vendor: 4,790 bytes, lines 1-9
1function AS(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var pu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ya(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function IS(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if(typeof e=="function"){var r=function n(){var s=!1;try{s=this instanceof n}catch{}return s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var Km={exports:{}},De={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var Jy;function PS(){if(Jy)return De;Jy=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.iterator;function v(R){return R===null||typeof R!="object"?null:(R=g&&R[g]||R["@@iterator"],typeof R=="function"?R:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,k={};function w(R,W,we){this.props=R,this.context=W,this.refs=k,this.updater=we||E}w.prototype.isReactComponent={},w.prototype.setState=function(R,W){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,W,"setState")},w.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function C(){}C.prototype=w.prototype;function _(R,W,we){this.props=R,this.context=W,this.refs=k,this.updater=we||E}var T=_.prototype=new C;T.constructor=_,N(T,w.prototype),T.isPureReactComponent=!0;var A=Array.isArray,I=Object.prototype.hasOwnProperty,M={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function $(R,W,we){var xe,_e={},J=null,me=null;if(W!=null)for(xe in W.ref!==void 0&&(me=W.ref),W.key!==void 0&&(J=""+W.key),W)I.call(W,xe)&&!D.hasOwnProperty(xe)&&(_e[xe]=W[xe]);var ye=arguments.length-2;if(ye===1)_e.children=we;else if(1<ye){for(var ve=Array(ye),$e=0;$e<ye;$e++)ve[$e]=arguments[$e+2];_e.children=ve}if(R&&R.defaultProps)for(xe in ye=R.defaultProps,ye)_e[xe]===void 0&&(_e[xe]=ye[xe]);return{$$typeof:t,type:R,key:J,ref:me,props:_e,_owner:M.current}}function j(R,W){return{$$typeof:t,type:R.type,key:W,ref:R.ref,props:R.props,_owner:R._owner}}function B(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function ee(R){var W={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(we){return W[we]})}var te=/\/+/g;function ne(R,W){return typeof R=="object"&&R!==null&&R.key!=null?ee(""+R.key):W.toString(36)}function Z(R,W,we,xe,_e){var J=typeof R;(J==="undefined"||J==="boolean")&&(R=null);var me=!1;if(R===null)me=!0;else switch(J){case"string":case"number":me=!0;break;case"object":switch(R.$$typeof){case t:case e:me=!0}}if(me)return me=R,_e=_e(me),R=xe===""?"."+ne(me,0):xe,A(_e)?(we="",R!=null&&(we=R.replace(te,"$&/")+"/"),Z(_e,W,we,"",function($e){return $e})):_e!=null&&(B(_e)&&(_e=j(_e,we+(!_e.key||me&&me.key===_e.key?"":(""+_e.key).replace(te,"$&/")+"/")+R)),W.pu
vendor: 5,582 bytes, lines 9-17
9sh(_e)),1;if(me=0,xe=xe===""?".":xe+":",A(R))for(var ye=0;ye<R.length;ye++){J=R[ye];var ve=xe+ne(J,ye);me+=Z(J,W,we,ve,_e)}else if(ve=v(R),typeof ve=="function")for(R=ve.call(R),ye=0;!(J=R.next()).done;)J=J.value,ve=xe+ne(J,ye++),me+=Z(J,W,we,ve,_e);else if(J==="object")throw W=String(R),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return me}function ae(R,W,we){if(R==null)return R;var xe=[],_e=0;return Z(R,xe,"","",function(J){return W.call(we,J,_e++)}),xe}function ke(R){if(R._status===-1){var W=R._result;W=W(),W.then(function(we){(R._status===0||R._status===-1)&&(R._status=1,R._result=we)},function(we){(R._status===0||R._status===-1)&&(R._status=2,R._result=we)}),R._status===-1&&(R._status=0,R._result=W)}if(R._status===1)return R._result.default;throw R._result}var se={current:null},V={transition:null},re={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:V,ReactCurrentOwner:M};function K(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:ae,forEach:function(R,W,we){ae(R,function(){W.apply(this,arguments)},we)},count:function(R){var W=0;return ae(R,function(){W++}),W},toArray:function(R){return ae(R,function(W){return W})||[]},only:function(R){if(!B(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},De.Component=w,De.Fragment=r,De.Profiler=s,De.PureComponent=_,De.StrictMode=n,De.Suspense=m,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,De.act=K,De.cloneElement=function(R,W,we){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var xe=N({},R.props),_e=R.key,J=R.ref,me=R._owner;if(W!=null){if(W.ref!==void 0&&(J=W.ref,me=M.current),W.key!==void 0&&(_e=""+W.key),R.type&&R.type.defaultProps)var ye=R.type.defaultProps;for(ve in W)I.call(W,ve)&&!D.hasOwnProperty(ve)&&(xe[ve]=W[ve]===void 0&&ye!==void 0?ye[ve]:W[ve])}var ve=arguments.length-2;if(ve===1)xe.children=we;else if(1<ve){ye=Array(ve);for(var $e=0;$e<ve;$e++)ye[$e]=arguments[$e+2];xe.children=ye}return{$$typeof:t,type:R.type,key:_e,ref:J,props:xe,_owner:me}},De.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:o,_context:R},R.Consumer=R},De.createElement=$,De.createFactory=function(R){var W=$.bind(null,R);return W.type=R,W},De.createRef=function(){return{current:null}},De.forwardRef=function(R){return{$$typeof:d,render:R}},De.isValidElement=B,De.lazy=function(R){return{$$typeof:p,_payload:{_status:-1,_result:R},_init:ke}},De.memo=function(R,W){return{$$typeof:h,type:R,compare:W===void 0?null:W}},De.startTransition=function(R){var W=V.transition;V.transition={};try{R()}finally{V.transition=W}},De.unstable_act=K,De.useCallback=function(R,W){return se.current.useCallback(R,W)},De.useContext=function(R){return se.current.useContext(R)},De.useDebugValue=function(){},De.useDeferredValue=function(R){return se.current.useDeferredValue(R)},De.useEffect=function(R,W){return se.current.useEffect(R,W)},De.useId=function(){return se.current.useId()},De.useImperativeHandle=function(R,W,we){return se.current.useImperativeHandle(R,W,we)},De.useInsertionEffect=function(R,W){return se.current.useInsertionEffect(R,W)},De.useLayoutEffect=function(R,W){return se.current.useLayoutEffect(R,W)},De.useMemo=function(R,W){return se.current.useMemo(R,W)},De.useReducer=function(R,W,we){return se.current.useReducer(R,W,we)},De.useRef=function(R){return se.current.useRef(R)},De.useState=function(R){return se.current.useState(R)},De.useSyncExternalStore=function(R,W,we){return se.current.useSyncExternalStore(R,W,we)},De.useTransition=function(){return se.current.useTransition()},De.version="18.3.1",De}var Ky;function Du(){return Ky||(Ky=1,Km.exports=PS()),Km.exports}var x=Du();const a=ya(x),PE=AS({__proto__:null,default:a},[x]);var Ac={},Qm={exports:{}},Kt={},Zm={exports:{}},Xm={};/** 10 * @license React 11 * scheduler.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var Qy;function OS(){return Qy||(Qy=1,function(t){function e(V,re){var K=V.length;V.push(re);e:for(;0<K;){var R=K-1>>>1,W=V[R];if(0<s(W,re))V[R]=re,V[K]=W,K=R;else break e}}function r(V){return V.length===0?null:V[0]}function n(V){if(V.length===0)return null;var re=V[0],K=V.pop();if(K!==re){V[0]=K;e:for(var R=0,W=V.length,we=W>>>1;R<we;){var xe=2*(R+1)-1,_e=V[xe],J=xe+1,me=V[J];if(0>s(_e,K))J<W&&0>s(me,_e)?(V[R]=me,V[J]=K,R=J):(V[R]=_e,V[xe]=K,R=xe);else if(J<W&&0>s(me,K))V[R]=me,V[J]=K,R=J;else break e}}return re}function s(V,re){var K=V.sortIndex-re.sortIndex;return K!==0?K:V.id-re.id}if(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 m=[],h=[],p=1,g=null,v=3,E=!1,N=!1,k=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(V){for(var re=r(h);re!==null;){if(re.callback===null)n(h);
vendor: 4,388 bytes, lines 17-25
17else if(re.startTime<=V)n(h),re.sortIndex=re.expirationTime,e(m,re);else break;re=r(h)}}function A(V){if(k=!1,T(V),!N)if(r(m)!==null)N=!0,ke(I);else{var re=r(h);re!==null&&se(A,re.startTime-V)}}function I(V,re){N=!1,k&&(k=!1,C($),$=-1),E=!0;var K=v;try{for(T(re),g=r(m);g!==null&&(!(g.expirationTime>re)||V&&!ee());){var R=g.callback;if(typeof R=="function"){g.callback=null,v=g.priorityLevel;var W=R(g.expirationTime<=re);re=t.unstable_now(),typeof W=="function"?g.callback=W:g===r(m)&&n(m),T(re)}else n(m);g=r(m)}if(g!==null)var we=!0;else{var xe=r(h);xe!==null&&se(A,xe.startTime-re),we=!1}return we}finally{g=null,v=K,E=!1}}var M=!1,D=null,$=-1,j=5,B=-1;function ee(){return!(t.unstable_now()-B<j)}function te(){if(D!==null){var V=t.unstable_now();B=V;var re=!0;try{re=D(!0,V)}finally{re?ne():(M=!1,D=null)}}else M=!1}var ne;if(typeof _=="function")ne=function(){_(te)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,ae=Z.port2;Z.port1.onmessage=te,ne=function(){ae.postMessage(null)}}else ne=function(){w(te,0)};function ke(V){D=V,M||(M=!0,ne())}function se(V,re){$=w(function(){V(t.unstable_now())},re)}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(V){V.callback=null},t.unstable_continueExecution=function(){N||E||(N=!0,ke(I))},t.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<V?Math.floor(1e3/V):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return r(m)},t.unstable_next=function(V){switch(v){case 1:case 2:case 3:var re=3;break;default:re=v}var K=v;v=re;try{return V()}finally{v=K}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(V,re){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var K=v;v=V;try{return re()}finally{v=K}},t.unstable_scheduleCallback=function(V,re,K){var R=t.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?R+K:R):K=R,V){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=K+W,V={id:p++,callback:re,priorityLevel:V,startTime:K,expirationTime:W,sortIndex:-1},K>R?(V.sortIndex=K,e(h,V),r(m)===null&&V===r(h)&&(k?(C($),$=-1):k=!0,se(A,K-R))):(V.sortIndex=W,e(m,V),N||E||(N=!0,ke(I))),V},t.unstable_shouldYield=ee,t.unstable_wrapCallback=function(V){var re=v;return function(){var K=v;v=re;try{return V.apply(this,arguments)}finally{v=K}}}}(Xm)),Xm}var Zy;function RS(){return Zy||(Zy=1,Zm.exports=OS()),Zm.exports}/** 18 * @license React 19 * react-dom.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var Xy;function DS(){if(Xy)return Kt;Xy=1;var t=Du(),e=RS();function r(i){for(var l="https://reactjs.org/docs/error-decoder.html?invariant="+i,u=1;u<arguments.length;u++)l+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+i+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n=new Set,s={};function o(i,l){c(i,l),c(i+"Capture",l)}function c(i,l){for(s[i]=l,i=0;i<l.length;i++)n.add(l[i])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,h=/^[: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]*$/,p={},g={};function v(i){return m.call(g,i)?!0:m.call(p,i)?!1:h.test(i)?g[i]=!0:(p[i]=!0,!1)}function E(i,l,u,f){if(u!==null&&u.type===0)return!1;switch(typeof l){case"function":case"symbol":return!0;case"boolean":return f?!1:u!==null?!u.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function N(i,l,u,f){if(l===null||typeof l>"u"||E(i,l,u,f))return!0;
vendor: 10,039 bytes, lines 25-29
25if(f)return!1;if(u!==null)switch(u.type){case 3:return!l;case 4:return l===!1;case 5:return isNaN(l);case 6:return isNaN(l)||1>l}return!1}function k(i,l,u,f,y,b,S){this.acceptsBooleans=l===2||l===3||l===4,this.attributeName=f,this.attributeNamespace=y,this.mustUseProperty=u,this.propertyName=i,this.type=l,this.sanitizeURL=b,this.removeEmptyString=S}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){w[i]=new k(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var l=i[0];w[l]=new k(l,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){w[i]=new k(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){w[i]=new k(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){w[i]=new k(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){w[i]=new k(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){w[i]=new k(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){w[i]=new k(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){w[i]=new k(i,5,!1,i.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function _(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var l=i.replace(C,_);w[l]=new k(l,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var l=i.replace(C,_);w[l]=new k(l,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var l=i.replace(C,_);w[l]=new k(l,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){w[i]=new k(i,1,!1,i.toLowerCase(),null,!1,!1)}),w.xlinkHref=new k("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){w[i]=new k(i,1,!1,i.toLowerCase(),null,!0,!0)});function T(i,l,u,f){var y=w.hasOwnProperty(l)?w[l]:null;(y!==null?y.type!==0:f||!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(N(l,u,y,f)&&(u=null),f||y===null?v(l)&&(u===null?i.removeAttribute(l):i.setAttribute(l,""+u)):y.mustUseProperty?i[y.propertyName]=u===null?y.type===3?!1:"":u:(l=y.attributeName,f=y.attributeNamespace,u===null?i.removeAttribute(l):(y=y.type,u=y===3||y===4&&u===!0?"":""+u,f?i.setAttributeNS(f,l,u):i.setAttribute(l,u))))}var A=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,I=Symbol.for("react.element"),M=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),$=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),B=Symbol.for("react.provider"),ee=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),ke=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),V=Symbol.iterator;function re(i){return i===null||typeof i!="object"?null:(i=V&&i[V]||i["@@iterator"],typeof i=="function"?i:null)}var K=Object.assign,R;function W(i){if(R===void 0)try{throw Error()}catch(u){var l=u.stack.trim().match(/\n( *(at )?)/);R=l&&l[1]||""}return` 26`+R+i}var we=!1;function xe(i,l){if(!i||we)return"";we=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(l)if(l=function(){throw Error()},Object.defineProperty(l.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(l,[])}catch(z){var f=z}Reflect.construct(i,[],l)}else{try{l.call()}catch(z){f=z}i.call(l.prototype)}else{try{throw Error()}catch(z){f=z}i()}}catch(z){if(z&&f&&typeof z.stack=="string"){for(var y=z.stack.split(` 27`),b=f.stack.split(` 28`),S=y.length-1,P=b.length-1;1<=S&&0<=P&&y[S]!==b[P];)P--;for(;1<=S&&0<=P;S--,P--)if(y[S]!==b[P]){if(S!==1||P!==1)do if(S--,P--,0>P||y[S]!==b[P]){var O=` 29`+y[S].replace(" at new "," at ");return i.displayName&&O.includes("<anonymous>")&&(O=O.replace("<anonymous>",i.displayName)),O}while(1<=S&&0<=P);break}}}finally{we=!1,Error.prepareStackTrace=u}return(i=i?i.displayName||i.name:"")?W(i):""}function _e(i){switch(i.tag){case 5:return W(i.type);case 16:return W("Lazy");case 13:return W("Suspense");case 19:return W("SuspenseList");case 0:case 2:case 15:return i=xe(i.type,!1),i;case 11:return i=xe(i.type.render,!1),i;case 1:return i=xe(i.type,!0),i;default:return""}}function J(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case D:return"Fragment";case M:return"Portal";case j:return"Profiler";case $:return"StrictMode";case ne:return"Suspense";case Z:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ee:return(i.displayName||"Context")+".Consumer";case B:return(i._context.displayName||"Context")+".Provider";case te:var l=i.render;return i=i.displayName,i||(i=l.displayName||l.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ae:return l=i.displayName||null,l!==null?l:J(i.type)||"Memo";case ke:l=i._payload,i=i._init;try{return J(i(l))}catch{}}return null}function me(i){var l=i.type;switch(i.tag){case 24:return"Cache";case 9:return(l.displayName||"Context")+".Consumer";case 10:return(l._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=l.render,i=i.displayName||i.name||"",l.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return l;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return J(l);case 8:return l===$?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l}return null}function ye(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function ve(i){var l=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function $e(i){var l=ve(i)?"checked":"value",u=Object.getOwnPropertyDescriptor(i.constructor.prototype,l),f=""+i[l];if(!i.hasOwnProperty(l)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var y=u.get,b=u.set;return Object.defineProperty(i,l,{configurable:!0,get:function(){return y.call(this)},set:function(S){f=""+S,b.call(this,S)}}),Object.defineProperty(i,l,{enumerable:u.enumerable}),{getValue:function(){return f},setValue:function(S){f=""+S},stopTracking:function(){i._valueTracker=null,delete i[l]}}}}function Ye(i){i._valueTracker||(i._valueTracker=$e(i))}function Be(i){if(!i)return!1;var l=i._valueTracker;if(!l)return!0;var u=l.getValue(),f="";return i&&(f=ve(i)?i.checked?"true":"false":i.value),i=f,i!==u?(l.setValue(i),!0):!1}function Le(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}function Je(i,l){var u=l.checked;return K({},l,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??i._wrapperState.initialChecked})}function Ue(i,l){var u=l.defaultValue==null?"":l.defaultValue,f=l.checked!=null?l.checked:l.defaultChecked;u=ye(l.value!=null?l.value:u),i._wrapperState={initialChecked:f,initialValue:u,controlled:l.type==="checkbox"||l.type==="radio"?l.checked!=null:l.value!=null}}function At(i,l){l=l.checked,l!=null&&T(i,"checked",l,!1)}function Fr(i,l){At(i,l);var u=ye(l.value),f=l.type;if(u!=null)f==="number"?(u===0&&i.value===""||i.value!=u)&&(i.value=""+u):i.value!==""+u&&(i.value=""+u);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}l.hasOwnProperty("value")?gt(i,l.type,u):l.hasOwnProperty("defaultValue")&>(i,l.type,ye(l.defaultValue)),l.checked==null&&l.defaultChecked!=null&&(i.defaultChecked=!!l.defaultChecked)}function dt(i,l,u){if(l.hasOwnProperty("value")||l.hasOwnProperty("defaultValue")){var f=l.type;if(!(f!=="submit"&&f!=="reset"||l.value!==void 0&&l.value!==null))return;l=""+i._wrapperState.initialValue,u||l===i.value||(i.value=l),i.defaultValue=l}u=i.name,u!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,u!==""&&(i.name=u)}function gt(i,l,u){(l!=="number"||Le(i.ownerDocument)!==i)&&(u==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+u&&(i.defaultValue=""+u))}var zt=Array.isArray;function Qr(i,l,u,f){if(i=i.options,l){l={};for(var y=0;y<u.length;y++)l["$"+u[y]]=!0;for(u=0;
vendor: 4,445 bytes, line 29
29u<i.length;u++)y=l.hasOwnProperty("$"+i[u].value),i[u].selected!==y&&(i[u].selected=y),y&&f&&(i[u].defaultSelected=!0)}else{for(u=""+ye(u),l=null,y=0;y<i.length;y++){if(i[y].value===u){i[y].selected=!0,f&&(i[y].defaultSelected=!0);return}l!==null||i[y].disabled||(l=i[y])}l!==null&&(l.selected=!0)}}function cs(i,l){if(l.dangerouslySetInnerHTML!=null)throw Error(r(91));return K({},l,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Li(i,l){var u=l.value;if(u==null){if(u=l.children,l=l.defaultValue,u!=null){if(l!=null)throw Error(r(92));if(zt(u)){if(1<u.length)throw Error(r(93));u=u[0]}l=u}l==null&&(l=""),u=l}i._wrapperState={initialValue:ye(u)}}function $t(i,l){var u=ye(l.value),f=ye(l.defaultValue);u!=null&&(u=""+u,u!==i.value&&(i.value=u),l.defaultValue==null&&i.defaultValue!==u&&(i.defaultValue=u)),f!=null&&(i.defaultValue=""+f)}function lr(i){var l=i.textContent;l===i._wrapperState.initialValue&&l!==""&&l!==null&&(i.value=l)}function us(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Fi(i,l){return i==null||i==="http://www.w3.org/1999/xhtml"?us(l):i==="http://www.w3.org/2000/svg"&&l==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Tn,cg=function(i){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(l,u,f,y){MSApp.execUnsafeLocalFunction(function(){return i(l,u,f,y)})}:i}(function(i,l){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=l;else{for(Tn=Tn||document.createElement("div"),Tn.innerHTML="<svg>"+l.valueOf().toString()+"</svg>",l=Tn.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;l.firstChild;)i.appendChild(l.firstChild)}});function ji(i,l){if(l){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=l;return}}i.textContent=l}var Ui={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},R1=["Webkit","ms","Moz","O"];Object.keys(Ui).forEach(function(i){R1.forEach(function(l){l=l+i.charAt(0).toUpperCase()+i.substring(1),Ui[l]=Ui[i]})});function ug(i,l,u){return l==null||typeof l=="boolean"||l===""?"":u||typeof l!="number"||l===0||Ui.hasOwnProperty(i)&&Ui[i]?(""+l).trim():l+"px"}function dg(i,l){i=i.style;for(var u in l)if(l.hasOwnProperty(u)){var f=u.indexOf("--")===0,y=ug(u,l[u],f);u==="float"&&(u="cssFloat"),f?i.setProperty(u,y):i[u]=y}}var D1=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ld(i,l){if(l){if(D1[i]&&(l.children!=null||l.dangerouslySetInnerHTML!=null))throw Error(r(137,i));if(l.dangerouslySetInnerHTML!=null){if(l.children!=null)throw Error(r(60));if(typeof l.dangerouslySetInnerHTML!="object"||!("__html"in l.dangerouslySetInnerHTML))throw Error(r(61))}if(l.style!=null&&typeof l.style!="object")throw Error(r(62))}}function cd(i,l){if(i.indexOf("-")===-1)return typeof l.is=="string";switch(i){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 ud=null;function dd(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var md=null,ds=null,ms=null;function mg(i){if(i=oo(i)){if(typeof md!="function")throw Error(r(280));var l=i.stateNode;l&&(l=Vl(l),md(i.stateNode,i.type,l))}}function fg(i){ds?ms?ms.push(i):ms=[i]:ds=i}function hg(){if(ds){var i=ds,l=ms;if(ms=ds=null,mg(i),l)for(i=0;i<l.length;i++)mg(l[i])}}function pg(i,l){return i(l)}function gg(){}var fd=!1;function yg(i,l,u){if(fd)return i(l,u);fd=!0;try{return pg(i,l,u)}finally{fd=!1,(ds!==null||ms!==null)&&(gg(),hg())}}function zi(i,l){var u=i.stateNode;if(u===null)return null;var f=Vl(u);
vendor: 28,027 bytes, line 29
29if(f===null)return null;u=f[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,l,typeof u));return u}var hd=!1;if(d)try{var $i={};Object.defineProperty($i,"passive",{get:function(){hd=!0}}),window.addEventListener("test",$i,$i),window.removeEventListener("test",$i,$i)}catch{hd=!1}function M1(i,l,u,f,y,b,S,P,O){var z=Array.prototype.slice.call(arguments,3);try{l.apply(u,z)}catch(G){this.onError(G)}}var Bi=!1,wl=null,kl=!1,pd=null,L1={onError:function(i){Bi=!0,wl=i}};function F1(i,l,u,f,y,b,S,P,O){Bi=!1,wl=null,M1.apply(L1,arguments)}function j1(i,l,u,f,y,b,S,P,O){if(F1.apply(this,arguments),Bi){if(Bi){var z=wl;Bi=!1,wl=null}else throw Error(r(198));kl||(kl=!0,pd=z)}}function wa(i){var l=i,u=i;if(i.alternate)for(;l.return;)l=l.return;else{i=l;do l=i,(l.flags&4098)!==0&&(u=l.return),i=l.return;while(i)}return l.tag===3?u:null}function vg(i){if(i.tag===13){var l=i.memoizedState;if(l===null&&(i=i.alternate,i!==null&&(l=i.memoizedState)),l!==null)return l.dehydrated}return null}function bg(i){if(wa(i)!==i)throw Error(r(188))}function U1(i){var l=i.alternate;if(!l){if(l=wa(i),l===null)throw Error(r(188));return l!==i?null:i}for(var u=i,f=l;;){var y=u.return;if(y===null)break;var b=y.alternate;if(b===null){if(f=y.return,f!==null){u=f;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===u)return bg(y),i;if(b===f)return bg(y),l;b=b.sibling}throw Error(r(188))}if(u.return!==f.return)u=y,f=b;else{for(var S=!1,P=y.child;P;){if(P===u){S=!0,u=y,f=b;break}if(P===f){S=!0,f=y,u=b;break}P=P.sibling}if(!S){for(P=b.child;P;){if(P===u){S=!0,u=b,f=y;break}if(P===f){S=!0,f=b,u=y;break}P=P.sibling}if(!S)throw Error(r(189))}}if(u.alternate!==f)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:l}function Eg(i){return i=U1(i),i!==null?xg(i):null}function xg(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var l=xg(i);if(l!==null)return l;i=i.sibling}return null}var wg=e.unstable_scheduleCallback,kg=e.unstable_cancelCallback,z1=e.unstable_shouldYield,$1=e.unstable_requestPaint,ot=e.unstable_now,B1=e.unstable_getCurrentPriorityLevel,gd=e.unstable_ImmediatePriority,Ng=e.unstable_UserBlockingPriority,Nl=e.unstable_NormalPriority,W1=e.unstable_LowPriority,Sg=e.unstable_IdlePriority,Sl=null,jr=null;function V1(i){if(jr&&typeof jr.onCommitFiberRoot=="function")try{jr.onCommitFiberRoot(Sl,i,void 0,(i.current.flags&128)===128)}catch{}}var Er=Math.clz32?Math.clz32:G1,q1=Math.log,H1=Math.LN2;function G1(i){return i>>>=0,i===0?32:31-(q1(i)/H1|0)|0}var _l=64,Cl=4194304;function Wi(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function Tl(i,l){var u=i.pendingLanes;if(u===0)return 0;var f=0,y=i.suspendedLanes,b=i.pingedLanes,S=u&268435455;if(S!==0){var P=S&~y;P!==0?f=Wi(P):(b&=S,b!==0&&(f=Wi(b)))}else S=u&~y,S!==0?f=Wi(S):b!==0&&(f=Wi(b));if(f===0)return 0;if(l!==0&&l!==f&&(l&y)===0&&(y=f&-f,b=l&-l,y>=b||y===16&&(b&4194240)!==0))return l;if((f&4)!==0&&(f|=u&16),l=i.entangledLanes,l!==0)for(i=i.entanglements,l&=f;0<l;)u=31-Er(l),y=1<<u,f|=i[u],l&=~y;return f}function Y1(i,l){switch(i){case 1:case 2:case 4:return l+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function J1(i,l){for(var u=i.suspendedLanes,f=i.pingedLanes,y=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-Er(b),P=1<<S,O=y[S];O===-1?((P&u)===0||(P&f)!==0)&&(y[S]=Y1(P,l)):O<=l&&(i.expiredLanes|=P),b&=~P}}function yd(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function _g(){var i=_l;return _l<<=1,(_l&4194240)===0&&(_l=64),i}function vd(i){for(var l=[],u=0;31>u;u++)l.push(i);return l}function Vi(i,l,u){i.pendingLanes|=l,l!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,l=31-Er(l),i[l]=u}function K1(i,l){var u=i.pendingLanes&~l;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=l,i.mutableReadLanes&=l,i.entangledLanes&=l,l=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<u;){var y=31-Er(u),b=1<<y;l[y]=0,f[y]=-1,i[y]=-1,u&=~b}}function bd(i,l){var u=i.entangledLanes|=l;for(i=i.entanglements;u;){var f=31-Er(u),y=1<<f;y&l|i[f]&l&&(i[f]|=l),u&=~y}}var qe=0;function Cg(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Tg,Ed,Ag,Ig,Pg,xd=!1,Al=[],An=null,In=null,Pn=null,qi=new Map,Hi=new Map,On=[],Q1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Og(i,l){switch(i){case"focusin":case"focusout":An=null;break;case"dragenter":case"dragleave":In=null;break;case"mouseover":case"mouseout":Pn=null;break;case"pointerover":case"pointerout":qi.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":Hi.delete(l.pointerId)}}function Gi(i,l,u,f,y,b){return i===null||i.nativeEvent!==b?(i={blockedOn:l,domEventName:u,eventSystemFlags:f,nativeEvent:b,targetContainers:[y]},l!==null&&(l=oo(l),l!==null&&Ed(l)),i):(i.eventSystemFlags|=f,l=i.targetContainers,y!==null&&l.indexOf(y)===-1&&l.push(y),i)}function Z1(i,l,u,f,y){switch(l){case"focusin":return An=Gi(An,i,l,u,f,y),!0;case"dragenter":return In=Gi(In,i,l,u,f,y),!0;case"mouseover":return Pn=Gi(Pn,i,l,u,f,y),!0;case"pointerover":var b=y.pointerId;return qi.set(b,Gi(qi.get(b)||null,i,l,u,f,y)),!0;case"gotpointercapture":return b=y.pointerId,Hi.set(b,Gi(Hi.get(b)||null,i,l,u,f,y)),!0}return!1}function Rg(i){var l=ka(i.target);if(l!==null){var u=wa(l);if(u!==null){if(l=u.tag,l===13){if(l=vg(u),l!==null){i.blockedOn=l,Pg(i.priority,function(){Ag(u)});return}}else if(l===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Il(i){if(i.blockedOn!==null)return!1;for(var l=i.targetContainers;0<l.length;){var u=kd(i.domEventName,i.eventSystemFlags,l[0],i.nativeEvent);if(u===null){u=i.nativeEvent;var f=new u.constructor(u.type,u);ud=f,u.target.dispatchEvent(f),ud=null}else return l=oo(u),l!==null&&Ed(l),i.blockedOn=u,!1;l.shift()}return!0}function Dg(i,l,u){Il(i)&&u.delete(l)}function X1(){xd=!1,An!==null&&Il(An)&&(An=null),In!==null&&Il(In)&&(In=null),Pn!==null&&Il(Pn)&&(Pn=null),qi.forEach(Dg),Hi.forEach(Dg)}function Yi(i,l){i.blockedOn===l&&(i.blockedOn=null,xd||(xd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,X1)))}function Ji(i){function l(y){return Yi(y,i)}if(0<Al.length){Yi(Al[0],i);for(var u=1;u<Al.length;u++){var f=Al[u];f.blockedOn===i&&(f.blockedOn=null)}}for(An!==null&&Yi(An,i),In!==null&&Yi(In,i),Pn!==null&&Yi(Pn,i),qi.forEach(l),Hi.forEach(l),u=0;u<On.length;u++)f=On[u],f.blockedOn===i&&(f.blockedOn=null);for(;0<On.length&&(u=On[0],u.blockedOn===null);)Rg(u),u.blockedOn===null&&On.shift()}var fs=A.ReactCurrentBatchConfig,Pl=!0;function eN(i,l,u,f){var y=qe,b=fs.transition;fs.transition=null;try{qe=1,wd(i,l,u,f)}finally{qe=y,fs.transition=b}}function tN(i,l,u,f){var y=qe,b=fs.transition;fs.transition=null;try{qe=4,wd(i,l,u,f)}finally{qe=y,fs.transition=b}}function wd(i,l,u,f){if(Pl){var y=kd(i,l,u,f);if(y===null)zd(i,l,f,Ol,u),Og(i,f);else if(Z1(y,i,l,u,f))f.stopPropagation();else if(Og(i,f),l&4&&-1<Q1.indexOf(i)){for(;y!==null;){var b=oo(y);if(b!==null&&Tg(b),b=kd(i,l,u,f),b===null&&zd(i,l,f,Ol,u),b===y)break;y=b}y!==null&&f.stopPropagation()}else zd(i,l,f,null,u)}}var Ol=null;function kd(i,l,u,f){if(Ol=null,i=dd(f),i=ka(i),i!==null)if(l=wa(i),l===null)i=null;else if(u=l.tag,u===13){if(i=vg(l),i!==null)return i;i=null}else if(u===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;i=null}else l!==i&&(i=null);return Ol=i,null}function Mg(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(B1()){case gd:return 1;case Ng:return 4;case Nl:case W1:return 16;case Sg:return 536870912;default:return 16}default:return 16}}var Rn=null,Nd=null,Rl=null;function Lg(){if(Rl)return Rl;var i,l=Nd,u=l.length,f,y="value"in Rn?Rn.value:Rn.textContent,b=y.length;for(i=0;i<u&&l[i]===y[i];i++);var S=u-i;for(f=1;f<=S&&l[u-f]===y[b-f];f++);return Rl=y.slice(i,1<f?1-f:void 0)}function Dl(i){var l=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&l===13&&(i=13)):i=l,i===10&&(i=13),32<=i||i===13?i:0}function Ml(){return!0}function Fg(){return!1}function er(i){function l(u,f,y,b,S){this._reactName=u,this._targetInst=y,this.type=f,this.nativeEvent=b,this.target=S,this.currentTarget=null;for(var P in i)i.hasOwnProperty(P)&&(u=i[P],this[P]=u?u(b):b[P]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ml:Fg,this.isPropagationStopped=Fg,this}return K(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ml)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ml)},persist:function(){},isPersistent:Ml}),l}var hs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sd=er(hs),Ki=K({},hs,{view:0,detail:0}),rN=er(Ki),_d,Cd,Qi,Ll=K({},Ki,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ad,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Qi&&(Qi&&i.type==="mousemove"?(_d=i.screenX-Qi.screenX,Cd=i.screenY-Qi.screenY):Cd=_d=0,Qi=i),_d)},movementY:function(i){return"movementY"in i?i.movementY:Cd}}),jg=er(Ll),nN=K({},Ll,{dataTransfer:0}),aN=er(nN),sN=K({},Ki,{relatedTarget:0}),Td=er(sN),iN=K({},hs,{animationName:0,elapsedTime:0,pseudoElement:0}),oN=er(iN),lN=K({},hs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),cN=er(lN),uN=K({},hs,{data:0}),Ug=er(uN),dN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},mN={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"},fN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hN(i){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(i):(i=fN[i])?!!l[i]:!1}function Ad(){return hN}var pN=K({},Ki,{key:function(i){if(i.key){var l=dN[i.key]||i.key;if(l!=="Unidentified")return l}return i.type==="keypress"?(i=Dl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?mN[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ad,charCode:function(i){return i.type==="keypress"?Dl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Dl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),gN=er(pN),yN=K({},Ll,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zg=er(yN),vN=K({},Ki,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ad}),bN=er(vN),EN=K({},hs,{propertyName:0,elapsedTime:0,pseudoElement:0}),xN=er(EN),wN=K({},Ll,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),kN=er(wN),NN=[9,13,27,32],Id=d&&"CompositionEvent"in window,Zi=null;d&&"documentMode"in document&&(Zi=document.documentMode);var SN=d&&"TextEvent"in window&&!Zi,$g=d&&(!Id||Zi&&8<Zi&&11>=Zi),Bg=" ",Wg=!1;function Vg(i,l){switch(i){case"keyup":return NN.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ps=!1;function _N(i,l){switch(i){case"compositionend":return qg(l);case"keypress":return l.which!==32?null:(Wg=!0,Bg);case"textInput":return i=l.data,i===Bg&&Wg?null:i;default:return null}}function CN(i,l){if(ps)return i==="compositionend"||!Id&&Vg(i,l)?(i=Lg(),Rl=Nd=Rn=null,ps=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return $g&&l.locale!=="ko"?null:l.data;default:return null}}var TN={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 Hg(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l==="input"?!!TN[i.type]:l==="textarea"}function Gg(i,l,u,f){fg(f),l=$l(l,"onChange"),0<l.length&&(u=new Sd("onChange","change",null,u,f),i.push({event:u,listeners:l}))}var Xi=null,eo=null;function AN(i){d0(i,0)}function Fl(i){var l=Es(i);if(Be(l))return i}function IN(i,l){if(i==="change")return l}var Yg=!1;if(d){var Pd;if(d){var Od="oninput"in document;if(!Od){var Jg=document.createElement("div");Jg.setAttribute("oninput","return;"),Od=typeof Jg.oninput=="function"}Pd=Od}else Pd=!1;Yg=Pd&&(!document.documentMode||9<document.documentMode)}function Kg(){Xi&&(Xi.detachEvent("onpropertychange",Qg),eo=Xi=null)}function Qg(i){if(i.propertyName==="value"&&Fl(eo)){var l=[];Gg(l,eo,i,dd(i)),yg(AN,l)}}function PN(i,l,u){i==="focusin"?(Kg(),Xi=l,eo=u,Xi.attachEvent("onpropertychange",Qg)):i==="focusout"&&Kg()}function ON(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Fl(eo)}function RN(i,l){if(i==="click")return Fl(l)}function DN(i,l){if(i==="input"||i==="change")return Fl(l)}function MN(i,l){return i===l&&(i!==0||1/i===1/l)||i!==i&&l!==l}var xr=typeof Object.is=="function"?Object.is:MN;function to(i,l){if(xr(i,l))return!0;if(typeof i!="object"||i===null||typeof l!="object"||l===null)return!1;var u=Object.keys(i),f=Object.keys(l);if(u.length!==f.length)return!1;for(f=0;f<u.length;f++){var y=u[f];if(!m.call(l,y)||!xr(i[y],l[y]))return!1}return!0}function Zg(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Xg(i,l){var u=Zg(i);i=0;for(var f;u;){if(u.nodeType===3){if(f=i+u.textContent.length,i<=l&&f>=l)return{node:u,offset:l-i};i=f}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Zg(u)}}function e0(i,l){return i&&l?i===l?!0:i&&i.nodeType===3?!1:l&&l.nodeType===3?e0(i,l.parentNode):"contains"in i?i.contains(l):i.compareDocumentPosition?!!(i.compareDocumentPosition(l)&16):!1:!1}function t0(){for(var i=window,l=Le();l instanceof i.HTMLIFrameElement;){try{var u=typeof l.contentWindow.location.href=="string"}catch{u=!1}if(u)i=l.contentWindow;else break;l=Le(i.document)}return l}function Rd(i){var l=i&&i.nodeName&&i.nodeName.toLowerCase();return l&&(l==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||l==="textarea"||i.contentEditable==="true")}function LN(i){var l=t0(),u=i.focusedElem,f=i.selectionRange;if(l!==u&&u&&u.ownerDocument&&e0(u.ownerDocument.documentElement,u)){if(f!==null&&Rd(u)){if(l=f.start,i=f.end,i===void 0&&(i=l),"selectionStart"in u)u.selectionStart=l,u.selectionEnd=Math.min(i,u.value.length);else if(i=(l=u.ownerDocument||document)&&l.defaultView||window,i.getSelection){i=i.getSelection();var y=u.textContent.length,b=Math.min(f.start,y);f=f.end===void 0?b:Math.min(f.end,y),!i.extend&&b>f&&(y=f,f=b,b=y),y=Xg(u,b);var S=Xg(u,f);y&&S&&(i.rangeCount!==1||i.anchorNode!==y.node||i.anchorOffset!==y.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(l=l.createRange(),l.setStart(y.node,y.offset),i.removeAllRanges(),b>f?(i.addRange(l),i.extend(S.node,S.offset)):(l.setEnd(S.node,S.offset),i.addRange(l)))}}for(l=[],i=u;i=i.parentNode;)i.nodeType===1&&l.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<l.length;u++)i=l[u],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var FN=d&&"documentMode"in document&&11>=document.documentMode,gs=null,Dd=null,ro=null,Md=!1;function r0(i,l,u){var f=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Md||gs==null||gs!==Le(f)||(f=gs,"selectionStart"in f&&Rd(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),ro&&to(ro,f)||(ro=f,f=$l(Dd,"onSelect"),0<f.length&&(l=new Sd("onSelect","select",null,l,u),i.push({event:l,listeners:f}),l.target=gs)))}function jl(i,l){var u={};return u[i.toLowerCase()]=l.toLowerCase(),u["Webkit"+i]="webkit"+l,u["Moz"+i]="moz"+l,u}var ys={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionend:jl("Transition","TransitionEnd")},Ld={},n0={};d&&(n0=document.createElement("div").style,"AnimationEvent"in window||(delete ys.animationend.animation,delete ys.animationiteration.animation,delete ys.animationstart.animation),"TransitionEvent"in window||delete ys.transitionend.transition);function Ul(i){if(Ld[i])return Ld[i];if(!ys[i])return i;var l=ys[i],u;for(u in l)if(l.hasOwnProperty(u)&&u in n0)return Ld[i]=l[u];return i}var a0=Ul("animationend"),s0=Ul("animationiteration"),i0=Ul("animationstart"),o0=Ul("transitionend"),l0=new Map,c0="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Dn(i,l){l0.set(i,l),o(l,[i])}for(var Fd=0;Fd<c0.length;Fd++){var jd=c0[Fd],jN=jd.toLowerCase(),UN=jd[0].toUpperCase()+jd.slice(1);Dn(jN,"on"+UN)}Dn(a0,"onAnimationEnd"),Dn(s0,"onAnimationIteration"),Dn(i0,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(o0,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var no="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(" "),zN=new Set("cancel close invalid load scroll toggle".split(" ").concat(no));function u0(i,l,u){var f=i.type||"unknown-event";i.currentTarget=u,j1(f,l,void 0,i),i.currentTarget=null}function d0(i,l){l=(l&4)!==0;for(var u=0;u<i.length;u++){var f=i[u],y=f.event;f=f.listeners;e:{var b=void 0;if(l)for(var S=f.length-1;0<=S;S--){var P=f[S],O=P.instance,z=P.currentTarget;if(P=P.listener,O!==b&&y.isPropagationStopped())break e;u0(y,P,z),b=O}else for(S=0;S<f.length;S++){if(P=f[S],O=P.instance,z=P.currentTarget,P=P.listener,O!==b&&y.isPropagationStopped())break e;u0(y,P,z),b=O}}}if(kl)throw i=pd,kl=!1,pd=null,i}function Ke(i,l){var u=l[Hd];u===void 0&&(u=l[Hd]=new Set);var f=i+"__bubble";u.has(f)||(m0(l,i,2,!1),u.add(f))}function Ud(i,l,u){var f=0;l&&(f|=4),m0(u,i,f,l)}var zl="_reactListening"+Math.random().toString(36).slice(2);function ao(i){if(!i[zl]){i[zl]=!0,n.forEach(function(u){u!=="selectionchange"&&(zN.has(u)||Ud(u,!1,i),Ud(u,!0,i))});var l=i.nodeType===9?i:i.ownerDocument;l===null||l[zl]||(l[zl]=!0,Ud("selectionchange",!1,l))}}function m0(i,l,u,f){switch(Mg(l)){case 1:var y=eN;break;case 4:y=tN;break;default:y=wd}u=y.bind(null,l,u,i),y=void 0,!hd||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(y=!0),f?y!==void 0?i.addEventListener(l,u,{capture:!0,passive:y}):i.addEventListener(l,u,!0):y!==void 0?i.addEventListener(l,u,{passive:y}):i.addEventListener(l,u,!1)}function zd(i,l,u,f,y){var b=f;if((l&1)===0&&(l&2)===0&&f!==null)e:for(;;){if(f===null)return;var S=f.tag;if(S===3||S===4){var P=f.stateNode.containerInfo;if(P===y||P.nodeType===8&&P.parentNode===y)break;if(S===4)for(S=f.return;S!==null;){var O=S.tag;if((O===3||O===4)&&(O=S.stateNode.containerInfo,O===y||O.nodeType===8&&O.parentNode===y))return;S=S.return}for(;P!==null;){if(S=ka(P),S===null)return;if(O=S.tag,O===5||O===6){f=b=S;continue e}P=P.parentNode}}f=f.return}yg(function(){var z=b,G=dd(u),Y=[];e:{var H=l0.get(i);if(H!==void 0){var ie=Sd,de=i;switch(i){case"keypress":if(Dl(u)===0)break e;case"keydown":case"keyup":ie=gN;break;case"focusin":de="focus",ie=Td;break;case"focusout":de="blur",ie=Td;break;case"beforeblur":case"afterblur":ie=Td;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ie=jg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=aN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=bN;break;case a0:case s0:case i0:ie=oN;break;case o0:ie=xN;break;case"scroll":ie=rN;break;case"wheel":ie=kN;break;case"copy":case"cut":case"paste":ie=cN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=zg}var fe=(l&4)!==0,lt=!fe&&i==="scroll",F=fe?H!==null?H+"Capture":null:H;fe=[];for(var L=z,U;L!==null;){U=L;var Q=U.stateNode;if(U.tag===5&&Q!==null&&(U=Q,F!==null&&(Q=zi(L,F),Q!=null&&fe.push(so(L,Q,U)))),lt)break;L=L.return}0<fe.length&&(H=new ie(H,de,null,u,G),Y.push({event:H,listeners:fe}))}}if((l&7)===0){e:{if(H=i==="mouseover"||i==="pointerover",ie=i==="mouseout"||i==="pointerout",H&&u!==ud&&(de=u.relatedTarget||u.fromElement)&&(ka(de)||de[Zr]))break e;if((ie||H)&&(H=G.window===G?G:(H=G.ownerDocument)?H.defaultView||H.parentWindow:window,ie?(de=u.relatedTarget||u.toElement,ie=z,de=de?ka(de):null,de!==null&&(lt=wa(de),de!==lt||de.tag!==5&&de.tag!==6)&&(de=null)):(ie=null,de=z),ie!==de)){if(fe=jg,Q="onMouseLeave",F="onMouseEnter",L="mouse",(i==="pointerout"||i==="pointerover")&&(fe=zg,Q="onPointerLeave",F="onPointerEnter",L="pointer"),lt=ie==null?H:Es(ie),U=de==null?H:Es(de),H=new fe(Q,L+"leave",ie,u,G),H.target=lt,H.relatedTarget=U,Q=null,ka(G)===z&&(fe=new fe(F,L+"enter",de,u,G),fe.target=U,fe.relatedTarget=lt,Q=fe),lt=Q,ie&&de)t:{for(fe=ie,F=de,L=0,U=fe;U;U=vs(U))L++;for(U=0,Q=F;Q;Q=vs(Q))U++;for(;0<L-U;)fe=vs(fe),L--;for(;0<U-L;)F=vs(F),U--;for(;L--;){if(fe===F||F!==null&&fe===F.alternate)break t;fe=vs(fe),F=vs(F)}fe=null}else fe=null;ie!==null&&f0(Y,H,ie,fe,!1),de!==null&<!==null&&f0(Y,lt,de,fe,!0)}}e:{if(H=z?Es(z):window,ie=H.nodeName&&H.nodeName.toLowerCase(),ie==="select"||ie==="input"&&H.type==="file")var he=IN;else if(Hg(H))if(Yg)he=DN;else{he=ON;var be=PN}else(ie=H.nodeName)&&ie.toLowerCase()==="input"&&(H.type==="checkbox"||H.type==="radio")&&(he=RN);if(he&&(he=he(i,z))){Gg(Y,he,u,G);break e}be&&be(i,H,z),i==="focusout"&&(be=H._wrapperState)&&be.controlled&&H.type==="number"&>(H,"number",H.value)}switch(be=z?Es(z):window,i){case"focusin":(Hg(be)||be.contentEditable==="true")&&(gs=be,Dd=z,ro=null);break;case"focusout":ro=Dd=gs=null;break;case"mousedown":Md=!0;break;case"contextmenu":case"mouseup":case"dragend":Md=!1,r0(Y,u,G);break;case"selectionchange":if(FN)break;case"keydown":case"keyup":r0(Y,u,G)}var Ee;if(Id)e:{switch(i){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else ps?Vg(i,u)&&(Se="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Se="onCompositionStart");Se&&($g&&u.locale!=="ko"&&(ps||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&ps&&(Ee=Lg()):(Rn=G,Nd="value"in Rn?Rn.value:Rn.textContent,ps=!0)),be=$l(z,Se),0<be.length&&(Se=new Ug(Se,i,null,u,G),Y.push({event:Se,listeners:be}),Ee?Se.data=Ee:(Ee=qg(u),Ee!==null&&(Se.data=Ee)))),(Ee=SN?_N(i,u):CN(i,u))&&(z=$l(z,"onBeforeInput"),0<z.length&&(G=new Ug("onBeforeInput","beforeinput",null,u,G),Y.push({event:G,listeners:z}),G.data=Ee))}d0(Y,l)})}function so(i,l,u){return{instance:i,listener:l,currentTarget:u}}function $l(i,l){for(var u=l+"Capture",f=[];i!==null;){var y=i,b=y.stateNode;y.tag===5&&b!==null&&(y=b,b=zi(i,u),b!=null&&f.unshift(so(i,b,y)),b=zi(i,l),b!=null&&f.pu
vendor: 6,685 bytes, lines 29-30
29sh(so(i,b,y))),i=i.return}return f}function vs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function f0(i,l,u,f,y){for(var b=l._reactName,S=[];u!==null&&u!==f;){var P=u,O=P.alternate,z=P.stateNode;if(O!==null&&O===f)break;P.tag===5&&z!==null&&(P=z,y?(O=zi(u,b),O!=null&&S.unshift(so(u,O,P))):y||(O=zi(u,b),O!=null&&S.push(so(u,O,P)))),u=u.return}S.length!==0&&i.push({event:l,listeners:S})}var $N=/\r\n?/g,BN=/\u0000|\uFFFD/g;function h0(i){return(typeof i=="string"?i:""+i).replace($N,` 30`).replace(BN,"")}function Bl(i,l,u){if(l=h0(l),h0(i)!==l&&u)throw Error(r(425))}function Wl(){}var $d=null,Bd=null;function Wd(i,l){return i==="textarea"||i==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Vd=typeof setTimeout=="function"?setTimeout:void 0,WN=typeof clearTimeout=="function"?clearTimeout:void 0,p0=typeof Promise=="function"?Promise:void 0,VN=typeof queueMicrotask=="function"?queueMicrotask:typeof p0<"u"?function(i){return p0.resolve(null).then(i).catch(qN)}:Vd;function qN(i){setTimeout(function(){throw i})}function qd(i,l){var u=l,f=0;do{var y=u.nextSibling;if(i.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"){if(f===0){i.removeChild(y),Ji(l);return}f--}else u!=="$"&&u!=="$?"&&u!=="$!"||f++;u=y}while(u);Ji(l)}function Mn(i){for(;i!=null;i=i.nextSibling){var l=i.nodeType;if(l===1||l===3)break;if(l===8){if(l=i.data,l==="$"||l==="$!"||l==="$?")break;if(l==="/$")return null}}return i}function g0(i){i=i.previousSibling;for(var l=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"){if(l===0)return i;l--}else u==="/$"&&l++}i=i.previousSibling}return null}var bs=Math.random().toString(36).slice(2),Ur="__reactFiber$"+bs,io="__reactProps$"+bs,Zr="__reactContainer$"+bs,Hd="__reactEvents$"+bs,HN="__reactListeners$"+bs,GN="__reactHandles$"+bs;function ka(i){var l=i[Ur];if(l)return l;for(var u=i.parentNode;u;){if(l=u[Zr]||u[Ur]){if(u=l.alternate,l.child!==null||u!==null&&u.child!==null)for(i=g0(i);i!==null;){if(u=i[Ur])return u;i=g0(i)}return l}i=u,u=i.parentNode}return null}function oo(i){return i=i[Ur]||i[Zr],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Es(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(r(33))}function Vl(i){return i[io]||null}var Gd=[],xs=-1;function Ln(i){return{current:i}}function Qe(i){0>xs||(i.current=Gd[xs],Gd[xs]=null,xs--)}function He(i,l){xs++,Gd[xs]=i.current,i.current=l}var Fn={},Dt=Ln(Fn),qt=Ln(!1),Na=Fn;function ws(i,l){var u=i.type.contextTypes;if(!u)return Fn;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===l)return f.__reactInternalMemoizedMaskedChildContext;var y={},b;for(b in u)y[b]=l[b];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=l,i.__reactInternalMemoizedMaskedChildContext=y),y}function Ht(i){return i=i.childContextTypes,i!=null}function ql(){Qe(qt),Qe(Dt)}function y0(i,l,u){if(Dt.current!==Fn)throw Error(r(168));He(Dt,l),He(qt,u)}function v0(i,l,u){var f=i.stateNode;if(l=l.childContextTypes,typeof f.getChildContext!="function")return u;f=f.getChildContext();for(var y in f)if(!(y in l))throw Error(r(108,me(i)||"Unknown",y));return K({},u,f)}function Hl(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Fn,Na=Dt.current,He(Dt,i),He(qt,qt.current),!0}function b0(i,l,u){var f=i.stateNode;if(!f)throw Error(r(169));u?(i=v0(i,l,Na),f.__reactInternalMemoizedMergedChildContext=i,Qe(qt),Qe(Dt),He(Dt,i)):Qe(qt),He(qt,u)}var Xr=null,Gl=!1,Yd=!1;function E0(i){Xr===null?Xr=[i]:Xr.push(i)}function YN(i){Gl=!0,E0(i)}function jn(){if(!Yd&&Xr!==null){Yd=!0;var i=0,l=qe;try{var u=Xr;for(qe=1;i<u.length;i++){var f=u[i];do f=f(!0);while(f!==null)}Xr=null,Gl=!1}catch(y){throw Xr!==null&&(Xr=Xr.slice(i+1)),wg(gd,jn),y}finally{qe=l,Yd=!1}}return null}var ks=[],Ns=0,Yl=null,Jl=0,cr=[],ur=0,Sa=null,en=1,tn="";function _a(i,l){ks[Ns++]=Jl,ks[Ns++]=Yl,Yl=i,Jl=l}function x0(i,l,u){cr[ur++]=en,cr[ur++]=tn,cr[ur++]=Sa,Sa=i;var f=en;i=tn;var y=32-Er(f)-1;f&=~(1<<y),u+=1;var b=32-Er(l)+y;if(30<b){var S=y-y%5;b=(f&(1<<S)-1).toString(32),f>>=S,y-=S,en=1<<32-Er(l)+y|u<<y|f,tn=b+i}else en=1<<b|u<<y|f,tn=i}function Jd(i){i.return!==null&&(_a(i,1),x0(i,1,0))}function Kd(i){for(;i===Yl;)Yl=ks[--Ns],ks[Ns]=null,Jl=ks[--Ns],ks[Ns]=null;for(;i===Sa;)Sa=cr[--ur],cr[ur]=null,tn=cr[--ur],cr[ur]=null,en=cr[--ur],cr[ur]=null}var tr=null,rr=null,tt=!1,wr=null;function w0(i,l){var u=hr(5,null,null,0);u.elementType="DELETED",u.stateNode=l,u.return=i,l=i.deletions,l===null?(i.deletions=[u],i.flags|=16):l.push(u)}function k0(i,l){switch(i.tag){case 5:var u=i.type;return l=l.nodeType!==1||u.toLowerCase()!==l.nodeName.toLowerCase()?null:l,l!==null?(i.stateNode=l,tr=i,rr=Mn(l.firstChild),!0):!1;case 6:return l=i.pendingProps===""||l.nodeType!==3?null:l,l!==null?(i.stateNode=l,tr=i,rr=null,!0):!1;case 13:return l=l.nodeType!==8?null:l,l!==null?(u=Sa!==null?{id:en,overflow:tn}:null,i.memoizedState={dehydrated:l,treeContext:u,retryLane:1073741824},u=hr(18,null,null,0),u.stateNode=l,u.return=i,i.child=u,tr=i,rr=null,!0):!1;default:return!1}}function Qd(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Zd(i){if(tt){var l=rr;if(l){var u=l;if(!k0(i,l)){if(Qd(i))throw Error(r(418));l=Mn(u.nextSibling);var f=tr;l&&k0(i,l)?w0(f,u):(i.flags=i.flags&-4097|2,tt=!1,tr=i)}}else{if(Qd(i))throw Error(r(418));i.flags=i.flags&-4097|2,tt=!1,tr=i}}}function N0(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;tr=i}function Kl(i){if(i!==tr)return!1;if(!tt)return N0(i),tt=!0,!1;var l;if((l=i.tag!==3)&&!(l=i.tag!==5)&&(l=i.type,l=l!=="head"&&l!=="body"&&!Wd(i.type,i.memoizedProps)),l&&(l=rr)){if(Qd(i))throw S0(),Error(r(418));for(;l;)w0(i,l),l=Mn(l.nextSibling)}if(N0(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));e:{for(i=i.nextSibling,l=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"){if(l===0){rr=Mn(i.nextSibling);break e}l--}else u!=="$"&&u!=="$!"&&u!=="$?"||l++}i=i.nextSibling}rr=null}}else rr=tr?Mn(i.stateNode.nextSibling):null;return!0}function S0(){for(var i=rr;i;)i=Mn(i.nextSibling)}function Ss(){rr=tr=null,tt=!1}function Xd(i){wr===null?wr=[i]:wr.push(i)}var JN=A.ReactCurrentBatchConfig;function lo(i,l,u){if(i=u.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(r(309));var f=u.stateNode}if(!f)throw Error(r(147,i));var y=f,b=""+i;return l!==null&&l.ref!==null&&typeof l.ref=="function"&&l.ref._stringRef===b?l.ref:(l=function(S){var P=y.refs;S===null?delete P[b]:P[b]=S},l._stringRef=b,l)}
vendor: 11,323 bytes, line 30
30if(typeof i!="string")throw Error(r(284));if(!u._owner)throw Error(r(290,i))}return i}function Ql(i,l){throw i=Object.prototype.toString.call(l),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":i))}function _0(i){var l=i._init;return l(i._payload)}function C0(i){function l(F,L){if(i){var U=F.deletions;U===null?(F.deletions=[L],F.flags|=16):U.push(L)}}function u(F,L){if(!i)return null;for(;L!==null;)l(F,L),L=L.sibling;return null}function f(F,L){for(F=new Map;L!==null;)L.key!==null?F.set(L.key,L):F.set(L.index,L),L=L.sibling;return F}function y(F,L){return F=Hn(F,L),F.index=0,F.sibling=null,F}function b(F,L,U){return F.index=U,i?(U=F.alternate,U!==null?(U=U.index,U<L?(F.flags|=2,L):U):(F.flags|=2,L)):(F.flags|=1048576,L)}function S(F){return i&&F.alternate===null&&(F.flags|=2),F}function P(F,L,U,Q){return L===null||L.tag!==6?(L=Vm(U,F.mode,Q),L.return=F,L):(L=y(L,U),L.return=F,L)}function O(F,L,U,Q){var he=U.type;return he===D?G(F,L,U.props.children,Q,U.key):L!==null&&(L.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===ke&&_0(he)===L.type)?(Q=y(L,U.props),Q.ref=lo(F,L,U),Q.return=F,Q):(Q=xc(U.type,U.key,U.props,null,F.mode,Q),Q.ref=lo(F,L,U),Q.return=F,Q)}function z(F,L,U,Q){return L===null||L.tag!==4||L.stateNode.containerInfo!==U.containerInfo||L.stateNode.implementation!==U.implementation?(L=qm(U,F.mode,Q),L.return=F,L):(L=y(L,U.children||[]),L.return=F,L)}function G(F,L,U,Q,he){return L===null||L.tag!==7?(L=Da(U,F.mode,Q,he),L.return=F,L):(L=y(L,U),L.return=F,L)}function Y(F,L,U){if(typeof L=="string"&&L!==""||typeof L=="number")return L=Vm(""+L,F.mode,U),L.return=F,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case I:return U=xc(L.type,L.key,L.props,null,F.mode,U),U.ref=lo(F,null,L),U.return=F,U;case M:return L=qm(L,F.mode,U),L.return=F,L;case ke:var Q=L._init;return Y(F,Q(L._payload),U)}if(zt(L)||re(L))return L=Da(L,F.mode,U,null),L.return=F,L;Ql(F,L)}return null}function H(F,L,U,Q){var he=L!==null?L.key:null;if(typeof U=="string"&&U!==""||typeof U=="number")return he!==null?null:P(F,L,""+U,Q);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case I:return U.key===he?O(F,L,U,Q):null;case M:return U.key===he?z(F,L,U,Q):null;case ke:return he=U._init,H(F,L,he(U._payload),Q)}if(zt(U)||re(U))return he!==null?null:G(F,L,U,Q,null);Ql(F,U)}return null}function ie(F,L,U,Q,he){if(typeof Q=="string"&&Q!==""||typeof Q=="number")return F=F.get(U)||null,P(L,F,""+Q,he);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case I:return F=F.get(Q.key===null?U:Q.key)||null,O(L,F,Q,he);case M:return F=F.get(Q.key===null?U:Q.key)||null,z(L,F,Q,he);case ke:var be=Q._init;return ie(F,L,U,be(Q._payload),he)}if(zt(Q)||re(Q))return F=F.get(U)||null,G(L,F,Q,he,null);Ql(L,Q)}return null}function de(F,L,U,Q){for(var he=null,be=null,Ee=L,Se=L=0,Nt=null;Ee!==null&&Se<U.length;Se++){Ee.index>Se?(Nt=Ee,Ee=null):Nt=Ee.sibling;var We=H(F,Ee,U[Se],Q);if(We===null){Ee===null&&(Ee=Nt);break}i&&Ee&&We.alternate===null&&l(F,Ee),L=b(We,L,Se),be===null?he=We:be.sibling=We,be=We,Ee=Nt}if(Se===U.length)return u(F,Ee),tt&&_a(F,Se),he;if(Ee===null){for(;Se<U.length;Se++)Ee=Y(F,U[Se],Q),Ee!==null&&(L=b(Ee,L,Se),be===null?he=Ee:be.sibling=Ee,be=Ee);return tt&&_a(F,Se),he}for(Ee=f(F,Ee);Se<U.length;Se++)Nt=ie(Ee,F,Se,U[Se],Q),Nt!==null&&(i&&Nt.alternate!==null&&Ee.delete(Nt.key===null?Se:Nt.key),L=b(Nt,L,Se),be===null?he=Nt:be.sibling=Nt,be=Nt);return i&&Ee.forEach(function(Gn){return l(F,Gn)}),tt&&_a(F,Se),he}function fe(F,L,U,Q){var he=re(U);if(typeof he!="function")throw Error(r(150));if(U=he.call(U),U==null)throw Error(r(151));for(var be=he=null,Ee=L,Se=L=0,Nt=null,We=U.next();Ee!==null&&!We.done;Se++,We=U.next()){Ee.index>Se?(Nt=Ee,Ee=null):Nt=Ee.sibling;var Gn=H(F,Ee,We.value,Q);if(Gn===null){Ee===null&&(Ee=Nt);break}i&&Ee&&Gn.alternate===null&&l(F,Ee),L=b(Gn,L,Se),be===null?he=Gn:be.sibling=Gn,be=Gn,Ee=Nt}if(We.done)return u(F,Ee),tt&&_a(F,Se),he;if(Ee===null){for(;!We.done;Se++,We=U.next())We=Y(F,We.value,Q),We!==null&&(L=b(We,L,Se),be===null?he=We:be.sibling=We,be=We);return tt&&_a(F,Se),he}for(Ee=f(F,Ee);!We.done;Se++,We=U.next())We=ie(Ee,F,Se,We.value,Q),We!==null&&(i&&We.alternate!==null&&Ee.delete(We.key===null?Se:We.key),L=b(We,L,Se),be===null?he=We:be.sibling=We,be=We);return i&&Ee.forEach(function(TS){return l(F,TS)}),tt&&_a(F,Se),he}function lt(F,L,U,Q){if(typeof U=="object"&&U!==null&&U.type===D&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case I:e:{for(var he=U.key,be=L;be!==null;){if(be.key===he){if(he=U.type,he===D){if(be.tag===7){u(F,be.sibling),L=y(be,U.props.children),L.return=F,F=L;break e}}else if(be.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===ke&&_0(he)===be.type){u(F,be.sibling),L=y(be,U.props),L.ref=lo(F,be,U),L.return=F,F=L;break e}u(F,be);break}else l(F,be);be=be.sibling}U.type===D?(L=Da(U.props.children,F.mode,Q,U.key),L.return=F,F=L):(Q=xc(U.type,U.key,U.props,null,F.mode,Q),Q.ref=lo(F,L,U),Q.return=F,F=Q)}return S(F);case M:e:{for(be=U.key;L!==null;){if(L.key===be)if(L.tag===4&&L.stateNode.containerInfo===U.containerInfo&&L.stateNode.implementation===U.implementation){u(F,L.sibling),L=y(L,U.children||[]),L.return=F,F=L;break e}else{u(F,L);break}else l(F,L);L=L.sibling}L=qm(U,F.mode,Q),L.return=F,F=L}return S(F);case ke:return be=U._init,lt(F,L,be(U._payload),Q)}if(zt(U))return de(F,L,U,Q);if(re(U))return fe(F,L,U,Q);Ql(F,U)}return typeof U=="string"&&U!==""||typeof U=="number"?(U=""+U,L!==null&&L.tag===6?(u(F,L.sibling),L=y(L,U),L.return=F,F=L):(u(F,L),L=Vm(U,F.mode,Q),L.return=F,F=L),S(F)):u(F,L)}return lt}var _s=C0(!0),T0=C0(!1),Zl=Ln(null),Xl=null,Cs=null,em=null;function tm(){em=Cs=Xl=null}function rm(i){var l=Zl.current;Qe(Zl),i._currentValue=l}function nm(i,l,u){for(;i!==null;){var f=i.alternate;if((i.childLanes&l)!==l?(i.childLanes|=l,f!==null&&(f.childLanes|=l)):f!==null&&(f.childLanes&l)!==l&&(f.childLanes|=l),i===u)break;i=i.return}}function Ts(i,l){Xl=i,em=Cs=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&l)!==0&&(Gt=!0),i.firstContext=null)}function dr(i){var l=i._currentValue;if(em!==i)if(i={context:i,memoizedValue:l,next:null},Cs===null){if(Xl===null)throw Error(r(308));Cs=i,Xl.dependencies={lanes:0,firstContext:i}}else Cs=Cs.next=i;return l}var Ca=null;function am(i){Ca===null?Ca=[i]:Ca.push(i)}function A0(i,l,u,f){var y=l.interleaved;return y===null?(u.next=u,am(l)):(u.next=y.next,y.next=u),l.interleaved=u,rn(i,f)}function rn(i,l){i.lanes|=l;var u=i.alternate;for(u!==null&&(u.lanes|=l),u=i,i=i.return;i!==null;)i.childLanes|=l,u=i.alternate,u!==null&&(u.childLanes|=l),u=i,i=i.return;return u.tag===3?u.stateNode:null}var Un=!1;function sm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function I0(i,l){i=i.updateQueue,l.updateQueue===i&&(l.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function nn(i,l){return{eventTime:i,lane:l,tag:0,payload:null,callback:null,next:null}}function zn(i,l,u){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(ze&2)!==0){var y=f.pending;return y===null?l.next=l:(l.next=y.next,y.next=l),f.pending=l,rn(i,u)}return y=f.interleaved,y===null?(l.next=l,am(f)):(l.next=y.next,y.next=l),f.interleaved=l,rn(i,u)}function ec(i,l,u){if(l=l.updateQueue,l!==null&&(l=l.shared,(u&4194240)!==0)){var f=l.lanes;f&=i.pendingLanes,u|=f,l.lanes=u,bd(i,u)}}function P0(i,l){var u=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,u===f)){var y=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var S={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};b===null?y=b=S:b=b.next=S,u=u.next}while(u!==null);b===null?y=b=l:b=b.next=l}else y=b=l;u={baseState:f.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:f.shared,effects:f.effects},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=l:i.next=l,u.lastBaseUpdate=l}function tc(i,l,u,f){var y=i.updateQueue;Un=!1;var b=y.firstBaseUpdate,S=y.lastBaseUpdate,P=y.shared.pending;if(P!==null){y.shared.pending=null;var O=P,z=O.next;O.next=null,S===null?b=z:S.next=z,S=O;var G=i.alternate;G!==null&&(G=G.updateQueue,P=G.lastBaseUpdate,P!==S&&(P===null?G.firstBaseUpdate=z:P.next=z,G.lastBaseUpdate=O))}if(b!==null){var Y=y.baseState;S=0,G=z=O=null,P=b;do{var H=P.lane,ie=P.eventTime;if((f&H)===H){G!==null&&(G=G.next={eventTime:ie,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var de=i,fe=P;switch(H=l,ie=u,fe.tag){case 1:if(de=fe.payload,typeof de=="function"){Y=de.call(ie,Y,H);break e}Y=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=fe.payload,H=typeof de=="function"?de.call(ie,Y,H):de,H==null)break e;Y=K({},Y,H);break e;case 2:Un=!0}}P.callback!==null&&P.lane!==0&&(i.flags|=64,H=y.effects,H===null?y.effects=[P]:H.push(P))}else ie={eventTime:ie,lane:H,tag:P.tag,payload:P.payload,callback:P.callback,next:null},G===null?(z=G=ie,O=Y):G=G.next=ie,S|=H;if(P=P.next,P===null){if(P=y.shared.pending,P===null)break;H=P,P=H.next,H.next=null,y.lastBaseUpdate=H,y.shared.pending=null}}while(!0);if(G===null&&(O=Y),y.baseState=O,y.firstBaseUpdate=z,y.lastBaseUpdate=G,l=y.shared.interleaved,l!==null){y=l;do S|=y.lane,y=y.next;while(y!==l)}else b===null&&(y.shared.lanes=0);Ia|=S,i.lanes=S,i.memoizedState=Y}}function O0(i,l,u){if(i=l.effects,l.effects=null,i!==null)for(l=0;l<i.length;l++){var f=i[l],y=f.callback;if(y!==null){if(f.callback=null,f=u,typeof y!="function")throw Error(r(191,y));y.call(f)}}}var co={},zr=Ln(co),uo=Ln(co),mo=Ln(co);function Ta(i){if(i===co)throw Error(r(174));return i}function im(i,l){switch(He(mo,l),He(uo,i),He(zr,co),i=l.nodeType,i){case 9:case 11:l=(l=l.documentElement)?l.namespaceURI:Fi(null,"");break;default:i=i===8?l.parentNode:l,l=i.namespaceURI||null,i=i.tagName,l=Fi(l,i)}Qe(zr),He(zr,l)}function As(){Qe(zr),Qe(uo),Qe(mo)}function R0(i){Ta(mo.current);var l=Ta(zr.current),u=Fi(l,i.type);l!==u&&(He(uo,i),He(zr,u))}function om(i){uo.current===i&&(Qe(zr),Qe(uo))}var rt=Ln(0);function rc(i){for(var l=i;l!==null;){if(l.tag===13){var u=l.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!==void 0){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var lm=[];function cm(){for(var i=0;i<lm.length;i++)lm[i]._workInProgressVersionPrimary=null;lm.length=0}var nc=A.ReactCurrentDispatcher,um=A.ReactCurrentBatchConfig,Aa=0,nt=null,yt=null,wt=null,ac=!1,fo=!1,ho=0,KN=0;function Mt(){throw Error(r(321))}function dm(i,l){if(l===null)return!1;for(var u=0;u<l.length&&u<i.length;u++)if(!xr(i[u],l[u]))return!1;return!0}function mm(i,l,u,f,y,b){if(Aa=b,nt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,nc.current=i===null||i.memoizedState===null?eS:tS,i=u(f,y),fo){b=0;do{if(fo=!1,ho=0,25<=b)throw Error(r(301));b+=1,wt=yt=null,l.updateQueue=null,nc.current=rS,i=u(f,y)}while(fo)}if(nc.current=oc,l=yt!==null&&yt.next!==null,Aa=0,wt=yt=nt=null,ac=!1,l)throw Error(r(300));return i}
vendor: 5,087 bytes, line 30
30function fm(){var i=ho!==0;return ho=0,i}function $r(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?nt.memoizedState=wt=i:wt=wt.next=i,wt}function mr(){if(yt===null){var i=nt.alternate;i=i!==null?i.memoizedState:null}else i=yt.next;var l=wt===null?nt.memoizedState:wt.next;if(l!==null)wt=l,yt=i;else{if(i===null)throw Error(r(310));yt=i,i={memoizedState:yt.memoizedState,baseState:yt.baseState,baseQueue:yt.baseQueue,queue:yt.queue,next:null},wt===null?nt.memoizedState=wt=i:wt=wt.next=i}return wt}function po(i,l){return typeof l=="function"?l(i):l}function hm(i){var l=mr(),u=l.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var f=yt,y=f.baseQueue,b=u.pending;if(b!==null){if(y!==null){var S=y.next;y.next=b.next,b.next=S}f.baseQueue=y=b,u.pending=null}if(y!==null){b=y.next,f=f.baseState;var P=S=null,O=null,z=b;do{var G=z.lane;if((Aa&G)===G)O!==null&&(O=O.next={lane:0,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),f=z.hasEagerState?z.eagerState:i(f,z.action);else{var Y={lane:G,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null};O===null?(P=O=Y,S=f):O=O.next=Y,nt.lanes|=G,Ia|=G}z=z.next}while(z!==null&&z!==b);O===null?S=f:O.next=P,xr(f,l.memoizedState)||(Gt=!0),l.memoizedState=f,l.baseState=S,l.baseQueue=O,u.lastRenderedState=f}if(i=u.interleaved,i!==null){y=i;do b=y.lane,nt.lanes|=b,Ia|=b,y=y.next;while(y!==i)}else y===null&&(u.lanes=0);return[l.memoizedState,u.dispatch]}function pm(i){var l=mr(),u=l.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var f=u.dispatch,y=u.pending,b=l.memoizedState;if(y!==null){u.pending=null;var S=y=y.next;do b=i(b,S.action),S=S.next;while(S!==y);xr(b,l.memoizedState)||(Gt=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),u.lastRenderedState=b}return[b,f]}function D0(){}function M0(i,l){var u=nt,f=mr(),y=l(),b=!xr(f.memoizedState,y);if(b&&(f.memoizedState=y,Gt=!0),f=f.queue,gm(j0.bind(null,u,f,i),[i]),f.getSnapshot!==l||b||wt!==null&&wt.memoizedState.tag&1){if(u.flags|=2048,go(9,F0.bind(null,u,f,y,l),void 0,null),kt===null)throw Error(r(349));(Aa&30)!==0||L0(u,l,y)}return y}function L0(i,l,u){i.flags|=16384,i={getSnapshot:l,value:u},l=nt.updateQueue,l===null?(l={lastEffect:null,stores:null},nt.updateQueue=l,l.stores=[i]):(u=l.stores,u===null?l.stores=[i]:u.push(i))}function F0(i,l,u,f){l.value=u,l.getSnapshot=f,U0(l)&&z0(i)}function j0(i,l,u){return u(function(){U0(l)&&z0(i)})}function U0(i){var l=i.getSnapshot;i=i.value;try{var u=l();return!xr(i,u)}catch{return!0}}function z0(i){var l=rn(i,1);l!==null&&_r(l,i,1,-1)}function $0(i){var l=$r();return typeof i=="function"&&(i=i()),l.memoizedState=l.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:po,lastRenderedState:i},l.queue=i,i=i.dispatch=XN.bind(null,nt,i),[l.memoizedState,i]}function go(i,l,u,f){return i={tag:i,create:l,destroy:u,deps:f,next:null},l=nt.updateQueue,l===null?(l={lastEffect:null,stores:null},nt.updateQueue=l,l.lastEffect=i.next=i):(u=l.lastEffect,u===null?l.lastEffect=i.next=i:(f=u.next,u.next=i,i.next=f,l.lastEffect=i)),i}function B0(){return mr().memoizedState}function sc(i,l,u,f){var y=$r();nt.flags|=i,y.memoizedState=go(1|l,u,void 0,f===void 0?null:f)}function ic(i,l,u,f){var y=mr();f=f===void 0?null:f;var b=void 0;if(yt!==null){var S=yt.memoizedState;if(b=S.destroy,f!==null&&dm(f,S.deps)){y.memoizedState=go(l,u,b,f);return}}nt.flags|=i,y.memoizedState=go(1|l,u,b,f)}function W0(i,l){return sc(8390656,8,i,l)}function gm(i,l){return ic(2048,8,i,l)}function V0(i,l){return ic(4,2,i,l)}function q0(i,l){return ic(4,4,i,l)}function H0(i,l){if(typeof l=="function")return i=i(),l(i),function(){l(null)};if(l!=null)return i=i(),l.current=i,function(){l.current=null}}function G0(i,l,u){return u=u!=null?u.concat([i]):null,ic(4,4,H0.bind(null,l,i),u)}function ym(){}function Y0(i,l){var u=mr();l=l===void 0?null:l;var f=u.memoizedState;return f!==null&&l!==null&&dm(l,f[1])?f[0]:(u.memoizedState=[i,l],i)}function J0(i,l){var u=mr();l=l===void 0?null:l;var f=u.memoizedState;return f!==null&&l!==null&&dm(l,f[1])?f[0]:(i=i(),u.memoizedState=[i,l],i)}function K0(i,l,u){return(Aa&21)===0?(i.baseState&&(i.baseState=!1,Gt=!0),i.memoizedState=u):(xr(u,l)||(u=_g(),nt.lanes|=u,Ia|=u,i.baseState=!0),l)}function QN(i,l){var u=qe;qe=u!==0&&4>u?u:4,i(!0);var f=um.transition;um.transition={};try{i(!1),l()}finally{qe=u,um.transition=f}}function Q0(){return mr().memoizedState}function ZN(i,l,u){var f=Vn(i);if(u={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null},Z0(i))X0(l,u);else if(u=A0(i,l,u,f),u!==null){var y=Wt();_r(u,i,f,y),ey(u,l,f)}}function XN(i,l,u){var f=Vn(i),y={lane:f,action:u,hasEagerState:!1,eagerState:null,next:null};if(Z0(i))X0(l,y);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var S=l.lastRenderedState,P=b(S,u);if(y.hasEagerState=!0,y.eagerState=P,xr(P,S)){var O=l.interleaved;O===null?(y.next=y,am(l)):(y.next=O.next,O.next=y),l.interleaved=y;return}}catch{}finally{}
vendor: 9,177 bytes, lines 30-32
30u=A0(i,l,y,f),u!==null&&(y=Wt(),_r(u,i,f,y),ey(u,l,f))}}function Z0(i){var l=i.alternate;return i===nt||l!==null&&l===nt}function X0(i,l){fo=ac=!0;var u=i.pending;u===null?l.next=l:(l.next=u.next,u.next=l),i.pending=l}function ey(i,l,u){if((u&4194240)!==0){var f=l.lanes;f&=i.pendingLanes,u|=f,l.lanes=u,bd(i,u)}}var oc={readContext:dr,useCallback:Mt,useContext:Mt,useEffect:Mt,useImperativeHandle:Mt,useInsertionEffect:Mt,useLayoutEffect:Mt,useMemo:Mt,useReducer:Mt,useRef:Mt,useState:Mt,useDebugValue:Mt,useDeferredValue:Mt,useTransition:Mt,useMutableSource:Mt,useSyncExternalStore:Mt,useId:Mt,unstable_isNewReconciler:!1},eS={readContext:dr,useCallback:function(i,l){return $r().memoizedState=[i,l===void 0?null:l],i},useContext:dr,useEffect:W0,useImperativeHandle:function(i,l,u){return u=u!=null?u.concat([i]):null,sc(4194308,4,H0.bind(null,l,i),u)},useLayoutEffect:function(i,l){return sc(4194308,4,i,l)},useInsertionEffect:function(i,l){return sc(4,2,i,l)},useMemo:function(i,l){var u=$r();return l=l===void 0?null:l,i=i(),u.memoizedState=[i,l],i},useReducer:function(i,l,u){var f=$r();return l=u!==void 0?u(l):l,f.memoizedState=f.baseState=l,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:l},f.queue=i,i=i.dispatch=ZN.bind(null,nt,i),[f.memoizedState,i]},useRef:function(i){var l=$r();return i={current:i},l.memoizedState=i},useState:$0,useDebugValue:ym,useDeferredValue:function(i){return $r().memoizedState=i},useTransition:function(){var i=$0(!1),l=i[0];return i=QN.bind(null,i[1]),$r().memoizedState=i,[l,i]},useMutableSource:function(){},useSyncExternalStore:function(i,l,u){var f=nt,y=$r();if(tt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=l(),kt===null)throw Error(r(349));(Aa&30)!==0||L0(f,l,u)}y.memoizedState=u;var b={value:u,getSnapshot:l};return y.queue=b,W0(j0.bind(null,f,b,i),[i]),f.flags|=2048,go(9,F0.bind(null,f,b,u,l),void 0,null),u},useId:function(){var i=$r(),l=kt.identifierPrefix;if(tt){var u=tn,f=en;u=(f&~(1<<32-Er(f)-1)).toString(32)+u,l=":"+l+"R"+u,u=ho++,0<u&&(l+="H"+u.toString(32)),l+=":"}else u=KN++,l=":"+l+"r"+u.toString(32)+":";return i.memoizedState=l},unstable_isNewReconciler:!1},tS={readContext:dr,useCallback:Y0,useContext:dr,useEffect:gm,useImperativeHandle:G0,useInsertionEffect:V0,useLayoutEffect:q0,useMemo:J0,useReducer:hm,useRef:B0,useState:function(){return hm(po)},useDebugValue:ym,useDeferredValue:function(i){var l=mr();return K0(l,yt.memoizedState,i)},useTransition:function(){var i=hm(po)[0],l=mr().memoizedState;return[i,l]},useMutableSource:D0,useSyncExternalStore:M0,useId:Q0,unstable_isNewReconciler:!1},rS={readContext:dr,useCallback:Y0,useContext:dr,useEffect:gm,useImperativeHandle:G0,useInsertionEffect:V0,useLayoutEffect:q0,useMemo:J0,useReducer:pm,useRef:B0,useState:function(){return pm(po)},useDebugValue:ym,useDeferredValue:function(i){var l=mr();return yt===null?l.memoizedState=i:K0(l,yt.memoizedState,i)},useTransition:function(){var i=pm(po)[0],l=mr().memoizedState;return[i,l]},useMutableSource:D0,useSyncExternalStore:M0,useId:Q0,unstable_isNewReconciler:!1};function kr(i,l){if(i&&i.defaultProps){l=K({},l),i=i.defaultProps;for(var u in i)l[u]===void 0&&(l[u]=i[u]);return l}return l}function vm(i,l,u,f){l=i.memoizedState,u=u(f,l),u=u==null?l:K({},l,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var lc={isMounted:function(i){return(i=i._reactInternals)?wa(i)===i:!1},enqueueSetState:function(i,l,u){i=i._reactInternals;var f=Wt(),y=Vn(i),b=nn(f,y);b.payload=l,u!=null&&(b.callback=u),l=zn(i,b,y),l!==null&&(_r(l,i,y,f),ec(l,i,y))},enqueueReplaceState:function(i,l,u){i=i._reactInternals;var f=Wt(),y=Vn(i),b=nn(f,y);b.tag=1,b.payload=l,u!=null&&(b.callback=u),l=zn(i,b,y),l!==null&&(_r(l,i,y,f),ec(l,i,y))},enqueueForceUpdate:function(i,l){i=i._reactInternals;var u=Wt(),f=Vn(i),y=nn(u,f);y.tag=2,l!=null&&(y.callback=l),l=zn(i,y,f),l!==null&&(_r(l,i,f,u),ec(l,i,f))}};function ty(i,l,u,f,y,b,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,b,S):l.prototype&&l.prototype.isPureReactComponent?!to(u,f)||!to(y,b):!0}function ry(i,l,u){var f=!1,y=Fn,b=l.contextType;return typeof b=="object"&&b!==null?b=dr(b):(y=Ht(l)?Na:Dt.current,f=l.contextTypes,b=(f=f!=null)?ws(i,y):Fn),l=new l(u,b),i.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=lc,i.stateNode=l,l._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=y,i.__reactInternalMemoizedMaskedChildContext=b),l}function ny(i,l,u,f){i=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(u,f),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(u,f),l.state!==i&&lc.enqueueReplaceState(l,l.state,null)}function bm(i,l,u,f){var y=i.stateNode;y.props=u,y.state=i.memoizedState,y.refs={},sm(i);var b=l.contextType;typeof b=="object"&&b!==null?y.context=dr(b):(b=Ht(l)?Na:Dt.current,y.context=ws(i,b)),y.state=i.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(vm(i,l,b,u),y.state=i.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(l=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),l!==y.state&&lc.enqueueReplaceState(y,y.state,null),tc(i,u,y,f),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308)}function Is(i,l){try{var u="",f=l;do u+=_e(f),f=f.return;while(f);var y=u}catch(b){y=` 31Error generating stack: `+b.message+` 32`+b.stack}return{value:i,source:l,stack:y,digest:null}}function Em(i,l,u){return{value:i,source:null,stack:u??null,digest:l??null}}function xm(i,l){try{console.error(l.value)}catch(u){setTimeout(function(){throw u})}}var nS=typeof WeakMap=="function"?WeakMap:Map;function ay(i,l,u){u=nn(-1,u),u.tag=3,u.payload={element:null};var f=l.value;return u.callback=function(){pc||(pc=!0,Lm=f),xm(i,l)},u}function sy(i,l,u){u=nn(-1,u),u.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var y=l.value;u.payload=function(){return f(y)},u.callback=function(){xm(i,l)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(u.callback=function(){xm(i,l),typeof f!="function"&&(Bn===null?Bn=new Set([this]):Bn.add(this));var S=l.stack;this.componentDidCatch(l.value,{componentStack:S!==null?S:""})}),u}function iy(i,l,u){var f=i.pingCache;if(f===null){f=i.pingCache=new nS;var y=new Set;f.set(l,y)}else y=f.get(l),y===void 0&&(y=new Set,f.set(l,y));y.has(u)||(y.add(u),i=yS.bind(null,i,l,u),l.then(i,i))}function oy(i){do{var l;if((l=i.tag===13)&&(l=i.memoizedState,l=l!==null?l.dehydrated!==null:!0),l)return i;i=i.return}while(i!==null);return null}function ly(i,l,u,f,y){return(i.mode&1)===0?(i===l?i.flags|=65536:(i.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(l=nn(-1,1),l.tag=2,zn(u,l,1))),u.lanes|=1),i):(i.flags|=65536,i.lanes=y,i)}var aS=A.ReactCurrentOwner,Gt=!1;function Bt(i,l,u,f){l.child=i===null?T0(l,null,u,f):_s(l,i.child,u,f)}function cy(i,l,u,f,y){u=u.render;var b=l.ref;return Ts(l,y),f=mm(i,l,u,f,b,y),u=fm(),i!==null&&!Gt?(l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~y,an(i,l,y)):(tt&&u&&Jd(l),l.flags|=1,Bt(i,l,f,y),l.child)}function uy(i,l,u,f,y){if(i===null){var b=u.type;return typeof b=="function"&&!Wm(b)&&b.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(l.tag=15,l.type=b,dy(i,l,b,f,y)):(i=xc(u.type,null,f,l,l.mode,y),i.ref=l.ref,i.return=l,l.child=i)}if(b=i.child,(i.lanes&y)===0){var S=b.memoizedProps;if(u=u.compare,u=u!==null?u:to,u(S,f)&&i.ref===l.ref)return an(i,l,y)}return l.flags|=1,i=Hn(b,f),i.ref=l.ref,i.return=l,l.child=i}function dy(i,l,u,f,y){if(i!==null){var b=i.memoizedProps;if(to(b,f)&&i.ref===l.ref)if(Gt=!1,l.pendingProps=f=b,(i.lanes&y)!==0)(i.flags&131072)!==0&&(Gt=!0);else return l.lanes=i.lanes,an(i,l,y)}return wm(i,l,u,f,y)}function my(i,l,u){var f=l.pendingProps,y=f.children,b=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((l.mode&1)===0)l.memoizedState={baseLanes:0,cachePool:null,transitions:null},He(Os,nr),nr|=u;else{if((u&1073741824)===0)return i=b!==null?b.baseLanes|u:u,l.lanes=l.childLanes=1073741824,l.memoizedState={baseLanes:i,cachePool:null,transitions:null},l.updateQueue=null,He(Os,nr),nr|=i,null;l.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=b!==null?b.baseLanes:u,He(Os,nr),nr|=f}else b!==null?(f=b.baseLanes|u,l.memoizedState=null):f=u,He(Os,nr),nr|=f;return Bt(i,l,y,u),l.child}function fy(i,l){var u=l.ref;(i===null&&u!==null||i!==null&&i.ref!==u)&&(l.flags|=512,l.flags|=2097152)}function wm(i,l,u,f,y){var b=Ht(u)?Na:Dt.current;return b=ws(l,b),Ts(l,y),u=mm(i,l,u,f,b,y),f=fm(),i!==null&&!Gt?(l.updateQueue=i.updateQueue,l.flags&=-2053,i.lanes&=~y,an(i,l,y)):(tt&&f&&Jd(l),l.flags|=1,Bt(i,l,u,y),l.child)}function hy(i,l,u,f,y){if(Ht(u)){var b=!0;Hl(l)}else b=!1;if(Ts(l,y),l.stateNode===null)uc(i,l),ry(l,u,f),bm(l,u,f,y),f=!0;else if(i===null){var S=l.stateNode,P=l.memoizedProps;S.props=P;
vendor: 9,549 bytes, line 32
32var O=S.context,z=u.contextType;typeof z=="object"&&z!==null?z=dr(z):(z=Ht(u)?Na:Dt.current,z=ws(l,z));var G=u.getDerivedStateFromProps,Y=typeof G=="function"||typeof S.getSnapshotBeforeUpdate=="function";Y||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(P!==f||O!==z)&&ny(l,S,f,z),Un=!1;var H=l.memoizedState;S.state=H,tc(l,f,S,y),O=l.memoizedState,P!==f||H!==O||qt.current||Un?(typeof G=="function"&&(vm(l,u,G,f),O=l.memoizedState),(P=Un||ty(l,u,P,f,H,O,z))?(Y||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(l.flags|=4194308)):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=f,l.memoizedState=O),S.props=f,S.state=O,S.context=z,f=P):(typeof S.componentDidMount=="function"&&(l.flags|=4194308),f=!1)}else{S=l.stateNode,I0(i,l),P=l.memoizedProps,z=l.type===l.elementType?P:kr(l.type,P),S.props=z,Y=l.pendingProps,H=S.context,O=u.contextType,typeof O=="object"&&O!==null?O=dr(O):(O=Ht(u)?Na:Dt.current,O=ws(l,O));var ie=u.getDerivedStateFromProps;(G=typeof ie=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(P!==Y||H!==O)&&ny(l,S,f,O),Un=!1,H=l.memoizedState,S.state=H,tc(l,f,S,y);var de=l.memoizedState;P!==Y||H!==de||qt.current||Un?(typeof ie=="function"&&(vm(l,u,ie,f),de=l.memoizedState),(z=Un||ty(l,u,z,f,H,de,O)||!1)?(G||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(f,de,O),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(f,de,O)),typeof S.componentDidUpdate=="function"&&(l.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof S.componentDidUpdate!="function"||P===i.memoizedProps&&H===i.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||P===i.memoizedProps&&H===i.memoizedState||(l.flags|=1024),l.memoizedProps=f,l.memoizedState=de),S.props=f,S.state=de,S.context=O,f=z):(typeof S.componentDidUpdate!="function"||P===i.memoizedProps&&H===i.memoizedState||(l.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||P===i.memoizedProps&&H===i.memoizedState||(l.flags|=1024),f=!1)}return km(i,l,u,f,b,y)}function km(i,l,u,f,y,b){fy(i,l);var S=(l.flags&128)!==0;if(!f&&!S)return y&&b0(l,u,!1),an(i,l,b);f=l.stateNode,aS.current=l;var P=S&&typeof u.getDerivedStateFromError!="function"?null:f.render();return l.flags|=1,i!==null&&S?(l.child=_s(l,i.child,null,b),l.child=_s(l,null,P,b)):Bt(i,l,P,b),l.memoizedState=f.state,y&&b0(l,u,!0),l.child}function py(i){var l=i.stateNode;l.pendingContext?y0(i,l.pendingContext,l.pendingContext!==l.context):l.context&&y0(i,l.context,!1),im(i,l.containerInfo)}function gy(i,l,u,f,y){return Ss(),Xd(y),l.flags|=256,Bt(i,l,u,f),l.child}var Nm={dehydrated:null,treeContext:null,retryLane:0};function Sm(i){return{baseLanes:i,cachePool:null,transitions:null}}function yy(i,l,u){var f=l.pendingProps,y=rt.current,b=!1,S=(l.flags&128)!==0,P;if((P=S)||(P=i!==null&&i.memoizedState===null?!1:(y&2)!==0),P?(b=!0,l.flags&=-129):(i===null||i.memoizedState!==null)&&(y|=1),He(rt,y&1),i===null)return Zd(l),i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((l.mode&1)===0?l.lanes=1:i.data==="$!"?l.lanes=8:l.lanes=1073741824,null):(S=f.children,i=f.fallback,b?(f=l.mode,b=l.child,S={mode:"hidden",children:S},(f&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=S):b=wc(S,f,0,null),i=Da(i,f,u,null),b.return=l,i.return=l,b.sibling=i,l.child=b,l.child.memoizedState=Sm(u),l.memoizedState=Nm,i):_m(l,S));if(y=i.memoizedState,y!==null&&(P=y.dehydrated,P!==null))return sS(i,l,S,f,P,y,u);if(b){b=f.fallback,S=l.mode,y=i.child,P=y.sibling;var O={mode:"hidden",children:f.children};return(S&1)===0&&l.child!==y?(f=l.child,f.childLanes=0,f.pendingProps=O,l.deletions=null):(f=Hn(y,O),f.subtreeFlags=y.subtreeFlags&14680064),P!==null?b=Hn(P,b):(b=Da(b,S,u,null),b.flags|=2),b.return=l,f.return=l,f.sibling=b,l.child=f,f=b,b=l.child,S=i.child.memoizedState,S=S===null?Sm(u):{baseLanes:S.baseLanes|u,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~u,l.memoizedState=Nm,f}return b=i.child,i=b.sibling,f=Hn(b,{mode:"visible",children:f.children}),(l.mode&1)===0&&(f.lanes=u),f.return=l,f.sibling=null,i!==null&&(u=l.deletions,u===null?(l.deletions=[i],l.flags|=16):u.push(i)),l.child=f,l.memoizedState=null,f}function _m(i,l){return l=wc({mode:"visible",children:l},i.mode,0,null),l.return=i,i.child=l}function cc(i,l,u,f){return f!==null&&Xd(f),_s(l,i.child,null,u),i=_m(l,l.pendingProps.children),i.flags|=2,l.memoizedState=null,i}function sS(i,l,u,f,y,b,S){if(u)return l.flags&256?(l.flags&=-257,f=Em(Error(r(422))),cc(i,l,S,f)):l.memoizedState!==null?(l.child=i.child,l.flags|=128,null):(b=f.fallback,y=l.mode,f=wc({mode:"visible",children:f.children},y,0,null),b=Da(b,y,S,null),b.flags|=2,f.return=l,b.return=l,f.sibling=b,l.child=f,(l.mode&1)!==0&&_s(l,i.child,null,S),l.child.memoizedState=Sm(S),l.memoizedState=Nm,b);if((l.mode&1)===0)return cc(i,l,S,null);if(y.data==="$!"){if(f=y.nextSibling&&y.nextSibling.dataset,f)var P=f.dgst;return f=P,b=Error(r(419)),f=Em(b,f,void 0),cc(i,l,S,f)}if(P=(S&i.childLanes)!==0,Gt||P){if(f=kt,f!==null){switch(S&-S){case 4:y=2;break;case 16:y=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(f.suspendedLanes|S))!==0?0:y,y!==0&&y!==b.retryLane&&(b.retryLane=y,rn(i,y),_r(f,i,y,-1))}return Bm(),f=Em(Error(r(421))),cc(i,l,S,f)}return y.data==="$?"?(l.flags|=128,l.child=i.child,l=vS.bind(null,i),y._reactRetry=l,null):(i=b.treeContext,rr=Mn(y.nextSibling),tr=l,tt=!0,wr=null,i!==null&&(cr[ur++]=en,cr[ur++]=tn,cr[ur++]=Sa,en=i.id,tn=i.overflow,Sa=l),l=_m(l,f.children),l.flags|=4096,l)}function vy(i,l,u){i.lanes|=l;var f=i.alternate;f!==null&&(f.lanes|=l),nm(i.return,l,u)}function Cm(i,l,u,f,y){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:f,tail:u,tailMode:y}:(b.isBackwards=l,b.rendering=null,b.renderingStartTime=0,b.last=f,b.tail=u,b.tailMode=y)}function by(i,l,u){var f=l.pendingProps,y=f.revealOrder,b=f.tail;if(Bt(i,l,f.children,u),f=rt.current,(f&2)!==0)f=f&1|2,l.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=l.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&vy(i,u,l);else if(i.tag===19)vy(i,u,l);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===l)break e;for(;i.sibling===null;){if(i.return===null||i.return===l)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(He(rt,f),(l.mode&1)===0)l.memoizedState=null;else switch(y){case"forwards":for(u=l.child,y=null;u!==null;)i=u.alternate,i!==null&&rc(i)===null&&(y=u),u=u.sibling;u=y,u===null?(y=l.child,l.child=null):(y=u.sibling,u.sibling=null),Cm(l,!1,y,u,b);break;case"backwards":for(u=null,y=l.child,l.child=null;y!==null;){if(i=y.alternate,i!==null&&rc(i)===null){l.child=y;break}i=y.sibling,y.sibling=u,u=y,y=i}Cm(l,!0,u,null,b);break;case"together":Cm(l,!1,null,null,void 0);break;default:l.memoizedState=null}return l.child}function uc(i,l){(l.mode&1)===0&&i!==null&&(i.alternate=null,l.alternate=null,l.flags|=2)}function an(i,l,u){if(i!==null&&(l.dependencies=i.dependencies),Ia|=l.lanes,(u&l.childLanes)===0)return null;if(i!==null&&l.child!==i.child)throw Error(r(153));if(l.child!==null){for(i=l.child,u=Hn(i,i.pendingProps),l.child=u,u.return=l;i.sibling!==null;)i=i.sibling,u=u.sibling=Hn(i,i.pendingProps),u.return=l;u.sibling=null}return l.child}function iS(i,l,u){switch(l.tag){case 3:py(l),Ss();break;case 5:R0(l);break;case 1:Ht(l.type)&&Hl(l);break;case 4:im(l,l.stateNode.containerInfo);break;case 10:var f=l.type._context,y=l.memoizedProps.value;He(Zl,f._currentValue),f._currentValue=y;break;case 13:if(f=l.memoizedState,f!==null)return f.dehydrated!==null?(He(rt,rt.current&1),l.flags|=128,null):(u&l.child.childLanes)!==0?yy(i,l,u):(He(rt,rt.current&1),i=an(i,l,u),i!==null?i.sibling:null);He(rt,rt.current&1);break;case 19:if(f=(u&l.childLanes)!==0,(i.flags&128)!==0){if(f)return by(i,l,u);l.flags|=128}if(y=l.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),He(rt,rt.current),f)break;return null;case 22:case 23:return l.lanes=0,my(i,l,u)}return an(i,l,u)}var Ey,Tm,xy,wy;Ey=function(i,l){for(var u=l.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},Tm=function(){},xy=function(i,l,u,f){var y=i.memoizedProps;if(y!==f){i=l.stateNode,Ta(zr.current);var b=null;switch(u){case"input":y=Je(i,y),f=Je(i,f),b=[];break;case"select":y=K({},y,{value:void 0}),f=K({},f,{value:void 0}),b=[];break;case"textarea":y=cs(i,y),f=cs(i,f),b=[];break;default:typeof y.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=Wl)}ld(u,f);var S;u=null;for(z in y)if(!f.hasOwnProperty(z)&&y.hasOwnProperty(z)&&y[z]!=null)if(z==="style"){var P=y[z];
vendor: 5,408 bytes, line 32
32for(S in P)P.hasOwnProperty(S)&&(u||(u={}),u[S]="")}else z!=="dangerouslySetInnerHTML"&&z!=="children"&&z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&z!=="autoFocus"&&(s.hasOwnProperty(z)?b||(b=[]):(b=b||[]).push(z,null));for(z in f){var O=f[z];if(P=y?.[z],f.hasOwnProperty(z)&&O!==P&&(O!=null||P!=null))if(z==="style")if(P){for(S in P)!P.hasOwnProperty(S)||O&&O.hasOwnProperty(S)||(u||(u={}),u[S]="");for(S in O)O.hasOwnProperty(S)&&P[S]!==O[S]&&(u||(u={}),u[S]=O[S])}else u||(b||(b=[]),b.push(z,u)),u=O;else z==="dangerouslySetInnerHTML"?(O=O?O.__html:void 0,P=P?P.__html:void 0,O!=null&&P!==O&&(b=b||[]).push(z,O)):z==="children"?typeof O!="string"&&typeof O!="number"||(b=b||[]).push(z,""+O):z!=="suppressContentEditableWarning"&&z!=="suppressHydrationWarning"&&(s.hasOwnProperty(z)?(O!=null&&z==="onScroll"&&Ke("scroll",i),b||P===O||(b=[])):(b=b||[]).push(z,O))}u&&(b=b||[]).push("style",u);var z=b;(l.updateQueue=z)&&(l.flags|=4)}},wy=function(i,l,u,f){u!==f&&(l.flags|=4)};function yo(i,l){if(!tt)switch(i.tailMode){case"hidden":l=i.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?l||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function Lt(i){var l=i.alternate!==null&&i.alternate.child===i.child,u=0,f=0;if(l)for(var y=i.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags&14680064,f|=y.flags&14680064,y.return=i,y=y.sibling;else for(y=i.child;y!==null;)u|=y.lanes|y.childLanes,f|=y.subtreeFlags,f|=y.flags,y.return=i,y=y.sibling;return i.subtreeFlags|=f,i.childLanes=u,l}function oS(i,l,u){var f=l.pendingProps;switch(Kd(l),l.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(l),null;case 1:return Ht(l.type)&&ql(),Lt(l),null;case 3:return f=l.stateNode,As(),Qe(qt),Qe(Dt),cm(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(Kl(l)?l.flags|=4:i===null||i.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,wr!==null&&(Um(wr),wr=null))),Tm(i,l),Lt(l),null;case 5:om(l);var y=Ta(mo.current);if(u=l.type,i!==null&&l.stateNode!=null)xy(i,l,u,f,y),i.ref!==l.ref&&(l.flags|=512,l.flags|=2097152);else{if(!f){if(l.stateNode===null)throw Error(r(166));return Lt(l),null}if(i=Ta(zr.current),Kl(l)){f=l.stateNode,u=l.type;var b=l.memoizedProps;switch(f[Ur]=l,f[io]=b,i=(l.mode&1)!==0,u){case"dialog":Ke("cancel",f),Ke("close",f);break;case"iframe":case"object":case"embed":Ke("load",f);break;case"video":case"audio":for(y=0;y<no.length;y++)Ke(no[y],f);break;case"source":Ke("error",f);break;case"img":case"image":case"link":Ke("error",f),Ke("load",f);break;case"details":Ke("toggle",f);break;case"input":Ue(f,b),Ke("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!b.multiple},Ke("invalid",f);break;case"textarea":Li(f,b),Ke("invalid",f)}ld(u,b),y=null;for(var S in b)if(b.hasOwnProperty(S)){var P=b[S];S==="children"?typeof P=="string"?f.textContent!==P&&(b.suppressHydrationWarning!==!0&&Bl(f.textContent,P,i),y=["children",P]):typeof P=="number"&&f.textContent!==""+P&&(b.suppressHydrationWarning!==!0&&Bl(f.textContent,P,i),y=["children",""+P]):s.hasOwnProperty(S)&&P!=null&&S==="onScroll"&&Ke("scroll",f)}switch(u){case"input":Ye(f),dt(f,b,!0);break;case"textarea":Ye(f),lr(f);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(f.onclick=Wl)}f=y,l.updateQueue=f,f!==null&&(l.flags|=4)}else{S=y.nodeType===9?y:y.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=us(u)),i==="http://www.w3.org/1999/xhtml"?u==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=S.createElement(u,{is:f.is}):(i=S.createElement(u),u==="select"&&(S=i,f.multiple?S.multiple=!0:f.size&&(S.size=f.size))):i=S.createElementNS(i,u),i[Ur]=l,i[io]=f,Ey(i,l,!1,!1),l.stateNode=i;e:{switch(S=cd(u,f),u){case"dialog":Ke("cancel",i),Ke("close",i),y=f;break;case"iframe":case"object":case"embed":Ke("load",i),y=f;break;case"video":case"audio":for(y=0;y<no.length;y++)Ke(no[y],i);y=f;break;case"source":Ke("error",i),y=f;break;case"img":case"image":case"link":Ke("error",i),Ke("load",i),y=f;break;case"details":Ke("toggle",i),y=f;break;case"input":Ue(i,f),y=Je(i,f),Ke("invalid",i);break;case"option":y=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},y=K({},f,{value:void 0}),Ke("invalid",i);break;case"textarea":Li(i,f),y=cs(i,f),Ke("invalid",i);break;default:y=f}ld(u,y),P=y;for(b in P)if(P.hasOwnProperty(b)){var O=P[b];b==="style"?dg(i,O):b==="dangerouslySetInnerHTML"?(O=O?O.__html:void 0,O!=null&&cg(i,O)):b==="children"?typeof O=="string"?(u!=="textarea"||O!=="")&&ji(i,O):typeof O=="number"&&ji(i,""+O):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(s.hasOwnProperty(b)?O!=null&&b==="onScroll"&&Ke("scroll",i):O!=null&&T(i,b,O,S))}switch(u){case"input":Ye(i),dt(i,f,!1);break;case"textarea":Ye(i),lr(i);break;case"option":f.value!=null&&i.setAttribute("value",""+ye(f.value));break;case"select":i.multiple=!!f.multiple,b=f.value,b!=null?Qr(i,!!f.multiple,b,!1):f.defaultValue!=null&&Qr(i,!!f.multiple,f.defaultValue,!0);break;default:typeof y.onClick=="function"&&(i.onclick=Wl)}switch(u){case"button":case"input":case"select":case"textarea":f=!!f.autoF
vendor: 23,356 bytes, line 32
32ocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(l.flags|=4)}l.ref!==null&&(l.flags|=512,l.flags|=2097152)}return Lt(l),null;case 6:if(i&&l.stateNode!=null)wy(i,l,i.memoizedProps,f);else{if(typeof f!="string"&&l.stateNode===null)throw Error(r(166));if(u=Ta(mo.current),Ta(zr.current),Kl(l)){if(f=l.stateNode,u=l.memoizedProps,f[Ur]=l,(b=f.nodeValue!==u)&&(i=tr,i!==null))switch(i.tag){case 3:Bl(f.nodeValue,u,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Bl(f.nodeValue,u,(i.mode&1)!==0)}b&&(l.flags|=4)}else f=(u.nodeType===9?u:u.ownerDocument).createTextNode(f),f[Ur]=l,l.stateNode=f}return Lt(l),null;case 13:if(Qe(rt),f=l.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(tt&&rr!==null&&(l.mode&1)!==0&&(l.flags&128)===0)S0(),Ss(),l.flags|=98560,b=!1;else if(b=Kl(l),f!==null&&f.dehydrated!==null){if(i===null){if(!b)throw Error(r(318));if(b=l.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[Ur]=l}else Ss(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Lt(l),b=!1}else wr!==null&&(Um(wr),wr=null),b=!0;if(!b)return l.flags&65536?l:null}return(l.flags&128)!==0?(l.lanes=u,l):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(l.child.flags|=8192,(l.mode&1)!==0&&(i===null||(rt.current&1)!==0?vt===0&&(vt=3):Bm())),l.updateQueue!==null&&(l.flags|=4),Lt(l),null);case 4:return As(),Tm(i,l),i===null&&ao(l.stateNode.containerInfo),Lt(l),null;case 10:return rm(l.type._context),Lt(l),null;case 17:return Ht(l.type)&&ql(),Lt(l),null;case 19:if(Qe(rt),b=l.memoizedState,b===null)return Lt(l),null;if(f=(l.flags&128)!==0,S=b.rendering,S===null)if(f)yo(b,!1);else{if(vt!==0||i!==null&&(i.flags&128)!==0)for(i=l.child;i!==null;){if(S=rc(i),S!==null){for(l.flags|=128,yo(b,!1),f=S.updateQueue,f!==null&&(l.updateQueue=f,l.flags|=4),l.subtreeFlags=0,f=u,u=l.child;u!==null;)b=u,i=f,b.flags&=14680066,S=b.alternate,S===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=S.childLanes,b.lanes=S.lanes,b.child=S.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=S.memoizedProps,b.memoizedState=S.memoizedState,b.updateQueue=S.updateQueue,b.type=S.type,i=S.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),u=u.sibling;return He(rt,rt.current&1|2),l.child}i=i.sibling}b.tail!==null&&ot()>Rs&&(l.flags|=128,f=!0,yo(b,!1),l.lanes=4194304)}else{if(!f)if(i=rc(S),i!==null){if(l.flags|=128,f=!0,u=i.updateQueue,u!==null&&(l.updateQueue=u,l.flags|=4),yo(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!tt)return Lt(l),null}else 2*ot()-b.renderingStartTime>Rs&&u!==1073741824&&(l.flags|=128,f=!0,yo(b,!1),l.lanes=4194304);b.isBackwards?(S.sibling=l.child,l.child=S):(u=b.last,u!==null?u.sibling=S:l.child=S,b.last=S)}return b.tail!==null?(l=b.tail,b.rendering=l,b.tail=l.sibling,b.renderingStartTime=ot(),l.sibling=null,u=rt.current,He(rt,f?u&1|2:u&1),l):(Lt(l),null);case 22:case 23:return $m(),f=l.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(l.flags|=8192),f&&(l.mode&1)!==0?(nr&1073741824)!==0&&(Lt(l),l.subtreeFlags&6&&(l.flags|=8192)):Lt(l),null;case 24:return null;case 25:return null}throw Error(r(156,l.tag))}function lS(i,l){switch(Kd(l),l.tag){case 1:return Ht(l.type)&&ql(),i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 3:return As(),Qe(qt),Qe(Dt),cm(),i=l.flags,(i&65536)!==0&&(i&128)===0?(l.flags=i&-65537|128,l):null;case 5:return om(l),null;case 13:if(Qe(rt),i=l.memoizedState,i!==null&&i.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Ss()}return i=l.flags,i&65536?(l.flags=i&-65537|128,l):null;case 19:return Qe(rt),null;case 4:return As(),null;case 10:return rm(l.type._context),null;case 22:case 23:return $m(),null;case 24:return null;default:return null}}var dc=!1,Ft=!1,cS=typeof WeakSet=="function"?WeakSet:Set,ue=null;function Ps(i,l){var u=i.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(f){at(i,l,f)}else u.current=null}function Am(i,l,u){try{u()}catch(f){at(i,l,f)}}var ky=!1;function uS(i,l){if($d=Pl,i=t0(),Rd(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var f=u.getSelection&&u.getSelection();if(f&&f.rangeCount!==0){u=f.anchorNode;var y=f.anchorOffset,b=f.focusNode;f=f.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var S=0,P=-1,O=-1,z=0,G=0,Y=i,H=null;t:for(;;){for(var ie;Y!==u||y!==0&&Y.nodeType!==3||(P=S+y),Y!==b||f!==0&&Y.nodeType!==3||(O=S+f),Y.nodeType===3&&(S+=Y.nodeValue.length),(ie=Y.firstChild)!==null;)H=Y,Y=ie;for(;;){if(Y===i)break t;if(H===u&&++z===y&&(P=S),H===b&&++G===f&&(O=S),(ie=Y.nextSibling)!==null)break;Y=H,H=Y.parentNode}Y=ie}u=P===-1||O===-1?null:{start:P,end:O}}else u=null}u=u||{start:0,end:0}}else u=null;for(Bd={focusedElem:i,selectionRange:u},Pl=!1,ue=l;ue!==null;)if(l=ue,i=l.child,(l.subtreeFlags&1028)!==0&&i!==null)i.return=l,ue=i;else for(;ue!==null;){l=ue;try{var de=l.alternate;if((l.flags&1024)!==0)switch(l.tag){case 0:case 11:case 15:break;case 1:if(de!==null){var fe=de.memoizedProps,lt=de.memoizedState,F=l.stateNode,L=F.getSnapshotBeforeUpdate(l.elementType===l.type?fe:kr(l.type,fe),lt);F.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var U=l.stateNode.containerInfo;U.nodeType===1?U.textContent="":U.nodeType===9&&U.documentElement&&U.removeChild(U.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(Q){at(l,l.return,Q)}if(i=l.sibling,i!==null){i.return=l.return,ue=i;break}ue=l.return}return de=ky,ky=!1,de}function vo(i,l,u){var f=l.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&i)===i){var b=y.destroy;y.destroy=void 0,b!==void 0&&Am(l,u,b)}y=y.next}while(y!==f)}}function mc(i,l){if(l=l.updateQueue,l=l!==null?l.lastEffect:null,l!==null){var u=l=l.next;do{if((u.tag&i)===i){var f=u.create;u.destroy=f()}u=u.next}while(u!==l)}}function Im(i){var l=i.ref;if(l!==null){var u=i.stateNode;switch(i.tag){case 5:i=u;break;default:i=u}typeof l=="function"?l(i):l.current=i}}function Ny(i){var l=i.alternate;l!==null&&(i.alternate=null,Ny(l)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(l=i.stateNode,l!==null&&(delete l[Ur],delete l[io],delete l[Hd],delete l[HN],delete l[GN])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function Sy(i){return i.tag===5||i.tag===3||i.tag===4}function _y(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Sy(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Pm(i,l,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,l?u.nodeType===8?u.parentNode.insertBefore(i,l):u.insertBefore(i,l):(u.nodeType===8?(l=u.parentNode,l.insertBefore(i,u)):(l=u,l.appendChild(i)),u=u._reactRootContainer,u!=null||l.onclick!==null||(l.onclick=Wl));else if(f!==4&&(i=i.child,i!==null))for(Pm(i,l,u),i=i.sibling;i!==null;)Pm(i,l,u),i=i.sibling}function Om(i,l,u){var f=i.tag;if(f===5||f===6)i=i.stateNode,l?u.insertBefore(i,l):u.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Om(i,l,u),i=i.sibling;i!==null;)Om(i,l,u),i=i.sibling}var It=null,Nr=!1;function $n(i,l,u){for(u=u.child;u!==null;)Cy(i,l,u),u=u.sibling}function Cy(i,l,u){if(jr&&typeof jr.onCommitFiberUnmount=="function")try{jr.onCommitFiberUnmount(Sl,u)}catch{}switch(u.tag){case 5:Ft||Ps(u,l);case 6:var f=It,y=Nr;It=null,$n(i,l,u),It=f,Nr=y,It!==null&&(Nr?(i=It,u=u.stateNode,i.nodeType===8?i.parentNode.removeChild(u):i.removeChild(u)):It.removeChild(u.stateNode));break;case 18:It!==null&&(Nr?(i=It,u=u.stateNode,i.nodeType===8?qd(i.parentNode,u):i.nodeType===1&&qd(i,u),Ji(i)):qd(It,u.stateNode));break;case 4:f=It,y=Nr,It=u.stateNode.containerInfo,Nr=!0,$n(i,l,u),It=f,Nr=y;break;case 0:case 11:case 14:case 15:if(!Ft&&(f=u.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){y=f=f.next;do{var b=y,S=b.destroy;b=b.tag,S!==void 0&&((b&2)!==0||(b&4)!==0)&&Am(u,l,S),y=y.next}while(y!==f)}$n(i,l,u);break;case 1:if(!Ft&&(Ps(u,l),f=u.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=u.memoizedProps,f.state=u.memoizedState,f.componentWillUnmount()}catch(P){at(u,l,P)}$n(i,l,u);break;case 21:$n(i,l,u);break;case 22:u.mode&1?(Ft=(f=Ft)||u.memoizedState!==null,$n(i,l,u),Ft=f):$n(i,l,u);break;default:$n(i,l,u)}}function Ty(i){var l=i.updateQueue;if(l!==null){i.updateQueue=null;var u=i.stateNode;u===null&&(u=i.stateNode=new cS),l.forEach(function(f){var y=bS.bind(null,i,f);u.has(f)||(u.add(f),f.then(y,y))})}}function Sr(i,l){var u=l.deletions;if(u!==null)for(var f=0;f<u.length;f++){var y=u[f];try{var b=i,S=l,P=S;e:for(;P!==null;){switch(P.tag){case 5:It=P.stateNode,Nr=!1;break e;case 3:It=P.stateNode.containerInfo,Nr=!0;break e;case 4:It=P.stateNode.containerInfo,Nr=!0;break e}P=P.return}if(It===null)throw Error(r(160));Cy(b,S,y),It=null,Nr=!1;var O=y.alternate;O!==null&&(O.return=null),y.return=null}catch(z){at(y,l,z)}}if(l.subtreeFlags&12854)for(l=l.child;l!==null;)Ay(l,i),l=l.sibling}function Ay(i,l){var u=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Sr(l,i),Br(i),f&4){try{vo(3,i,i.return),mc(3,i)}catch(fe){at(i,i.return,fe)}try{vo(5,i,i.return)}catch(fe){at(i,i.return,fe)}}break;case 1:Sr(l,i),Br(i),f&512&&u!==null&&Ps(u,u.return);break;case 5:if(Sr(l,i),Br(i),f&512&&u!==null&&Ps(u,u.return),i.flags&32){var y=i.stateNode;try{ji(y,"")}catch(fe){at(i,i.return,fe)}}if(f&4&&(y=i.stateNode,y!=null)){var b=i.memoizedProps,S=u!==null?u.memoizedProps:b,P=i.type,O=i.updateQueue;if(i.updateQueue=null,O!==null)try{P==="input"&&b.type==="radio"&&b.name!=null&&At(y,b),cd(P,S);var z=cd(P,b);for(S=0;S<O.length;S+=2){var G=O[S],Y=O[S+1];G==="style"?dg(y,Y):G==="dangerouslySetInnerHTML"?cg(y,Y):G==="children"?ji(y,Y):T(y,G,Y,z)}switch(P){case"input":Fr(y,b);break;case"textarea":$t(y,b);break;case"select":var H=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!b.multiple;var ie=b.value;ie!=null?Qr(y,!!b.multiple,ie,!1):H!==!!b.multiple&&(b.defaultValue!=null?Qr(y,!!b.multiple,b.defaultValue,!0):Qr(y,!!b.multiple,b.multiple?[]:"",!1))}y[io]=b}catch(fe){at(i,i.return,fe)}}break;case 6:if(Sr(l,i),Br(i),f&4){if(i.stateNode===null)throw Error(r(162));y=i.stateNode,b=i.memoizedProps;try{y.nodeValue=b}catch(fe){at(i,i.return,fe)}}break;case 3:if(Sr(l,i),Br(i),f&4&&u!==null&&u.memoizedState.isDehydrated)try{Ji(l.containerInfo)}catch(fe){at(i,i.return,fe)}break;case 4:Sr(l,i),Br(i);break;case 13:Sr(l,i),Br(i),y=i.child,y.flags&8192&&(b=y.memoizedState!==null,y.stateNode.isHidden=b,!b||y.alternate!==null&&y.alternate.memoizedState!==null||(Mm=ot())),f&4&&Ty(i);break;case 22:if(G=u!==null&&u.memoizedState!==null,i.mode&1?(Ft=(z=Ft)||G,Sr(l,i),Ft=z):Sr(l,i),Br(i),f&8192){if(z=i.memoizedState!==null,(i.stateNode.isHidden=z)&&!G&&(i.mode&1)!==0)for(ue=i,G=i.child;G!==null;){for(Y=ue=G;ue!==null;){switch(H=ue,ie=H.child,H.tag){case 0:case 11:case 14:case 15:vo(4,H,H.return);break;case 1:Ps(H,H.return);var de=H.stateNode;if(typeof de.componentWillUnmount=="function"){f=H,u=H.return;try{l=f,de.props=l.memoizedProps,de.state=l.memoizedState,de.componentWillUnmount()}catch(fe){at(f,u,fe)}}break;case 5:Ps(H,H.return);break;case 22:if(H.memoizedState!==null){Oy(Y);continue}}ie!==null?(ie.return=H,ue=ie):Oy(Y)}G=G.sibling}e:for(G=null,Y=i;;){if(Y.tag===5){if(G===null){G=Y;try{y=Y.stateNode,z?(b=y.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(P=Y.stateNode,O=Y.memoizedProps.style,S=O!=null&&O.hasOwnProperty("display")?O.display:null,P.style.display=ug("display",S))}catch(fe){at(i,i.return,fe)}}}else if(Y.tag===6){if(G===null)try{Y.stateNode.nodeValue=z?"":Y.memoizedProps}catch(fe){at(i,i.return,fe)}}else if((Y.tag!==22&&Y.tag!==23||Y.memoizedState===null||Y===i)&&Y.child!==null){Y.child.return=Y,Y=Y.child;continue}if(Y===i)break e;for(;Y.sibling===null;){if(Y.return===null||Y.return===i)break e;G===Y&&(G=null),Y=Y.return}G===Y&&(G=null),Y.sibling.return=Y.return,Y=Y.sibling}}break;case 19:Sr(l,i),Br(i),f&4&&Ty(i);break;case 21:break;default:Sr(l,i),Br(i)}}function Br(i){var l=i.flags;if(l&2){try{e:{for(var u=i.return;u!==null;){if(Sy(u)){var f=u;break e}u=u.return}throw Error(r(160))}switch(f.tag){case 5:var y=f.stateNode;f.flags&32&&(ji(y,""),f.flags&=-33);var b=_y(i);Om(i,b,y);break;case 3:case 4:var S=f.stateNode.containerInfo,P=_y(i);Pm(i,P,S);break;default:throw Error(r(161))}}catch(O){at(i,i.return,O)}i.flags&=-3}l&4096&&(i.flags&=-4097)}function dS(i,l,u){ue=i,Iy(i)}function Iy(i,l,u){for(var f=(i.mode&1)!==0;ue!==null;){var y=ue,b=y.child;if(y.tag===22&&f){var S=y.memoizedState!==null||dc;if(!S){var P=y.alternate,O=P!==null&&P.memoizedState!==null||Ft;P=dc;var z=Ft;if(dc=S,(Ft=O)&&!z)for(ue=y;ue!==null;)S=ue,O=S.child,S.tag===22&&S.memoizedState!==null?Ry(y):O!==null?(O.return=S,ue=O):Ry(y);for(;b!==null;)ue=b,Iy(b),b=b.sibling;ue=y,dc=P,Ft=z}Py(i)}else(y.subtreeFlags&8772)!==0&&b!==null?(b.return=y,ue=b):Py(i)}}function Py(i){for(;ue!==null;){var l=ue;if((l.flags&8772)!==0){var u=l.alternate;try{if((l.flags&8772)!==0)switch(l.tag){case 0:case 11:case 15:Ft||mc(5,l);break;case 1:var f=l.stateNode;if(l.flags&4&&!Ft)if(u===null)f.componentDidMount();else{var y=l.elementType===l.type?u.memoizedProps:kr(l.type,u.memoizedProps);f.componentDidUpdate(y,u.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var b=l.updateQueue;b!==null&&O0(l,b,f);break;case 3:var S=l.updateQueue;if(S!==null){if(u=null,l.child!==null)switch(l.child.tag){case 5:u=l.child.stateNode;break;case 1:u=l.child.stateNode}O0(l,S,u)}break;case 5:var P=l.stateNode;if(u===null&&l.flags&4){u=P;var O=l.memoizedProps;switch(l.type){case"button":case"input":case"select":case"textarea":O.autoFocus&&u.focus();break;case"img":O.src&&(u.src=O.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(l.memoizedState===null){var z=l.alternate;if(z!==null){var G=z.memoizedState;if(G!==null){var Y=G.dehydrated;Y!==null&&Ji(Y)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Ft||l.flags&512&&Im(l)}catch(H){at(l,l.return,H)}}if(l===i){ue=null;break}if(u=l.sibling,u!==null){u.return=l.return,ue=u;break}ue=l.return}}function Oy(i){for(;ue!==null;){var l=ue;if(l===i){ue=null;break}var u=l.sibling;if(u!==null){u.return=l.return,ue=u;break}ue=l.return}}function Ry(i){for(;ue!==null;){var l=ue;try{switch(l.tag){case 0:case 11:case 15:var u=l.return;try{mc(4,l)}catch(O){at(l,u,O)}break;case 1:var f=l.stateNode;if(typeof f.componentDidMount=="function"){var y=l.return;try{f.componentDidMount()}catch(O){at(l,y,O)}}var b=l.return;try{Im(l)}catch(O){at(l,b,O)}break;case 5:var S=l.return;try{Im(l)}catch(O){at(l,S,O)}}}catch(O){at(l,l.return,O)}if(l===i){ue=null;break}var P=l.sibling;if(P!==null){P.return=l.return,ue=P;break}ue=l.return}}var mS=Math.ceil,fc=A.ReactCurrentDispatcher,Rm=A.ReactCurrentOwner,fr=A.ReactCurrentBatchConfig,ze=0,kt=null,mt=null,Pt=0,nr=0,Os=Ln(0),vt=0,bo=null,Ia=0,hc=0,Dm=0,Eo=null,Yt=null,Mm=0,Rs=1/0,sn=null,pc=!1,Lm=null,Bn=null,gc=!1,Wn=null,yc=0,xo=0,Fm=null,vc=-1,bc=0;function Wt(){return(ze&6)!==0?ot():vc!==-1?vc:vc=ot()}function Vn(i){return(i.mode&1)===0?1:(ze&2)!==0&&Pt!==0?Pt&-Pt:JN.transition!==null?(bc===0&&(bc=_g()),bc):(i=qe,i!==0||(i=window.event,i=i===void 0?16:Mg(i.type)),i)}function _r(i,l,u,f){if(50<xo)throw xo=0,Fm=null,Error(r(185));Vi(i,u,f),((ze&2)===0||i!==kt)&&(i===kt&&((ze&2)===0&&(hc|=u),vt===4&&qn(i,Pt)),Jt(i,f),u===1&&ze===0&&(l.mode&1)===0&&(Rs=ot()+500,Gl&&jn()))}function Jt(i,l){var u=i.callbackNode;J1(i,l);var f=Tl(i,i===kt?Pt:0);if(f===0)u!==null&&kg(u),i.callbackNode=null,i.callbackPriority=0;else if(l=f&-f,i.callbackPriority!==l){if(u!=null&&kg(u),l===1)i.tag===0?YN(My.bind(null,i)):E0(My.bind(null,i)),VN(function(){(ze&6)===0&&jn()}),u=null;else{switch(Cg(f)){case 1:u=gd;break;case 4:u=Ng;break;case 16:u=Nl;break;case 536870912:u=Sg;break;default:u=Nl}u=Wy(u,Dy.bind(null,i))}i.callbackPriority=l,i.callbackNode=u}}function Dy(i,l){if(vc=-1,bc=0,(ze&6)!==0)throw Error(r(327));var u=i.callbackNode;if(Ds()&&i.callbackNode!==u)return null;var f=Tl(i,i===kt?Pt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||l)l=Ec(i,f);else{l=f;var y=ze;ze|=2;var b=Fy();(kt!==i||Pt!==l)&&(sn=null,Rs=ot()+500,Oa(i,l));do try{pS();break}catch(P){Ly(i,P)}while(!0);tm(),fc.current=b,ze=y,mt!==null?l=0:(kt=null,Pt=0,l=vt)}if(l!==0){if(l===2&&(y=yd(i),y!==0&&(f=y,l=jm(i,y))),l===1)throw u=bo,Oa(i,0),qn(i,f),Jt(i,ot()),u;if(l===6)qn(i,f);else{if(y=i.current.alternate,(f&30)===0&&!fS(y)&&(l=Ec(i,f),l===2&&(b=yd(i),b!==0&&(f=b,l=jm(i,b))),l===1))throw u=bo,Oa(i,0),qn(i,f),Jt(i,ot()),u;switch(i.finishedWork=y,i.finishedLanes=f,l){case 0:case 1:throw Error(r(345));case 2:Ra(i,Yt,sn);break;case 3:if(qn(i,f),(f&130023424)===f&&(l=Mm+500-ot(),10<l)){if(Tl(i,0)!==0)break;if(y=i.suspendedLanes,(y&f)!==f){Wt(),i.pingedLanes|=i.suspendedLanes&y;break}i.timeoutHandle=Vd(Ra.bind(null,i,Yt,sn),l);break}Ra(i,Yt,sn);break;case 4:if(qn(i,f),(f&4194240)===f)break;for(l=i.eventTimes,y=-1;0<f;){var S=31-Er(f);b=1<<S,S=l[S],S>y&&(y=S),f&=~b}if(f=y,f=ot()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*mS(f/1960))-f,10<f){i.timeoutHandle=Vd(Ra.bind(null,i,Yt,sn),f);break}Ra(i,Yt,sn);break;case 5:Ra(i,Yt,sn);break;default:throw Error(r(329))}}}return Jt(i,ot()),i.callbackNode===u?Dy.bind(null,i):null}function jm(i,l){var u=Eo;return i.current.memoizedState.isDehydrated&&(Oa(i,l).flags|=256),i=Ec(i,l),i!==2&&(l=Yt,Yt=u,l!==null&&Um(l)),i}function Um(i){Yt===null?Yt=i:Yt.push.apply(Yt,i)}function fS(i){for(var l=i;;){if(l.flags&16384){var u=l.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var f=0;f<u.length;f++){var y=u[f],b=y.getSnapshot;y=y.value;try{if(!xr(b(),y))return!1}catch{return!1}}}if(u=l.child,l.subtreeFlags&16384&&u!==null)u.return=l,l=u;else{if(l===i)break;for(;l.sibling===null;){if(l.return===null||l.return===i)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function qn(i,l){for(l&=~Dm,l&=~hc,i.suspendedLanes|=l,i.pingedLanes&=~l,i=i.expirationTimes;0<l;){var u=31-Er(l),f=1<<u;i[u]=-1,l&=~f}}function My(i){if((ze&6)!==0)throw Error(r(327));Ds();var l=Tl(i,0);if((l&1)===0)return Jt(i,ot()),null;var u=Ec(i,l);if(i.tag!==0&&u===2){var f=yd(i);f!==0&&(l=f,u=jm(i,f))}if(u===1)throw u=bo,Oa(i,0),qn(i,l),Jt(i,ot()),u;if(u===6)throw Error(r(345));return i.finishedWork=i.current.alternate,i.finishedLanes=l,Ra(i,Yt,sn),Jt(i,ot()),null}function zm(i,l){var u=ze;ze|=1;try{return i(l)}finally{ze=u,ze===0&&(Rs=ot()+500,Gl&&jn())}}function Pa(i){Wn!==null&&Wn.tag===0&&(ze&6)===0&&Ds();var l=ze;ze|=1;var u=fr.transition,f=qe;try{if(fr.transition=null,qe=1,i)return i()}finally{qe=f,fr.transition=u,ze=l,(ze&6)===0&&jn()}}function $m(){nr=Os.current,Qe(Os)}function Oa(i,l){i.finishedWork=null,i.finishedLanes=0;var u=i.timeoutHandle;if(u!==-1&&(i.timeoutHandle=-1,WN(u)),mt!==null)for(u=mt.return;u!==null;){var f=u;switch(Kd(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&ql();break;case 3:As(),Qe(qt),Qe(Dt),cm();break;case 5:om(f);break;case 4:As();break;case 13:Qe(rt);break;case 19:Qe(rt);break;case 10:rm(f.type._context);break;case 22:case 23:$m()}u=u.return}if(kt=i,mt=i=Hn(i.current,null),Pt=nr=l,vt=0,bo=null,Dm=hc=Ia=0,Yt=Eo=null,Ca!==null){for(l=0;l<Ca.length;l++)if(u=Ca[l],f=u.interleaved,f!==null){u.interleaved=null;var y=f.next,b=u.pending;if(b!==null){var S=b.next;b.next=y,f.next=S}u.pending=f}Ca=null}return i}function Ly(i,l){do{var u=mt;try{if(tm(),nc.current=oc,ac){for(var f=nt.memoizedState;f!==null;){var y=f.queue;y!==null&&(y.pending=null),f=f.next}ac=!1}if(Aa=0,wt=yt=nt=null,fo=!1,ho=0,Rm.current=null,u===null||u.return===null){vt=1,bo=l,mt=null;break}e:{var b=i,S=u.return,P=u,O=l;if(l=Pt,P.flags|=32768,O!==null&&typeof O=="object"&&typeof O.then=="function"){var z=O,G=P,Y=G.tag;if((G.mode&1)===0&&(Y===0||Y===11||Y===15)){var H=G.alternate;H?(G.updateQueue=H.updateQueue,G.memoizedState=H.memoizedState,G.lanes=H.lanes):(G.updateQueue=null,G.memoizedState=null)}var ie=oy(S);if(ie!==null){ie.flags&=-257,ly(ie,S,P,b,l),ie.mode&1&&iy(b,z,l),l=ie,O=z;var de=l.updateQueue;if(de===null){var fe=new Set;fe.add(O),l.updateQueue=fe}else de.add(O);break e}else{if((l&1)===0){iy(b,z,l),Bm();break e}O=Error(r(426))}}else if(tt&&P.mode&1){var lt=oy(S);if(lt!==null){(lt.flags&65536)===0&&(lt.flags|=256),ly(lt,S,P,b,l),Xd(Is(O,P));break e}}b=O=Is(O,P),vt!==4&&(vt=2),Eo===null?Eo=[b]:Eo.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,l&=-l,b.lanes|=l;var F=ay(b,O,l);P0(b,F);break e;case 1:P=O;var L=b.type,U=b.stateNode;if((b.flags&128)===0&&(typeof L.getDerivedStateFromError=="function"||U!==null&&typeof U.componentDidCatch=="function"&&(Bn===null||!Bn.has(U)))){b.flags|=65536,l&=-l,b.lanes|=l;var Q=sy(b,P,l);P0(b,Q);break e}}b=b.return}while(b!==null)}Uy(u)}catch(he){l=he,mt===u&&u!==null&&(mt=u=u.return);continue}break}while(!0)}function Fy(){var i=fc.current;return fc.current=oc,i===null?oc:i}function Bm(){(vt===0||vt===3||vt===2)&&(vt=4),kt===null||(Ia&268435455)===0&&(hc&268435455)===0||qn(kt,Pt)}function Ec(i,l){var u=ze;ze|=2;var f=Fy();(kt!==i||Pt!==l)&&(sn=null,Oa(i,l));do try{hS();break}catch(y){Ly(i,y)}while(!0);if(tm(),ze=u,fc.current=f,mt!==null)throw Error(r(261));return kt=null,Pt=0,vt}function hS(){for(;mt!==null;)jy(mt)}function pS(){for(;mt!==null&&!z1();)jy(mt)}function jy(i){var l=By(i.alternate,i,nr);i.memoizedProps=i.pendingProps,l===null?Uy(i):mt=l,Rm.current=null}function Uy(i){var l=i;do{var u=l.alternate;if(i=l.return,(l.flags&32768)===0){if(u=oS(u,l,nr),u!==null){mt=u;return}}else{if(u=lS(u,l),u!==null){u.flags&=32767,mt=u;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{vt=6,mt=null;return}}if(l=l.sibling,l!==null){mt=l;return}mt=l=i}while(l!==null);vt===0&&(vt=5)}function Ra(i,l,u){var f=qe,y=fr.transition;try{fr.transition=null,qe=1,gS(i,l,u,f)}finally{fr.transition=y,qe=f}return null}function gS(i,l,u,f){do Ds();while(Wn!==null);if((ze&6)!==0)throw Error(r(327));u=i.finishedWork;var y=i.finishedLanes;if(u===null)return null;if(i.finishedWork=null,i.finishedLanes=0,u===i.current)throw Error(r(177));i.callbackNode=null,i.callbackPriority=0;var b=u.lanes|u.childLanes;if(K1(i,b),i===kt&&(mt=kt=null,Pt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||gc||(gc=!0,Wy(Nl,function(){return Ds(),null})),b=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||b){b=fr.transition,fr.transition=null;var S=qe;qe=1;var P=ze;ze|=4,Rm.current=null,uS(i,u),Ay(u,i),LN(Bd),Pl=!!$d,Bd=$d=null,i.current=u,dS(u),$1(),ze=P,qe=S,fr.transition=b}else i.current=u;if(gc&&(gc=!1,Wn=i,yc=y),b=i.pendingLanes,b===0&&(Bn=null),V1(u.stateNode),Jt(i,ot()),l!==null)for(f=i.onRecoverableError,u=0;u<l.length;u++)y=l[u],f(y.value,{componentStack:y.stack,digest:y.digest});if(pc)throw pc=!1,i=Lm,Lm=null,i;return(yc&1)!==0&&i.tag!==0&&Ds(),b=i.pendingLanes,(b&1)!==0?i===Fm?xo++:(xo=0,Fm=i):xo=0,jn(),null}function Ds(){if(Wn!==null){var i=Cg(yc),l=fr.transition,u=qe;try{if(fr.transition=null,qe=16>i?16:i,Wn===null)var f=!1;else{if(i=Wn,Wn=null,yc=0,(ze&6)!==0)throw Error(r(331));var y=ze;
vendor: 4,516 bytes, line 32
32for(ze|=4,ue=i.current;ue!==null;){var b=ue,S=b.child;if((ue.flags&16)!==0){var P=b.deletions;if(P!==null){for(var O=0;O<P.length;O++){var z=P[O];for(ue=z;ue!==null;){var G=ue;switch(G.tag){case 0:case 11:case 15:vo(8,G,b)}var Y=G.child;if(Y!==null)Y.return=G,ue=Y;else for(;ue!==null;){G=ue;var H=G.sibling,ie=G.return;if(Ny(G),G===z){ue=null;break}if(H!==null){H.return=ie,ue=H;break}ue=ie}}}var de=b.alternate;if(de!==null){var fe=de.child;if(fe!==null){de.child=null;do{var lt=fe.sibling;fe.sibling=null,fe=lt}while(fe!==null)}}ue=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,ue=S;else e:for(;ue!==null;){if(b=ue,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:vo(9,b,b.return)}var F=b.sibling;if(F!==null){F.return=b.return,ue=F;break e}ue=b.return}}var L=i.current;for(ue=L;ue!==null;){S=ue;var U=S.child;if((S.subtreeFlags&2064)!==0&&U!==null)U.return=S,ue=U;else e:for(S=L;ue!==null;){if(P=ue,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:mc(9,P)}}catch(he){at(P,P.return,he)}if(P===S){ue=null;break e}var Q=P.sibling;if(Q!==null){Q.return=P.return,ue=Q;break e}ue=P.return}}if(ze=y,jn(),jr&&typeof jr.onPostCommitFiberRoot=="function")try{jr.onPostCommitFiberRoot(Sl,i)}catch{}f=!0}return f}finally{qe=u,fr.transition=l}}return!1}function zy(i,l,u){l=Is(u,l),l=ay(i,l,1),i=zn(i,l,1),l=Wt(),i!==null&&(Vi(i,1,l),Jt(i,l))}function at(i,l,u){if(i.tag===3)zy(i,i,u);else for(;l!==null;){if(l.tag===3){zy(l,i,u);break}else if(l.tag===1){var f=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Bn===null||!Bn.has(f))){i=Is(u,i),i=sy(l,i,1),l=zn(l,i,1),i=Wt(),l!==null&&(Vi(l,1,i),Jt(l,i));break}}l=l.return}}function yS(i,l,u){var f=i.pingCache;f!==null&&f.delete(l),l=Wt(),i.pingedLanes|=i.suspendedLanes&u,kt===i&&(Pt&u)===u&&(vt===4||vt===3&&(Pt&130023424)===Pt&&500>ot()-Mm?Oa(i,0):Dm|=u),Jt(i,l)}function $y(i,l){l===0&&((i.mode&1)===0?l=1:(l=Cl,Cl<<=1,(Cl&130023424)===0&&(Cl=4194304)));var u=Wt();i=rn(i,l),i!==null&&(Vi(i,l,u),Jt(i,u))}function vS(i){var l=i.memoizedState,u=0;l!==null&&(u=l.retryLane),$y(i,u)}function bS(i,l){var u=0;switch(i.tag){case 13:var f=i.stateNode,y=i.memoizedState;y!==null&&(u=y.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(r(314))}f!==null&&f.delete(l),$y(i,u)}var By;By=function(i,l,u){if(i!==null)if(i.memoizedProps!==l.pendingProps||qt.current)Gt=!0;else{if((i.lanes&u)===0&&(l.flags&128)===0)return Gt=!1,iS(i,l,u);Gt=(i.flags&131072)!==0}else Gt=!1,tt&&(l.flags&1048576)!==0&&x0(l,Jl,l.index);switch(l.lanes=0,l.tag){case 2:var f=l.type;uc(i,l),i=l.pendingProps;var y=ws(l,Dt.current);Ts(l,u),y=mm(null,l,f,i,y,u);var b=fm();return l.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(l.tag=1,l.memoizedState=null,l.updateQueue=null,Ht(f)?(b=!0,Hl(l)):b=!1,l.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,sm(l),y.updater=lc,l.stateNode=y,y._reactInternals=l,bm(l,f,i,u),l=km(null,l,f,!0,b,u)):(l.tag=0,tt&&b&&Jd(l),Bt(null,l,y,u),l=l.child),l;case 16:f=l.elementType;e:{switch(uc(i,l),i=l.pendingProps,y=f._init,f=y(f._payload),l.type=f,y=l.tag=xS(f),i=kr(f,i),y){case 0:l=wm(null,l,f,i,u);break e;case 1:l=hy(null,l,f,i,u);break e;case 11:l=cy(null,l,f,i,u);break e;case 14:l=uy(null,l,f,kr(f.type,i),u);break e}throw Error(r(306,f,""))}return l;case 0:return f=l.type,y=l.pendingProps,y=l.elementType===f?y:kr(f,y),wm(i,l,f,y,u);case 1:return f=l.type,y=l.pendingProps,y=l.elementType===f?y:kr(f,y),hy(i,l,f,y,u);case 3:e:{if(py(l),i===null)throw Error(r(387));f=l.pendingProps,b=l.memoizedState,y=b.element,I0(i,l),tc(l,f,null,u);var S=l.memoizedState;if(f=S.element,b.isDehydrated)if(b={element:f,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){y=Is(Error(r(423)),l),l=gy(i,l,f,u,y);break e}else if(f!==y){y=Is(Error(r(424)),l),l=gy(i,l,f,u,y);break e}else for(rr=Mn(l.stateNode.containerInfo.firstChild),tr=l,tt=!0,wr=null,u=T0(l,null,f,u),l.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ss(),f===y){l=an(i,l,u);break e}Bt(i,l,f,u)}l=l.child}return l;case 5:return R0(l),i===null&&Zd(l),f=l.type,y=l.pendingProps,b=i!==null?i.memoizedProps:null,S=y.children,Wd(f,y)?S=null:b!==null&&Wd(f,b)&&(l.flags|=32),fy(i,l),Bt(i,l,S,u),l.child;case 6:return i===null&&Zd(l),null;case 13:return yy(i,l,u);case 4:return im(l,l.stateNode.containerInfo),f=l.pendingProps,i===null?l.child=_
vendor: 1,436 bytes, line 32
32s(l,null,f,u):Bt(i,l,f,u),l.child;case 11:return f=l.type,y=l.pendingProps,y=l.elementType===f?y:kr(f,y),cy(i,l,f,y,u);case 7:return Bt(i,l,l.pendingProps,u),l.child;case 8:return Bt(i,l,l.pendingProps.children,u),l.child;case 12:return Bt(i,l,l.pendingProps.children,u),l.child;case 10:e:{if(f=l.type._context,y=l.pendingProps,b=l.memoizedProps,S=y.value,He(Zl,f._currentValue),f._currentValue=S,b!==null)if(xr(b.value,S)){if(b.children===y.children&&!qt.current){l=an(i,l,u);break e}}else for(b=l.child,b!==null&&(b.return=l);b!==null;){var P=b.dependencies;if(P!==null){S=b.child;for(var O=P.firstContext;O!==null;){if(O.context===f){if(b.tag===1){O=nn(-1,u&-u),O.tag=2;var z=b.updateQueue;if(z!==null){z=z.shared;var G=z.pending;G===null?O.next=O:(O.next=G.next,G.next=O),z.pending=O}}b.lanes|=u,O=b.alternate,O!==null&&(O.lanes|=u),nm(b.return,u,l),P.lanes|=u;break}O=O.next}}else if(b.tag===10)S=b.type===l.type?null:b.child;else if(b.tag===18){if(S=b.return,S===null)throw Error(r(341));S.lanes|=u,P=S.alternate,P!==null&&(P.lanes|=u),nm(S,u,l),S=b.sibling}else S=b.child;if(S!==null)S.return=b;else for(S=b;S!==null;){if(S===l){S=null;break}if(b=S.sibling,b!==null){b.return=S.return,S=b;break}S=S.return}b=S}Bt(i,l,y.children,u),l=l.child}return l;case 9:return y=l.type,f=l.pendingProps.children,Ts(l,u),y=dr(y),f=f(y),l.flags|=1,Bt(i,l,f,u),l.child;case 14:return f=l.type,y=kr(f,l.pendingProps),y=kr(f.type,y),uy(i,l,f,y,u);
vendor: 7,977 bytes, line 32
32case 15:return dy(i,l,l.type,l.pendingProps,u);case 17:return f=l.type,y=l.pendingProps,y=l.elementType===f?y:kr(f,y),uc(i,l),l.tag=1,Ht(f)?(i=!0,Hl(l)):i=!1,Ts(l,u),ry(l,f,y),bm(l,f,y,u),km(null,l,f,!0,i,u);case 19:return by(i,l,u);case 22:return my(i,l,u)}throw Error(r(156,l.tag))};function Wy(i,l){return wg(i,l)}function ES(i,l,u,f){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function hr(i,l,u,f){return new ES(i,l,u,f)}function Wm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function xS(i){if(typeof i=="function")return Wm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===te)return 11;if(i===ae)return 14}return 2}function Hn(i,l){var u=i.alternate;return u===null?(u=hr(i.tag,l,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=l,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&14680064,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,l=i.dependencies,u.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u}function xc(i,l,u,f,y,b){var S=2;if(f=i,typeof i=="function")Wm(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case D:return Da(u.children,y,b,l);case $:S=8,y|=8;break;case j:return i=hr(12,u,l,y|2),i.elementType=j,i.lanes=b,i;case ne:return i=hr(13,u,l,y),i.elementType=ne,i.lanes=b,i;case Z:return i=hr(19,u,l,y),i.elementType=Z,i.lanes=b,i;case se:return wc(u,y,b,l);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case B:S=10;break e;case ee:S=9;break e;case te:S=11;break e;case ae:S=14;break e;case ke:S=16,f=null;break e}throw Error(r(130,i==null?i:typeof i,""))}return l=hr(S,u,l,y),l.elementType=i,l.type=f,l.lanes=b,l}function Da(i,l,u,f){return i=hr(7,i,f,l),i.lanes=u,i}function wc(i,l,u,f){return i=hr(22,i,f,l),i.elementType=se,i.lanes=u,i.stateNode={isHidden:!1},i}function Vm(i,l,u){return i=hr(6,i,null,l),i.lanes=u,i}function qm(i,l,u){return l=hr(4,i.children!==null?i.children:[],i.key,l),l.lanes=u,l.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},l}function wS(i,l,u,f,y){this.tag=l,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vd(0),this.expirationTimes=vd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vd(0),this.identifierPrefix=f,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function Hm(i,l,u,f,y,b,S,P,O){return i=new wS(i,l,u,P,O),l===1?(l=1,b===!0&&(l|=8)):l=0,b=hr(3,null,null,l),i.current=b,b.stateNode=i,b.memoizedState={element:f,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},sm(b),i}function kS(i,l,u){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:M,key:f==null?null:""+f,children:i,containerInfo:l,implementation:u}}function Vy(i){if(!i)return Fn;i=i._reactInternals;e:{if(wa(i)!==i||i.tag!==1)throw Error(r(170));var l=i;do{switch(l.tag){case 3:l=l.stateNode.context;break e;case 1:if(Ht(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break e}}l=l.return}while(l!==null);throw Error(r(171))}if(i.tag===1){var u=i.type;if(Ht(u))return v0(i,u,l)}return l}function qy(i,l,u,f,y,b,S,P,O){return i=Hm(u,f,!0,i,y,b,S,P,O),i.context=Vy(null),u=i.current,f=Wt(),y=Vn(u),b=nn(f,y),b.callback=l??null,zn(u,b,y),i.current.lanes=y,Vi(i,y,f),Jt(i,f),i}function kc(i,l,u,f){var y=l.current,b=Wt(),S=Vn(y);return u=Vy(u),l.context===null?l.context=u:l.pendingContext=u,l=nn(b,S),l.payload={element:i},f=f===void 0?null:f,f!==null&&(l.callback=f),i=zn(y,l,S),i!==null&&(_r(i,y,S,b),ec(i,y,S)),S}function Nc(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function Hy(i,l){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<l?u:l}}function Gm(i,l){Hy(i,l),(i=i.alternate)&&Hy(i,l)}function NS(){return null}var Gy=typeof reportError=="function"?reportError:function(i){console.error(i)};function Ym(i){this._internalRoot=i}Sc.prototype.render=Ym.prototype.render=function(i){var l=this._internalRoot;if(l===null)throw Error(r(409));kc(i,l,null,null)},Sc.prototype.unmount=Ym.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var l=i.containerInfo;Pa(function(){kc(null,i,null,null)}),l[Zr]=null}};function Sc(i){this._internalRoot=i}Sc.prototype.unstable_scheduleHydration=function(i){if(i){var l=Ig();i={blockedOn:null,target:i,priority:l};for(var u=0;u<On.length&&l!==0&&l<On[u].priority;u++);On.splice(u,0,i),u===0&&Rg(i)}};function Jm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function _c(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function Yy(){}function SS(i,l,u,f,y){if(y){if(typeof f=="function"){var b=f;f=function(){var z=Nc(S);b.call(z)}}var S=qy(l,f,i,0,null,!1,!1,"",Yy);return i._reactRootContainer=S,i[Zr]=S.current,ao(i.nodeType===8?i.parentNode:i),Pa(),S}for(;y=i.lastChild;)i.removeChild(y);if(typeof f=="function"){var P=f;f=function(){var z=Nc(O);P.call(z)}}var O=Hm(i,0,!1,null,null,!1,!1,"",Yy);return i._reactRootContainer=O,i[Zr]=O.current,ao(i.nodeType===8?i.parentNode:i),Pa(function(){kc(l,O,u,f)}),O}function Cc(i,l,u,f,y){var b=u._reactRootContainer;if(b){var S=b;if(typeof y=="function"){var P=y;y=function(){var O=Nc(S);P.call(O)}}kc(l,S,i,y)}else S=SS(u,l,i,y,f);return Nc(S)}Tg=function(i){switch(i.tag){case 3:var l=i.stateNode;if(l.current.memoizedState.isDehydrated){var u=Wi(l.pendingLanes);u!==0&&(bd(l,u|1),Jt(l,ot()),(ze&6)===0&&(Rs=ot()+500,jn()))}break;case 13:Pa(function(){var f=rn(i,1);if(f!==null){var y=Wt();_r(f,i,1,y)}}),Gm(i,1)}},Ed=function(i){if(i.tag===13){var l=rn(i,134217728);if(l!==null){var u=Wt();_r(l,i,134217728,u)}Gm(i,134217728)}},Ag=function(i){if(i.tag===13){var l=Vn(i),u=rn(i,l);if(u!==null){var f=Wt();_r(u,i,l,f)}Gm(i,l)}},Ig=function(){return qe},Pg=function(i,l){var u=qe;try{return qe=i,l()}finally{qe=u}},md=function(i,l,u){switch(l){case"input":if(Fr(i,u),l=u.name,u.type==="radio"&&l!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+l)+'][type="radio"]'),l=0;l<u.length;l++){var f=u[l];if(f!==i&&f.form===i.form){var y=Vl(f);if(!y)throw Error(r(90));Be(f),Fr(f,y)}}}break;case"textarea":$t(i,u);break;case"select":l=u.value,l!=null&&Qr(i,!!u.multiple,l,!1)}},pg=zm,gg=Pa;var _S={usingClientEntryPoint:!1,Events:[oo,Es,Vl,fg,hg,zm]},wo={findFiberByHostInstance:ka,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},CS={bundleType:wo.bundleType,version:wo.version,rendererPackageName:wo.rendererPackageName,rendererConfig:wo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Eg(i),i===null?null:i.stateNode},findFiberByHostInstance:wo.findFiberByHostInstance||NS,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
32if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tc.isDisabled&&Tc.supportsFiber)try{Sl=Tc.inject(CS),jr=Tc}catch{}}return Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_S,Kt.createPortal=function(i,l){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Jm(l))throw Error(r(200));return kS(i,l,null,u)},Kt.createRoot=function(i,l){if(!Jm(i))throw Error(r(299));var u=!1,f="",y=Gy;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onRecoverableError!==void 0&&(y=l.onRecoverableError)),l=Hm(i,1,!1,null,null,u,!1,f,y),i[Zr]=l.current,ao(i.nodeType===8?i.parentNode:i),new Ym(l)},Kt.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var l=i._reactInternals;if(l===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=Eg(l),i=i===null?null:i.stateNode,i},Kt.flushSync=function(i){return Pa(i)},Kt.hydrate=function(i,l,u){if(!_c(l))throw Error(r(200));return Cc(null,i,l,!0,u)},Kt.hydrateRoot=function(i,l,u){if(!Jm(i))throw Error(r(405));var f=u!=null&&u.hydratedSources||null,y=!1,b="",S=Gy;if(u!=null&&(u.unstable_strictMode===!0&&(y=!0),u.identifierPrefix!==void 0&&(b=u.identifierPrefix),u.onRecoverableError!==void 0&&(S=u.onRecoverableError)),l=qy(l,null,i,1,u??null,y,!1,b,S),i[Zr]=l.current,ao(i),f)for(i=0;i<f.length;i++)u=f[i],y=u._getVersion,y=y(u._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[u,y]:l.mutableSourceEagerHydrationData.push(u,y);return new Sc(l)},Kt.render=function(i,l,u){if(!_c(l))throw Error(r(200));return Cc(null,i,l,!1,u)},Kt.unmountComponentAtNode=function(i){if(!_c(i))throw Error(r(40));return i._reactRootContainer?(Pa(function(){Cc(null,null,i,!1,function(){i._reactRootContainer=null,i[Zr]=null})}),!0):!1},Kt.unstable_batchedUpdates=zm,Kt.unstable_renderSubtreeIntoContainer=function(i,l,u,f){if(!_c(u))throw Error(r(200));if(i==null||i._reactInternals===void 0)throw Error(r(38));return Cc(i,l,u,!1,f)},Kt.version="18.3.1-next-f1338f8080-20240426",Kt}var ev;function OE(){if(ev)return Qm.exports;ev=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(),Qm.exports=DS(),Qm.exports}var tv;function MS(){if(tv)return Ac;tv=1;var t=OE();return Ac.createRoot=t.createRoot,Ac.hydrateRoot=t.hydrateRoot,Ac}var LS=MS();const FS=ya(LS);var up=OE();const jS=ya(up);/** 33 * @remix-run/router v1.21.1 34 * 35 * Copyright (c) Remix Software Inc. 36 * 37 * This source code is licensed under the MIT license found in the 38 * LICENSE.md file in the root directory of this source tree. 39 * 40 * @license MIT 41 */function Xo(){return Xo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Xo.apply(this,arguments)}var aa;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(aa||(aa={}));const rv="popstate";function US(t){t===void 0&&(t={});function e(n,s){let{pathname:o,search:c,hash:d}=n.location;return oh("",{pathname:o,search:c,hash:d},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:gu(s)}return $S(e,r,null,t)}function ut(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function RE(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function zS(){return Math.random().toString(36).substr(2,8)}function nv(t,e){return{usr:t.state,key:t.key,idx:e}}function oh(t,e,r,n){return r===void 0&&(r=null),Xo({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?_i(e):e,{state:r,key:e&&e.key||n||zS()})}function gu(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function _i(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function $S(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,c=s.history,d=aa.Pop,m=null,h=p();h==null&&(h=0,c.replaceState(Xo({},c.state,{idx:h}),""));function p(){return(c.state||{idx:null}).idx}function g(){d=aa.Pop;let w=p(),C=w==null?null:w-h;h=w,m&&m({action:d,location:k.location,delta:C})}function v(w,C){d=aa.Push;let _=oh(k.location,w,C);h=p()+1;let T=nv(_,h),A=k.createHref(_);try{c.pushState(T,"",A)}
vendor: 3,212 bytes, line 41
41catch(I){if(I instanceof DOMException&&I.name==="DataCloneError")throw I;s.location.assign(A)}o&&m&&m({action:d,location:k.location,delta:1})}function E(w,C){d=aa.Replace;let _=oh(k.location,w,C);h=p();let T=nv(_,h),A=k.createHref(_);c.replaceState(T,"",A),o&&m&&m({action:d,location:k.location,delta:0})}function N(w){let C=s.location.origin!=="null"?s.location.origin:s.location.href,_=typeof w=="string"?w:gu(w);return _=_.replace(/ $/,"%20"),ut(C,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,C)}let k={get action(){return d},get location(){return t(s,c)},listen(w){if(m)throw new Error("A history only accepts one active listener");return s.addEventListener(rv,g),m=w,()=>{s.removeEventListener(rv,g),m=null}},createHref(w){return e(s,w)},createURL:N,encodeLocation(w){let C=N(w);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:v,replace:E,go(w){return c.go(w)}};return k}var av;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(av||(av={}));function BS(t,e,r){return r===void 0&&(r="/"),WS(t,e,r)}function WS(t,e,r,n){let s=typeof e=="string"?_i(e):e,o=dp(s.pathname||"/",r);if(o==null)return null;let c=DE(t);VS(c);let d=null;for(let m=0;d==null&&m<c.length;++m){let h=r2(o);d=XS(c[m],h)}return d}function DE(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,c,d)=>{let m={relativePath:d===void 0?o.path||"":d,caseSensitive:o.caseSensitive===!0,childrenIndex:c,route:o};m.relativePath.startsWith("/")&&(ut(m.relativePath.startsWith(n),'Absolute route path "'+m.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),m.relativePath=m.relativePath.slice(n.length));let h=oa([n,m.relativePath]),p=r.concat(m);o.children&&o.children.length>0&&(ut(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),DE(o.children,e,p,h)),!(o.path==null&&!o.index)&&e.push({path:h,score:QS(h,o.index),routesMeta:p})};return t.forEach((o,c)=>{var d;if(o.path===""||!((d=o.path)!=null&&d.includes("?")))s(o,c);else for(let m of ME(o.path))s(o,c,m)}),e}function ME(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let c=ME(n.join("/")),d=[];return d.push(...c.map(m=>m===""?o:[o,m].join("/"))),s&&d.push(...c),d.map(m=>t.startsWith("/")&&m===""?"/":m)}function VS(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:ZS(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const qS=/^:[\w-]+$/,HS=3,GS=2,YS=1,JS=10,KS=-2,sv=t=>t==="*";function QS(t,e){let r=t.split("/"),n=r.length;return r.some(sv)&&(n+=KS),e&&(n+=GS),r.filter(s=>!sv(s)).reduce((s,o)=>s+(qS.test(o)?HS:o===""?YS:JS),n)}function ZS(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function XS(t,e,r){let{routesMeta:n}=t,s={},o="/",c=[];for(let d=0;d<n.length;++d){let m=n[d],h=d===n.length-1,p=o==="/"?e:e.slice(o.length)||"/",g=e2({path:m.relativePath,caseSensitive:m.caseSensitive,end:h},p),v=m.route;if(!g)return null;
vendor: 4,080 bytes, lines 41-50
41Object.assign(s,g.params),c.push({params:s,pathname:oa([o,g.pathname]),pathnameBase:i2(oa([o,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(o=oa([o,g.pathnameBase]))}return c}function e2(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=t2(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:n.reduce((h,p,g)=>{let{paramName:v,isOptional:E}=p;if(v==="*"){let k=d[g]||"";c=o.slice(0,o.length-k.length).replace(/(.)\/+$/,"$1")}const N=d[g];return E&&!N?h[v]=void 0:h[v]=(N||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:c,pattern:t}}function t2(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),RE(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,m)=>(n.push({paramName:d,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function r2(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return RE(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function dp(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function n2(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?_i(t):t;return{pathname:r?r.startsWith("/")?r:a2(r,e):e,search:o2(n),hash:l2(s)}}function a2(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function ef(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function s2(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function mp(t,e){let r=s2(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function fp(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=_i(t):(s=Xo({},t),ut(!s.pathname||!s.pathname.includes("?"),ef("?","pathname","search",s)),ut(!s.pathname||!s.pathname.includes("#"),ef("#","pathname","hash",s)),ut(!s.search||!s.search.includes("#"),ef("#","search","hash",s)));let o=t===""||s.pathname==="",c=o?"/":s.pathname,d;if(c==null)d=r;else{let g=e.length-1;if(!n&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),g-=1;s.pathname=v.join("/")}d=g>=0?e[g]:"/"}let m=n2(s,d),h=c&&c!=="/"&&c.endsWith("/"),p=(o||c===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(h||p)&&(m.pathname+="/"),m}const oa=t=>t.join("/").replace(/\/\/+/g,"/"),i2=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),o2=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,l2=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function c2(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const LE=["post","put","patch","delete"];new Set(LE);const u2=["get",...LE];new Set(u2);/** 42 * React Router v6.28.2 43 * 44 * Copyright (c) Remix Software Inc. 45 * 46 * This source code is licensed under the MIT license found in the 47 * LICENSE.md file in the root directory of this source tree. 48 * 49 * @license MIT 50 */function el(){return el=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];
vendor: 5,421 bytes, line 50
50for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},el.apply(this,arguments)}const hp=x.createContext(null),d2=x.createContext(null),va=x.createContext(null),Mu=x.createContext(null),xn=x.createContext({outlet:null,matches:[],isDataRoute:!1}),FE=x.createContext(null);function m2(t,e){let{relative:r}=e===void 0?{}:e;Ci()||ut(!1);let{basename:n,navigator:s}=x.useContext(va),{hash:o,pathname:c,search:d}=UE(t,{relative:r}),m=c;return n!=="/"&&(m=c==="/"?n:oa([n,c])),s.createHref({pathname:m,search:d,hash:o})}function Ci(){return x.useContext(Mu)!=null}function wn(){return Ci()||ut(!1),x.useContext(Mu).location}function jE(t){x.useContext(va).static||x.useLayoutEffect(t)}function ba(){let{isDataRoute:t}=x.useContext(xn);return t?_2():f2()}function f2(){Ci()||ut(!1);let t=x.useContext(hp),{basename:e,future:r,navigator:n}=x.useContext(va),{matches:s}=x.useContext(xn),{pathname:o}=wn(),c=JSON.stringify(mp(s,r.v7_relativeSplatPath)),d=x.useRef(!1);return jE(()=>{d.current=!0}),x.useCallback(function(h,p){if(p===void 0&&(p={}),!d.current)return;if(typeof h=="number"){n.go(h);return}let g=fp(h,JSON.parse(c),o,p.relative==="path");t==null&&e!=="/"&&(g.pathname=g.pathname==="/"?e:oa([e,g.pathname])),(p.replace?n.replace:n.push)(g,p.state,p)},[e,n,c,o,t])}function h2(){let{matches:t}=x.useContext(xn),e=t[t.length-1];return e?e.params:{}}function UE(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=x.useContext(va),{matches:s}=x.useContext(xn),{pathname:o}=wn(),c=JSON.stringify(mp(s,n.v7_relativeSplatPath));return x.useMemo(()=>fp(t,JSON.parse(c),o,r==="path"),[t,c,o,r])}function p2(t,e){return g2(t,e)}function g2(t,e,r,n){Ci()||ut(!1);let{navigator:s}=x.useContext(va),{matches:o}=x.useContext(xn),c=o[o.length-1],d=c?c.params:{};c&&c.pathname;let m=c?c.pathnameBase:"/";c&&c.route;let h=wn(),p;if(e){var g;let w=typeof e=="string"?_i(e):e;m==="/"||(g=w.pathname)!=null&&g.startsWith(m)||ut(!1),p=w}else p=h;let v=p.pathname||"/",E=v;if(m!=="/"){let w=m.replace(/^\//,"").split("/");E="/"+v.replace(/^\//,"").split("/").slice(w.length).join("/")}let N=BS(t,{pathname:E}),k=x2(N&&N.map(w=>Object.assign({},w,{params:Object.assign({},d,w.params),pathname:oa([m,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?m:oa([m,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r,n);return e&&k?x.createElement(Mu.Provider,{value:{location:el({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:aa.Pop}},k):k}function y2(){let t=S2(),e=c2(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},e),r?x.createElement("pre",{style:s},r):null,null)}const v2=x.createElement(y2,null);class b2 extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?x.createElement(xn.Provider,{value:this.props.routeContext},x.createElement(FE.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function E2(t){let{routeContext:e,match:r,children:n}=t,s=x.useContext(hp);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(xn.Provider,{value:e},n)}function x2(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var o;if(!r)return null;if(r.errors)t=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let c=t,d=(s=r)==null?void 0:s.errors;if(d!=null){let p=c.findIndex(g=>g.route.id&&d?.[g.route.id]!==void 0);p>=0||ut(!1),c=c.slice(0,Math.min(c.length,p+1))}let m=!1,h=-1;if(r&&n&&n.v7_partialHydration)for(let p=0;p<c.length;p++){let g=c[p];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(h=p),g.route.id){let{loaderData:v,errors:E}=r,N=g.route.loader&&v[g.route.id]===void 0&&(!E||E[g.route.id]===void 0);if(g.route.lazy||N){m=!0,h>=0?c=c.slice(0,h+1):c=[c[0]];break}}}return c.reduceRight((p,g,v)=>{let E,N=!1,k=null,w=null;r&&(E=d&&g.route.id?d[g.route.id]:void 0,k=g.route.errorElement||v2,m&&(h<0&&v===0?(C2("route-fallback"),N=!0,w=null):h===v&&(N=!0,w=g.route.hydrateFallbackElement||null)));let C=e.concat(c.slice(0,v+1)),_=()=>{let T;return E?T=k:N?T=w:g.route.Component?T=x.createElement(g.route.Component,null):g.route.element?T=g.route.element:T=p,x.createElement(E2,{match:g,routeContext:{outlet:p,matches:C,isDataRoute:r!=null},children:T})};return r&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?x.createElement(b2,{location:r.location,revalidation:r.revalidation,component:k,error:E,children:_(),routeC
50ontext:{outlet:null,matches:C,isDataRoute:!0}}):_()},null)}var zE=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(zE||{}),$E=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}($E||{});function w2(t){let e=x.useContext(hp);return e||ut(!1),e}function k2(t){let e=x.useContext(d2);return e||ut(!1),e}function N2(t){let e=x.useContext(xn);return e||ut(!1),e}function BE(t){let e=N2(),r=e.matches[e.matches.length-1];return r.route.id||ut(!1),r.route.id}function S2(){var t;let e=x.useContext(FE),r=k2(),n=BE();return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function _2(){let{router:t}=w2(zE.UseNavigateStable),e=BE($E.UseNavigateStable),r=x.useRef(!1);return jE(()=>{r.current=!0}),x.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,el({fromRouteId:e},o)))},[t,e])}const iv={};function C2(t,e,r){iv[t]||(iv[t]=!0)}const ov={};function T2(t,e){ov[e]||(ov[e]=!0,console.warn(e))}const lv=(t,e,r)=>T2(t,"â ï¸ React Router Future Flag Warning: "+e+". "+("You can use the `"+t+"` future flag to opt-in early. ")+("For more information, see "+r+"."));function A2(t,e){t?.v7_startTransition===void 0&&lv("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),t?.v7_relativeSplatPath===void 0&&lv("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function WE(t){let{to:e,replace:r,state:n,relative:s}=t;Ci()||ut(!1);let{future:o,static:c}=x.useContext(va),{matches:d}=x.useContext(xn),{pathname:m}=wn(),h=ba(),p=fp(e,mp(d,o.v7_relativeSplatPath),m,s==="path"),g=JSON.stringify(p);return x.useEffect(()=>h(JSON.parse(g),{replace:r,state:n,relative:s}),[h,g,s,r,n]),null}function st(t){ut(!1)}function I2(t){let{basename:e="/",children:r=null,location:n,navigationType:s=aa.Pop,navigator:o,static:c=!1,future:d}=t;Ci()&&ut(!1);let m=e.replace(/^\/*/,"/"),h=x.useMemo(()=>({basename:m,navigator:o,static:c,future:el({v7_relativeSplatPath:!1},d)}),[m,d,o,c]);typeof n=="string"&&(n=_i(n));let{pathname:p="/",search:g="",hash:v="",state:E=null,key:N="default"}=n,k=x.useMemo(()=>{let w=dp(p,m);return w==null?null:{location:{pathname:w,search:g,hash:v,state:E,key:N},navigationType:s}},[m,p,g,v,E,N,s]);return k==null?null:x.createElement(va.Provider,{value:h},x.createElement(Mu.Provider,{children:r,value:k}))}function P2(t){let{children:e,location:r}=t;return p2(lh(e),r)}new Promise(()=>{});function lh(t,e){e===void 0&&(e=[]);let r=[];return x.Children.forEach(t,(n,s)=>{if(!x.isValidElement(n))return;let o=[...e,s];if(n.type===x.Fragment){r.push.apply(r,lh(n.props.children,o));return}n.type!==st&&ut(!1),!n.props.index||!n.props.children||ut(!1);let c={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(c.children=lh(n.props.children,o)),r.push(c)}),r}/** 51 * React Router DOM v6.28.2 52 * 53 * Copyright (c) Remix Software Inc. 54 * 55 * This source code is licensed under the MIT license found in the 56 * LICENSE.md file in the root directory of this source tree. 57 * 58 * @license MIT 59 */function ch(){return ch=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ch.apply(this,arguments)}function O2(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,o;for(o=0;o<n.length;o++)s=n[o],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function R2(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function D2(t,e){return t.button===0&&(!e||e==="_self")&&!R2(t)}function uh(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function M2(t,e){let r=uh(t);return e&&e.forEach((n,s)=>
59{r.has(s)||e.getAll(s).forEach(o=>{r.append(s,o)})}),r}const L2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],F2="6";try{window.__reactRouterVersion=F2}catch{}const j2="startTransition",cv=PE[j2];function U2(t){let{basename:e,children:r,future:n,window:s}=t,o=x.useRef();o.current==null&&(o.current=US({window:s,v5Compat:!0}));let c=o.current,[d,m]=x.useState({action:c.action,location:c.location}),{v7_startTransition:h}=n||{},p=x.useCallback(g=>{h&&cv?cv(()=>m(g)):m(g)},[m,h]);return x.useLayoutEffect(()=>c.listen(p),[c,p]),x.useEffect(()=>A2(n),[n]),x.createElement(I2,{basename:e,children:r,location:d.location,navigationType:d.action,navigator:c,future:n})}const z2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Tt=x.forwardRef(function(e,r){let{onClick:n,relative:s,reloadDocument:o,replace:c,state:d,target:m,to:h,preventScrollReset:p,viewTransition:g}=e,v=O2(e,L2),{basename:E}=x.useContext(va),N,k=!1;if(typeof h=="string"&&$2.test(h)&&(N=h,z2))try{let T=new URL(window.location.href),A=h.startsWith("//")?new URL(T.protocol+h):new URL(h),I=dp(A.pathname,E);A.origin===T.origin&&I!=null?h=I+A.search+A.hash:k=!0}catch{}let w=m2(h,{relative:s}),C=B2(h,{replace:c,state:d,target:m,preventScrollReset:p,relative:s,viewTransition:g});function _(T){n&&n(T),T.defaultPrevented||C(T)}return x.createElement("a",ch({},v,{href:N||w,onClick:k||o?n:_,ref:r,target:m}))});var uv;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(uv||(uv={}));var dv;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(dv||(dv={}));function B2(t,e){let{target:r,replace:n,state:s,preventScrollReset:o,relative:c,viewTransition:d}=e===void 0?{}:e,m=ba(),h=wn(),p=UE(t,{relative:c}
59);return x.useCallback(g=>{if(D2(g,r)){g.preventDefault();let v=n!==void 0?n:gu(h)===gu(p);m(t,{replace:v,state:s,preventScrollReset:o,relative:c,viewTransition:d})}},[h,m,p,n,s,r,t,o,c,d])}function W2(t){let e=x.useRef(uh(t)),r=x.useRef(!1),n=wn(),s=x.useMemo(()=>M2(n.search,r.current?null:e.current),[n.search]),o=ba(),c=x.useCallback((d,m)=>{const h=uh(typeof d=="function"?d(s):d);r.current=!0,o("?"+h,m)},[o,s]);return[s,c]}const VE=x.createContext(void 0);function V2({children:t}){const[e,r]=x.useState("dark");x.useEffect(()=>{const s=window.document.documentElement,o=localStorage.getItem("theme");o?(r(o),s.classList.toggle("dark",o==="dark")):window.matchMedia("(prefers-color-scheme: dark)").matches&&(r("dark"),s.classList.add("dark"))},[]);const n={theme:e,setTheme:s=>{const o=window.document.documentElement;localStorage.setItem("theme",s),o.classList.toggle("dark",s==="dark"),r(s)}};return a.createElement(VE.Provider,{value:n},t)}function q2(){const t=x.useContext(VE);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t}var pp=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},le=(t,e,r)=>(pp(t,e,"read from private field"),r?r.call(t):e.get(t)),za=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Ma=(t,e,r,n)=>(pp(t,e,"write to private field"),e.set(t,r),r),H2=(t,e,r)=>(pp(t,e,"access private method"),r),mv={},fv;function G2(){return fv||(fv=1,typeof window<"u"&&!window.global&&(window.global=typeof pu>"u"?window:pu)),mv}G2();var qE=t=>typeof atob<"u"&&typeof atob=="function"?atob(t):typeof global<"u"&&global.Buffer?new global.Buffer(t,"base64").toString():t,HE="pk_live_",Y2="pk_test_";function hv(t){if(t=t||"",!GE(t))return null;const e=t.startsWith(HE)?"production":"development";let r=qE(t.split("_")[2]);return r.endsWith("$")?(r=r.slice(0,-1),{instanceType:e,frontendApi:r}):null}function GE(t){t=t||"";const e=t.startsWith(HE)||t.startsWith(Y2),r=qE(t.split("_")[2]||"").endsWith("$");return e&&r}function J2(t){return t=t||"",t.startsWith("clerk.")}function K2(){const t=[".lcl.dev",".stg.dev",".lclstage.dev",".stgstage.dev",".dev.lclclerk.com",".stg.lclclerk.com",".accounts.lclclerk.com","accountsstage.dev","accounts.dev"],e=new Map;return{isDevOrStagingUrl:r=>{if(!r)return!1;const n=typeof r=="string"?r:r.hostname;let s=e.get(n);return s===void 0&&(s=t.some(o=>n.endsWith(o)),e.set(n,s)),s}}}var YE=Object.defineProperty,Q2=Object.getOwnPropertyDescriptor,Z2=Object.getOwnPropertyNames,X2=Object.prototype.hasOwnProperty,e_=(t,e)=>{for(var r in e)YE(t,r,{get:e[r],enumerable:!0})},t_=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Z2(e))!X2.call(t,s)&&s!==r&&YE(t,s,{get:()=>e[s],enumerable:!(n=Q2(e,s))||n.enumerable});return t},r_=(t,e,r)=>(t_(t,e,"default"),r),n_=()=>{try{return!1}catch{}return!1},a_=()=>{try{return!1}catch{}return!1},s_=()=>{try{return!0}catch{}return!1},pv=new Set,yu=(t,e,r)=>{const n=a_()||s_(),s=t;pv.has(s)||n||(pv.add(s),console.warn(`Clerk - DEPRECATION WARNING: "${t}" is deprecated and will be removed in the next major release. 60${e}`))},i_={Expired:"expired",Failed:"failed"};new Proxy(i_,{get(t,e,r){return yu("MagicLinkErrorCode","Use `EmailLinkErrorCode` instead."),Reflect.get(t,e,r)}});var o_=Object.freeze({InvalidFrontendApiErrorMessage:"The frontendApi passed to Clerk is invali
60d. You can get your Frontend API key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",InvalidProxyUrlErrorMessage:"The proxyUrl passed to Clerk is invalid. The expected value for proxyUrl is an absolute URL or a relative path with a leading '/'. (key={{url}})",InvalidPublishableKeyErrorMessage:"The publishableKey passed to Clerk is invalid. You can get your Publishable key at https://dashboard.clerk.com/last-active?path=api-keys. (key={{key}})",MissingPublishableKeyErrorMessage:"Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys."});function l_({packageName:t,customMessages:e}){let r=t;const n={...o_,...e};function s(o,c){if(!c)return`${r}: ${o}`;let d=o;const m=o.matchAll(/{{([a-zA-Z0-9-_]+)}}/g);for(const h of m){const p=(c[h[1]]||"").toString();d=d.replace(`{{${h[1]}}}`,p)}return`${r}: ${d}`}return{setPackageName({packageName:o}){return typeof o=="string"&&(r=o),this},setMessages({customMessages:o}){return Object.assign(n,o||{}),this},throwInvalidPublishableKeyError(o){throw new Error(s(n.InvalidPublishableKeyErrorMessage,o))},throwInvalidFrontendApiError(o){throw new Error(s(n.InvalidFrontendApiErrorMessage,o))},throwInvalidProxyUrl(o){throw new Error(s(n.InvalidProxyUrlErrorMessage,o))},throwMissingPublishableKeyError(){throw new Error(s(n.MissingPublishableKeyErrorMessage))}}}const c_="Clerk: You must wrap your application in a <ClerkProvider> component.",u_="Clerk: You've added multiple <ClerkProvider> components in your React component tree. Wrap your components in a single <ClerkProvider>.",d_="Clerk: Invalid state. Feel free to submit a bug or reach out to support here: https://clerk.com/support",tf="Clerk: Unsupported usage of isSatellite, domain or proxyUrl. The usage of isSatellite, domain or proxyUrl as function is not supported in non-browser environments.",m_="Clerk: <UserProfile.Page /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",f_="Clerk: <UserProfile.Link /> component needs to be a direct child of `<UserProfile />` or `<UserButton />`.",h_="Clerk: <OrganizationProfile.Page /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",p_="Clerk: <OrganizationProfile.Link /> component needs to be a direct child of `<OrganizationProfile />` or `<OrganizationSwitcher />`.",g_=t=>`Clerk: <${t} /> can only accept <${t}.Page /> and <${t}.Link /> as its children. Any other provided component will be ignored.`,y_=t=>`Clerk: Missing props. <${t}.Page /> component requires the following props: url, label, labelIcon, alongside with children to be rendered inside the page.`,v_=t=>`Clerk: Missing props. <${t}.Link /> component requires the following props: url, label and labelIcon.`,b_='Clerk: Missing parameters. `has` from `useAuth` requires a permission or role key to be passed. Example usage: `has({permission: "org:posts:edit"`',Ho=l_({packageName:"@clerk/react"});function E_(t){Ho.setMessages(t).setPackageName(t)}function x_(t){return typeof t=="function"}var w_="loadScript cannot be called when document does not exist",k_="loadScript cannot be called without a src";async function N_(t="",e){const{async:r,defer:n,beforeLoad:s,crossOrigin:o}=e||{};return new Promise((c,d)=>{t||d(k_),(!document||!document.body)&&d(w_);const m=document.createElement("script");o&&m.setAttribute("crossorigin",o),m.async=r||!1,m.defer=n||!1,m.addEventListener("load",()=>{m.remove(),c(m)}),m.addEventListener("error",()=>{m.remove(),d()}),m.src=t,s?.(m),document.body.appendChild(m)})}function S_(t){return t?__(t)||JE(t):!0}function __(t){return/^http(s)?:\/\//.test(t||"")}function JE(t){return t.startsWith("/")}function C_(t){return t?JE(t)?new URL(t,window.location.origin).toString():t:""}function T_(t){if(!t)return"";let e;if(t.match(/^(clerk\.)+\w*$/))e=/(clerk\.)*(?=clerk\.)/;else{if(t.match(/\.clerk.accounts/))return t;e=/^(clerk\.)*/gi}return`clerk.${t.replace(e,"")}`}const{isDevOrStagingUrl:A_}=K2(),I_=t=>{if(t)return t;const e=P_("4.32.4");return e?e==="snapshot"?"4.73.9":e:O_("4.32.4")},P_=t=>{var e;return(e=t.match(/-(.*)\./))==null?void 0:e[1]},O_=t=>t.split(".")[0],R_="Clerk: Failed to load Clerk",D_=t=>{const{frontendApi:e,publishableKey:r}=t;return!r&&!e&&Ho.throwMissingPublishableKeyError(),N_(M_(t),{async:!0,crossOrigin:"anonymous",beforeLoad:L_(t)}).catch(()=>{throw new Error(R_)})},M_=t=>{var e,r;const{clerkJSUrl:n,clerkJSVariant:s,clerkJSVersion:o,proxyUrl:c,domain:d,publishableKey:m,frontendApi:h}=t;if(n)return n;let p="";c&&S_(c)?p=C_(c).replace(/http(s)?:\/\//,""):d&&!A_(((e=hv(m))==null?void 0:e.frontendApi)||h||"")?p=T_(d):p=((r=hv(m))==null?void 0:r.frontendApi)||h||"";const g=s?`${s.replace(/\.+$/,"")}.`:"",v=I_(o);return`https://${p}/npm/@clerk/clerk-js@${v}/dist/clerk.${g}browser.js`},L_=t=>e=>{const{publishableKey:r,frontendApi:n,proxyUrl:s,domain:o}=t;r?e.setAttribute("data-clerk-publishable-key",r):n&&e.setAttribute("data-clerk-frontend-api",n),s&&e.setAttribute("data-clerk-proxy-url",s),o&&e.setAttribute("data-clerk-domain",o)},Ic=new Map;function F_(t,e,r=1){a.useEffect(()=>{const n=Ic.get(t)||0;if(n==r)throw new Error(e);return Ic.set(t,n+1),()=>{Ic.set(t,(Ic.get(t)||1)-1)}},[])}function j_(t,e,r){const n=t.displayName||t.name||e||"Component",s=o=>(F_(e,r),a.createElement(t,{...o}));return s.displayName=`withMaxAllowedInstancesGuard(${n})`,s}const rf=t=>{const e=Array(t.length).fill(null),[r,n]=x.useState(e);return t.map((s,o)=>({id:s.id,mount:c=>n(d=>d.map((m,h)=>h===o?c:m)),unmount:()=>n(c=>c.map((d,m)=>m===o?null:d)),portal:()=>a.createElement(a.Fragment,null,r[o]?up.createPortal(s.component,r[o]):null)}))};function nf(t,e,r){if(typeof t=="function")return t(e);if(typeof t<"u")return t;if(typeof r<"u")return r}
60function gv(){return typeof window<"u"}var Ya=t=>{n_()&&console.error(t)},af={exports:{}},sf={};/** 61 * @license React 62 * use-sync-external-store-shim.production.js 63 * 64 * Copyright (c) Meta Platforms, Inc. and affiliates. 65 * 66 * This source code is licensed under the MIT license found in the 67 * LICENSE file in the root directory of this source tree. 68 */var yv;function U_(){if(yv)return sf;yv=1;var t=Du();function e(g,v){return g===v&&(g!==0||1/g===1/v)||g!==g&&v!==v}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,s=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function d(g,v){var E=v(),N=n({inst:{value:E,getSnapshot:v}}),k=N[0].inst,w=N[1];return o(function(){k.value=E,k.getSnapshot=v,m(k)&&w({inst:k})},[g,E,v]),s(function(){return m(k)&&w({inst:k}),g(function(){m(k)&&w({inst:k})})},[g]),c(E),E}function m(g){var v=g.getSnapshot;g=g.value;try{var E=v();return!r(g,E)}catch{return!0}}function h(g,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return sf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,sf}var vv;function z_(){return vv||(vv=1,af.exports=U_()),af.exports}var KE=z_();const sa=()=>{},Vt=sa(),Zc=Object,Re=t=>t===Vt,Ir=t=>typeof t=="function",yn=(t,e)=>({...t,...e}),$_=t=>Ir(t.then),Pc=new WeakMap;let B_=0;const tl=t=>{const e=typeof t,r=t&&t.constructor,n=r==Date;let s,o;if(Zc(t)===t&&!n&&r!=RegExp){if(s=Pc.get(t),s)return s;if(s=++B_+"~",Pc.set(t,s),r==Array){for(s="@",o=0;o<t.length;o++)s+=tl(t[o])+",";Pc.set(t,s)}if(r==Zc){s="#";const c=Zc.keys(t).sort();for(;!Re(o=c.pop());)Re(t[o])||(s+=o+":"+tl(t[o])+",");Pc.set(t,s)}}else s=n?t.toJSON():e=="symbol"?t.toString():e=="string"?JSON.stringify(t):""+t;return s},Vr=new WeakMap,of={},Oc={},gp="undefined",Lu=typeof window!=gp,dh=typeof document!=gp,W_=()=>Lu&&typeof window.requestAnimationFrame!=gp,ea=(t,e)=>{const r=Vr.get(t);return[()=>!Re(e)&&t.get(e)||of,n=>{if(!Re(e)){const s=t.get(e);e in Oc||(Oc[e]=s),r[5](e,yn(s,n),s||of)}},r[6],()=>!Re(e)&&e in Oc?Oc[e]:!Re(e)&&t.get(e)||of]};let mh=!0;const V_=()=>mh,[fh,hh]=Lu&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[sa,sa],q_=()=>{const t=dh&&document.visibilityState;return Re(t)||t!=="hidden"},H_=t=>(dh&&document.addEventListener("visibilitychange",t),fh("focus",t),()=>{dh&&document.removeEventListener("visibilitychange",t),hh("focus",t)}),G_=t=>{const e=()=>{mh=!0,t()},r=()=>{mh=!1};return fh("online",e),fh("offline",r),()=>{hh("online",e),hh("offline",r)}},Y_={isOnline:V_,isVisible:q_},J_={initFocus:H_,initReconnect:G_},bv=!a.useId,rl=!Lu||"Deno"in window,K_=t=>W_()?window.requestAnimationFrame(t):setTimeout(t,1),Go=rl?x.useEffect:x.useLayoutEffect,lf=typeof navigator<"u"&&navigator.connection,Ev=!rl&&lf&&(["slow-2g","2g"].includes(lf.effectiveType)||lf.saveData),da=t=>{if(Ir(t))try{t=t()}catch{t=""}const e=t;return t=typeof t=="string"?t:(Array.isArray(t)?t.length:t)?tl(t):"",[t,e]};let Q_=0;const ph=()=>++Q_,QE=0,ZE=1,XE=2,Z_=3;var ko={__proto__:null,ERROR_REVALIDATE_EVENT:Z_,FOCUS_EVENT:QE,MUTATE_EVENT:XE,RECONNECT_EVENT:ZE};async function ex(...t){const[e,r,n,s]=t,o=yn({populateCache:!0,throwOnError:!0},typeof s=="boolean"?{revalidate:s}:s||{});let c=o.populateCache;const d=o.rollbackOnError;let m=o.optimisticData;const h=o.revalidate!==!1,p=E=>typeof d=="function"?d(E):d!==!1,g=o.throwOnError;if(Ir(r)){const E=r,N=[],k=e.keys();for(const w of k)!/^\$(inf|sub)\$/.test(w)&&E(e.get(w)._k)&&N.push(w);return Promise.all(N.map(v))}return v(r);async function v(E){const[N]=da(E);if(!N)return;const[k,w]=ea(e,N),[C,_,T,A]=Vr.get(e),I=C[N],M=()=>h&&(delete T[N],delete A[N],I&&I[0])?I[0](XE).then(()=>k().data):k().data;if(t.length<3)return M();let D=n,$;const j=ph();_[N]=[j,0];const B=!Re(m),ee=k(),te=ee.data,ne=ee._c,Z=Re(ne)?te:ne;if(B&&(m=Ir(m)?m(Z,te):m,w({data:m,_c:Z})),Ir(D))try{D=D(Z)}catch(ke){$=ke}if(D&&$_(D))if(D=await D.catch(ke=>{$=ke}),j!==_[N][0]){if($)throw $;return D}else $&&B&&p($)&&(c=!0,D=Z,w({data:D,_c:Vt}));c&&($||(Ir(c)&&(D=c(D,Z)),w({data:D,error:Vt,_c:Vt}
68))),_[N][1]=ph();const ae=await M();if(w({_c:Vt}),$){if(g)throw $;return}return c?ae:D}}const xv=(t,e)=>{for(const r in t)t[r][0]&&t[r][0](e)},tx=(t,e)=>{if(!Vr.has(t)){const r=yn(J_,e),n={},s=ex.bind(Vt,t);let o=sa;const c={},d=(p,g)=>{const v=c[p]||[];return c[p]=v,v.push(g),()=>v.splice(v.indexOf(g),1)},m=(p,g,v)=>{t.set(p,g);const E=c[p];if(E)for(const N of E)N(g,v)},h=()=>{if(!Vr.has(t)&&(Vr.set(t,[n,{},{},{},s,m,d]),!rl)){const p=r.initFocus(setTimeout.bind(Vt,xv.bind(Vt,n,QE))),g=r.initReconnect(setTimeout.bind(Vt,xv.bind(Vt,n,ZE)));o=()=>{p&&p(),g&&g(),Vr.delete(t)}}};return h(),[t,s,h,o]}return[t,Vr.get(t)[4]]},X_=(t,e,r,n,s)=>{const o=r.errorRetryCount,c=s.retryCount,d=~~((Math.random()+.5)*(1<<(c<8?c:8)))*r.errorRetryInterval;!Re(o)&&c>o||setTimeout(n,d,s)},eC=(t,e)=>tl(t)==tl(e),[Fu,rx]=tx(new Map),nx=yn({onLoadingSlow:sa,onSuccess:sa,onError:sa,onErrorRetry:X_,onDiscarded:sa,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Ev?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Ev?5e3:3e3,compare:eC,isPaused:()=>!1,cache:Fu,mutate:rx,fallback:{}},Y_),ax=(t,e)=>{const r=yn(t,e);if(e){const{use:n,fallback:s}=t,{use:o,fallback:c}=e;n&&o&&(r.use=n.concat(o)),s&&c&&(r.fallback=yn(s,c))}return r},gh=x.createContext({}),tC=t=>{const{value:e}=t,r=x.useContext(gh),n=Ir(e),s=x.useMemo(()=>n?e(r):e,[n,r,e]),o=x.useMemo(()=>n?s:ax(r,s),[n,r,s]),c=s&&s.provider,d=x.useRef(Vt);c&&!d.current&&(d.current=tx(c(o.cache||Fu),s));const m=d.current;return m&&(o.cache=m[0],o.mutate=m[1]),Go(()=>{if(m)return m[2]&&m[2](),m[3]},[]),x.createElement(gh.Provider,yn(t,{value:o}))},sx=Lu&&window.__SWR_DEVTOOLS_USE__,rC=sx?window.__SWR_DEVTOOLS_USE__:[],nC=()=>{sx&&(window.__SWR_DEVTOOLS_REACT__=a)},ix=t=>Ir(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(t[1]===null?t[2]:t[1])||{}],ox=()=>yn(nx,x.useContext(gh)),aC=(t,e)=>{const[r,n]=da(t),[,,,s]=Vr.get(Fu);if(s[r])return s[r];const o=e(n);return s[r]=o,o},sC=t=>(e,r,n)=>t(e,r&&((...o)=>{const[c]=da(e),[,,,d]=Vr.get(Fu),m=d[c];return Re(m)?r(...o):(delete d[c],m)}),n),iC=rC.concat(sC),oC=t=>function(...r){const n=ox(),[s,o,c]=ix(r),d=ax(n,c);let m=t;const{use:h}=d,p=(h||[]).concat(iC);for(let g=p.length;g--;)m=p[g](m);return m(s,o||d.fetcher||null,d)},lC=(t,e,r)=>{const n=e[t]||(e[t]=[]);return n.push(r),()=>{const s=n.indexOf(r);s>=0&&(n[s]=n[n.length-1],n.pop())}},cC=(t,e)=>(...r)=>{const[n,s,o]=ix(r),c=(o.use||[]).concat(e);return t(n,s,{...o,use:c})};nC();const uC=t=>da(t)[0],wv=a.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)}),cf={dedupe:!0},dC=(t,e,r)=>{const{cache:n,compare:s,suspense:o,fallbackData:c,revalidateOnMount:d,revalidateIfStale:m,refreshInterval:h,refreshWhenHidden:p,refreshWhenOffline:g,keepPreviousData:v}=r,[E,N,k,w]=Vr.get(n),[C,_]=da(t),T=x.useRef(!1),A=x.useRef(!1),I=x.useRef(C),M=x.useRef(e),D=x.useRef(r),$=()=>D.current,j=()=>$().isVisible()&&$().isOnline(),[B,ee,te,ne]=ea(n,C),Z=x.useRef({}).current,ae=Re(c)?r.fallback[C]:c,ke=(Be,Le)=>{for(const Je in Z){const Ue=Je;if(Ue==="data"){if(!s(Be[Ue],Le[Ue])&&(!Re(Be[Ue])||!s(_e,Le[Ue])))return!1}else if(Le[Ue]!==Be[Ue])return!1}return!0},se=x.useMemo(()=>{const Be=!C||!e?!1:Re(d)?$().isPaused()||o?!1:Re(m)?!0:m:d,Le=gt=>{const zt=yn(gt);return delete zt._k,Be?{isValidating:!0,isLoading:!0,...zt}:zt},Je=B(),Ue=ne(),At=Le(Je),Fr=Je===Ue?At:Le(Ue);let dt=At;return[()=>{const gt=Le(B());return ke(gt,dt)?(dt.data=gt.data,dt.isLoading=gt.isLoading,dt.isValidating=gt.isValidating,dt.error=gt.error,dt):(dt=gt,gt)},()=>Fr]},[n,C]),V=KE.useSyncExternalStore(x.useCallback(Be=>te(C,(Le,Je)=>{ke(Je,Le)||Be()}),[n,C]),se[0],se[1]),re=!T.current,K=E[C]&&E[C].length>0,R=V.data,W=Re(R)?ae:R,we=V.error,xe=x.useRef(W),_e=v?Re(R)?xe.current:R:W,J=K&&!Re(we)?!1:re&&!Re(d)?d:$().isPaused()?!1:o?Re(W)?!1:m:Re(W)||m,me=!!(C&&e&&re&&J),ye=Re(V.isValidating)?me:V.isValidating,ve=Re(V.isLoading)?me:V.isLoading,$e=x.useCallback(async Be=>{const Le=M.current;if(!C||!Le||A.current||$().isPaused())return!1;let Je,Ue,At=!0;const Fr=Be||{},dt=!k[C]||!Fr.dedupe,gt=()=>bv?!A.current&&C===I.current&&T.current:C===I.current,zt={isValidating:!1,isLoading:!1},Qr=()=>{ee(zt)},cs=()=>{const $t=k[C];$t&&$t[1]===Ue&&delete k[C]},Li={isValidating:!0};Re(B().data)&&(Li.isLoading=!0);try{if(dt&&(ee(Li),r.loadingTimeout&&Re(B().data)&&setTimeout(()=>{At&>()&&$().onLoadingSlow(C,r)},r.loadingTimeout),k[C]=[Le(_),ph()]),[Je,Ue]=k[C],Je=await Je,dt&&setTimeout(cs,r.dedupingInterval),!k[C]||k[C][1]!==Ue)return dt&>()&&$().onDiscarded(C),!1;zt.error=Vt;const $t=N[C];if(!Re($t)&&(Ue<=$t[0]||Ue<=$t[1]||$t[1]===0))return Qr(),dt&>()&&$().onDiscarded(C),!1;const lr=B().data;zt.data=s(lr,Je)?lr:Je,dt&>()&&$().onSuccess(Je,C,r)}catch($t){cs();const lr=$(),{shouldRetryOnError:us}=lr;lr.isPaused()||(zt.error=$t,dt&>()&&(lr.onError($t,C,lr),(us===!0||Ir(us)&&us($t))&&j()&&lr.onErrorRetry($t,C,lr,Fi=>{const Tn=E[C];Tn&&Tn[0]&&Tn[0](ko.ERROR_REVALIDATE_EVENT,Fi)},{retryCount:(Fr.retryCount||0)+1,dedupe:!0})))}return At=!1,Qr(),!0},[C,n]),Ye=x.useCallback((...Be)=>ex(n,I.current,...Be),[]);if(Go(()=>{M.current=e,D.current=r,Re(R)||(xe.current=R)}),Go(()=>
68{if(!C)return;const Be=$e.bind(Vt,cf);let Le=0;const Ue=lC(C,E,(At,Fr={})=>{if(At==ko.FOCUS_EVENT){const dt=Date.now();$().revalidateOnFocus&&dt>Le&&j()&&(Le=dt+$().focusThrottleInterval,Be())}else if(At==ko.RECONNECT_EVENT)$().revalidateOnReconnect&&j()&&Be();else{if(At==ko.MUTATE_EVENT)return $e();if(At==ko.ERROR_REVALIDATE_EVENT)return $e(Fr)}});return A.current=!1,I.current=C,T.current=!0,ee({_k:_}),J&&(Re(W)||rl?Be():K_(Be)),()=>{A.current=!0,Ue()}},[C]),Go(()=>{let Be;function Le(){const Ue=Ir(h)?h(B().data):h;Ue&&Be!==-1&&(Be=setTimeout(Je,Ue))}function Je(){!B().error&&(p||$().isVisible())&&(g||$().isOnline())?$e(cf).then(Le):Le()}return Le(),()=>{Be&&(clearTimeout(Be),Be=-1)}},[h,p,g,C]),x.useDebugValue(_e),o&&Re(W)&&C){if(!bv&&rl)throw new Error("Fallback data is required when using suspense in SSR.");M.current=e,D.current=r,A.current=!1;const Be=w[C];if(!Re(Be)){const Le=Ye(Be);wv(Le)}if(Re(we)){const Le=$e(cf);Re(_e)||(Le.status="fulfilled",Le.value=!0),wv(Le)}else throw we}return{mutate:Ye,get data(){return Z.data=!0,_e},get error(){return Z.error=!0,we},get isValidating(){return Z.isValidating=!0,ye},get isLoading(){return Z.isLoading=!0,ve}}},yp=Zc.defineProperty(tC,"defaultValue",{value:nx}),vp=oC(dC),mC=Object.freeze(Object.defineProperty({__proto__:null,SWRConfig:yp,default:vp,mutate:rx,preload:aC,unstable_serialize:uC,useSWRConfig:ox},Symbol.toStringTag,{value:"Module"})),fC="$inf$",hC=t=>da(t?t(0,null):null)[0],uf=Promise.resolve(),pC=t=>(e,r,n)=>{const s=x.useRef(!1),{cache:o,initialSize:c=1,revalidateAll:d=!1,persistSize:m=!1,revalidateFirstPage:h=!0,revalidateOnMount:p=!1,parallel:g=!1}=n;let v;try{v=hC(e),v&&(v=fC+v)}catch{}const[E,N,k]=ea(o,v),w=x.useCallback(()=>Re(E()._l)?c:E()._l,[o,v,c]);KE.useSyncExternalStore(x.useCallback(D=>v?k(v,()=>{D()}):()=>{},[o,v]),w,w);const C=x.useCallback(()=>{const D=E()._l;return Re(D)?c:D},[v,c]),_=x.useRef(C());Go(()=>{if(!s.current){s.current=!0;return}v&&N({_l:m?_.current:C()})},[v,o]);const T=p&&!s.current,A=t(v,async D=>{const $=E()._i,j=[],B=C(),[ee]=ea(o,D),te=ee().data,ne=[];let Z=null;for(let ae=0;ae<B;++ae){const[ke,se]=da(e(ae,g?null:Z));if(!ke)break;const[V,re]=ea(o,ke);let K=V().data;const R=d||$||Re(K)||h&&!ae&&!Re(te)||T||te&&!Re(te[ae])&&!n.compare(te[ae],K);if(r&&R){const W=async()=>{K=await r(se),re({data:K,_k:se}),j[ae]=K};g?ne.push(W):await W()}else j[ae]=K;g||(Z=K)}return g&&await Promise.all(ne.map(ae=>ae())),N({_i:Vt}),j},n),I=x.useCallback(function(D,$){const j=typeof $=="boolean"?{revalidate:$}:$||{},B=j.revalidate!==!1;return v?(B&&(Re(D)?N({_i:!0}):N({_i:!1})),arguments.length?A.mutate(D,{...j,revalidate:B}):A.mutate()):uf},[v,o]),M=x.useCallback(D=>{if(!v)return uf;const[,$]=ea(o,v);let j;if(Ir(D)?j=D(C()):typeof D=="number"&&(j=D),typeof j!="number")return uf;$({_l:j}),_.current=j;const B=[],[ee]=ea(o,v);let te=null;for(let ne=0;ne<j;
68++ne){const[Z]=da(e(ne,te)),[ae]=ea(o,Z),ke=Z?ae().data:Vt;if(Re(ke))return I(ee().data);B.push(ke),te=ke}return I(B)},[v,o,I,C]);return{size:C(),setSize:M,mutate:I,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}},gC=cC(vp,pC);function yC(t,e){if(!t)throw typeof e=="string"?new Error(e):new Error(`${e.displayName} not found`)}var Ti=(t,e)=>{const{assertCtxFn:r=yC}={},n=a.createContext(void 0);return n.displayName=t,[n,()=>{const c=a.useContext(n);return r(c,`${t} not found`),c.value},()=>{const c=a.useContext(n);return c?c.value:{}}]},lx={};e_(lx,{SWRConfig:()=>yp,useSWR:()=>vp,useSWRInfinite:()=>gC});r_(lx,mC);var[vC,bC]=Ti("ClerkInstanceContext"),[EC,xC]=Ti("UserContext"),[wC,EM]=Ti("ClientContext"),[kC,xM]=Ti("SessionContext"),[NC,wM]=Ti("OrganizationContext"),SC=({children:t,organization:e,lastOrganizationMember:r,lastOrganizationInvitation:n,swrConfig:s})=>a.createElement(yp,{value:s},a.createElement(NC.Provider,{value:{value:{organization:e,lastOrganizationMember:r,lastOrganizationInvitation:n}}},t));typeof window<"u"?a.useLayoutEffect:a.useEffect;const[_C,cx]=[vC,bC];function CC(t){if(!t)throw new Error(c_)}const ux=Object.freeze({noGuarantees:Object.freeze({guaranteedLoaded:!1}),guaranteedLoaded:Object.freeze({guaranteedLoaded:!0})}),ju=a.createContext(void 0);ju.displayName="StructureContext";const TC=()=>{const t=a.useContext(ju);return CC(t),t},AC=({children:t})=>TC().guaranteedLoaded?a.createElement(a.Fragment,null,t):a.createElement(ju.Provider,{value:ux.guaranteedLoaded},t),kn=(t,e)=>{e=e||t.displayName||t.name||"Component",t.displayName=e;const r=n=>{const s=cx();return s.loaded?a.createElement(AC,null,a.createElement(t,{...n,clerk:s})):null};return r.displayName=`withClerk(${e})`,r},No=t=>"mount"in t,kv=t=>"open"in t;let Nn=class extends a.PureComponent{constructor(){super(...arguments),this.portalRef=a.createRef()}componentDidUpdate(e){var r,n,s,o;!No(e)||!No(this.props)||(e.props.appearance!==this.props.props.appearance||((n=(r=e.props)==null?void 0:r.customPages)==null?void 0:n.length)!==((o=(s=this.props.props)==null?void 0:s.customPages)==null?void 0:o.length))&&this.props.updateProps({node:this.portalRef.current,props:this.props.props})}componentDidMount(){this.portalRef.current&&(No(this.props)&&this.props.mount(this.portalRef.current,this.props.props),kv(this.props)&&this.props.open(this.props.props))}componentWillUnmount(){this.portalRef.current&&(No(this.props)&&this.props.unmount(this.portalRef.current),kv(this.props)&&this.props.close())}render(){var e,r;return a.createElement(a.Fragment,null,a.createElement("div",{ref:this.portalRef}),No(this.props)&&((r=(e=this.props)==null?void 0:e.customPagesPortals)==null?void 0:r.map((n,s)=>x.createElement(n,{key:s}))))}};const IC=kn(({clerk:t,...e})=>a.createElement(Nn,{mount:t.mountSignIn,unmount:t.unmountSignIn,updateProps:t.__unstable__updateProps,props:e}),"SignIn"),PC=kn(({clerk:t,...e})=>a.createElement(Nn,{mount:t.mountSignUp,unmount:t.unmountSignUp,updateProps:t.__unstable__updateProps,props:e}),"SignUp");function bp({children:t}){return Ya(m_),a.createElement(a.Fragment,null,t)}function Ep({children:t}){return Ya(f_),a.createElement(a.Fragment,null,t)}const OC=kn(({clerk:t,...e})=>{const{customPages:r,customPagesPortals:n}=dx(e.children);return a.createElement(Nn,{mount:t.mountUserProfile,unmount:t.unmountUserProfile,updateProps:t.__unstable__updateProps,props:{...e,customPages:r},customPagesPortals:n})},"UserProfile");Object.assign(OC,{Page:bp,Link:Ep});const RC=kn(({clerk:t,...e})=>{const{customPages:r,customPagesPortals:n}=dx(e.children),s=Object.assign(e.userProfileProps||{},{customPages:r});return a.createElement(Nn,{mount:t.mountUserButton,unmount:t.unmountUserButton,updateProps:t.__unstable__updateProps,props:{...e,userProfileProps:s},customPagesPortals:n})},"UserButton"),DC=Object.assign(RC,{UserProfilePage:bp,UserProfileLink:Ep});function xp({children:t}){return Ya(h_),a.createElement(a.Fragment,null,t)}function wp({children:t}){return Ya(p_),a.createElement(a.Fragment,null,t)}const MC=kn(({clerk:t,...e})=>{const{customPages:r,customPagesPortals:n}=mx(e.children);return a.createElement(Nn,{mount:t.mountOrganizationProfile,unmount:t.unmountOrganizationProfile,updateProps:t.__unstable__updateProps,props:{...e,customPages:r},customPagesPortals:n})},"OrganizationProfile");Object.assign(MC,{Page:xp,Link:wp});kn(({clerk:t,...e})=>a.createElement(Nn,{mount:t.mountCreateOrganization,unmount:t.unmountCreateOrganization,updateProps:t.__unstable__updateProps,props:e}),"CreateOrganization");const LC=kn(({clerk:t,...e})=>{const{customPages:r,customPagesPortals:n}=mx(e.children),s=Object.assign(e.organizationProfileProps||{},{customPages:r});return a.createElement(Nn,{mount:t.mountOrganizationSwitcher,unmount:t.unmountOrganizationSwitcher,updateProps:t.__unstable__updateProps,props:{...e,organizationProfileProps:s},customPagesPortals:n})},"OrganizationSwitcher");Object.assign(LC,{OrganizationProfilePage:xp,OrganizationProfileLink:wp});kn(({clerk:t,...e})=>a.createElement(Nn,{mount:t.mountOrganizationList,unmount:t.unmountOrganizationList,updateProps:t.__unstable__updateProps,props:e}),"OrganizationList");kn(({clerk:t,...e})=>a.createElement(Nn,{open:t.openGoogleOneTap,close:t.closeGoogleOneTap,props:e}),"GoogleOneTap");const Rc=(t,e)=>!!t&&a.isValidElement(t)&&t?.type===e,dx=t=>fx({children:t,reorderItemsLabels:["account","security"],LinkComponent:Ep,PageComponent:bp,componentName:"UserProfile"}),mx=t=>fx({children:t,reorderItemsLabels:["members","settings"],LinkComponent:wp,PageComponent:xp,componentName:"OrganizationProfile"}),fx=({children:t,LinkComponent:e,PageComponent:r,reorderItemsLabels:n,componentName:s})=>{const o=[];
68a.Children.forEach(t,N=>{if(!Rc(N,r)&&!Rc(N,e)){N&&Ya(g_(s));return}const{props:k}=N,{children:w,label:C,url:_,labelIcon:T}=k;if(Rc(N,r))if(Nv(k,n))o.push({label:C});else if(df(k))o.push({label:C,labelIcon:T,children:w,url:_});else{Ya(y_(s));return}if(Rc(N,e))if(mf(k))o.push({label:C,labelIcon:T,url:_});else{Ya(v_(s));return}});const c=[],d=[],m=[];o.forEach((N,k)=>{if(df(N)){c.push({component:N.children,id:k}),d.push({component:N.labelIcon,id:k});return}mf(N)&&m.push({component:N.labelIcon,id:k})});const h=rf(c),p=rf(d),g=rf(m),v=[],E=[];return o.forEach((N,k)=>{if(Nv(N,n)){v.push({label:N.label});return}if(df(N)){const{portal:w,mount:C,unmount:_}=h.find(M=>M.id===k),{portal:T,mount:A,unmount:I}=p.find(M=>M.id===k);v.push({label:N.label,url:N.url,mount:C,unmount:_,mountIcon:A,unmountIcon:I}),E.push(w),E.push(T);return}if(mf(N)){const{portal:w,mount:C,unmount:_}=g.find(T=>T.id===k);v.push({label:N.label,url:N.url,mountIcon:C,unmountIcon:_}),E.push(w);return}}),{customPages:v,customPagesPortals:E}},Nv=(t,e)=>{const{children:r,label:n,url:s,labelIcon:o}=t;return!r&&!s&&!o&&e.some(c=>c===n)},df=t=>{const{children:e,label:r,url:n,labelIcon:s}=t;return!!e&&!!n&&!!s&&!!r},mf=t=>{const{children:e,label:r,url:n,labelIcon:s}=t;return!e&&!!n&&!!s&&!!r};var pe,Zs,Xs,Xc,eu,Wa,yh,hx;const px=class gx{constructor(e){za(this,yh),this.clerkjs=null,this.preopenOneTap=null,this.preopenSignIn=null,this.preopenSignUp=null,this.preopenUserProfile=null,this.preopenOrganizationProfile=null,this.preopenCreateOrganization=null,this.premountSignInNodes=new Map,this.premountSignUpNodes=new Map,this.premountUserProfileNodes=new Map,this.premountUserButtonNodes=new Map,this.premountOrganizationProfileNodes=new Map,this.premountCreateOrganizationNodes=new Map,this.premountOrganizationSwitcherNodes=new Map,this.premountOrganizationListNodes=new Map,this.premountMethodCalls=new Map,this.loadedListeners=[],za(this,pe,!1),za(this,Zs,void 0),za(this,Xs,void 0),za(this,Xc,void 0),za(this,eu,void 0),this.isReady=()=>{var o;return!!((o=this.clerkjs)!=null&&o.isReady())},this.buildSignInUrl=o=>{const c=()=>{var d;return((d=this.clerkjs)==null?void 0:d.buildSignInUrl(o))||""};if(this.clerkjs&&le(this,pe))return c();this.premountMethodCalls.set("buildSignInUrl",c)},this.buildSignUpUrl=o=>{const c=()=>{var d;return((d=this.clerkjs)==null?void 0:d.buildSignUpUrl(o))||""};if(this.clerkjs&&le(this,pe))return c();this.premountMethodCalls.set("buildSignUpUrl",c)},this.buildUserProfileUrl=()=>{const o=()=>{var c;return((c=this.clerkjs)==null?void 0:c.buildUserProfileUrl())||""};if(this.clerkjs&&le(this,pe))return o();this.premountMethodCalls.set("buildUserProfileUrl",o)},this.buildCreateOrganizationUrl=()=>{const o=()=>{var c;return((c=this.clerkjs)==null?void 0:c.buildCreateOrganizationUrl())||""};if(this.clerkjs&&le(this,pe))return o();this.premountMethodCalls.set("buildCreateOrganizationUrl",o)},this.buildOrganizationProfileUrl=()=>{const o=()=>{var c;return((c=this.clerkjs)==null?void 0:c.buildOrganizationProfileUrl())||""};if(this.clerkjs&&le(this,pe))return o();this.premountMethodCalls.set("buildOrganizationProfileUrl",o)},this.buildHomeUrl=()=>{const o=()=>{var c;return((c=this.clerkjs)==null?void 0:c.buildHomeUrl())||""};if(this.clerkjs&&le(this,pe))return o();this.premountMethodCalls.set("buildHomeUrl",o)},this.buildUrlWithAuth=o=>{const c=()=>{var d;return((d=this.clerkjs)==null?void 0:d.buildUrlWithAuth(o))||""};if(this.clerkjs&&le(this,pe))return c();this.premountMethodCalls.set("buildUrlWithAuth",c)},this.handleUnauthenticated=()=>{const o=()=>{var c;return(c=this.clerkjs)==null?void 0:c.handleUnauthenticated()};this.clerkjs&&le(this,pe)?o():this.premountMethodCalls.set("handleUnauthenticated",o)},this.addOnLoaded=o=>{this.loadedListeners.push(o),this.loaded&&this.emitLoaded()},this.emitLoaded=()=>{this.loadedListeners.forEach(o=>o()),this.loadedListeners=[]},this.hydrateClerkJS=o=>{if(!o)throw new Error("Failed to hydrate latest Clerk JS");return this.clerkjs=o,this.premountMethodCalls.forEach(c=>c()),this.preopenSignIn!==null&&o.openSignIn(this.preopenSignIn),this.preopenSignUp!==null&&o.openSignUp(this.preopenSignUp),this.preopenUserProfile!==null&&o.openUserProfile(this.preopenUserProfile),this.preopenOneTap!==null&&o.openGoogleOneTap(this.preopenOneTap),this.preopenOrganizationProfile!==null&&o.openOrganizationProfile(this.preopenOrganizationProfile),this.preopenCreateOrganization!==null&&o.openCreateOrganization(this.preopenCreateOrganization),this.premountSign
68InNodes.forEach((c,d)=>{o.mountSignIn(d,c)}),this.premountSignUpNodes.forEach((c,d)=>{o.mountSignUp(d,c)}),this.premountUserProfileNodes.forEach((c,d)=>{o.mountUserProfile(d,c)}),this.premountUserButtonNodes.forEach((c,d)=>{o.mountUserButton(d,c)}),this.premountOrganizationListNodes.forEach((c,d)=>{o.mountOrganizationList(d,c)}),Ma(this,pe,!0),this.emitLoaded(),this.clerkjs},this.__unstable__updateProps=o=>{if(this.clerkjs&&"__unstable__updateProps"in this.clerkjs)this.clerkjs.__unstable__updateProps(o);else return},this.setActive=({session:o,organization:c,beforeEmit:d})=>this.clerkjs?this.clerkjs.setActive({session:o,organization:c,beforeEmit:d}):Promise.reject(),this.setSession=(o,c)=>(yu("setSession","Use `Clerk.setActive` instead"),this.setActive({session:o,beforeEmit:c})),this.openSignIn=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.openSignIn(o):this.preopenSignIn=o},this.closeSignIn=()=>{this.clerkjs&&le(this,pe)?this.clerkjs.closeSignIn():this.preopenSignIn=null},this.openGoogleOneTap=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.openGoogleOneTap(o):this.preopenOneTap=o},this.closeGoogleOneTap=()=>{this.clerkjs&&le(this,pe)?this.clerkjs.closeGoogleOneTap():this.preopenOneTap=null},this.openUserProfile=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.openUserProfile(o):this.preopenUserProfile=o},this.closeUserProfile=()=>{this.clerkjs&&le(this,pe)?this.clerkjs.closeUserProfile():this.preopenUserProfile=null},this.openOrganizationProfile=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.openOrganizationProfile(o):this.preopenOrganizationProfile=o},this.closeOrganizationProfile=()=>{this.clerkjs&&le(this,pe)?this.clerkjs.closeOrganizationProfile():this.preopenOrganizationProfile=null},this.openCreateOrganization=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.openCreateOrganization(o):this.preopenCreateOrganization=o},this.closeCreateOrganization=()=>{this.clerkjs&&le(this,pe)?this.clerkjs.closeCreateOrganization():this.preopenCreateOrganization=null},this.openSignUp=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.openSignUp(o):this.preopenSignUp=o},this.closeSignUp=()=>{this.clerkjs&&le(this,pe)?this.clerkjs.closeSignUp():this.preopenSignUp=null},this.mountSignIn=(o,c)=>{this.clerkjs&&le(this,pe)?this.clerkjs.mountSignIn(o,c):this.premountSignInNodes.set(o,c)},this.unmountSignIn=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.unmountSignIn(o):this.premountSignInNodes.delete(o)},this.mountSignUp=(o,c)=>{this.clerkjs&&le(this,pe)?this.clerkjs.mountSignUp(o,c):this.premountSignUpNodes.set(o,c)},this.unmountSignUp=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.unmountSignUp(o):this.premountSignUpNodes.delete(o)},this.mountUserProfile=(o,c)=>{this.clerkjs&&le(this,pe)?this.clerkjs.mountUserProfile(o,c):this.premountUserProfileNodes.set(o,c)},this.unmountUserProfile=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.unmountUserProfile(o):this.premountUserProfileNodes.delete(o)},this.mountOrganizationProfile=(o,c)=>{this.clerkjs&&le(this,pe)?this.clerkjs.mountOrganizationProfile(o,c):this.premountOrganizationProfileNodes.set(o,c)},this.unmountOrganizationProfile=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.unmountOrganizationProfile(o):this.premountOrganizationProfileNodes.delete(o)},this.mountCreateOrganization=(o,c)=>{this.clerkjs&&le(this,pe)?this.clerkjs.mountCreateOrganization(o,c):this.premountCreateOrganizationNodes.set(o,c)},this.unmountCreateOrganization=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.unmountCreateOrganization(o):this.premountCreateOrganizationNodes.delete(o)},this.mountOrganizationSwitcher=(o,c)=>{this.clerkjs&&le(this,pe)?this.clerkjs.mountOrganizationSwitcher(o,c):this.premountOrganizationSwitcherNodes.set(o,c)},this.unmountOrganizationSwitcher=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.unmountOrganizationSwitcher(o):this.premountOrganizationSwitcherNodes.delete(o)},this.mountOrganizationList=(o,c)=>{this.clerkjs&&le(this,pe)?this.clerkjs.mountOrganizationList(o,c):this.premountOrganizationListNodes.set(o,c)},this.unmountOrganizationList=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.unmountOrganizationList(o):this.premountOrganizationListNodes.delete(o)},this.mountUserButton=(o,c)=>{this.clerkjs&&le(this,pe)?this.clerkjs.mountUserButton(o,c):this.premountUserButtonNodes.set(o,c)},this.unmountUserButton=o=>{this.clerkjs&&le(this,pe)?this.clerkjs.unmountUserButton(o):this.premountUserButtonNodes.delete(o)},this.addListener=o=>{const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.addListener(o)};return this.clerkjs?c():(this.premountMethodCalls.set("addListener",c),()=>this.premountMethodCalls.delete("addListener"))},this.navigate=o=>{const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.navigate(o)};this.clerkjs&&le(this,pe)?c():this.premountMethodCalls.set("navigate",c)},this.redirectWithAuth=(...o)=>{const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.redirectWithAuth(...o)};this.clerkjs&&le(this,pe)?c():this.premountMethodCalls.set("redirectWithAuth",c)},this.redirectToSignIn=o=>{const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.redirectToSignIn(o)};this.clerkjs&&le(this,pe)?c():this.premountMethodCalls.set("redirectToSignIn",c)},this.redirectToSignUp=o=>{const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.redirectToSignUp(o)};this.clerkjs&&le(this,pe)?c():this.premountMethodCalls.set("redirectToSignUp",c)},this.redirectToUserProfile=()=>{const o=()=>{var c;return(c=this.clerkjs)==null?void 0:c.redirectToUserProfile()};this.clerkjs&&le(this,pe)?o():this.premountMethodCalls.set("redirectToUserProfile",o)},this.redirectToHome=()=>{const o=()=>{var c;return(c=this.clerkjs)==null?void 0:c.redirectToHome()};this.clerkjs&&le(this,pe)?o():this.premountMethodCalls.set("redirectToHome",o)},this.redirectToOrganizationProfile=()=>{const o=()=>{var c;return(c=this.clerkjs)==null?void 0:c.redirectToOrganizationProfile()};this.clerkjs&&le(this,pe)?o():this.premountMethodCalls.set("redirectToOrganizationProfile",o)},this.redirectToCreateOrganization=()=>{const o=()=>{var c;return(c=this.clerkjs)==null?void 0:c.redirectToCreateOrganization()};this.clerkjs&&le(this,pe)?o():this.premountMethodCalls.set("redirectToCreateOrganization",o)},this.handleRedirectCallback=o=>{var c;const d=()=>{var m;return(m=this.clerkjs)==null?void 0:m.handleRedirectCallback(o)};this.clerkjs&&le(this,pe)?(c=d())==null||c.catch(()=>{}):this.premountMethodCalls.set("handleRedirectCallback",d)},this.handleMagicLinkVerification=async o=>{yu("handleMagicLinkVerification","Use `handleEmailLinkVerification` instead.");const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.handleMagicLinkVerification(o)};if(this.clerkjs&&le(this,pe))return c();this.premountMethodCalls.set("handleMagicLinkVerification",c)},this.handleGoogleOneTapCallback=(o,c)=>{var d;const m=()=>{var h;
68return(h=this.clerkjs)==null?void 0:h.handleGoogleOneTapCallback(o,c)};this.clerkjs&&le(this,pe)?(d=m())==null||d.catch(()=>{}):this.premountMethodCalls.set("handleGoogleOneTapCallback",m)},this.handleEmailLinkVerification=async o=>{const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.handleEmailLinkVerification(o)};if(this.clerkjs&&le(this,pe))return c();this.premountMethodCalls.set("handleEmailLinkVerification",c)},this.authenticateWithMetamask=async o=>{const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.authenticateWithMetamask(o)};if(this.clerkjs&&le(this,pe))return c();this.premountMethodCalls.set("authenticateWithMetamask",c)},this.authenticateWithGoogleOneTap=async o=>(await H2(this,yh,hx).call(this)).authenticateWithGoogleOneTap(o),this.createOrganization=async o=>{const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.createOrganization(o)};if(this.clerkjs&&le(this,pe))return c();this.premountMethodCalls.set("createOrganization",c)},this.getOrganizationMemberships=async()=>{const o=()=>{var c;return(c=this.clerkjs)==null?void 0:c.getOrganizationMemberships()};if(this.clerkjs&&le(this,pe))return o();this.premountMethodCalls.set("getOrganizationMemberships",o)},this.getOrganization=async o=>{const c=()=>{var d;return(d=this.clerkjs)==null?void 0:d.getOrganization(o)};if(this.clerkjs&&le(this,pe))return c();this.premountMethodCalls.set("getOrganization",c)},this.signOut=async(o,c)=>{const d=()=>{var m;return(m=this.clerkjs)==null?void 0:m.signOut(o,c)};if(this.clerkjs&&le(this,pe))return d();this.premountMethodCalls.set("signOut",d)};const{Clerk:r=null,frontendApi:n,publishableKey:s}=e||{};Ma(this,Xc,n),Ma(this,eu,s),Ma(this,Xs,e?.proxyUrl),Ma(this,Zs,e?.domain),this.options=e,this.Clerk=r,this.mode=gv()?"browser":"server",this.loadClerkJS()}get publishableKey(){return le(this,eu)}get loaded(){return le(this,pe)}static getOrCreateInstance(e){return(!gv()||!le(this,Wa)||e.Clerk&&le(this,Wa).Clerk!==e.Clerk)&&Ma(this,Wa,new gx(e)),le(this,Wa)}static clearInstance(){Ma(this,Wa,null)}get domain(){if(typeof window<"u"&&window.location)return nf(le(this,Zs),new URL(window.location.href),"");if(typeof le(this,Zs)=="function")throw new Error(tf);return le(this,Zs)||""}get proxyUrl(){if(typeof window<"u"&&window.location)return nf(le(this,Xs),new URL(window.location.href),"");if(typeof le(this,Xs)=="function")throw new Error(tf);return le(this,Xs)||""}get sdkMetadata(){var e;return((e=this.clerkjs)==null?void 0:e.sdkMetadata)||this.options.sdkMetadata||void 0}get instanceType(){var e;return(e=this.clerkjs)==null?void 0:e.instanceType}get frontendApi(){var e;return((e=this.clerkjs)==null?void 0:e.frontendApi)||le(this,Xc)||""}get isStandardBrowser(){var e;return((e=this.clerkjs)==null?void 0:e.isStandardBrowser)||this.options.standardBrowser||!1}get isSatellite(){if(typeof window<"u"&&window.location)return nf(this.options.isSatellite,new URL(window.location.href),!1);if(typeof this.options.isSatellite=="function")throw new Error(tf);return!1}async loadClerkJS(){var e,r,n;if(!(this.mode!=="browser"||le(this,pe))){typeof window<"u"&&(window.__clerk_frontend_api=this.frontendApi,window.__clerk_publishable_key=this.publishableKey,window.__clerk_proxy_url=this.proxyUrl,window.__clerk_domain=this.domain);try{if(this.Clerk){let s;x_(this.Clerk)?(s=new this.Clerk(this.publishableKey||this.frontendApi||"",{proxyUrl:this.proxyUrl,domain:this.domain}),await s.load(this.options)):(s=this.Clerk,s.isReady()||await s.load(this.options)),global.Clerk=s}else{if(global.Clerk||await D_({...this.options,frontendApi:this.frontendApi,publishableKey:this.publishableKey,proxyUrl:this.proxyUrl,domain:this.domain}),!global.Clerk)throw new Error("Failed to download latest ClerkJS. Contact [email protected].");await global.Clerk.load(this.options)}return global.Clerk.sdkMetadata=(e=this.options.sdkMetadata)!=null?e:{name:"@clerk/clerk-react",version:"4.32.4"},(r=global.Clerk)!=null&&r.loaded||(n=global.Clerk)!=null&&n.isReady()?this.hydrateClerkJS(global.Clerk):void 0}catch(s){const o=s;console.error(o.stack||o.message||o);return}}}get version(){var e;return(e=this.clerkjs)==null?void 0:e.version}get client(){if(this.clerkjs)return this.clerkjs.client}get session(){if(this.clerkjs)return this.clerkjs.session}
68get user(){if(this.clerkjs)return this.clerkjs.user}get organization(){if(this.clerkjs)return this.clerkjs.organization}get __unstable__environment(){if(this.clerkjs)return this.clerkjs.__unstable__environment}__unstable__setEnvironment(...e){if(this.clerkjs&&"__unstable__setEnvironment"in this.clerkjs)this.clerkjs.__unstable__setEnvironment(e);else return}};pe=new WeakMap;Zs=new WeakMap;Xs=new WeakMap;Xc=new WeakMap;eu=new WeakMap;Wa=new WeakMap;yh=new WeakSet;hx=function(){return new Promise(t=>{le(this,pe)&&t(this.clerkjs),this.addOnLoaded(()=>t(this.clerkjs))})};za(px,Wa,void 0);let Sv=px;const FC=(t,e,r)=>!t&&r?jC(r):UC(e),jC=t=>{const e=t.userId,r=t.user,n=t.sessionId,s=t.session,o=t.organization,c=t.orgId,d=t.orgRole,m=t.orgPermissions,h=t.orgSlug,p=t.actor;return{userId:e,user:r,sessionId:n,session:s,organization:o,orgId:c,orgRole:d,orgPermissions:m,orgSlug:h,actor:p,lastOrganizationInvitation:null,lastOrganizationMember:null}},UC=t=>{var e;const r=t.user?t.user.id:t.user,n=t.user,s=t.session?t.session.id:t.session,o=t.session,c=o?.actor,d=t.organization,m=t.organization?t.organization.id:t.organization,h=d?.slug,p=d&&((e=n?.organizationMemberships)==null?void 0:e.find(k=>k.organization.id===m)),g=p&&p.permissions,v=p&&p.role,E=t.lastOrganizationInvitation,N=t.lastOrganizationMember;return{userId:r,user:n,sessionId:s,session:o,organization:d,orgId:m,orgRole:v,orgSlug:h,orgPermissions:g,actor:c,lastOrganizationInvitation:E,lastOrganizationMember:N}},[zC,$C]=Ti("AuthContext");function BC(t){const{isomorphicClerkOptions:e,initialState:r,children:n}=t,{isomorphicClerk:s,loaded:o}=WC(e);e.frontendApi&&yu("frontendApi","Use `publishableKey` instead.");const[c,d]=a.useState({client:s.client,session:s.session,user:s.user,organization:s.organization,lastOrganizationInvitation:null,lastOrganizationMember:null});a.useEffect(()=>s.addListener(ee=>d({...ee})),[]);const m=FC(o,c,r),h=a.useMemo(()=>({value:s}),[o]),p=a.useMemo(()=>({value:c.client}),[c.client]),{sessionId:g,session:v,userId:E,user:N,orgId:k,actor:w,lastOrganizationInvitation:C,lastOrganizationMember:_,organization:T,orgRole:A,orgSlug:I,orgPermissions:M}=m,D=a.useMemo(()=>({value:{sessionId:g,userId:E,actor:w,orgId:k,orgRole:A,orgSlug:I,orgPermissions:M}}),[g,E,w,k,A,I]),$=a.useMemo(()=>({value:N}),[E,N]),j=a.useMemo(()=>({value:v}),[g,v]),B=a.useMemo(()=>({value:{organization:T,lastOrganizationInvitation:C,lastOrganizationMember:_}}),[k,T,C,_]);return a.createElement(_C.Provider,{value:h},a.createElement(wC.Provider,{value:p},a.createElement(kC.Provider,{value:j},a.createElement(SC,{...B.value},a.createElement(zC.Provider,{value:D},a.createElement(EC.Provider,{value:$},n))))))}const WC=t=>{const[e,r]=a.useState(!1),n=a.useMemo(()=>Sv.getOrCreateInstance(t),[]);return a.useEffect(()=>{n.__unstable__updateProps({appearance:t.appearance})},[t.appearance]),a.useEffect(()=>{n.__unstable__updateProps({options:t})},[t.localization]),a.useEffect(()=>{n.addOnLoaded(()=>r(!0))},[]),a.useEffect(()=>()=>{Sv.clearInstance()},[]),{isomorphicClerk:n,loaded:e}};E_({packageName:"@clerk/clerk-react"});function VC(t){const{initialState:e,children:r,...n}=t,{frontendApi:s="",publishableKey:o="",Clerk:c}=n;return c||(!o&&!s?Ho.throwMissingPublishableKeyError():o&&!GE(o)?Ho.throwInvalidPublishableKeyError({key:o}):!o&&s&&!J2(s)&&Ho.throwInvalidFrontendApiError({key:s})),a.createElement(ju.Provider,{value:ux.noGuarantees},a.createElement(BC,{initialState:e,isomorphicClerkOptions:n},r))}const yx=j_(VC,"ClerkProvider",u_);yx.displayName="ClerkProvider";function qC(){const t=xC();return t===void 0?{isLoaded:!1,isSignedIn:void 0,user:void 0}:t===null?{isLoaded:!0,isSignedIn:!1,user:null}:{isLoaded:!0,isSignedIn:!0,user:t}}const vx=t=>new Promise(e=>{t.loaded&&e(),t.addOnLoaded(e)}),HC=t=>async e=>(await vx(t),t.session?t.session.getToken(e):null),GC=t=>async(...e)=>(await vx(t),t.signOut(...e)),fl=()=>{const{sessionId:t,userId:e,actor:r,orgId:n,orgRole:s,orgSlug:o,orgPermissions:c}=$C(),d=cx(),m=x.useCallback(HC(d),[d]),h=x.useCallback(GC(d),[d]),p=x.useCallback(g=>{if(!g?.permission&&!g?.role)throw new Error(b_);return!n||!e||!s||!c?!1:g.permission?c.includes(g.permission):g.role?s===g.role:!1},[n,s,e,c]);if(t===void 0&&e===void 0)return{isLoaded:!1,isSignedIn:void 0,sessionId:t,userId:e,actor:void 0,orgId:void 0,orgRole:void 0,orgSlug:void 0,has:void 0,signOut:h,getToken:m};if(t===null&&e===null)return{isLoaded:!0,isSignedIn:!1,sessionId:t,userId:e,actor:null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:h,getToken:m};if(t&&e&&n&&s)return{isLoaded:!0,isSignedIn:!0,sessionId:t,userId:e,actor:r||null,orgId:n,orgRole:s,orgSlug:o||null,has:p,signOut:h,getToken:m};if(t&&e&&!n)return{isLoaded:!0,isSignedIn:!0,sessionId:t,userId:e,actor:r||null,orgId:null,orgRole:null,orgSlug:null,has:()=>!1,signOut:h,getToken:m};throw new Error(d_)};function _v(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function bx(...t){return e=>{let r=!1;const n=t.map(s=>{const o=_v(s,e);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():_v(t[s],null)}}}}function as(...t){return x.useCallback(bx(...t),t)}var ff={exports:{}},So={};/** 69 * @license React 70 * react-jsx-runtime.production.min.js 71 * 72 * Copyright (c) Facebook, Inc. and its affiliates. 73 * 74 * This source code is licensed under the MIT license found in the 75 * LICENSE file in the root directory of this source tree. 76 */var Cv;function YC(){if(Cv)return So;Cv=1;var t=Du(),e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=t.__SECRET_INT
vendor: 3,273 bytes, line 76
76ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(d,m,h){var p,g={},v=null,E=null;h!==void 0&&(v=""+h),m.key!==void 0&&(v=""+m.key),m.ref!==void 0&&(E=m.ref);for(p in m)n.call(m,p)&&!o.hasOwnProperty(p)&&(g[p]=m[p]);if(d&&d.defaultProps)for(p in m=d.defaultProps,m)g[p]===void 0&&(g[p]=m[p]);return{$$typeof:e,type:d,key:v,ref:E,props:g,_owner:s.current}}return So.Fragment=r,So.jsx=c,So.jsxs=c,So}var Tv;function JC(){return Tv||(Tv=1,ff.exports=YC()),ff.exports}var Fe=JC(),Uu=x.forwardRef((t,e)=>{const{children:r,...n}=t,s=x.Children.toArray(r),o=s.find(QC);if(o){const c=o.props.children,d=s.map(m=>m===o?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:m);return Fe.jsx(vh,{...n,ref:e,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return Fe.jsx(vh,{...n,ref:e,children:r})});Uu.displayName="Slot";var vh=x.forwardRef((t,e)=>{const{children:r,...n}=t;if(x.isValidElement(r)){const s=XC(r);return x.cloneElement(r,{...ZC(n,r.props),ref:e?bx(e,s):s})}return x.Children.count(r)>1?x.Children.only(null):null});vh.displayName="SlotClone";var KC=({children:t})=>Fe.jsx(Fe.Fragment,{children:t});function QC(t){return x.isValidElement(t)&&t.type===KC}function ZC(t,e){const r={...e};for(const n in e){const s=t[n],o=e[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...d)=>{o(...d),s(...d)}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...t,...r}}function XC(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Ex(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Ex(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function xx(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Ex(t))&&(n&&(n+=" "),n+=e);return n}const Av=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Iv=xx,kp=(t,e)=>r=>{var n;if(e?.variants==null)return Iv(t,r?.class,r?.className);const{variants:s,defaultVariants:o}=e,c=Object.keys(s).map(h=>{const p=r?.[h],g=o?.[h];if(p===null)return null;const v=Av(p)||Av(g);return s[h][v]}),d=r&&Object.entries(r).reduce((h,p)=>{let[g,v]=p;return v===void 0||(h[g]=v),h},{}),m=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((h,p)=>{let{class:g,className:v,...E}=p;return Object.entries(E).every(N=>{let[k,w]=N;return Array.isArray(w)?w.includes({...o,...d}[k]):{...o,...d}[k]===w})?[...h,g,v]:h},[]);return Iv(t,c,m,r?.class,r?.className)},Np="-",eT=t=>{const e=rT(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:c=>{const d=c.split(Np);return d[0]===""&&d.length!==1&&d.shift(),wx(d,e)||tT(c)},getConflictingClassGroupIds:(c,d)=>{const m=r[c]||[];return d&&n[c]?[...m,...n[c]]:m}}},wx=(t,e)=>{if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?wx(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const o=t.join(Np);return e.validators.find(({validator:c}
vendor: 5,341 bytes, line 76
76)=>c(o))?.classGroupId},Pv=/^\[(.+)\]$/,tT=t=>{if(Pv.test(t)){const e=Pv.exec(t)[1],r=e?.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},rT=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return aT(Object.entries(t.classGroups),r).forEach(([o,c])=>{bh(c,n,o,e)}),n},bh=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const o=s===""?e:Ov(e,s);o.classGroupId=r;return}if(typeof s=="function"){if(nT(s)){bh(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,c])=>{bh(c,Ov(e,o),r,n)})})},Ov=(t,e)=>{let r=t;return e.split(Np).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},nT=t=>t.isThemeGetter,aT=(t,e)=>e?t.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([c,d])=>[e+c,d])):o);return[r,s]}):t,sT=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(o,c)=>{r.set(o,c),e++,e>t&&(e=0,n=r,r=new Map)};return{get(o){let c=r.get(o);if(c!==void 0)return c;if((c=n.get(o))!==void 0)return s(o,c),c},set(o,c){r.has(o)?r.set(o,c):s(o,c)}}},kx="!",iT=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],o=e.length,c=d=>{const m=[];let h=0,p=0,g;for(let w=0;w<d.length;w++){let C=d[w];if(h===0){if(C===s&&(n||d.slice(w,w+o)===e)){m.push(d.slice(p,w)),p=w+o;continue}if(C==="/"){g=w;continue}}C==="["?h++:C==="]"&&h--}const v=m.length===0?d:d.substring(p),E=v.startsWith(kx),N=E?v.substring(1):v,k=g&&g>p?g-p:void 0;return{modifiers:m,hasImportantModifier:E,baseClassName:N,maybePostfixModifierPosition:k}};return r?d=>r({className:d,parseClassName:c}):c},oT=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},lT=t=>({cache:sT(t.cacheSize),parseClassName:iT(t),...eT(t)}),cT=/\s+/,uT=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,o=[],c=t.trim().split(cT);let d="";for(let m=c.length-1;m>=0;m-=1){const h=c[m],{modifiers:p,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:E}=r(h);let N=!!E,k=n(N?v.substring(0,E):v);if(!k){if(!N){d=h+(d.length>0?" "+d:d);continue}if(k=n(v),!k){d=h+(d.length>0?" "+d:d);continue}N=!1}const w=oT(p).join(":"),C=g?w+kx:w,_=C+k;if(o.includes(_))continue;o.push(_);const T=s(k,N);for(let A=0;A<T.length;++A){const I=T[A];o.push(C+I)}d=h+(d.length>0?" "+d:d)}return d};function dT(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=Nx(e))&&(n&&(n+=" "),n+=r);return n}const Nx=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Nx(t[n]))&&(r&&(r+=" "),r+=e);return r};function mT(t,...e){let r,n,s,o=c;function c(m){const h=e.reduce((p,g)=>g(p),t());return r=lT(h),n=r.cache.get,s=r.cache.set,o=d,d(m)}function d(m){const h=n(m);if(h)return h;const p=uT(m,r);return s(m,p),p}return function(){return o(dT.apply(null,arguments))}}const Ze=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Sx=/^\[(?:([a-z-]+):)?(.+)\]$/i,fT=/^\d+\/\d+$/,hT=new Set(["px","full","screen"]),pT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,yT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,vT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,on=t=>li(t)||hT.has(t)||fT.test(t),Yn=t=>Ai(t,"length",CT),li=t=>!!t&&!Number.isNaN(Number(t)),hf=t=>Ai(t,"number",li),_o=t=>!!t&&Number.isInteger(Number(t)),ET=t=>t.endsWith("%")&&li(t.slice(0,-1)),Pe=t=>Sx.test(t),Jn=t=>pT.test(t),xT=new Set(["length","size","percentage"]),wT=t=>Ai(t,xT,_x),kT=t=>Ai(t,"position",_x),NT=new Set(["image","url"]),ST=t=>Ai(t,NT,AT),_T=t=>Ai(t,"",TT),Co=()=>!0,Ai=(t,e,r)=>{const n=Sx.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},CT=t=>gT.test(t)&&!yT.test(t),_x=()=>!1,TT=t=>vT.test(t),AT=t=>bT.test(t),IT=()=>{const t=Ze("colors"),e=Ze("spacing"),r=Ze("blur"),n=Ze("brightness"),s=Ze("borderColor"),o=Ze("borderRadius"),c=Ze("borderSpacing"),d=Ze("borderWidth"),m=Ze("contrast"),h=Ze("grayscale"),p=Ze("hueRotate"),g=Ze("invert"),v=Ze("gap"),E=Ze("gradientColorStops"),N=Ze("gradientColorStopPositions"),k=Ze("inset"),w=Ze("margin"),C=Ze("opacity"),_=Ze("padding"),T=Ze("saturate"),A=Ze("scale"),I=Ze("sepia"),M=Ze("skew"),D=Ze("space"),$=Ze("translate"),j=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],ee=()=>["auto",Pe,e],te=()=>[Pe,e],ne=()=>["",on,Yn],Z=()=>["auto",li,Pe],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ke=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],re=()=>["","0",Pe],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>[li,Pe];return{cacheSize:500,separator:":",theme:{colors:[Co],spacing:[on,Yn],blur:["none","",Jn,Pe],brightness:R(),borderColor:[t],borderRadius:["n
76one","","full",Jn,Pe],borderSpacing:te(),borderWidth:ne(),contrast:R(),grayscale:re(),hueRotate:R(),invert:re(),gap:te(),gradientColorStops:[t],gradientColorStopPositions:[ET,Yn],inset:ee(),margin:ee(),opacity:R(),padding:te(),saturate:R(),scale:R(),sepia:re(),skew:R(),space:te(),translate:te()},classGroups:{aspect:[{aspect:["auto","square","video",Pe]}],container:["container"],columns:[{columns:[Jn]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ae(),Pe]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",_o,Pe]}],basis:[{basis:ee()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Pe]}],grow:[{grow:re()}],shrink:[{shrink:re()}],order:[{order:["first","last","none",_o,Pe]}],"grid-cols":[{"grid-cols":[Co]}],"col-start-end":[{col:["auto",{span:["full",_o,Pe]},Pe]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Co]}],"row-start-end":[{row:["auto",{span:[_o,Pe]},Pe]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Pe]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[D]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[D]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Pe,e]}],"min-w":[{"min-w":[Pe,e,"min","max","fit"]}],"max-w":[{"max-w":[Pe,e,"none","full","min","max","fit","prose",{screen:[Jn]},Jn]}],h:[{h:[Pe,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Pe,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Pe,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Pe,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Jn,Yn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",hf]}],"font-family":[{font:[Co]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Pe]}],"line-clamp":[{"line-clamp":["none",li,hf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",on,Pe]}],"list-image":[{"list-image":["none",Pe]}],"list-style-type":[{list:["none","disc","decimal",Pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",on,Yn]}],"underline-offset":[{"underline-offset":["auto",on,Pe]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:te()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ae(),kT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ST]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[N]}
vendor: 4,873 bytes, line 76
76],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[E]}],"gradient-via":[{via:[E]}],"gradient-to":[{to:[E]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...ke(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:ke()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...ke()]}],"outline-offset":[{"outline-offset":[on,Pe]}],"outline-w":[{outline:[on,Yn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[on,Yn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Jn,_T]}],"shadow-color":[{shadow:[Co]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",Jn,Pe]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[g]}],saturate:[{saturate:[T]}],sepia:[{sepia:[I]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[I]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-y":[{"border-spacing-y":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Pe]}],duration:[{duration:R()}],ease:[{ease:["linear","in","out","in-out",Pe]}],delay:[{delay:R()}],animate:[{animate:["none","spin","ping","pulse","bounce",Pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[_o,Pe]}],"translate-x":[{"translate-x":[$]}],"translate-y":[{"translate-y":[$]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Pe]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Pe]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":te()}],"scroll-mx":[{"scroll-mx":te()}],"scroll-my":[{"scroll-my":te()}],"scroll-ms":[{"scroll-ms":te()}],"scroll-me":[{"scroll-me":te()}],"scroll-mt":[{"scroll-mt":te()}],"scroll-mr":[{"scroll-mr":te()}],"scroll-mb":[{"scroll-mb":te()}],"scroll-ml":[{"scroll-ml":te()}],"scroll-p":[{"scroll-p":te()}],"scroll-px":[{"scroll-px":te()}],"scroll-py":[{"scroll-py":te()}],"scroll-ps":[{"scroll-ps":te()}],"scroll-pe":[{"scroll-pe":te()}
vendor: 4,577 bytes, line 76
76],"scroll-pt":[{"scroll-pt":te()}],"scroll-pr":[{"scroll-pr":te()}],"scroll-pb":[{"scroll-pb":te()}],"scroll-pl":[{"scroll-pl":te()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Pe]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[on,Yn,hf]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},PT=mT(IT);function Oe(...t){return PT(xx(t))}function Eh(){return Eh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Eh.apply(null,arguments)}const OT=kp("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-950 dark:focus-visible:ring-slate-300 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-white shadow hover:bg-primary/90 dark:bg-primary dark:text-white dark:hover:bg-primary/90",destructive:"bg-red-500 text-white shadow-sm hover:bg-red-600 dark:bg-red-900 dark:hover:bg-red-900/90",outline:"border border-slate-200 bg-white shadow-sm hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50",secondary:"bg-slate-100 text-slate-900 shadow-sm hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",ghost:"hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",link:"text-slate-900 underline-offset-4 hover:underline dark:text-slate-50"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ce=x.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},o)=>{const c=n?Uu:"button";return x.createElement(c,Eh({className:Oe(OT({variant:e,size:r,className:t})),ref:o}
vendor: 4,592 bytes, line 76
76,s))});ce.displayName="Button";function la(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t?.(s),r===!1||!s.defaultPrevented)return e?.(s)}}function RT(t,e){const r=x.createContext(e),n=o=>{const{children:c,...d}=o,m=x.useMemo(()=>d,Object.values(d));return Fe.jsx(r.Provider,{value:m,children:c})};n.displayName=t+"Provider";function s(o){const c=x.useContext(r);if(c)return c;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[n,s]}function DT(t,e=[]){let r=[];function n(o,c){const d=x.createContext(c),m=r.length;r=[...r,c];const h=g=>{const{scope:v,children:E,...N}=g,k=v?.[t]?.[m]||d,w=x.useMemo(()=>N,Object.values(N));return Fe.jsx(k.Provider,{value:w,children:E})};h.displayName=o+"Provider";function p(g,v){const E=v?.[t]?.[m]||d,N=x.useContext(E);if(N)return N;if(c!==void 0)return c;throw new Error(`\`${g}\` must be used within \`${o}\``)}return[h,p]}const s=()=>{const o=r.map(c=>x.createContext(c));return function(d){const m=d?.[t]||o;return x.useMemo(()=>({[`__scope${t}`]:{...d,[t]:m}}),[d,m])}};return s.scopeName=t,[n,MT(s,...e)]}function MT(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const c=n.reduce((d,{useScope:m,scopeName:h})=>{const g=m(o)[`__scope${h}`];return{...d,...g}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:c}),[c])}};return r.scopeName=e.scopeName,r}var vu=globalThis?.document?x.useLayoutEffect:()=>{},LT=PE.useId||(()=>{}),FT=0;function pf(t){const[e,r]=x.useState(LT());return vu(()=>{r(n=>n??String(FT++))},[t]),t||(e?`radix-${e}`:"")}function Ka(t){const e=x.useRef(t);return x.useEffect(()=>{e.current=t}),x.useMemo(()=>(...r)=>e.current?.(...r),[])}function jT({prop:t,defaultProp:e,onChange:r=()=>{}}){const[n,s]=UT({defaultProp:e,onChange:r}),o=t!==void 0,c=o?t:n,d=Ka(r),m=x.useCallback(h=>{if(o){const g=typeof h=="function"?h(t):h;g!==t&&d(g)}else s(h)},[o,t,s,d]);return[c,m]}function UT({defaultProp:t,onChange:e}){const r=x.useState(t),[n]=r,s=x.useRef(n),o=Ka(e);return x.useEffect(()=>{s.current!==n&&(o(n),s.current=n)},[n,s,o]),r}var zT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Sn=zT.reduce((t,e)=>{const r=x.forwardRef((n,s)=>{const{asChild:o,...c}=n,d=o?Uu:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),Fe.jsx(d,{...c,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function $T(t,e){t&&up.flushSync(()=>t.dispatchEvent(e))}function BT(t,e=globalThis?.document){const r=Ka(t);x.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var WT="DismissableLayer",xh="dismissableLayer.update",VT="dismissableLayer.pointerDownOutside",qT="dismissableLayer.focusOutside",Rv,Cx=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Tx=x.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:c,onDismiss:d,...m}=t,h=x.useContext(Cx),[p,g]=x.useState(null),v=p?.ownerDocument??globalThis?.document,[,E]=x.useState({}),N=as(e,D=>g(D)),k=Array.from(h.layers),[w]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),C=k.indexOf(w),_=p?k.indexOf(p):-1,T=h.layersWithOutsidePointerEventsDisabled.size>0,A=_>=C,I=YT(D=>{const $=D.target,j=[...h.branches].some(B=>B.contains($));!A||j||(s?.(D),c?.(D),D.defaultPrevented||d?.())},v),M=JT(D=>{const $=D.target;[...h.branches].some(B=>B.contains($))||(o?.(D),c?.(D),D.defaultPrevented||d?.())},v);return BT(D=>{_===h.layers.size-1&&(n?.(D),!D.defaultPrevented&&d&&(D.preventDefault(),d()))},v),x.useEffect(()=>{if(p)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(Rv=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(p)),h.layers.add(p),Dv(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Rv)}},[p,v,r,h]),x.useEffect(()=>()=>{p&&(h.layers.delete(p),h.layersWithOutsidePointerEventsDisabled.delete(p),Dv())},[p,h]),x.useEffect(()=>{const D=()=>E({});return document.addEventListener(xh,D),()=>document.removeEventListener(xh,D)},[]),Fe.jsx(Sn.div,{...m,ref:N,style:{pointerEvents:T?A?"auto":"none":void 0,...t.style},onFocusCapture:la(t.onFocusCapture,M.onFocusCapture),onBlurCapture:la(t.onBlurCapture,M.onBlurCapture),onPointerDownCapture:la(t.onPointerDownCapture,I.onPointerDownCapture)})});Tx.displayName=WT;
vendor: 5,159 bytes, line 76
76var HT="DismissableLayerBranch",GT=x.forwardRef((t,e)=>{const r=x.useContext(Cx),n=x.useRef(null),s=as(e,n);return x.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),Fe.jsx(Sn.div,{...t,ref:s})});GT.displayName=HT;function YT(t,e=globalThis?.document){const r=Ka(t),n=x.useRef(!1),s=x.useRef(()=>{});return x.useEffect(()=>{const o=d=>{if(d.target&&!n.current){let m=function(){Ax(VT,r,h,{discrete:!0})};const h={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=m,e.addEventListener("click",s.current,{once:!0})):m()}else e.removeEventListener("click",s.current);n.current=!1},c=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(c),e.removeEventListener("pointerdown",o),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function JT(t,e=globalThis?.document){const r=Ka(t),n=x.useRef(!1);return x.useEffect(()=>{const s=o=>{o.target&&!n.current&&Ax(qT,r,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Dv(){const t=new CustomEvent(xh);document.dispatchEvent(t)}function Ax(t,e,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?$T(s,o):s.dispatchEvent(o)}var gf="focusScope.autoFocusOnMount",yf="focusScope.autoFocusOnUnmount",Mv={bubbles:!1,cancelable:!0},KT="FocusScope",Ix=x.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...c}=t,[d,m]=x.useState(null),h=Ka(s),p=Ka(o),g=x.useRef(null),v=as(e,k=>m(k)),E=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(n){let k=function(T){if(E.paused||!d)return;const A=T.target;d.contains(A)?g.current=A:Zn(g.current,{select:!0})},w=function(T){if(E.paused||!d)return;const A=T.relatedTarget;A!==null&&(d.contains(A)||Zn(g.current,{select:!0}))},C=function(T){if(document.activeElement===document.body)for(const I of T)I.removedNodes.length>0&&Zn(d)};document.addEventListener("focusin",k),document.addEventListener("focusout",w);const _=new MutationObserver(C);return d&&_.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",w),_.disconnect()}}},[n,d,E.paused]),x.useEffect(()=>{if(d){Fv.add(E);const k=document.activeElement;if(!d.contains(k)){const C=new CustomEvent(gf,Mv);d.addEventListener(gf,h),d.dispatchEvent(C),C.defaultPrevented||(QT(rA(Px(d)),{select:!0}),document.activeElement===k&&Zn(d))}return()=>{d.removeEventListener(gf,h),setTimeout(()=>{const C=new CustomEvent(yf,Mv);d.addEventListener(yf,p),d.dispatchEvent(C),C.defaultPrevented||Zn(k??document.body,{select:!0}),d.removeEventListener(yf,p),Fv.remove(E)},0)}}},[d,h,p,E]);const N=x.useCallback(k=>{if(!r&&!n||E.paused)return;const w=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,C=document.activeElement;if(w&&C){const _=k.currentTarget,[T,A]=ZT(_);T&&A?!k.shiftKey&&C===A?(k.preventDefault(),r&&Zn(T,{select:!0})):k.shiftKey&&C===T&&(k.preventDefault(),r&&Zn(A,{select:!0})):C===_&&k.preventDefault()}},[r,n,E.paused]);return Fe.jsx(Sn.div,{tabIndex:-1,...c,ref:v,onKeyDown:N})});Ix.displayName=KT;function QT(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(Zn(n,{select:e}),document.activeElement!==r)return}function ZT(t){const e=Px(t),r=Lv(e,t),n=Lv(e.reverse(),t);return[r,n]}function Px(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function Lv(t,e){for(const r of t)if(!XT(r,{upTo:e}))return r}function XT(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function eA(t){return t instanceof HTMLInputElement&&"select"in t}function Zn(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&eA(t)&&e&&t.select()}}var Fv=tA();function tA(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=jv(t,e),t.unshift(e)},remove(e){t=jv(t,e),t[0]?.resume()}}}function jv(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function rA(t){return t.filter(e=>e.tagName!=="A")}var nA="Portal",Ox=x.forwardRef((t,e)=>{const{container:r,...n}=t,[s,o]=x.useState(!1);vu(()=>o(!0),[]);const c=r||s&&globalThis?.document?.body;return c?jS.createPortal(Fe.jsx(Sn.div,{...n,ref:e}),c):null});Ox.displayName=nA;function aA(t,e){return x.useReducer((r,n)=>e[r][n]??r,t)}var zu=t=>{const{present:e,children:r}=t,n=sA(e),s=typeof r=="function"?r({present:n.isPresent}):x.Children.only(r),o=as(n.ref,iA(s));return typeof r=="function"||n.isPresent?x.cloneElement(s,{ref:o}):null};zu.displayName="Presence";
76function sA(t){const[e,r]=x.useState(),n=x.useRef({}),s=x.useRef(t),o=x.useRef("none"),c=t?"mounted":"unmounted",[d,m]=aA(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const h=Dc(n.current);o.current=d==="mounted"?h:"none"},[d]),vu(()=>{const h=n.current,p=s.current;if(p!==t){const v=o.current,E=Dc(h);t?m("MOUNT"):E==="none"||h?.display==="none"?m("UNMOUNT"):m(p&&v!==E?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,m]),vu(()=>{if(e){let h;const p=e.ownerDocument.defaultView??window,g=E=>{const k=Dc(n.current).includes(E.animationName);if(E.target===e&&k&&(m("ANIMATION_END"),!s.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",h=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},v=E=>{E.target===e&&(o.current=Dc(n.current))};return e.addEventListener("animationstart",v),e.addEventListener("animationcancel",g),e.addEventListener("animationend",g),()=>{p.clearTimeout(h),e.removeEventListener("animationstart",v),e.removeEventListener("animationcancel",g),e.removeEventListener("animationend",g)}}else m("ANIMATION_END")},[e,m]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:x.useCallback(h=>{h&&(n.current=getComputedStyle(h)),r(h)},[])}}function Dc(t){return t?.animationName||"none"}function iA(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var vf=0;function oA(){x.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Uv()),document.body.insertAdjacentElement("beforeend",t[1]??Uv()),vf++,()=>{vf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),vf--}},[])}function Uv(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var wh=function(t,e){return wh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])},wh(t,e)};function ss(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");wh(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var gr=function(){return gr=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},gr.apply(this,arguments)};function Rx(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function lA(t,e,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{h(n.next(p))}catch(g){c(g)}}function m(p){try{h(n.throw(p))}catch(g){c(g)}}function h(p){p.done?o(p.value):s(p.value).then(d,m)}h((n=n.apply(t,[])).next())})}function Dx(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(h){return function(p){return m([h,p])}}function m(h){if(n)throw new TypeError("Generator is already executing.");for(;c&&(c=0,h[0]&&(r=0)),r;)try{if(n=1,s&&(o=h[0]&2?s.return:h[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,h[1])).done)return o;switch(s=0,o&&(h=[h[0]&2,o.value]),h[0]){case 0:case 1:o=h;break;case 4:return r.label++,{value:h[1],done:!1};case 5:r.label++,s=h[1],h=[0];continue;case 7:h=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(h[0]===6||h[0]===2)){r=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]<o[3])){r.label=h[1];break}if(h[0]===6&&r.label<o[1]){r.label=o[1],o=h;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(h);break}o[2]&&r.ops.pop(),r.trys.pop();continue}h=e.call(t,r)}catch(p){h=[6,p],s=0}finally{n=o=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function yi(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function bu(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,o=[],c;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(d){c={error:d}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(c)throw c.error}}return o}function nl(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,o;n<s;
vendor: 5,268 bytes, line 76
76n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}function ci(t){return this instanceof ci?(this.v=t,this):new ci(t)}function cA(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),s,o=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(v){n[v]&&(s[v]=function(E){return new Promise(function(N,k){o.push([v,E,N,k])>1||d(v,E)})})}function d(v,E){try{m(n[v](E))}catch(N){g(o[0][3],N)}}function m(v){v.value instanceof ci?Promise.resolve(v.value.v).then(h,p):g(o[0][2],v)}function h(v){d("next",v)}function p(v){d("throw",v)}function g(v,E){v(E),o.shift(),o.length&&d(o[0][0],o[0][1])}}function uA(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof yi=="function"?yi(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(c){return new Promise(function(d,m){c=t[o](c),s(d,m,c.done,c.value)})}}function s(o,c,d,m){Promise.resolve(m).then(function(h){o({value:h,done:d})},c)}}var tu="right-scroll-bar-position",ru="width-before-scroll-bar",dA="with-scroll-bars-hidden",mA="--removed-body-scroll-bar-size";function bf(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function fA(t,e){var r=x.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}var hA=typeof window<"u"?x.useLayoutEffect:x.useEffect,zv=new WeakMap;function pA(t,e){var r=fA(null,function(n){return t.forEach(function(s){return bf(s,n)})});return hA(function(){var n=zv.get(r);if(n){var s=new Set(n),o=new Set(t),c=r.current;s.forEach(function(d){o.has(d)||bf(d,null)}),o.forEach(function(d){s.has(d)||bf(d,c)})}zv.set(r,t)},[t]),r}function gA(t){return t}function yA(t,e){e===void 0&&(e=gA);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(o){var c=e(o,n);return r.push(c),function(){r=r.filter(function(d){return d!==c})}},assignSyncMedium:function(o){for(n=!0;r.length;){var c=r;r=[],c.forEach(o)}r={push:function(d){return o(d)},filter:function(){return r}}},assignMedium:function(o){n=!0;var c=[];if(r.length){var d=r;r=[],d.forEach(o),c=r}var m=function(){var p=c;c=[],p.forEach(o)},h=function(){return Promise.resolve().then(m)};h(),r={push:function(p){c.push(p),h()},filter:function(p){return c=c.filter(p),r}}}};return s}function vA(t){t===void 0&&(t={});var e=yA(null);return e.options=gr({async:!0,ssr:!1},t),e}var Mx=function(t){var e=t.sideCar,r=Rx(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return x.createElement(n,gr({},r))};Mx.isSideCarExport=!0;function bA(t,e){return t.useMedium(e),Mx}var Lx=vA(),Ef=function(){},$u=x.forwardRef(function(t,e){var r=x.useRef(null),n=x.useState({onScrollCapture:Ef,onWheelCapture:Ef,onTouchMoveCapture:Ef}),s=n[0],o=n[1],c=t.forwardProps,d=t.children,m=t.className,h=t.removeScrollBar,p=t.enabled,g=t.shards,v=t.sideCar,E=t.noIsolation,N=t.inert,k=t.allowPinchZoom,w=t.as,C=w===void 0?"div":w,_=t.gapMode,T=Rx(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=v,I=pA([r,e]),M=gr(gr({},T),s);return x.createElement(x.Fragment,null,p&&x.createElement(A,{sideCar:Lx,removeScrollBar:h,shards:g,noIsolation:E,inert:N,setCallbacks:o,allowPinchZoom:!!k,lockRef:r,gapMode:_}),c?x.cloneElement(x.Children.only(d),gr(gr({},M),{ref:I})):x.createElement(C,gr({},M,{className:m,ref:I}),d))});$u.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$u.classNames={fullWidth:ru,zeroRight:tu};var EA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xA(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=EA();return e&&t.setAttribute("nonce",e),t}function wA(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function kA(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var NA=function(){var t=0,e=null;return{add:function(r){t==0&&(e=xA())&&(wA(e,r),kA(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},SA=function(){var t=NA();return function(e,r){x.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},Fx=function(){var t=SA(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},_A={left:0,top:0,right:0,gap:0},xf=function(t){return parseInt(t||"",10)||0},CA=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[xf(r),xf(n),xf(s)]},TA=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return _A;
vendor: 3,601 bytes, lines 76-116
76var e=CA(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},AA=Fx(),ui="data-scroll-locked",IA=function(t,e,r,n){var s=t.left,o=t.top,c=t.right,d=t.gap;return r===void 0&&(r="margin"),` 77 .`.concat(dA,` { 78 overflow: hidden `).concat(n,`; 79 padding-right: `).concat(d,"px ").concat(n,`; 80 } 81 body[`).concat(ui,`] { 82 overflow: hidden `).concat(n,`; 83 overscroll-behavior: contain; 84 `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` 85 padding-left: `.concat(s,`px; 86 padding-top: `).concat(o,`px; 87 padding-right: `).concat(c,`px; 88 margin-left:0; 89 margin-top:0; 90 margin-right: `).concat(d,"px ").concat(n,`; 91 `),r==="padding"&&"padding-right: ".concat(d,"px ").concat(n,";")].filter(Boolean).join(""),` 92 } 93 94 .`).concat(tu,` { 95 right: `).concat(d,"px ").concat(n,`; 96 } 97 98 .`).concat(ru,` { 99 margin-right: `).concat(d,"px ").concat(n,`; 100 } 101 102 .`).concat(tu," .").concat(tu,` { 103 right: 0 `).concat(n,`; 104 } 105 106 .`).concat(ru," .").concat(ru,` { 107 margin-right: 0 `).concat(n,`; 108 } 109 110 body[`).concat(ui,`] { 111 `).concat(mA,": ").concat(d,`px; 112 } 113`)},$v=function(){var t=parseInt(document.body.getAttribute(ui)||"0",10);return isFinite(t)?t:0},PA=function(){x.useEffect(function(){return document.body.setAttribute(ui,($v()+1).toString()),function(){var t=$v()-1;t<=0?document.body.removeAttribute(ui):document.body.setAttribute(ui,t.toString())}},[])},OA=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;PA();var o=x.useMemo(function(){return TA(s)},[s]);return x.createElement(AA,{styles:IA(o,!e,s,r?"":"!important")})},kh=!1;if(typeof window<"u")try{var Mc=Object.defineProperty({},"passive",{get:function(){return kh=!0,!0}});window.addEventListener("test",Mc,Mc),window.removeEventListener("test",Mc,Mc)}catch{kh=!1}var Ms=kh?{passive:!1}:!1,RA=function(t){return t.tagName==="TEXTAREA"},jx=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!RA(t)&&r[e]==="visible")},DA=function(t){return jx(t,"overflowY")},MA=function(t){return jx(t,"overflowX")},Bv=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Ux(t,n);if(s){var o=zx(t,n),c=o[1],d=o[2];if(c>d)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},LA=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},FA=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},Ux=function(t,e){return t==="v"?DA(e):MA(e)},zx=function(t,e){return t==="v"?LA(e):FA(e)},jA=function(t,e){return t==="h"&&e==="rtl"?-1:1},UA=function(t,e,r,n,s){var o=jA(t,window.getComputedStyle(e).direction),c=o*n,d=r.target,m=e.contains(d),h=!1,p=c>0,g=0,v=0;do{var E=zx(t,d),N=E[0],k=E[1],w=E[2],C=k-w-o*N;(N||C)&&Ux(t,d)&&(g+=C,v+=N),d instanceof ShadowRoot?d=d.host:d=d.parentNode}while(!m&&d!==document.body||m&&(e.contains(d)||e===d));return(p&&Math.abs(g)<1||!p&&Math.abs(v)<1)&&(h=!0),h},Lc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Wv=function(t){return[t.deltaX,t.deltaY]},Vv=function(t){return t&&"current"in t?t.current:t},zA=function(t,e){return t[0]===e[0]&&t[1]===e[1]},$A=function(t){return` 114 .block-interactivity-`.concat(t,` {pointer-events: none;} 115 .allow-interactivity-`).concat(t,` {pointer-events: all;} 116`)},BA=0,Ls=[];function WA(t){var e=x.useRef([]),r=x.useRef([0,0]),n=x.useRef(),s=x.useState(BA++)[0],o=x.use
vendor: 11,775 bytes, lines 116-155
116State(Fx)[0],c=x.useRef(t);x.useEffect(function(){c.current=t},[t]),x.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var k=nl([t.lockRef.current],(t.shards||[]).map(Vv),!0).filter(Boolean);return k.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),k.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var d=x.useCallback(function(k,w){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!c.current.allowPinchZoom;var C=Lc(k),_=r.current,T="deltaX"in k?k.deltaX:_[0]-C[0],A="deltaY"in k?k.deltaY:_[1]-C[1],I,M=k.target,D=Math.abs(T)>Math.abs(A)?"h":"v";if("touches"in k&&D==="h"&&M.type==="range")return!1;var $=Bv(D,M);if(!$)return!0;if($?I=D:(I=D==="v"?"h":"v",$=Bv(D,M)),!$)return!1;if(!n.current&&"changedTouches"in k&&(T||A)&&(n.current=I),!I)return!0;var j=n.current||I;return UA(j,w,k,j==="h"?T:A)},[]),m=x.useCallback(function(k){var w=k;if(!(!Ls.length||Ls[Ls.length-1]!==o)){var C="deltaY"in w?Wv(w):Lc(w),_=e.current.filter(function(I){return I.name===w.type&&(I.target===w.target||w.target===I.shadowParent)&&zA(I.delta,C)})[0];if(_&&_.should){w.cancelable&&w.preventDefault();return}if(!_){var T=(c.current.shards||[]).map(Vv).filter(Boolean).filter(function(I){return I.contains(w.target)}),A=T.length>0?d(w,T[0]):!c.current.noIsolation;A&&w.cancelable&&w.preventDefault()}}},[]),h=x.useCallback(function(k,w,C,_){var T={name:k,delta:w,target:C,should:_,shadowParent:VA(C)};e.current.push(T),setTimeout(function(){e.current=e.current.filter(function(A){return A!==T})},1)},[]),p=x.useCallback(function(k){r.current=Lc(k),n.current=void 0},[]),g=x.useCallback(function(k){h(k.type,Wv(k),k.target,d(k,t.lockRef.current))},[]),v=x.useCallback(function(k){h(k.type,Lc(k),k.target,d(k,t.lockRef.current))},[]);x.useEffect(function(){return Ls.push(o),t.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:v}),document.addEventListener("wheel",m,Ms),document.addEventListener("touchmove",m,Ms),document.addEventListener("touchstart",p,Ms),function(){Ls=Ls.filter(function(k){return k!==o}),document.removeEventListener("wheel",m,Ms),document.removeEventListener("touchmove",m,Ms),document.removeEventListener("touchstart",p,Ms)}},[]);var E=t.removeScrollBar,N=t.inert;return x.createElement(x.Fragment,null,N?x.createElement(o,{styles:$A(s)}):null,E?x.createElement(OA,{gapMode:t.gapMode}):null)}function VA(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const qA=bA(Lx,WA);var $x=x.forwardRef(function(t,e){return x.createElement($u,gr({},t,{ref:e,sideCar:qA}))});$x.classNames=$u.classNames;var HA=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Fs=new WeakMap,Fc=new WeakMap,jc={},wf=0,Bx=function(t){return t&&(t.host||Bx(t.parentNode))},GA=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Bx(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},YA=function(t,e,r,n){var s=GA(e,Array.isArray(t)?t:[t]);jc[r]||(jc[r]=new WeakMap);var o=jc[r],c=[],d=new Set,m=new Set(s),h=function(g){!g||d.has(g)||(d.add(g),h(g.parentNode))};s.forEach(h);var p=function(g){!g||m.has(g)||Array.prototype.forEach.call(g.children,function(v){if(d.has(v))p(v);else try{var E=v.getAttribute(n),N=E!==null&&E!=="false",k=(Fs.get(v)||0)+1,w=(o.get(v)||0)+1;Fs.set(v,k),o.set(v,w),c.push(v),k===1&&N&&Fc.set(v,!0),w===1&&v.setAttribute(r,"true"),N||v.setAttribute(n,"true")}catch(C){console.error("aria-hidden: cannot operate on ",v,C)}})};return p(e),d.clear(),wf++,function(){c.forEach(function(g){var v=Fs.get(g)-1,E=o.get(g)-1;Fs.set(g,v),o.set(g,E),v||(Fc.has(g)||g.removeAttribute(n),Fc.delete(g)),E||g.removeAttribute(r)}),wf--,wf||(Fs=new WeakMap,Fs=new WeakMap,Fc=new WeakMap,jc={})}},JA=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=HA(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),YA(n,s,r,"aria-hidden")):function(){return null}},Sp="Dialog",[Wx,NM]=DT(Sp),[KA,Lr]=Wx(Sp),Vx=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:c=!0}=t,d=x.useRef(null),m=x.useRef(null),[h=!1,p]=jT({prop:n,defaultProp:s,onChange:o});return Fe.jsx(KA,{scope:e,triggerRef:d,contentRef:m,contentId:pf(),titleId:pf(),descriptionId:pf(),open:h,onOpenChange:p,onOpenToggle:x.useCallback(()=>p(g=>!g),[p]),modal:c,children:r})};Vx.displayName=Sp;var qx="DialogTrigger",Hx=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Lr(qx,r),o=as(e,s.triggerRef);return Fe.jsx(Sn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Tp(s.open),...n,ref:o,onClick:la(t.onClick,s.onOpenToggle)})});Hx.displayName=qx;var _p="DialogPortal",[QA,Gx]=Wx(_p,{forceMount:void 0}),Yx=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,o=Lr(_p,e);return Fe.jsx(QA,{scope:e,forceMount:r,children:x.Children.map(n,c=>Fe.jsx(zu,{present:r||o.open,children:Fe.jsx(Ox,{asChild:!0,container:s,children:c})}))})};Yx.displayName=_p;var Eu="DialogOverlay",Jx=x.forwardRef((t,e)=>{const r=Gx(Eu,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,o=Lr(Eu,t.__scopeDialog);return o.modal?Fe.jsx(zu,{present:n||o.open,children:Fe.jsx(ZA,{...s,ref:e})}):null});Jx.displayName=Eu;var ZA=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Lr(Eu,r);return Fe.jsx($x,{as:Uu,allowPinchZoom:!0,shards:[s.contentRef],children:Fe.jsx(Sn.div,{"data-state":Tp(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),Qa="DialogContent",Kx=x.forwardRef((t,e)=>{const r=Gx(Qa,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,o=Lr(Qa,t.__scopeDialog);return Fe.jsx(zu,{present:n||o.open,children:o.modal?Fe.jsx(XA,{...s,ref:e}):Fe.jsx(eI,{...s,ref:e})})});Kx.displayName=Qa;var XA=x.forwardRef((t,e)=>{const r=Lr(Qa,t.__scopeDialog),n=x.useRef(null),s=as(e,r.contentRef,n);return x.useEffect(()=>{const o=n.current;if(o)return JA(o)},[]),Fe.jsx(Qx,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:la(t.onCloseAutoFocus,o=>{o.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:la(t.onPointerDownOutside,o=>{const c=o.detail.originalEvent,d=c.button===0&&c.ctrlKey===!0;(c.button===2||d)&&o.preventDefault()}),onFocusOutside:la(t.onFocusOutside,o=>o.preventDefault())})}),eI=x.forwardRef((t,e)=>{const r=Lr(Qa,t.__scopeDialog),n=x.useRef(!1),s=x.useRef(!1);return Fe.jsx(Qx,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{t.onCloseAutoFocus?.(o),o.defaultPrevented||(n.current||r.triggerRef.current?.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{t.onInteractOutside?.(o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=o.target;r.triggerRef.current?.contains(c)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Qx=x.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...c}=t,d=Lr(Qa,r),m=x.useRef(null),h=as(e,m);return oA(),Fe.jsxs(Fe.Fragment,{children:[Fe.jsx(Ix,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:Fe.jsx(Tx,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":Tp(d.open),...c,ref:h,onDismiss:()=>d.onOpenChange(!1)})}),Fe.jsxs(Fe.Fragment,{children:[Fe.jsx(tI,{titleId:d.titleId}),Fe.jsx(nI,{contentRef:m,descriptionId:d.descriptionId})]})]})}),Cp="DialogTitle",Zx=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Lr(Cp,r);return Fe.jsx(Sn.h2,{id:s.titleId,...n,ref:e})});Zx.displayName=Cp;var Xx="DialogDescription",ew=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Lr(Xx,r);return Fe.jsx(Sn.p,{id:s.descriptionId,...n,ref:e})});ew.displayName=Xx;var tw="DialogClose",rw=x.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Lr(tw,r);return Fe.jsx(Sn.button,{type:"button",...n,ref:e,onClick:la(t.onClick,()=>s.onOpenChange(!1))})});rw.displayName=tw;function Tp(t){return t?"open":"closed"}var nw="DialogTitleWarning",[SM,aw]=RT(nw,{contentName:Qa,titleName:Cp,docsSlug:"dialog"}),tI=({titleId:t})=>{const e=aw(nw),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. 117 118If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. 119 120For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return x.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},rI="DialogDescriptionWarning",nI=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${aw(rI).contentName}}.`;return x.useEffect(()=>{const s=t.current?.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},sw=Vx,iw=Hx,ow=Yx,Bu=Jx,Wu=Kx,lw=Zx,cw=ew,uw=rw;/** 121 * @license lucide-react v0.344.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */var aI={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 126 * @license lucide-react v0.344.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const sI=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),ge=(t,e)=>{const r=x.forwardRef(({color:n="currentColor",size:s=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:d="",children:m,...h},p)=>x.createElement("svg",{ref:p,...aI,width:s,height:s,stroke:n,strokeWidth:c?Number(o)*24/Number(s):o,className:["lucide",`lucide-${sI(t)}`,d].join(" "),...h},[...e.map(([g,v])=>x.createElement(g,v)),...Array.isArray(m)?m:[m]]));return r.displayName=`${t}`,r};/** 131 * @license lucide-react v0.344.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const Uo=ge("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/** 136 * @license lucide-react v0.344.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const qv=ge("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 141 * @license lucide-react v0.344.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const Rr=ge("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 146 * @license lucide-react v0.344.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const iI=ge("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 151 * @license lucide-react v0.344.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const oI=ge("BarChart",[["line",{x1:"12",x2:"12",y1:"20",y2:"10",key:"1vz5eb"}],["line",{x1:"18",x2:"18",y1:"20",y2:"4",key:"cun8e5"}
155],["line",{x1:"6",x2:"6",y1:"20",y2:"16",key:"hq0ia6"}]]);/** 156 * @license lucide-react v0.344.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const lI=ge("Book",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20",key:"t4utmx"}]]);/** 161 * @license lucide-react v0.344.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const Hv=ge("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** 166 * @license lucide-react v0.344.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const cI=ge("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** 171 * @license lucide-react v0.344.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const uI=ge("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** 176 * @license lucide-react v0.344.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const qr=ge("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 181 * @license lucide-react v0.344.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const dI=ge("CheckSquare",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/** 186 * @license lucide-react v0.344.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const Za=ge("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 191 * @license lucide-react v0.344.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const dw=ge("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 196 * @license lucide-react v0.344.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const mI=ge("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 201 * @license lucide-react v0.344.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const Dr=ge("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 206 * @license lucide-react v0.344.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const fI=ge("Cpu",[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}
210],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** 211 * @license lucide-react v0.344.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const hI=ge("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** 216 * @license lucide-react v0.344.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const vi=ge("Crown",[["path",{d:"m2 4 3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14",key:"zkxr6b"}]]);/** 221 * @license lucide-react v0.344.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const pI=ge("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** 226 * @license lucide-react v0.344.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const kf=ge("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 231 * @license lucide-react v0.344.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const gI=ge("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 236 * @license lucide-react v0.344.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const Gv=ge("Gem",[["path",{d:"M6 3h12l4 6-10 13L2 9Z",key:"1pcd5k"}],["path",{d:"M11 3 8 9l4 13 4-13-3-6",key:"1fcu3u"}],["path",{d:"M2 9h20",key:"16fsjt"}]]);/** 241 * @license lucide-react v0.344.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const yI=ge("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/** 246 * @license lucide-react v0.344.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const Ap=ge("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 251 * @license lucide-react v0.344.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const vI=ge("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** 256 * @license lucide-react v0.344.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const mw=ge("Headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]);/** 261 * @license lucide-react v0.344.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const La=ge("HelpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 266 * @license lucide-react v0.344.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const bI=ge("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/** 271 * @license lucide-react v0.344.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const fw=ge("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 276 * @license lucide-react v0.344.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree.
280 */const hw=ge("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 281 * @license lucide-react v0.344.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const pw=ge("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 286 * @license lucide-react v0.344.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const al=ge("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 291 * @license lucide-react v0.344.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const EI=ge("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 296 * @license lucide-react v0.344.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const xI=ge("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 301 * @license lucide-react v0.344.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const wI=ge("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/** 306 * @license lucide-react v0.344.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const gw=ge("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 311 * @license lucide-react v0.344.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const kI=ge("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 316 * @license lucide-react v0.344.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const yw=ge("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/** 321 * @license lucide-react v0.344.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const NI=ge("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 326 * @license lucide-react v0.344.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const vw=ge("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/** 331 * @license lucide-react v0.344.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const sl=ge("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 336 * @license lucide-react v0.344.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const SI=ge("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** 341 * @license lucide-react v0.344.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const bw=ge("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** 346 * @license lucide-react v0.344.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const Mr=ge("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
350y:"oel41y"}]]);/** 351 * @license lucide-react v0.344.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const _I=ge("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);/** 356 * @license lucide-react v0.344.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const Yv=ge("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/** 361 * @license lucide-react v0.344.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const Xa=ge("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** 366 * @license lucide-react v0.344.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const CI=ge("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** 371 * @license lucide-react v0.344.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const Ip=ge("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** 376 * @license lucide-react v0.344.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const TI=ge("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/** 381 * @license lucide-react v0.344.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const ma=ge("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** 386 * @license lucide-react v0.344.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const AI=ge("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/** 391 * @license lucide-react v0.344.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const Ew=ge("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 396 * @license lucide-react v0.344.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const or=ge("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 401 * @license lucide-react v0.344.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const hl=ge("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
405],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 406 * @license lucide-react v0.344.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const vr=ge("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);function xu(){return xu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xu.apply(null,arguments)}const II=sw,PI=iw,OI=ow,xw=x.forwardRef(({className:t,...e},r)=>x.createElement(Bu,xu({className:Oe("fixed inset-0 z-50 bg-black/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},e,{ref:r})));xw.displayName=Bu.displayName;const RI=kp("fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-slate-900",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ww=x.forwardRef(({side:t="right",className:e,children:r,...n},s)=>x.createElement(OI,null,x.createElement(xw,null),x.createElement(Wu,xu({ref:s,className:Oe(RI({side:t}),e)},n),r,x.createElement(uw,{className:"absolute right-4 top-4 roun
410ded-full opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-slate-100 dark:ring-offset-slate-950 dark:focus:ring-slate-300 dark:data-[state=open]:bg-slate-800"},x.createElement(hl,{className:"h-5 w-5 text-slate-700 dark:text-slate-200"}),x.createElement("span",{className:"sr-only"},"Close")))));ww.displayName=Wu.displayName;function DI(){const{isSignedIn:t,isLoaded:e}=fl(),r=ba(),n=[{href:"#features",label:"Features"},{href:"#integrations",label:"Integrations"},{href:"/blog",label:"Blog"},{href:"#pricing",label:"Pricing"},{href:"/referrals",label:"Referrals"}];return a.createElement(II,null,a.createElement(PI,{asChild:!0},a.createElement(ce,{variant:"ghost",size:"icon",className:"md:hidden relative w-10 h-10 flex items-center justify-center hover:bg-slate-100 dark:hover:bg-slate-800 rounded-full"},a.createElement(xI,{className:"h-6 w-6 text-slate-700 dark:text-slate-200"}),a.createElement("span",{className:"sr-only"},"Toggle menu"))),a.createElement(ww,{side:"right",className:"w-[300px] sm:w-[400px] dark:bg-slate-900 dark:border-slate-800"},a.createElement("nav",{className:"flex flex-col gap-4 mt-8"},n.map(s=>s.href.startsWith("/")?a.createElement("button",{key:s.href,onClick:()=>r(s.href),className:"text-lg font-medium text-slate-700 dark:text-slate-200 hover:text-slate-900 dark:hover:text-white transition-colors text-left"},s.label):a.createElement("a",{key:s.href,href:s.href,onClick:()=>{document.querySelector('[data-state="open"] > div')?.dispatchEvent(new KeyboardEvent("keydown",{key:"Escape"}))},className:"text-lg font-medium text-slate-700 dark:text-slate-200 hover:text-slate-900 dark:hover:text-white transition-colors"},s.label)),a.createElement("hr",{className:"my-4 border-slate-200 dark:border-slate-700"}),e&&a.createElement(a.Fragment,null,t?a.createElement(ce,{className:"w-full",onClick:()=>r("/dashboard")},"Dashboard"):a.createElement("div",{className:"flex flex-col gap-3"},a.createElement(ce,{className:"w-full bg-gradient-to-r from-primary via-primary-light to-secondary hover:opacity-90 transition-opacity",onClick:()=>r("/sign-up")},a.createElement(Ew,{className:"h-4 w-4 mr-2"}),"Sign Up"),a.createElement(ce,{variant:"outline",className:"w-full border-slate-200 dark:border-slate-700 text-slate-900 dark:text-white hover:bg-slate-100 dark:hover:bg-slate-800",onClick:()=>r("/sign-in")},a.createElement(pw,{className:"h-4 w-4 mr-2"}),"Sign In"),a.createElement(ce,{className:"w-full bg-gradient-to-r from-primary via-primary-light to-secondary hover:opacity-90 transition-opacity"},"Request Demo"))))))}function MI(){const{theme:t,setTheme:e}=q2();return a.createElement(ce,{variant:"ghost",size:"icon",onClick:()=>e(t==="light"?"dark":"light"),className:"w-10 h-10 rounded-full hover:bg-slate-800"},t==="light"?a.createElement(kI,{className:"h-5 w-5 text-slate-200"}):a.createElement(CI,{className:"h-5 w-5 text-slate-200"}),a.createElement("span",{className:"sr-only"},"Toggle theme"))}function es(){return es=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},es.apply(null,arguments)}const Ii=sw,LI=iw,FI=ow,kw=x.forwardRef(({className:t,...e},r)=>x.createElement(Bu,es({ref:r,className:Oe("fixed inset-0 z-50 bg-black/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t)},e)));kw.displayName=Bu.displayName;const is=x.forwardRef(({className:t,children:e,...r},n)=>x.createElement(FI,null,x.createElement(kw,null),x.createElement(Wu,es({ref:n,className:Oe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-slate-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
410nded-lg dark:border-slate-800 dark:bg-slate-900",t)},r),e,x.createElement(uw,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-slate-100 data-[state=open]:text-slate-500 dark:ring-offset-slate-950 dark:focus:ring-slate-300 dark:data-[state=open]:bg-slate-800 dark:data-[state=open]:text-slate-400"},x.createElement(hl,{className:"h-4 w-4 text-slate-700 dark:text-slate-200"}),x.createElement("span",{className:"sr-only"},"Close")))));is.displayName=Wu.displayName;const Pi=({className:t,...e})=>x.createElement("div",es({className:Oe("flex flex-col space-y-1.5 text-center sm:text-left",t)},e));Pi.displayName="DialogHeader";const Hr=x.forwardRef(({className:t,...e},r)=>x.createElement(lw,es({ref:r,className:Oe("text-lg font-semibold leading-none tracking-tight text-slate-900 dark:text-slate-50",t)},e)));Hr.displayName=lw.displayName;const Gr=x.forwardRef(({className:t,...e},r)=>x.createElement(cw,es({ref:r,className:Oe("text-sm text-slate-500 dark:text-slate-400",t)},e)));Gr.displayName=cw.displayName;const jI="modulepreload",UI=function(t){return"/"+t},Jv={},ts=function(e,r,n){let s=Promise.resolve();if(r&&r.length>0){let h=function(p){return Promise.all(p.map(g=>Promise.resolve(g).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};var c=h;document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),m=d?.nonce||d?.getAttribute("nonce");s=h(r.map(p=>{if(p=UI(p),p in Jv)return;Jv[p]=!0;const g=p.endsWith(".css"),v=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${v}`))return;const E=document.createElement("link");if(E.rel=g?"stylesheet":jI,g||(E.as="script"),E.crossOrigin="",E.href=p,m&&E.setAttribute("nonce",m),document.head.appendChild(E),g)return new Promise((N,k)=>{E.addEventListener("load",N),E.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${p}`)))})}))}function o(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return s.then(d=>{for(const m of d||[])m.status==="rejected"&&o(m.reason);return e().catch(o)})},zI=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>ts(async()=>{const{default:n}=await Promise.resolve().then(()=>Oi);return{default:n}},void 0).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)};
410class Pp extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}}class $I extends Pp{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Kv extends Pp{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Qv extends Pp{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Nh;(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"})(Nh||(Nh={}));var BI=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{h(n.next(p))}catch(g){c(g)}}function m(p){try{h(n.throw(p))}catch(g){c(g)}}function h(p){p.done?o(p.value):s(p.value).then(d,m)}h((n=n.apply(t,e||[])).next())})};class WI{constructor(e,{headers:r={},customFetch:n,region:s=Nh.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=zI(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,r={}){var n;return BI(this,void 0,void 0,function*(){try{const{headers:s,method:o,body:c}=r;let d={},{region:m}=r;m||(m=this.region);const h=new URL(`${this.url}/${e}`);m&&m!=="any"&&(d["x-region"]=m,h.searchParams.set("forceFunctionRegion",m));let p;c&&(s&&!Object.prototype.hasOwnProperty.call(s,"Content-Type")||!s)&&(typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(d["Content-Type"]="application/octet-stream",p=c):typeof c=="string"?(d["Content-Type"]="text/plain",p=c):typeof FormData<"u"&&c instanceof FormData?p=c:(d["Content-Type"]="application/json",p=JSON.stringify(c)));const g=yield this.fetch(h.toString(),{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},d),this.headers),s),body:p}).catch(k=>{throw new $I(k)}),v=g.headers.get("x-relay-error");if(v&&v==="true")throw new Kv(g);if(!g.ok)throw new Qv(g);let E=((n=g.headers.get("Content-Type"))!==null&&n!==void 0?n:"text/plain").split(";")[0].trim(),N;return E==="application/json"?N=yield g.json():E==="application/octet-stream"?N=yield g.blob():E==="text/event-stream"?N=g:E==="multipart/form-data"?N=yield g.formData():N=yield g.text(),{data:N,error:null,response:g}}catch(s){return{data:null,error:s,response:s instanceof Qv||s instanceof Kv?s.context:void 0}}})}}var St={},js={},Us={},zs={},$s={},Bs={},VI=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},bi=VI();const qI=bi.fetch,Nw=bi.fetch.bind(bi),Sw=bi.Headers,HI=bi.Request,GI=bi.Response,Oi=Object.freeze(Object.defineProperty({__proto__:null,Headers:Sw,Request:HI,Response:GI,default:Nw,fetch:qI},Symbol.toStringTag,{value:"Module"})),YI=IS(Oi);var Uc={},Zv;function _w(){if(Zv)return Uc;Zv=1,Object.defineProperty(Uc,"__esModule",{value:!0});class t extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.co
410de=r.code}}return Uc.default=t,Uc}var Xv;function Cw(){if(Xv)return Bs;Xv=1;var t=Bs&&Bs.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Bs,"__esModule",{value:!0});const e=t(YI),r=t(_w());class n{constructor(o){this.shouldThrowOnError=!1,this.method=o.method,this.url=o.url,this.headers=o.headers,this.schema=o.schema,this.body=o.body,this.shouldThrowOnError=o.shouldThrowOnError,this.signal=o.signal,this.isMaybeSingle=o.isMaybeSingle,o.fetch?this.fetch=o.fetch:typeof fetch>"u"?this.fetch=e.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(o,c){return this.headers=Object.assign({},this.headers),this.headers[o]=c,this}then(o,c){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const d=this.fetch;let m=d(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async h=>{var p,g,v;let E=null,N=null,k=null,w=h.status,C=h.statusText;if(h.ok){if(this.method!=="HEAD"){const I=await h.text();I===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?N=I:N=JSON.parse(I))}const T=(p=this.headers.Prefer)===null||p===void 0?void 0:p.match(/count=(exact|planned|estimated)/),A=(g=h.headers.get("content-range"))===null||g===void 0?void 0:g.split("/");T&&A&&A.length>1&&(k=parseInt(A[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(N)&&(N.length>1?(E={code:"PGRST116",details:`Results contain ${N.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},N=null,k=null,w=406,C="Not Acceptable"):N.length===1?N=N[0]:N=null)}else{const T=await h.text();try{E=JSON.parse(T),Array.isArray(E)&&h.status===404&&(N=[],E=null,w=200,C="OK")}catch{h.status===404&&T===""?(w=204,C="No Content"):E={message:T}}if(E&&this.isMaybeSingle&&(!((v=E?.details)===null||v===void 0)&&v.includes("0 rows"))&&(E=null,w=200,C="OK"),E&&this.shouldThrowOnError)throw new r.default(E)}return{error:E,data:N,count:k,status:w,statusText:C}});return this.shouldThrowOnError||(m=m.catch(h=>{var p,g,v;return{error:{message:`${(p=h?.name)!==null&&p!==void 0?p:"FetchError"}: ${h?.message}`,details:`${(g=h?.stack)!==null&&g!==void 0?g:""}`,hint:"",code:`${(v=h?.code)!==null&&v!==void 0?v:""}`},data:null,count:null,status:0,statusText:""}})),m.then(o,c)}returns(){return this}overrideTypes(){return this}}return Bs.default=n,Bs}var eb;function Tw(){if(eb)return $s;eb=1;var t=$s&&$s.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty($s,"__esModule",{value:!0});const e=t(Cw());class r extends e.default{select(s){let o=!1;const c=(s??"*").split("").map(d=>/\s/.test(d)&&!o?"":(d==='"'&&(o=!o),d)).join("");return this.url.searchParams.set("select",c),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(s,{ascending:o=!0,nullsFirst:c,foreignTable:d,referencedTable:m=d}={}){const h=m?`${m}.order`:"order",p=this.url.searchParams.get(h);return this.url.searchParams.set(h,`${p?`${p},`:""}${s}.${o?"asc":"desc"}${c===void 0?"":c?".nullsfirst":".nullslast"}`),this}limit(s,{foreignTable:o,referencedTable:c=o}={}){const d=typeof c>"u"?"limit":`${c}.limit`;return this.url.searchParams.set(d,`${s}`),this}range(s,o,{foreignTable:c,referencedTable:d=c}={}){const m=typeof d>"u"?"offset":`${d}.offset`,h=typeof d>"u"?"limit":`${d}.limit`;return this.url.searchParams.set(m,`${s}`),this.url.searchParams.set(h,`${o-s+1}`),this}abortSignal(s){return this.signal=s,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}
410explain({analyze:s=!1,verbose:o=!1,settings:c=!1,buffers:d=!1,wal:m=!1,format:h="text"}={}){var p;const g=[s?"analyze":null,o?"verbose":null,c?"settings":null,d?"buffers":null,m?"wal":null].filter(Boolean).join("|"),v=(p=this.headers.Accept)!==null&&p!==void 0?p:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${h}; for="${v}"; options=${g};`,h==="json"?this:this}rollback(){var s;return((s=this.headers.Prefer)!==null&&s!==void 0?s:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}return $s.default=r,$s}var tb;function Op(){if(tb)return zs;tb=1;var t=zs&&zs.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(zs,"__esModule",{value:!0});const e=t(Tw());class r extends e.default{eq(s,o){return this.url.searchParams.append(s,`eq.${o}`),this}neq(s,o){return this.url.searchParams.append(s,`neq.${o}`),this}gt(s,o){return this.url.searchParams.append(s,`gt.${o}`),this}gte(s,o){return this.url.searchParams.append(s,`gte.${o}`),this}lt(s,o){return this.url.searchParams.append(s,`lt.${o}`),this}lte(s,o){return this.url.searchParams.append(s,`lte.${o}`),this}like(s,o){return this.url.searchParams.append(s,`like.${o}`),this}likeAllOf(s,o){return this.url.searchParams.append(s,`like(all).{${o.join(",")}}`),this}likeAnyOf(s,o){return this.url.searchParams.append(s,`like(any).{${o.join(",")}}`),this}ilike(s,o){return this.url.searchParams.append(s,`ilike.${o}`),this}ilikeAllOf(s,o){return this.url.searchParams.append(s,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(s,o){return this.url.searchParams.append(s,`ilike(any).{${o.join(",")}}`),this}is(s,o){return this.url.searchParams.append(s,`is.${o}`),this}in(s,o){const c=Array.from(new Set(o)).map(d=>typeof d=="string"&&new RegExp("[,()]").test(d)?`"${d}"`:`${d}`).join(",");return this.url.searchParams.append(s,`in.(${c})`),this}contains(s,o){return typeof o=="string"?this.url.searchParams.append(s,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(s,`cs.{${o.join(",")}}`):this.url.searchParams.append(s,`cs.${JSON.stringify(o)}`),this}containedBy(s,o){return typeof o=="string"?this.url.searchParams.append(s,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(s,`cd.{${o.join(",")}}`):this.url.searchParams.append(s,`cd.${JSON.stringify(o)}`),this}rangeGt(s,o){return this.url.searchParams.append(s,`sr.${o}`),this}rangeGte(s,o){return this.url.searchParams.append(s,`nxl.${o}`),this}rangeLt(s,o){return this.url.searchParams.append(s,`sl.${o}`),this}rangeLte(s,o){return this.url.searchParams.append(s,`nxr.${o}`),this}rangeAdjacent(s,o){return this.url.searchParams.append(s,`adj.${o}`),this}overlaps(s,o){return typeof o=="string"?this.url.searchParams.append(s,`ov.${o}`):this.url.searchParams.append(s,`ov.{${o.join(",")}}`),this}textSearch(s,o,{config:c,type:d}={}){let m="";d==="plain"?m="pl":d==="phrase"?m="ph":d==="websearch"&&(m="w");const h=c===void 0?"":`(${c})`;return this.url.searchParams.append(s,`${m}fts${h}.${o}`),this}match(s){return Object.entries(s).forEach(([o,c])=>{this.url.searchParams.append(o,`eq.${c}`)}),this}not(s,o,c){return this.url.searchParams.append(s,`not.${o}.${c}`),this}or(s,{foreignTable:o,referencedTable:c=o}={}){const d=c?`${c}.or`:"or";return this.url.searchParams.append(d,`(${s})`),this}filter(s,o,c){return this.url.searchParams.append(s,`${o}.${c}`),this}}return zs.default=r,zs}var rb;function Aw(){if(rb)return Us;rb=1;var t=Us&&Us.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Us,"__esModule",{value:!0});const e=t(Op());class r{constructor(s,{headers:o={},schema:c,fetch:d}){this.url=s,this.headers=o,this.schema=c,this.fetch=d}select(s,{head:o=!1,count:c}={}){const d=o?"HEAD":"GET";let m=!1;const h=(s??"*").split("").map(p=>/\s/.test(p)&&!m?"":(p==='"'&&(m=!m),p)).join("");return this.url.searchParams.set("select",h),c&&(this.headers.Prefer=`count=${c}`),new e.default({method:d,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(s,{count:o,defaultToNull:c=!0}={}){const d="POST",m=[];if(this.headers.Prefer&&m.push(this.headers.Prefer),o&&m.push(`count=${o}`),c||m.push("missing=default"),this.headers.Prefer=m.join(","),Array.isArray(s)){const h=s.reduce((p,g)=>p.concat(Object.keys(g)),[]);if(h.length>0){const p=[...new Set(h)].map(g=>`"${g}"`);this.url.searchParams.set("columns",p.join(","))}}return new e.default({method:d,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:this.fetch,allowEmpty:!1})}upsert(s,{onConflict:o,ignoreDuplicates:c=!1,count:d,defaultToNull:m=!0}={}){const h="POST",p=[`resolution=${c?"ignore":"merge"}-duplicates`];if(o!==void 0&&this.url.searchParams.set("on_conflict",o),this.headers.Prefer&&p.push(this.headers.Prefer),d&&p.push(`count=${d}`),m||p.push("missing=default"),this.headers.Prefer=p.join(","),Array.isArray(s)){const g=s.reduce((v,E)=>v.concat(Object.keys(E)),[]);if(g.length>0){const v=[...new Set(g)].map(E=>`"${E}"`);this.url.searchParams.set("columns",v.join(","))}}return new e.default({method:h,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:this.fetch,allowEmpty:!1})}update(s,{count:o}={}){const c="PATCH",d=[];return this.headers.Prefer&&d.push(this.headers.Prefer),o&&d.push(`count=${o}`),this.headers.Prefer=d.join(","),new e.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:this.fetch,allowEmpty:!1})}delete({count:s}={}){const o="DELETE",c=[];return s&&c.push(`count=${s}`),this.headers.Prefer&&c.unshift(this.headers.Prefer),this.headers.Prefer=c.join(","),new e.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}return Us.default=r,Us}var To={},Ao={},nb;function JI(){return nb||(nb=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.version=void 0,Ao.version="0.0.0-automated"),Ao}var ab;function KI(){if(ab)return To;ab=1,Object.defineProperty(To,"__esModule",{value:!0}),To.DEFAULT_HEADERS=void 0;const t=JI();return To.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${t.version}`},To}var sb;function QI(){if(sb)return js;sb=1;var t=js&&js.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(js,"__esModule",{value:!0});const e=t(Aw()),r=t(Op()),n=KI();class s{constructor(c,{headers:d={},schema:m,fetch:h}={}){this.url=c,this.headers=Object.assign(Object.assign({},n.DEFAULT_HEADERS),d),this.schemaName=m,this.fetch=h}from(c){const d=new URL(`${this.url}/${c}`);return new e.default(d,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(c){return new s(this.url,{headers:this.headers,schema:c,fetch:this.fetch})}rpc(c,d={},{head:m=!1,get:h=!1,count:p}={}){let g;const v=new URL(`${this.url}/rpc/${c}`);let E;m||h?(g=m?"HEAD":"GET",Object.entries(d).filter(([k,w])=>w!==void 0).map(([k,w])=>[k,Array.isArray(w)?`{${w.join(",")}}`:`${w}
410`]).forEach(([k,w])=>{v.searchParams.append(k,w)})):(g="POST",E=d);const N=Object.assign({},this.headers);return p&&(N.Prefer=`count=${p}`),new r.default({method:g,url:v,headers:N,schema:this.schemaName,body:E,fetch:this.fetch,allowEmpty:!1})}}return js.default=s,js}var ib;function ZI(){if(ib)return St;ib=1;var t=St&&St.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(St,"__esModule",{value:!0}),St.PostgrestError=St.PostgrestBuilder=St.PostgrestTransformBuilder=St.PostgrestFilterBuilder=St.PostgrestQueryBuilder=St.PostgrestClient=void 0;const e=t(QI());St.PostgrestClient=e.default;const r=t(Aw());St.PostgrestQueryBuilder=r.default;const n=t(Op());St.PostgrestFilterBuilder=n.default;const s=t(Tw());St.PostgrestTransformBuilder=s.default;const o=t(Cw());St.PostgrestBuilder=o.default;const c=t(_w());return St.PostgrestError=c.default,St.default={PostgrestClient:e.default,PostgrestQueryBuilder:r.default,PostgrestFilterBuilder:n.default,PostgrestTransformBuilder:s.default,PostgrestBuilder:o.default,PostgrestError:c.default},St}var XI=ZI();const e4=ya(XI),{PostgrestClient:t4,PostgrestQueryBuilder:_M,PostgrestFilterBuilder:CM,PostgrestTransformBuilder:TM,PostgrestBuilder:AM,PostgrestError:IM}=e4;function r4(){if(typeof WebSocket<"u")return WebSocket;if(typeof global.WebSocket<"u")return global.WebSocket;if(typeof window.WebSocket<"u")return window.WebSocket;if(typeof self.WebSocket<"u")return self.WebSocket;throw new Error("`WebSocket` is not supported in this environment")}const n4=r4(),a4="2.11.15",s4=`realtime-js/${a4}`,i4="1.0.0",Iw=1e4,o4=1e3;var Yo;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(Yo||(Yo={}));var jt;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(jt||(jt={}));var Ar;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(Ar||(Ar={}));var Sh;(function(t){t.websocket="websocket"})(Sh||(Sh={}));var Va;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(Va||(Va={}));class l4{constructor(){this.HEADER_LENGTH=1}decode(e,r){return e.constructor===ArrayBuffer?r(this._binaryDecode(e)):r(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const r=new DataView(e),n=new TextDecoder;return this._decodeBroadcast(e,r,n)}_decodeBroadcast(e,r,n){const s=r.getUint8(1),o=r.getUint8(2);let c=this.HEADER_LENGTH+2;const d=n.decode(e.slice(c,c+s));c=c+s;const m=n.decode(e.slice(c,c+o));c=c+o;const h=JSON.parse(n.decode(e.slice(c,e.byteLength)));return{ref:null,topic:d,event:m,payload:h}}}class Pw{constructor(e,r){this.callback=e,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var Ge;(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"})(Ge||(Ge={}));const ob=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return Object.keys(e).reduce((o,c)=>(o[c]=c4(c,t,e,s),o),{})},c4=(t,e,r,n)=>{const s=e.find(d=>d.name===t),o=s?.type,c=r[t];return o&&!n.includes(o)?Ow(o,c):_h(c)},Ow=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return f4(e,r)}switch(t){case Ge.bool:return u4(e);case Ge.float4:case Ge.float8:case Ge.int2:case Ge.int4:case Ge.int8:case Ge.numeric:case Ge.oid:return d4(e);case Ge.json:case Ge.jsonb:return m4(e);case Ge.timestamp:return h4(e);case Ge.abstime:case Ge.date:case Ge.daterange:case Ge.int4range:case Ge.int8range:case Ge.money:case Ge.reltime:case Ge.text:case Ge.time:case Ge.timestamptz:case Ge.timetz:case Ge.tsrange:case Ge.tstzrange:return _h(e);default:return _h(e)}},_h=t=>t,u4=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},d4=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},m4=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},f4=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];
vendor: 4,488 bytes, line 410
410if(t[0]==="{"&&n==="}"){let o;const c=t.slice(1,r);try{o=JSON.parse("["+c+"]")}catch{o=c?c.split(","):[]}return o.map(d=>Ow(e,d))}return t},h4=t=>typeof t=="string"?t.replace(" ","T"):t,Rw=t=>{let e=t;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")};class Nf{constructor(e,r,n={},s=Iw){this.channel=e,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,r){var n;return this._hasReceived(e)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:e,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(r))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var lb;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(lb||(lb={}));class Jo{constructor(e,r){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=r?.events||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:o,onLeave:c,onSync:d}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Jo.syncState(this.state,s,o,c),this.pendingDiffs.forEach(m=>{this.state=Jo.syncDiff(this.state,m,o,c)}),this.pendingDiffs=[],d()}),this.channel._on(n.diff,{},s=>{const{onJoin:o,onLeave:c,onSync:d}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Jo.syncDiff(this.state,s,o,c),d())}),this.onJoin((s,o,c)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:c})}),this.onLeave((s,o,c)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:c})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,r,n,s){const o=this.cloneDeep(e),c=this.transformState(r),d={},m={};return this.map(o,(h,p)=>{c[h]||(m[h]=p)}),this.map(c,(h,p)=>{const g=o[h];if(g){const v=p.map(w=>w.presence_ref),E=g.map(w=>w.presence_ref),N=p.filter(w=>E.indexOf(w.presence_ref)<0),k=g.filter(w=>v.indexOf(w.presence_ref)<0);N.length>0&&(d[h]=N),k.length>0&&(m[h]=k)}else d[h]=p}),this.syncDiff(o,{joins:d,leaves:m},n,s)}static syncDiff(e,r,n,s){const{joins:o,leaves:c}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(o,(d,m)=>{var h;const p=(h=e[d])!==null&&h!==void 0?h:[];if(e[d]=this.cloneDeep(m),p.length>0){const g=e[d].map(E=>E.presence_ref),v=p.filter(E=>g.indexOf(E.presence_ref)<0);e[d].unshift(...v)}n(d,p,m)}),this.map(c,(d,m)=>{let h=e[d];if(!h)return;const p=m.map(g=>g.presence_ref);h=h.filter(g=>p.indexOf(g.presence_ref)<0),e[d]=h,s(d,h,m),h.length===0&&delete e[d]}),e}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=e[n];return"metas"in s?r[n]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):r[n]=s,r},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var cb;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELET
410E="DELETE"})(cb||(cb={}));var ub;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(ub||(ub={}));var dn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(dn||(dn={}));class Rp{constructor(e,r={config:{}},n){this.topic=e,this.params=r,this.socket=n,this.bindings={},this.state=jt.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new Nf(this,Ar.join,this.params,this.timeout),this.rejoinTimer=new Pw(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=jt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(s=>s.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=jt.closed,this.socket._remove(this)}),this._onError(s=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,s),this.state=jt.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=jt.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Ar.reply,{},(s,o)=>{this._trigger(this._replyEventName(o),s)}),this.presence=new Jo(this),this.broadcastEndpointURL=Rw(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(e,r=this.timeout){var n,s;if(this.socket.isConnected()||this.socket.connect(),this.state==jt.closed){const{config:{broadcast:o,presence:c,private:d}}=this.params;this._onError(p=>e?.(dn.CHANNEL_ERROR,p)),this._onClose(()=>e?.(dn.CLOSED));const m={},h={broadcast:o,presence:c,postgres_changes:(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(p=>p.filter))!==null&&s!==void 0?s:[],private:d};this.socket.accessTokenValue&&(m.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:h},m)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:p})=>{var g;if(this.socket.setAuth(),p===void 0){e?.(dn.SUBSCRIBED);return}else{const v=this.bindings.postgres_changes,E=(g=v?.length)!==null&&g!==void 0?g:0,N=[];for(let k=0;k<E;k++){const w=v[k],{filter:{event:C,schema:_,table:T,filter:A}}=w,I=p&&p[k];if(I&&I.event===C&&I.schema===_&&I.table===T&&I.filter===A)N.push(Object.assign(Object.assign({},w),{id:I.id}));else{this.unsubscribe(),this.state=jt.errored,e?.(dn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=N,e&&e(dn.SUBSCRIBED);return}}).receive("error",p=>{this.state=jt.errored,e?.(dn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(p).join(", ")||"error")))}).receive("timeout",()=>{e?.(dn.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){return this._on(e,r,n)}async send(e,r={}){var n,s;if(!this._canPush()&&e.type==="broadcast"){const{event:o,payload:c}=e,m={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:c,private:this.private}]})};try{const h=await this._fetchWithTimeout(this.broadcastEndpointURL,m,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=h.body)===null||s===void 0?void 0:s.cancel()),h.ok?"ok":"error"}catch(h){return h.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var c,d,m;const h=this._push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((m=(d=(c=this.params)===null||c===void 0?void 0:c.config)===null||d===void 0?void 0:d.broadcast)===null||m===void 0)&&m.ack)&&o("ok"),h.receive("ok",()=>o("ok")),h.receive("error",()=>o("error")),h.receive("timeout",()=>o("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=jt.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Ar.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new Nf(this,Ar.leave,{},e),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n?.destroy()})}
410teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.rejoinTimer&&clearTimeout(this.rejoinTimer.timer),this.joinPush.destroy()}async _fetchWithTimeout(e,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),c=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),c}_push(e,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Nf(this,e,r,n);return this._canPush()?s.send():(s.startTimeout(),this.pushBuffer.push(s)),s}_onMessage(e,r,n){return r}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,r,n){var s,o;const c=e.toLocaleLowerCase(),{close:d,error:m,leave:h,join:p}=Ar;if(n&&[d,m,h,p].indexOf(c)>=0&&n!==this._joinRef())return;let v=this._onMessage(c,r,n);if(r&&!v)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(c)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(E=>{var N,k,w;return((N=E.filter)===null||N===void 0?void 0:N.event)==="*"||((w=(k=E.filter)===null||k===void 0?void 0:k.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===c}).map(E=>E.callback(v,n)):(o=this.bindings[c])===null||o===void 0||o.filter(E=>{var N,k,w,C,_,T;if(["broadcast","presence","postgres_changes"].includes(c))if("id"in E){const A=E.id,I=(N=E.filter)===null||N===void 0?void 0:N.event;return A&&((k=r.ids)===null||k===void 0?void 0:k.includes(A))&&(I==="*"||I?.toLocaleLowerCase()===((w=r.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const A=(_=(C=E?.filter)===null||C===void 0?void 0:C.event)===null||_===void 0?void 0:_.toLocaleLowerCase();return A==="*"||A===((T=r?.event)===null||T===void 0?void 0:T.toLocaleLowerCase())}else return E.type.toLocaleLowerCase()===c}).map(E=>{if(typeof v=="object"&&"ids"in v){const N=v.data,{schema:k,table:w,commit_timestamp:C,type:_,errors:T}=N;v=Object.assign(Object.assign({},{schema:k,table:w,commit_timestamp:C,eventType:_,new:{},old:{},errors:T}),this._getPayloadRecords(N))}E.callback(v,n)})}_isClosed(){return this.state===jt.closed}_isJoined(){return this.state===jt.joined}_isJoining(){return this.state===jt.joining}_isLeaving(){return this.state===jt.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,r,n){const s=e.toLocaleLowerCase(),o={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(e,r){const n=e.toLocaleLowerCase();return this.bindings[n]=this.bindings[n].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===n&&Rp.isEqual(s.filter,r))}),this}static isEqual(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(Ar.close,{},e)}_onError(e){this._on(Ar.error,{},r=>e(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=jt.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=ob(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=ob(e.columns,e.old_record)),r}}const db=()=>{},p4=` 411 addEventListener("message", (e) => { 412 if (e.data.event === "start") { 413 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 414 } 415 });`;class g4{constructor(e,r){var n;this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Iw,this.heartbeatIntervalMs=25e3,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=db,this.ref=0,this.logger=db,this.conn=null,this.sendBuffer=[],this.serializer=new l4,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=o=>{let c;return o?c=o:typeof fetch>"u"?c=(...d)=>ts(async()=>{const{default:m}=await Promise.resolve().then(()=>Oi);return{default:m}},void 0).then(({default:m})=>m(...d)):c=fetch,(...d)=>c(...d)},this.endPoint=`${e}/${Sh.websocket}`,this.httpEndpoint=Rw(e),r?.transport?this.transport=r.transport:this.transport=null,r?.params&&(this.params=r.params),r?.timeout&&(this.timeout=r.timeout),r?.logger&&(this.logger=r.logger),(r?.logLevel||r?.log_level)&&(this.logLevel=r.logLevel||r.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),r?.heartbeatIntervalMs&&(this.heartbeatIntervalMs=r.heartbeatIntervalMs);const s=(n=r?.params)===null||n===void 0?void 0:n.apikey;if(s&&(this.accessTokenValue=s,this.apiKey=s),this.reconnectAfterMs=r?.reconnectAfterMs?r.reconnectAfterMs:o=>[1e3,2e3,5e3,1e4][o-1]||1e4,this.encode=r?.encode?r.encode:(o,c)=>c(JSON.stringify(o)),this.decode=r?.decode?r.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Pw(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(r?.fetch),r?.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=r?.worker||!1,this.workerUrl=r?.workerUrl}this.accessToken=r?.accessToken||null}connect(){if(!this.conn){if(this.transport||(this.transport=n4),!this.transport)throw new Error("No transport provided");this.conn=new this.transport(this.endpointURL()),this.setupConnection()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:i4}))}
415disconnect(e,r){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,r??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset(),this.channels.forEach(n=>n.teardown()))}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const e=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,r,n){this.logger(e,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Yo.connecting:return Va.Connecting;case Yo.open:return Va.Open;case Yo.closing:return Va.Closing;default:return Va.Closed}}isConnected(){return this.connectionState()===Va.Open}channel(e,r={config:{}}){const n=`realtime:${e}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new Rp(`realtime:${e}`,r,this);return this.channels.push(o),o}}push(e){const{topic:r,event:n,payload:s,ref:o}=e,c=()=>{this.encode(e,d=>{var m;(m=this.conn)===null||m===void 0||m.send(d)})};this.log("push",`${r} ${n} (${o})`,s),this.isConnected()?c():this.sendBuffer.push(c)}async setAuth(e=null){let r=e||this.accessToken&&await this.accessToken()||this.accessTokenValue;this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const s={access_token:r,version:s4};r&&n.updateJoinPayload(s),n.joinedOnce&&n._isJoined()&&n._push(Ar.access_token,{access_token:r})}))}async sendHeartbeat(){var e;if(!this.isConnected()){this.heartbeatCallback("disconnected");return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.heartbeatCallback("timeout"),(e=this.conn)===null||e===void 0||e.close(o4,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatCallback("sent"),await this.setAuth()}onHeartbeat(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let r=this.channels.find(n=>n.topic===e&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${e}"`),r.unsubscribe())}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic)}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_onConnMessage(e){this.decode(e.data,r=>{let{topic:n,event:s,payload:o,ref:c}=r;n==="phoenix"&&s==="phx_reply"&&this.heartbeatCallback(r.payload.status=="ok"?"ok":"error"),c&&c===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${o.status||""} ${n} ${s} ${c&&"("+c+")"||""}`,o),Array.from(this.channels).filter(d=>d._isMember(n)).forEach(d=>d._trigger(s,o,c)),this.stateChangeCallbacks.message.forEach(d=>d(r))})}_onConnOpen(){this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this.stateChangeCallbacks.open.forEach(e=>e())}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_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=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(r=>r(e))}_onConnError(e){this.log("transport",`${e}`),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(r=>r(e))}
415_triggerChanError(){this.channels.forEach(e=>e._trigger(Ar.error))}_appendParams(e,r){if(Object.keys(r).length===0)return e;const n=e.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${e}${n}${s}`}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([p4],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}}class Dp extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function _t(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class y4 extends Dp{constructor(e,r,n){super(e),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Ch extends Dp{constructor(e,r){super(e),this.name="StorageUnknownError",this.originalError=r}}var v4=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{h(n.next(p))}catch(g){c(g)}}function m(p){try{h(n.throw(p))}catch(g){c(g)}}function h(p){p.done?o(p.value):s(p.value).then(d,m)}h((n=n.apply(t,e||[])).next())})};const Dw=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>ts(async()=>{const{default:n}=await Promise.resolve().then(()=>Oi);return{default:n}},void 0).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},b4=()=>v4(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield ts(()=>Promise.resolve().then(()=>Oi),void 0)).Response:Response}),Th=t=>{if(Array.isArray(t))return t.map(r=>Th(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));e[s]=Th(n)}),e},E4=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)};var os=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{h(n.next(p))}catch(g){c(g)}}function m(p){try{h(n.throw(p))}catch(g){c(g)}}function h(p){p.done?o(p.value):s(p.value).then(d,m)}h((n=n.apply(t,e||[])).next())})};const Sf=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),x4=(t,e,r)=>os(void 0,void 0,void 0,function*(){const n=yield b4();t instanceof n&&!r?.noResolveJson?t.json().then(s=>{const o=t.status||500,c=s?.statusCode||o+"";e(new y4(Sf(s),o,c))}).catch(s=>{e(new Ch(Sf(s),s))}):e(new Ch(Sf(t),t))}),w4=(t,e,r,n)=>{const s={method:t,headers:e?.headers||{}};return t==="GET"||!n?s:(E4(n)?(s.headers=Object.assign({"Content-Type":"application/json"},e?.headers),s.body=JSON.stringify(n)):s.body=n,Object.assign(Object.assign({},s),r))};function pl(t,e,r,n,s,o){return os(this,void 0,void 0,function*(){return new Promise((c,d)=>{t(r,w4(e,n,s,o)).then(m=>{if(!m.ok)throw m;return n?.noResolveJson?m:m.json()}).then(m=>c(m)).catch(m=>x4(m,d,n))})})}function wu(t,e,r,n){return os(this,void 0,void 0,function*(){return pl(t,"GET",e,r,n)})}function mn(t,e,r,n,s){return os(this,void 0,void 0,function*(){return pl(t,"POST",e,n,s,r)})}function Ah(t,e,r,n,s){return os(this,void 0,void 0,function*(){return pl(t,"PUT",e,n,s,r)})}function k4(t,e,r,n){return os(this,void 0,void 0,function*(){return pl(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function Mw(t,e,r,n,s){return os(this,void 0,void 0,function*(){return pl(t,"DELETE",e,n,s,r)})}var Qt=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{h(n.next(p))}catch(g){c(g)}}function m(p){try{h(n.throw(p))}catch(g){c(g)}}function h(p){p.done?o(p.value):s(p.value).then(d,m)}h((n=n.apply(t,e||[])).next())})};const N4={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},mb={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class S4{constructor(e,r={},n,s){this.url=e,this.headers=r,this.bucketId=n,this.fetch=Dw(s)}uploadOrUpdate(e,r,n,s){return Qt(this,void 0,void 0,function*(){try{let o;const c=Object.assign(Object.assign({},mb),s);let d=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(c.upsert)});const m=c.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",c.cacheControl),m&&o.append("metadata",this.encodeMetadata(m)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.append("cacheControl",c.cacheControl),m&&o.append("metadata",this.encodeMetadata(m))):(o=n,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType,m&&(d["x-metadata"]=this.toBase64(this.encodeMetadata(m)))),s?.headers&&(d=Object.assign(Object.assign({},d),s.headers));const h=this._removeEmptyFolders(r),p=this._getFinalPath(h),g=yield(e=="PUT"?Ah:mn)(this.fetch,`${this.url}/object/${p}`,o,Object.assign({headers:d},c?.duplex?{duplex:c.duplex}:{}));return{data:{path:h,id:g.Id,fullPath:g.Key},error:null}}catch(o){if(_t(o))return{data:null,error:o};throw o}})}upload(e,r,n){return Qt(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,r,n)})}uploadToSignedUrl(e,r,n,s){return Qt(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(e),c=this._getFinalPath(o),d=new URL(this.url+`/object/upload/sign/${c}`);d.searchParams.set("token",r);try{let m;const h=Object.assign({upsert:mb.upsert},s),p=Object.assign(Object.assign({},this.headers),{"x-upsert":String(h.upsert)});typeof Blob<"u"&&n instanceof Blob?(m=new FormData,m.append("cacheControl",h.cacheControl),m.append("",n)):typeof FormData<"u"&&n instanceof FormData?(m=n,m.append("cacheControl",h.cacheControl)):(m=n,p["cache-control"]=`max-age=${h.cacheControl}`,p["content-type"]=h.contentType);const g=yield Ah(this.fetch,d.toString(),m,{headers:p});return{data:{path:o,fullPath:g.Key},error:null}}catch(m){if(_t(m))return{data:null,error:m};throw m}})}createSignedUploadUrl(e,r){return Qt(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const s=Object.assign({},this.headers);r?.upsert&&(s["x-upsert"]="true");const o=yield mn(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:s}),c=new URL(this.url+o.url),d=c.searchParams.get("token");if(!d)throw new Dp("No token returned by API");return{data:{signedUrl:c.toString(),path:e,token:d},error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}update(e,r,n){return Qt(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,r,n)})}move(e,r,n){return Qt(this,void 0,void 0,function*(){try{return{data:yield mn(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n?.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(_t(s))return{data:null,error:s};throw s}})}copy(e,r,n){return Qt(this,void 0,void 0,function*(){try{return{data:{path:(yield mn(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n?.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(_t(s))return{data:null,error:s};throw s}})}createSignedUrl(e,r,n){return Qt(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),o=yield mn(this.fetch,`${this.url}/object/sign/${s}
415`,Object.assign({expiresIn:r},n?.transform?{transform:n.transform}:{}),{headers:this.headers});const c=n?.download?`&download=${n.download===!0?"":n.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${c}`)},{data:o,error:null}}catch(s){if(_t(s))return{data:null,error:s};throw s}})}createSignedUrls(e,r,n){return Qt(this,void 0,void 0,function*(){try{const s=yield mn(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:e},{headers:this.headers}),o=n?.download?`&download=${n.download===!0?"":n.download}`:"";return{data:s.map(c=>Object.assign(Object.assign({},c),{signedUrl:c.signedURL?encodeURI(`${this.url}${c.signedURL}${o}`):null})),error:null}}catch(s){if(_t(s))return{data:null,error:s};throw s}})}download(e,r){return Qt(this,void 0,void 0,function*(){const s=typeof r?.transform<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString(r?.transform||{}),c=o?`?${o}`:"";try{const d=this._getFinalPath(e);return{data:yield(yield wu(this.fetch,`${this.url}/${s}/${d}${c}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(d){if(_t(d))return{data:null,error:d};throw d}})}info(e){return Qt(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{const n=yield wu(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:Th(n),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}exists(e){return Qt(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{return yield k4(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(_t(n)&&n instanceof Ch){const s=n.originalError;if([400,404].includes(s?.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,r){const n=this._getFinalPath(e),s=[],o=r?.download?`download=${r.download===!0?"":r.download}`:"";o!==""&&s.push(o);const d=typeof r?.transform<"u"?"render/image":"object",m=this.transformOptsToQueryString(r?.transform||{});m!==""&&s.push(m);let h=s.join("&");return h!==""&&(h=`?${h}`),{data:{publicUrl:encodeURI(`${this.url}/${d}/public/${n}${h}`)}}}remove(e){return Qt(this,void 0,void 0,function*(){try{return{data:yield Mw(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}list(e,r,n){return Qt(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},N4),r),{prefix:e||""});return{data:yield mn(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},n),error:null}}catch(s){if(_t(s))return{data:null,error:s};throw s}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}}const _4="2.10.4",C4={"X-Client-Info":`storage-js/${_4}`};var Ws=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{h(n.next(p))}catch(g){c(g)}}function m(p){try{h(n.throw(p))}catch(g){c(g)}}function h(p){p.done?o(p.value):s(p.value).then(d,m)}h((n=n.apply(t,e||[])).next())})};class T4{constructor(e,r={},n,s){const o=new URL(e);s?.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase.")),this.url=o.href,this.headers=Object.assign(Object.assign({},C4),r),this.fetch=Dw(n)}listBuckets(){return Ws(this,void 0,void 0,function*(){try{return{data:yield wu(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(_t(e))return{data:null,error:e};throw e}})}getBucket(e){return Ws(this,void 0,void 0,function*(){try{return{data:yield wu(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}createBucket(e,r={public:!1}){return Ws(this,void 0,void 0,function*(){try{return{data:yield mn(this.fetch,`${this.url}/bucket`,{id:e,name:e,type:r.type,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}updateBucket(e,r){return Ws(this,void 0,void 0,function*(){try{return{data:yield Ah(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(_t(n))return{data:null,error:n};throw n}})}emptyBucket(e){return Ws(this,void 0,void 0,function*(){try{return{data:yield mn(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}deleteBucket(e){return Ws(this,void 0,void 0,function*(){try{return{data:yield Mw(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(_t(r))return{data:null,error:r};throw r}})}}class A4 extends T4{constructor(e,r={},n,s){super(e,r,n,s)}from(e){return new S4(this.url,this.headers,e,this.fetch)}}const I4="2.53.1";let zo="";
415typeof Deno<"u"?zo="deno":typeof document<"u"?zo="web":typeof navigator<"u"&&navigator.product==="ReactNative"?zo="react-native":zo="node";const P4={"X-Client-Info":`supabase-js-${zo}/${I4}`},O4={headers:P4},R4={schema:"public"},D4={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},M4={};var L4=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{h(n.next(p))}catch(g){c(g)}}function m(p){try{h(n.throw(p))}catch(g){c(g)}}function h(p){p.done?o(p.value):s(p.value).then(d,m)}h((n=n.apply(t,e||[])).next())})};const F4=t=>{let e;return t?e=t:typeof fetch>"u"?e=Nw:e=fetch,(...r)=>e(...r)},j4=()=>typeof Headers>"u"?Sw:Headers,U4=(t,e,r)=>{const n=F4(r),s=j4();return(o,c)=>L4(void 0,void 0,void 0,function*(){var d;const m=(d=yield e())!==null&&d!==void 0?d:t;let h=new s(c?.headers);return h.has("apikey")||h.set("apikey",t),h.has("Authorization")||h.set("Authorization",`Bearer ${m}`),n(o,Object.assign(Object.assign({},c),{headers:h}))})};var z4=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{h(n.next(p))}catch(g){c(g)}}function m(p){try{h(n.throw(p))}catch(g){c(g)}}function h(p){p.done?o(p.value):s(p.value).then(d,m)}h((n=n.apply(t,e||[])).next())})};function $4(t){return t.endsWith("/")?t:t+"/"}function B4(t,e){var r,n;const{db:s,auth:o,realtime:c,global:d}=t,{db:m,auth:h,realtime:p,global:g}=e,v={db:Object.assign(Object.assign({},m),s),auth:Object.assign(Object.assign({},h),o),realtime:Object.assign(Object.assign({},p),c),storage:{},global:Object.assign(Object.assign(Object.assign({},g),d),{headers:Object.assign(Object.assign({},(r=g?.headers)!==null&&r!==void 0?r:{}),(n=d?.headers)!==null&&n!==void 0?n:{})}),accessToken:()=>z4(this,void 0,void 0,function*(){return""})};return t.accessToken?v.accessToken=t.accessToken:delete v.accessToken,v}const Lw="2.71.1",ei=30*1e3,Ih=3,_f=Ih*ei,W4="http://localhost:9999",V4="supabase.auth.token",q4={"X-Client-Info":`gotrue-js/${Lw}`},Ph="X-Supabase-Api-Version",Fw={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},H4=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,G4=600*1e3;class Mp extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function Ie(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class Y4 extends Mp{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function J4(t){return Ie(t)&&t.name==="AuthApiError"}class jw extends Mp{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Ea extends Mp{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}}class Xn extends Ea{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function K4(t){return Ie(t)&&t.name==="AuthSessionMissingError"}class zc extends Ea{constructor(){super("Auth session or user missing","AuthInvalidToken
415ResponseError",500,void 0)}}class $c extends Ea{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Bc extends Ea{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function Q4(t){return Ie(t)&&t.name==="AuthImplicitGrantRedirectError"}class fb extends Ea{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Oh extends Ea{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Cf(t){return Ie(t)&&t.name==="AuthRetryableFetchError"}class hb extends Ea{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Rh extends Ea{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const ku="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),pb=` 416\r=`.split(""),Z4=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<pb.length;e+=1)t[pb[e].charCodeAt(0)]=-2;for(let e=0;e<ku.length;e+=1)t[ku[e].charCodeAt(0)]=e;return t})();function gb(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(ku[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(ku[n]),e.queuedBits-=6}}function Uw(t,e,r){const n=Z4[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function yb(t){const e=[],r=c=>{e.push(String.fromCodePoint(c))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=c=>{tP(c,n,r)};for(let c=0;c<t.length;c+=1)Uw(t.charCodeAt(c),s,o);return e.join("")}function X4(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 eP(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}X4(n,e)}}function tP(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if((t>>7-n&1)===0){e.utf8seq=n;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&&r(e.codepoint)}}function rP(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)Uw(t.charCodeAt(s),r,n);return new Uint8Array(e)}function nP(t){const e=[];return eP(t,r=>e.push(r)),new Uint8Array(e)}function aP(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>gb(s,r,n)),gb(null,r,n),e.join("")}function sP(t){return Math.round(Date.now()/1e3)+t}function iP(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}const Tr=()=>typeof window<"u"&&typeof document<"u",Fa={tested:!1,writable:!1},zw=()=>{if(!Tr())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Fa.tested)return Fa.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Fa.tested=!0,Fa.writable=!0}catch{Fa.tested=!0,Fa.writable=!1}return Fa.writable};function oP(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,o)=>{e[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{e[s]=n}),e}const $w=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...r)=>ts(async()=>{const{default:n}=await Promise.resolve().then(()=>Oi);return{default:n}},void 0).then(({default:n})=>n(...r)):e=fetch,(...r)=>e(...r)},lP=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",ti=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},ja=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Kn=async(t,e)=>{await t.removeItem(e)};class Vu{constructor(){this.promise=new Vu.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Vu.promiseConstructor=Promise;function Tf(t){const e=t.split(".");if(e.length!==3)throw new Rh("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!H4.test(e[n]))throw new Rh("JWT not in base64url format");return{header:JSON.parse(yb(e[0])),payload:JSON.parse(yb(e[1])),signature:rP(e[2]),raw:{header:e[0],payload:e[1]}}}async function cP(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function uP(t,e){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const c=await t(o);if(!e(o,null,c)){n(c);return}}catch(c){if(!e(o,c)){s(c);return}}})()})}function dP(t){return("0"+t.toString(16)).substr(-2)}function mP(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(e),Array.from(e,dP).join("")}async function fP(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function hP(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code
416challenge method will default to use plain instead of sha256."),t;const r=await fP(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Vs(t,e,r=!1){const n=mP();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await ti(t,`${e}-code-verifier`,s);const o=await hP(n);return[o,n===o?"plain":"s256"]}const pP=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function gP(t){const e=t.headers.get(Ph);if(!e||!e.match(pP))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function yP(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 vP(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 bP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function qs(t){if(!bP.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Af(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="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 "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function vb(t){return JSON.parse(JSON.stringify(t))}var EP=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r};const $a=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),xP=[502,503,504];async function bb(t){var e;if(!lP(t))throw new Oh($a(t),0);if(xP.includes(t.status))throw new Oh($a(t),t.status);let r;try{r=await t.json()}catch(o){throw new jw($a(o),o)}let n;const s=gP(t);if(s&&s.getTime()>=Fw["2024-01-01"].timestamp&&typeof r=="object"&&r&&typeof r.code=="string"?n=r.code:typeof r=="object"&&r&&typeof r.error_code=="string"&&(n=r.error_code),n){if(n==="weak_password")throw new hb($a(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new Xn}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,c)=>o&&typeof c=="string",!0))throw new hb($a(r),t.status,r.weak_password.reasons);throw new Y4($a(r),t.status||500,n)}const wP=(t,e,r,n)=>{const s={method:t,headers:e?.headers||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function Me(t,e,r,n){var s;const o=Object.assign({},n?.headers);o[Ph]||(o[Ph]=Fw["2024-01-01"].name),n?.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const c=(s=n?.query)!==null&&s!==void 0?s:{};n?.redirectTo&&(c.redirect_to=n.redirectTo);const d=Object.keys(c).length?"?"+new URLSearchParams(c).toString():"",m=await kP(t,e,r+d,{headers:o,noResolveJson:n?.noResolveJson},{},n?.body);return n?.xform?n?.xform(m):{data:Object.assign({},m),error:null}}async function kP(t,e,r,n,s,o){const c=wP(e,n,s,o);let d;try{d=await t(r,Object.assign({},c))}catch(m){throw console.error(m),new Oh($a(m),0)}if(d.ok||await bb(d),n?.noResolveJson)return d;try{return await d.json()}catch(m){await bb(m)}}function cn(t){var e;let r=null;CP(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=sP(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function Eb(t){const e=cn(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((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function ra(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function NP(t){return{data:t,error:null}}function SP(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=t,c=EP(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),d={action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o},m=Object.assign({},c);return{data:{properties:d,user:m},error:null}}function _P(t){return t}function CP(t){return t.access_token&&t.refresh_token&&t.expires_in}const If=["global","local","others"];var TP=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r};class AP{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=$w(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,r=If[0]){if(If.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${If.join(", ")}`);try{return await Me(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Ie(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await Me(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:ra})}catch(n){if(Ie(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=TP(e,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n?.newEmail,delete s.newEmail),await Me(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:SP,redirectTo:r?.redirectTo})}catch(r){if(Ie(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await Me(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:ra})}catch(r){if(Ie(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,o,c,d,m;try{const h={nextPage:null,lastPage:0,total:0},p=await Me(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e?.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=e?.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:_P});if(p.error)throw p.error;const g=await p.json(),v=(c=p.headers.get("x-total-count"))!==null&&c!==void 0?c:0,E=(m=(d=p.headers.get("link"))===null||d===void 0?void 0:d.split(","))!==null&&m!==void 0?m:[];return E.length>0&&(E.forEach(N=>{const k=parseInt(N.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(N.split(";")[1].split("=")[1]);h[`${w}Page`]=k}),h.total=parseInt(v)),{data:Object.assign(Object.assign({},g),h),error:null}}catch(h){if(Ie(h))return{data:{users:[]},error:h};throw h}}async getUserById(e){qs(e);try{return await Me(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:ra})}catch(r){if(Ie(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){qs(e);try{return await Me(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:ra})}catch(n){if(Ie(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){qs(e);
416try{return await Me(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:ra})}catch(n){if(Ie(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){qs(e.userId);try{const{data:r,error:n}=await Me(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(Ie(r))return{data:null,error:r};throw r}}async _deleteFactor(e){qs(e.userId),qs(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(r){if(Ie(r))return{data:null,error:r};throw r}}}function xb(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}function IP(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const Hs={debug:!!(globalThis&&zw()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Bw extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class PP extends Bw{}async function OP(t,e,r){Hs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),Hs.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){Hs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,s.name);try{return await r()}finally{Hs.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,s.name)}}else{if(e===0)throw Hs.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new PP(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Hs.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}IP();const RP={url:W4,storageKey:V4,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:q4,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function wb(t,e,r){return await r()}const Gs={};class il{constructor(e){var r,n;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=il.nextInstanceID,il.nextInstanceID+=1,this.instanceID>0&&Tr()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const s=Object.assign(Object.assign({},RP),e);if(this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.persistSession=s.persistSession,this.storageKey=s.storageKey,this.autoRefreshToken=s.autoRefreshToken,this.admin=new AP({url:s.url,headers:s.headers,fetch:s.fetch}),this.url=s.url,this.headers=s.headers,this.fetch=$w(s.fetch),this.lock=s.lock||wb,this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,s.lock?this.lock=s.lock:Tr()&&(!((r=globalThis?.navigator)===null||r===void 0)&&r.locks)?this.lock=OP:this.lock=wb,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)},this.persistSession?(s.storage?this.storage=s.storage:zw()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=xb(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=xb(this.memoryStorage)),Tr()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(n=this.broadcastChannel)===null||n===void 0||n.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}get jwks(){var e,r;return(r=(e=Gs[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){Gs[this.storageKey]=Object.assign(Object.assign({},Gs[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=Gs[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){Gs[this.storageKey]=Object.assign(Object.assign({},Gs[this.storageKey]),{cachedAt:e})}_debug(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${Lw}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{const r=oP(window.location.href);let n="none";if(this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce"),Tr()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),Q4(o)){const m=(e=o.details)===null||e===void 0?void 0:e.code;if(m==="identity_already_exists"||m==="identity_not_found"||m==="single_identity_not_deletable")return{error:o}}return await this._removeSession(),{error:o}}const{session:c,redirectType:d}=s;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(r){return Ie(r)?{error:r}:{error:new jw("Unexpected error during initialization",r)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const o=await Me(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e?.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=e?.options)===null||s===void 0?void 0:s.captchaToken}},xform:cn}),{data:c,error:d}=o;if(d||!c)return{data:{user:null,session:null},error:d};const m=c.session,h=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",m)),{data:{user:h,session:m},error:null}}catch(o){if(Ie(o))return{data:{user:null,session:null},error:o};throw o}}async signUp(e){var r,n,s;try{let o;if("email"in e){const{email:p,password:g,options:v}=e;let E=null,N=null;this.flowType==="pkce"&&([E,N]=await Vs(this.storage,this.storageKey)),o=await Me(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:v?.emailRedirectTo,body:{email:p,password:g,data:(r=v?.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:v?.captchaToken},code_challenge:E,code_challenge_method:N},xform:cn})}else if("phone"in e){const{phone:p,password:g,options:v}=e;o=await Me(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:p,password:g,data:(n=v?.data)!==null&&n!==void 0?n:{},channel:(s=v?.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:v?.captchaToken}},xform:cn})}else throw new $c("You must provide either an email or phone number and a password");const{data:c,error:d}=o;if(d||!c)return{data:{user:null,session:null},error:d};const m=c.session,h=c.user;return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",m)),{data:{user:h,session:m},error:null}}catch(o){if(Ie(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(e){try{let r;if("email"in e){const{email:o,password:c,options:d}=e;r=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:Eb})}else if("phone"in e){const{phone:o,password:c,options:d}=e;r=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:Eb})}else throw new $c("You must provide either an email or phone number and a password");const{data:n,error:s}=r;return s?{data:{user:null,session:null},error:s}:!n||!n.session||!n.user?{data:{user:null,session:null},error:new zc}:(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),{data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(Ie(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOAuth(e){var r,n,s,o;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=e.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;if(r==="solana")return await this.signInWithSolana(e);throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}async signInWithSolana(e){var r,n,s,o,c,d,m,h,p,g,v,E;let N,k;if("message"in e)N=e.message,k=e.signature;else{const{chain:w,wallet:C,statement:_,options:T}=e;let A;if(Tr())if(typeof C=="object")A=C;else{const M=window;if("solana"in M&&typeof M.solana=="object"&&("signIn"in M.solana&&typeof M.solana.signIn=="function"||"signMessage"in M.solana&&typeof M.solana.signMessage=="function"))A=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 C!="object"||!T?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");A=C}const I=new URL((r=T?.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in A&&A.signIn){const M=await A.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},T?.signInWithSolana),{version:"1",domain:I.host,uri:I.href}),_?{statement:_}:null));let D;if(Array.isArray(M)&&M[0]&&typeof M[0]=="object")D=M[0];else if(M&&typeof M=="object"&&"signedMessage"in M&&"signature"in M)D=M;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in D&&"signature"in D&&(typeof D.signedMessage=="string"||D.signedMessage instanceof Uint8Array)&&D.signature instanceof Uint8Array)N=typeof D.signedMessage=="string"?D.signedMessage:new TextDecoder().decode(D.signedMessage),k=D.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in A)||typeof A.signMessage!="function"||!("publicKey"in A)||typeof A!="object"||!A.publicKey||!("toBase58"in A.publicKey)||typeof A.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");N=[`${I.host} wants you to sign in with your Solana account:`,A.publicKey.toBase58(),..._?["",_,""]:[""],"Version: 1",`URI: ${I.href}`,`Issued At: ${(s=(n=T?.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=T?.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${T.signInWithSolana.notBefore}
416`]:[],...!((c=T?.signInWithSolana)===null||c===void 0)&&c.expirationTime?[`Expiration Time: ${T.signInWithSolana.expirationTime}`]:[],...!((d=T?.signInWithSolana)===null||d===void 0)&&d.chainId?[`Chain ID: ${T.signInWithSolana.chainId}`]:[],...!((m=T?.signInWithSolana)===null||m===void 0)&&m.nonce?[`Nonce: ${T.signInWithSolana.nonce}`]:[],...!((h=T?.signInWithSolana)===null||h===void 0)&&h.requestId?[`Request ID: ${T.signInWithSolana.requestId}`]:[],...!((g=(p=T?.signInWithSolana)===null||p===void 0?void 0:p.resources)===null||g===void 0)&&g.length?["Resources",...T.signInWithSolana.resources.map(D=>`- ${D}`)]:[]].join(` 417`);const M=await A.signMessage(new TextEncoder().encode(N),"utf8");if(!M||!(M instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");k=M}}try{const{data:w,error:C}=await Me(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:N,signature:aP(k)},!((v=e.options)===null||v===void 0)&&v.captchaToken?{gotrue_meta_security:{captcha_token:(E=e.options)===null||E===void 0?void 0:E.captchaToken}}:null),xform:cn});if(C)throw C;return!w||!w.session||!w.user?{data:{user:null,session:null},error:new zc}:(w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),{data:Object.assign({},w),error:C})}catch(w){if(Ie(w))return{data:{user:null,session:null},error:w};throw w}}async _exchangeCodeForSession(e){const r=await ja(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{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:n},xform:cn});if(await Kn(this.storage,`${this.storageKey}-code-verifier`),c)throw c;return!o||!o.session||!o.user?{data:{user:null,session:null,redirectType:null},error:new zc}:(o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:c})}catch(o){if(Ie(o))return{data:{user:null,session:null,redirectType:null},error:o};throw o}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:o,nonce:c}=e,d=await Me(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:c,gotrue_meta_security:{captcha_token:r?.captchaToken}},xform:cn}),{data:m,error:h}=d;return h?{data:{user:null,session:null},error:h}:!m||!m.session||!m.user?{data:{user:null,session:null},error:new zc}:(m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),{data:m,error:h})}catch(r){if(Ie(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithOtp(e){var r,n,s,o,c;try{if("email"in e){const{email:d,options:m}=e;let h=null,p=null;this.flowType==="pkce"&&([h,p]=await Vs(this.storage,this.storageKey));const{error:g}=await Me(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:d,data:(r=m?.data)!==null&&r!==void 0?r:{},create_user:(n=m?.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:m?.captchaToken},code_challenge:h,code_challenge_method:p},redirectTo:m?.emailRedirectTo});return{data:{user:null,session:null},error:g}}if("phone"in e){const{phone:d,options:m}=e,{data:h,error:p}=await Me(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:d,data:(s=m?.data)!==null&&s!==void 0?s:{},create_user:(o=m?.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:m?.captchaToken},channel:(c=m?.channel)!==null&&c!==void 0?c:"sms"}});return{data:{user:null,session:null,messageId:h?.message_id},error:p}}throw new $c("You must provide either an email or phone number.")}catch(d){if(Ie(d))return{data:{user:null,session:null},error:d};throw d}}async verifyOtp(e){var r,n;try{let s,o;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,o=(n=e.options)===null||n===void 0?void 0:n.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:s,xform:cn});if(d)throw d;if(!c)throw new Error("An error occurred on token verification.");const m=c.session,h=c.user;return m?.access_token&&(await this._saveSession(m),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",m)),{data:{user:h,session:m},error:null}}catch(s){if(Ie(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithSSO(e){var r,n,s;try{let o=null,c=null;return this.flowType==="pkce"&&([o,c]=await Vs(this.storage,this.storageKey)),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:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e?.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}
417:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:c}),headers:this.headers,xform:NP})}catch(o){if(Ie(o))return{data:null,error:o};throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new Xn;const{error:s}=await Me(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return{data:{user:null,session:null},error:s}})}catch(e){if(Ie(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:o}=e,{error:c}=await Me(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o?.captchaToken}},redirectTo:o?.emailRedirectTo});return{data:{user:null,session:null},error:c}}else if("phone"in e){const{phone:n,type:s,options:o}=e,{data:c,error:d}=await Me(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o?.captchaToken}}});return{data:{user:null,session:null,messageId:c?.message_id},error:d}}throw new $c("You must provide either an email or phone number and a type")}catch(r){if(Ie(r))return{data:{user:null,session:null},error:r};throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}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 r=await this.__loadSession();return await e(r)}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 r=await ja(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<_f:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const c=await ja(this.userStorage,this.storageKey+"-user");c?.user?e.user=c.user:e.user=Af()}if(this.storage.isServer&&e.user){let c=this.suppressGetSessionWarning;e=new Proxy(e,{get:(m,h,p)=>(!c&&h==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),c=!0,this.suppressGetSessionWarning=!0),Reflect.get(m,h,p))})}return{data:{session:e},error:null}}const{session:s,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{session:null},error:o}:{data:{session:s},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await Me(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:ra}):await this._useSession(async r=>{var n,s,o;const{data:c,error:d}=r;if(d)throw d;return!(!((n=c.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Xn}:await Me(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=c.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:ra})})}catch(r){if(Ie(r))return K4(r)&&(await this._removeSession(),await Kn(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:r};throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;
417if(o)throw o;if(!s.session)throw new Xn;const c=s.session;let d=null,m=null;this.flowType==="pkce"&&e.email!=null&&([d,m]=await Vs(this.storage,this.storageKey));const{data:h,error:p}=await Me(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r?.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:d,code_challenge_method:m}),jwt:c.access_token,xform:ra});if(p)throw p;return c.user=h.user,await this._saveSession(c),await this._notifyAllSubscribers("USER_UPDATED",c),{data:{user:c.user},error:null}})}catch(n){if(Ie(n))return{data:{user:null},error:n};throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new Xn;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:c}=Tf(e.access_token);if(c.exp&&(n=c.exp,s=n<=r),s){const{session:d,error:m}=await this._callRefreshToken(e.refresh_token);if(m)return{data:{user:null,session:null},error:m};if(!d)return{data:{user:null,session:null},error:null};o=d}else{const{data:d,error:m}=await this._getUser(e.access_token);if(m)throw m;o={access_token:e.access_token,refresh_token:e.refresh_token,user:d.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(r){if(Ie(r))return{data:{session:null,user:null},error:r};throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:c,error:d}=r;if(d)throw d;e=(n=c.session)!==null&&n!==void 0?n:void 0}if(!e?.refresh_token)throw new Xn;const{session:s,error:o}=await this._callRefreshToken(e.refresh_token);return o?{data:{user:null,session:null},error:o}:s?{data:{user:s.user,session:s},error:null}:{data:{user:null,session:null},error:null}})}catch(r){if(Ie(r))return{data:{user:null,session:null},error:r};throw r}}async _getSessionFromURL(e,r){try{if(!Tr())throw new Bc("No browser detected.");if(e.error||e.error_description||e.error_code)throw new Bc(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new fb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Bc("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new fb("No code detected.");const{data:_,error:T}=await this._exchangeCodeForSession(e.code);if(T)throw T;const A=new URL(window.location.href);return A.searchParams.delete("code"),window.history.replaceState(window.history.state,"",A.toString()),{data:{session:_.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:c,expires_in:d,expires_at:m,token_type:h}=e;if(!o||!d||!c||!h)throw new Bc("No session defined in URL");const p=Math.round(Date.now()/1e3),g=parseInt(d);let v=p+g;m&&(v=parseInt(m));const E=v-p;E*1e3<=ei&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${E}s, should have been closer to ${g}s`);const N=v-g;p-N>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",N,v,p):p-N<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",N,v,p);const{data:k,error:w}=await this._getUser(o);if(w)throw w;const C={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:g,expires_at:v,refresh_token:c,token_type:h,user:k.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:C,redirectType:e.type},error:null}}catch(n){if(Ie(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await ja(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return{error:o};const c=(n=s.session)===null||n===void 0?void 0:n.access_token;if(c){const{error:d}=await this.admin.signOut(c,e);if(d&&!(J4(d)&&(d.status===404||d.status===401||d.status===403)))return{error:d}}return e!=="others"&&(await this._removeSession(),await Kn(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(e){const r=iP(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(
417async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:c}=r;if(c)throw c;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",e,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",o),console.error(o)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Vs(this.storage,this.storageKey,!0));try{return await Me(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(Ie(o))return{data:null,error:o};throw o}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return{data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(r){if(Ie(r))return{data:null,error:r};throw r}}async linkIdentity(e){var r;try{const{data:n,error:s}=await this._useSession(async o=>{var c,d,m,h,p;const{data:g,error:v}=o;if(v)throw v;const E=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:(m=e.options)===null||m===void 0?void 0:m.queryParams,skipBrowserRedirect:!0});return await Me(this.fetch,"GET",E,{headers:this.headers,jwt:(p=(h=g.session)===null||h===void 0?void 0:h.access_token)!==null&&p!==void 0?p:void 0})});if(s)throw s;return Tr()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n?.url),{data:{provider:e.provider,url:n?.url},error:null}}catch(n){if(Ie(n))return{data:{provider:e.provider,url:null},error:n};throw n}}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:o,error:c}=r;if(c)throw c;return await Me(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(Ie(r))return{data:null,error:r};throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await uP(async s=>(s>0&&await cP(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await Me(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:cn})),(s,o)=>{const c=200*Math.pow(2,s);return o&&Cf(o)&&Date.now()+c-n<ei})}catch(n){if(this._debug(r,"error",n),Ie(n))return{data:{session:null,user:null},error:n};throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),Tr()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await ja(this.storage,this.storageKey);if(s&&this.userStorage){let c=await ja(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!c&&(c={user:s.user},await ti(this.userStorage,this.storageKey+"-user",c)),s.user=(e=c?.user)!==null&&e!==void 0?e:Af()}else if(s&&!s.user&&!s.user){const c=await ja(this.storage,this.storageKey+"-user");c&&c?.user?(s.user=c.user,await Kn(this.storage,this.storageKey+"-user"),await ti(this.storage,this.storageKey,s)):s.user=Af()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not val
417id"),s!==null&&await this._removeSession();return}const o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<_f;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${_f}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:c}=await this._callRefreshToken(s.refresh_token);c&&(console.error(c),Cf(c)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",c),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:c,error:d}=await this._getUser(s.access_token);!d&&c?.user?(s.user=c.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(c){console.error("Error getting user data:",c),this._debug(n,"error getting user data, skipping SIGNED_IN notification",c)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new Xn;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Vu;const{data:o,error:c}=await this._refreshAccessToken(e);if(c)throw c;if(!o.session)throw new Xn;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const d={session:o.session,error:null};return this.refreshingDeferred.resolve(d),d}catch(o){if(this._debug(s,"error",o),Ie(o)){const c={session:null,error:o};return Cf(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(c),c}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const o=[],c=Array.from(this.stateChangeEmitters.values()).map(async d=>{try{await d.callback(e,r)}catch(m){o.push(m)}});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(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await ti(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=vb(s);await ti(this.storage,this.storageKey,o)}else{const s=vb(r);await ti(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),await Kn(this.storage,this.storageKey),await Kn(this.storage,this.storageKey+"-code-verifier"),await Kn(this.storage,this.storageKey+"-user"),this.userStorage&&await Kn(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Tr()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),ei);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-e)/ei);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${ei}ms, refresh threshold is ${Ih} ticks`),s<=Ih&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof Bw)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Tr()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(
417await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"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,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n?.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n?.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,c]=await Vs(this.storage,this.storageKey),d=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(c)}`});s.push(d.toString())}if(n?.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.toString())}return n?.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?{data:null,error:o}:await Me(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s?.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(Ie(r))return{data:null,error:r};throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,s;const{data:o,error:c}=r;if(c)return{data:null,error:c};const d=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:{issuer:e.issuer}),{data:m,error:h}=await Me(this.fetch,"POST",`${this.url}/factors`,{body:d,headers:this.headers,jwt:(n=o?.session)===null||n===void 0?void 0:n.access_token});return h?{data:null,error:h}:(e.factorType==="totp"&&(!((s=m?.totp)===null||s===void 0)&&s.qr_code)&&(m.totp.qr_code=`data:image/svg+xml;utf-8,${m.totp.qr_code}`),{data:m,error:null})})}catch(r){if(Ie(r))return{data:null,error:r};throw r}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return{data:null,error:o};const{data:c,error:d}=await Me(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(n=s?.session)===null||n===void 0?void 0:n.access_token});return d?{data:null,error:d}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+c.expires_in},c)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",c),{data:c,error:d})})}catch(r){if(Ie(r))return{data:null,error:r};throw r}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?{data:null,error:o}:await Me(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:{channel:e.channel},headers:this.headers,jwt:(n=s?.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(Ie(r))return{data:null,error:r};throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?{data:null,error:n}:await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){const{data:{user:e},error:r}=await this.getUser();if(r)return{data:null,error:r};const n=e?.factors||[],s=n.filter(c=>c.factor_type==="totp"&&c.status==="verified"),o=n.filter(c=>c.factor_type==="phone"&&c.status==="verified");return{data:{all:n,totp:s,phone:o},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var r,n;const{data:{session:s},error:o}=e;if(o)return{data:null,error:o};if(!s)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=Tf(s.access_token);let d=null;c.aal&&(d=c.aal);let m=d;((n=(r=s.user.factors)===null||r===void 0?void 0:r.filter(g=>g.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(m="aal2");const p=c.amr||[];return{data:{currentLevel:d,nextLevel:m,currentAuthenticationMethods:p},error:null}}))}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(d=>d.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(d=>d.kid===e),n&&this.jwks_cached_at+G4>s)return n;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=s,n=o.keys.find(d=>d.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:E,error:N}
417=await this.getSession();if(N||!E.session)return{data:null,error:N};n=E.session.access_token}const{header:s,payload:o,signature:c,raw:{header:d,payload:m}}=Tf(n);r?.allowExpired||yP(o.exp);const h=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r?.keys?{keys:r.keys}:r?.jwks);if(!h){const{error:E}=await this.getUser(n);if(E)throw E;return{data:{claims:o,header:s,signature:c},error:null}}const p=vP(s.alg),g=await crypto.subtle.importKey("jwk",h,p,!0,["verify"]);if(!await crypto.subtle.verify(p,g,c,nP(`${d}.${m}`)))throw new Rh("Invalid JWT signature");return{data:{claims:o,header:s,signature:c},error:null}}catch(n){if(Ie(n))return{data:null,error:n};throw n}}}il.nextInstanceID=0;const DP=il;class MP extends DP{constructor(e){super(e)}}var LP=function(t,e,r,n){function s(o){return o instanceof r?o:new r(function(c){c(o)})}return new(r||(r=Promise))(function(o,c){function d(p){try{h(n.next(p))}catch(g){c(g)}}function m(p){try{h(n.throw(p))}catch(g){c(g)}}function h(p){p.done?o(p.value):s(p.value).then(d,m)}h((n=n.apply(t,e||[])).next())})};class FP{constructor(e,r,n){var s,o,c;if(this.supabaseUrl=e,this.supabaseKey=r,!e)throw new Error("supabaseUrl is required.");if(!r)throw new Error("supabaseKey is required.");const d=$4(e),m=new URL(d);this.realtimeUrl=new URL("realtime/v1",m),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",m),this.storageUrl=new URL("storage/v1",m),this.functionsUrl=new URL("functions/v1",m);const h=`sb-${m.hostname.split(".")[0]}-auth-token`,p={db:R4,realtime:M4,auth:Object.assign(Object.assign({},D4),{storageKey:h}),global:O4},g=B4(n??{},p);this.storageKey=(s=g.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=g.global.headers)!==null&&o!==void 0?o:{},g.accessToken?(this.accessToken=g.accessToken,this.auth=new Proxy({},{get:(v,E)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(E)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((c=g.auth)!==null&&c!==void 0?c:{},this.headers,g.global.fetch),this.fetch=U4(r,this._getAccessToken.bind(this),g.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},g.realtime)),this.rest=new t4(new URL("rest/v1",m).href,{headers:this.headers,schema:g.db.schema,fetch:this.fetch}),this.storage=new A4(this.storageUrl.href,this.headers,this.fetch,n?.storage),g.accessToken||this._listenForAuthEvents()}get functions(){return new WI(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,r={},n={}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,r;return LP(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:n}=yield this.auth.getSession();return(r=(e=n.session)===null||e===void 0?void 0:e.access_token)!==null&&r!==void 0?r:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:s,storageKey:o,flowType:c,lock:d,debug:m},h,p){const g={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new MP({url:this.authUrl.href,headers:Object.assign(Object.assign({},g),h),storageKey:o,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:s,flowType:c,lock:d,debug:m,fetch:p,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(e){return new g4(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n?.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?this.changedAccessToken=n:e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const jP=(t,e,r)=>new FP(t,e,r);function UP(){if(typeof window<"u"||typeof process>"u")return!1;const t=process.version;if(t==null)return!1;const e=t.match(/^v(\d+)\./);return e?parseInt(e[1],10)<=18:!1}UP()&&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
417ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const Ww=()=>{const t="https://lhioylodbbmwnfulkykc.supabase.co",e="sb_publishable_oygZUv3qDD5YYmuJyPCn0w_hi1NNENQ",r=t?.trim()||"",n=e?.trim()||"",s=!!r,o=!!n,c=r.startsWith("https://")&&r.includes(".supabase.co"),d=n.startsWith("eyJ")||n.startsWith("sb_")||n.startsWith("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9");return{url:r,key:n,isValid:s&&o&&c&&d,details:{hasUrl:s,hasKey:o,hasValidUrlFormat:c,hasValidKeyFormat:d}}},{url:nu,key:ia,isValid:qu,details:zP}=Ww(),$P=!1,BP=!0,Vw={url:!!nu,key:!!ia,urlFormat:nu?.startsWith("https://"),keyFormat:ia?.startsWith("sb_")||ia?.startsWith("eyJ"),details:zP,isValid:qu,isDevelopment:$P,isProduction:BP,actualUrl:nu?.substring(0,50)+"...",actualKeyPrefix:ia?.substring(0,20)+"..."};console.log("ð§ Supabase Configuration:",{...Vw,usingPublishableKey:!0,usingAnonKey:!0,selectedKeyPrefix:ia?.substring(0,30)+"...",selectedKeyType:ia?.startsWith("sb_publishable_")?"PUBLISHABLE (RECOMMENDED)":ia?.startsWith("eyJ")?"ANON (LEGACY)":"UNKNOWN"});
417qu||console.error("ð¨ Supabase configuration invalid in PRODUCTION:",Vw);class qw{constructor(e="Supabase not configured"){this.configError=e}from(){return{select:()=>Promise.resolve({data:[],error:{message:this.configError,code:"MOCK_CLIENT"}}),insert:()=>Promise.resolve({data:null,error:{message:this.configError,code:"MOCK_CLIENT"}}),update:()=>Promise.resolve({data:null,error:{message:this.configError,code:"MOCK_CLIENT"}}),delete:()=>Promise.resolve({data:null,error:{message:this.configError,code:"MOCK_CLIENT"}}),eq:()=>this,order:()=>this,limit:()=>this,single:()=>Promise.resolve({data:null,error:{message:this.configError,code:"MOCK_CLIENT"}})}}rpc(){return Promise.resolve({data:null,error:{message:this.configError,code:"MOCK_CLIENT"}})}auth={getUser:()=>Promise.resolve({data:{user:null},error:{message:this.configError,code:"MOCK_CLIENT"}}),signInWithOAuth:()=>Promise.resolve({data:null,error:{message:this.configError,code:"MOCK_CLIENT"}}),signOut:()=>Promise.resolve({error:{message:this.configError,code:"MOCK_CLIENT"}})}}const Ei=()=>et instanceof qw,et=qu?jP(nu,ia,{auth:{persistSession:!0,autoRefreshToken:!0},realtime:{params:{eventsPerSecond:10}},global:{headers:{"X-Client-Info":"zenith-website/1.0.0"}},db:{schema:"public"}}):new qw("Service configuration error. Please contact support."),Nu=()=>qu&&!Ei(),Hw=async()=>{if(Ei())return{connected:!1,error:"Using mock client - environment variables not configured",usingMock:!0};try{const{error:t}=await et.from("waitlist_entries").select("count",{count:"exact",head:!0});return t?t.message.includes("Invalid API key")||t.code==="401"?{connected:!1,error:`Authentication failed: ${t.message}`,usingMock:!1}:(console.log("Supabase connection verified (expected permission error is normal)"),{connected:!0}):{connected:!0}}catch(t){return{connected:!1,error:t.message||"Unknown connection error",usingMock:!1}}},WP=()=>(Ei()&&console.error("Attempted to use mock Supabase client. Check environment variables."),et),ol={welcome:t=>` 418 <div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;"> 419 <h1 style="color: #6366F1;">Welcome to Zenith!</h1> 420 <p>Hi ${t},</p> 421 <p>Thank you for signing up! We're excited to have you on board.</p> 422 <p>With Zenith, you'll be able to:</p> 423 <ul> 424 <li>Transform chaotic conversations into organized actions</li> 425 <li>Access AI-powered communication tools</li> 426 <li>Streamline your team's workflow</li> 427 </ul> 428 <p>Get started by exploring our features and integrations.</p> 429 <p>Best regards,<br>The Zenith Team</p> 430 </div> 431 `,waitlist:` 432 <div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;"> 433 <h1 style="color: #6366F1;">Welcome to the Zenith Waitlist!</h1> 434 <p>Thank you for joining our exclusive waitlist!</p> 435 <p>As an early supporter, you'll receive:</p> 436 <ul style="padding-left: 20px;"> 437 <li style="margin-bottom: 10px;">ð <strong>Early Access:</strong> Be among the first to experience Zenith</li> 438 <li style="margin-bottom: 10px;">ð <strong>Founding Member Benefits:</strong> Special perks and pricing</li> 439 <li style="margin-bottom: 10px;">ð¯ <strong>Priority Support:</strong> Direct line to our team</li> 440 <li style="margin-bottom: 10px;">ð <strong>Launch Updates:</strong> Regular progress updates</li> 441 </ul> 442 <div style="background-color: #F3F4F6; padding: 15px; border-radius: 8px; margin: 20px 0;"> 443 <p style="margin: 0; color: #4B5563;"> 444 <strong>Next Steps:</strong> Keep an eye on your inbox for exclusive updates and early access information. 445 </p> 446 </div> 447 <div style="background-color: #6366F1; padding: 15px; border-radius: 8px; margin: 20px 0; text-align: center;"> 448 <p style="margin: 0 0 10px 0; color: white; font-weight: bold;"> 449 ð¯ Boost Your Priority with Referrals! 450 </p> 451 <p style="margin: 0 0 15px 0; color: white;"> 452 Get exclusive rewards by referring others to Zenith 453 </p> 454 <a href="https://usezenith.ai/referrals" style="display: inline-block; background: white; color: #6366F1; padding: 10px 20px; text-decoration: none; border-radius: 5px; font-weight: bold;"> 455 View Your Referral Dashboard 456 </a> 457 </div> 458 <p>We're working hard to bring you the future of team communication.</p> 459 <p>
459Best regards,<br>The Zenith Team</p> 460 <div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #E5E7EB; font-size: 12px; color: #6B7280;"> 461 <p>You're receiving this email because you joined the Zenith waitlist. If you didn't request this, you can safely ignore this email.</p> 462 </div> 463 </div> 464 `,waitlistReminder:` 465 <div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;"> 466 <h1 style="color: #6366F1;">You're Already on the Zenith Waitlist!</h1> 467 <p>We noticed you tried to join our waitlist again - don't worry, you're already on the list! ð</p> 468 <p>Here's a quick update on what's happening:</p> 469 <ul style="padding-left: 20px;"> 470 <li style="margin-bottom: 10px;">⨠<strong>Development Progress:</strong> We're making great strides</li> 471 <li style="margin-bottom: 10px;">ð <strong>Launch Timeline:</strong> We're getting closer to launch</li> 472 <li style="margin-bottom: 10px;">ð <strong>Your Benefits:</strong> Your early supporter status is secured</li> 473 </ul> 474 <div style="background-color: #F3F4F6; padding: 15px; border-radius: 8px; margin: 20px 0;"> 475 <p style="margin: 0; color: #4B5563;"> 476 <strong>Stay Tuned:</strong> We'll be sharing some exciting updates soon! 477 </p> 478 </div> 479 <p>Thank you for your continued interest in Zenith.</p> 480 <p>Best regards,<br>The Zenith Team</p> 481 <div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #E5E7EB; font-size: 12px; color: #6B7280;"> 482 <p>You're receiving this email because you're on the Zenith waitlist. If you didn't request this, you can safely ignore this email.</p> 483 </div> 484 </div> 485 `,demoRequest:t=>` 486 <div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;"> 487 <h1 style="color: #6366F1;">Thank You for Your Interest in Zenith!</h1> 488 <p>Hi ${t},</p> 489 <p>We're excited to show you how Zenith can transform your team's communication.</p> 490 <div style="background-color: #F3F4F6; padding: 15px; border-radius: 8px; margin: 20px 0;"> 491 <h2 style="margin-top: 0; color: #4B5563;">Next Steps:</h2> 492 <ol style="padding-left: 20px; margin-bottom: 0;"> 493 <li style="margin-bottom: 10px;">Our team will review your request within 24 hours</li> 494 <li style="margin-bottom: 10px;">You'll receive a calendar invitation for the demo</li> 495 <li style="margin-bottom: 10px;">We'll prepare a customized demo based on your team's needs</li> 496 </ol> 497 </div> 498 <p>During the demo, you'll see:</p> 499 <ul style="padding-left: 20px;"> 500 <li style="margin-bottom: 10px;">ð¤ AI-powered communication tools in action</li> 501 <li style="margin-bottom: 10px;">ð Real-time task management features</li> 502 <li style="margin-bottom: 10px;">ð Integration capabilities with your existing tools</li> 503 <li style="margin-bottom: 10px;">ð Analytics and productivity insights</li> 504 </ul> 505 <p>If you need to reschedule or have any questions, please reply to this email.</p> 506 <p>Best regards,<br>The Zenith Team</p> 507 <div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #E5E7EB; font-size: 12px; color: #6B7280;"> 508 <p>You're receiving this email because you requested a demo of Zenith. If you didn't request this, please let us know.</p> 509 </div> 510 </div> 511 `,lifetimeDeal:(t,e)=>` 512 <div style="font-family: Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px;"> 513 <div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 30px; border-radius: 10px; text-align: center; margin-bottom: 30px;"> 514 <h1 style="color: white; margin: 0; font-size: 32px;">ð Congratulations, ${t}!</h1> 515 <p style="color: rgba(255,255,255,0.9); margin: 10px 0 0 0; font-size: 18px;">Your Zenith Lifetime Deal Spot is Reserved</p> 516 </div> 517 518 <div style="background-color: #f8f9fa; padding: 25px; border-radius: 10px; margin: 20px 0;"> 519 <h2 style="color: #333; margin-top: 0;">ð¥ Limited Time Offer Details</h2> 520 <div style="background-color: #fff; padding: 20px; border-radius: 8px; margin: 20px 0;"> 521 <p style="margin: 0; color: #666; text-decoration: line-through; font-size: 18px;">Regular: $588/year</p> 522 <p style="margin: 10px 0; color: #333; font-size: 32px; font-weight: bold;">Lifetime: <span style="color: #667eea;">$299</span></p> 523 <p style="margin: 0; color: #27ae60; font-weight: bold;">You save $1,188 every year!</p> 524 </div> 525 </div> 526 527 <div style="background-color: #fff3cd; border: 1px solid #ffeaa7; padding: 20px; border-radius: 8px; margin: 20px 0;"> 528 <h3 style="color: #856404; margin-top: 0;">â ï¸ Important: 24-Hour Reservation</h3> 529 <p style="margin: 0; color: #856404;">Your spot is reserved for 24 hours only. Complete your payment to secure your lifetime access.</p> 530 </div> 531 532 <div style="background-color: #e8f5e9; border: 1px solid #c3e6cb; padding: 20px; border-radius: 8px; margin: 20px 0;"> 533 <h3 style="color: #155724; margin-top: 0;">ð§ How to Complete Your Purchase</h3> 534 <ol style="color: #155724; padding-left: 20px;"> 535 <li style="margin-bottom: 10px;">Reply to this email with "Ready to pay"</li> 536 <li style="margin-bottom: 10px;">We'll send you a secure payment link</li> 537 <li style="margin-bottom: 10px;">Complete payment via credit card or wire transfer</li> 538 <li style="margin-bottom: 10px;">Receive immediate lifetime access to Zenith</li> 539 </ol> 540 </div> 541 542 <div style="margin: 30px 0;"> 543 <h3 style="color: #333;">⨠What You Get with Lifetime Access:</h3> 544 <ul style="padding-left: 20px;"> 545 <li style="margin-bottom: 10px;">ð <strong>Unlimited Tasks & Users</strong> - No caps on team size or usage</li> 546 <li style="margin-bottom: 10px;">ð¤ <strong>All AI Features</strong> - Current and future AI-powered tools</li> 547 <li style="margin-bottom: 10px;">ð <strong>All Platform Integrations</strong> - Slack, Teams, and more</li> 548 <li style="margin-bottom: 10px;">ð¯ <strong>Priority Support</strong> - Direct access to our founding team</li> 549 <li style="margin-bottom: 10px;">ð <strong>Advanced Analytics</strong> - Full access to reporting features</li> 550 <li style="margin-bottom: 10px;">ð® <strong>Future Updates</strong> - Every new feature, forever</li> 551 </ul> 552 </div> 553 554 ${e?.company?` 555 <div style="background-color: #e3f2fd; padding: 15px; border-radius: 8px; margin: 20px 0;"> 556 <p style="margin: 0; color: #1565c0;"> 557 <strong>Account Details:</strong><br> 558 Company: ${e.company}<br> 559 Team Size: ${e.teamSize||"Not specified"}<br> 560 ${e.referralCode?`Referral Code Applied: ${e.referralCode}`:""} 561 </p> 562 </div> 563 `:""} 564 565 <div style="text-align: center; margin: 30px 0;"> 566 <p style="color: #666; margin-bottom: 15px;">Have questions? We're here to help!</p> 567 <a href="mailto:[email protected]" style="display: inline-block; background: #667eea; color: white; padding: 12px 30px; text-decoration: none; border-radius: 5px; font-weight: bold;"> 568 Contact Support 569 </a> 570 </div> 571 572 <div style="margin-top: 30px; padding-top: 20px; border-top: 1px solid #E5E7EB;"> 573 <p style="font-size: 12px; color: #6B7280;"> 574 This offer is valid for 24 hours from the time of reservation. After that, your spot may be released to the next person on the waitlist. 575 </p> 576 <p style="font-size: 12px; color: #6B7280; margin-top: 10px;"> 577 You're receiving this email because you registered for the Zenith Lifetime Deal. 578 </p> 579 </div> 580 </div> 581 `,earlyAdopterWelcome:t=>
581{const{recipientName:e="Founding Member",company:r,region:n,tier:s="PIONEER",referralCode:o}=t,c=n?.isMENA||!1,d=n?.language==="ar";n?.currency;const m={PIONEER:["Early access to Zenith AI","Community Discord access","Founding member badge"],INFLUENCER:["All PIONEER benefits","Product co-creation sessions","Direct access to product team","Referral program priority"],VISIONARY:["All INFLUENCER benefits","CEO demo session","Direct product roadmap influence","Exclusive webinars with leadership"],FOUNDING_PARTNER:["All VISIONARY benefits","Lifetime discount (50% off)","Priority feature development","Annual in-person strategy session"]},h=m[s]||m.PIONEER,v=d?{headline:"Ù Ø±ØØ¨Ø§Ù ب٠ÙÙ Ø¨Ø±ÙØ§Ù ج اÙ٠ؤسسÙ٠اÙÙ Ø¨ÙØ±ÙÙ ÙÙ Zenith",description:"ÙÙ Ù Ø¤Ø³Ø³Ø§Ù Ù Ø´Ø§Ø±ÙØ§Ù Ù٠تØÙÙ٠اÙÙ ØØ§Ø¯Ø«Ø§Øª Ø¥Ù٠إجراءات عبر ÙÙ Ù ÙØµØ©",benefits:"Ù Ø²Ø§ÙØ§ ØØµØ±ÙØ© ÙÙ ÙÙ",nextSteps:"Ø§ÙØ®Ø·Ùات Ø§ÙØªØ§ÙÙØ©",thankYou:"Ø´ÙØ±Ø§Ù ÙÙ",team:"ÙØ±ÙÙ Zenith"}:{headline:"Welcome to the Zenith Early Adopter Program",description:"Transform conversations into action as a founding member co-creator",benefits:"Your exclusive benefits as a",nextSteps:"Next Steps",thankYou:"Thank you",team:"The Zenith Team"};return` 582 <!DOCTYPE html> 583 <html> 584 <head> 585 <meta charset="UTF-8"> 586 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 587 <title>Welcome to Zenith Early Adopter Program</title> 588 </head> 589 <body style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; background-color: #f8fafc; color: #1e293b;"> 590 591 <div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 40px 30px; border-radius: 16px; text-align: center; margin-bottom: 30px;"> 592 <h1 style="margin: 0; color: white; font-size: 32px; font-weight: 700; line-height: 1.2;"> 593 ${d?"ð Ù Ø±ØØ¨Ø§Ù":"ð Welcome"}${e?` ${e}`:""}! 594 </h1> 595 <p style="margin: 15px 0 0 0; color: rgba(255,255,255,0.95); font-size: 18px; font-weight: 500;"> 596 ${d?"Ø£ÙØª Ø§ÙØ¢Ù عض٠ÙÙ Ø¨Ø±ÙØ§Ù ج اÙ٠ؤسسÙ٠اÙÙ Ø¨ÙØ±ÙÙ":`You're now a ${s} Early Adopter`} 597 </p> 598 ${r?`<p style="margin: 8px 0 0 0; color: rgba(255,255,255,0.85); font-size: 16px;">${d?`Ù Ù ${r}`:`from ${r}`}</p>`:""} 599 </div> 600 601 <div style="background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); margin-bottom: 25px;"> 602 <h2 style="margin: 0 0 15px 0; color: #4f46e5; font-size: 24px; font-weight: 600;"> 603 ${v.headline} 604 </h2> 605 <p style="margin: 0 0 20px 0; font-size: 16px; line-height: 1.6; color: #64748b;"> 606 ${v.description} 607 </p> 608 609 <div style="background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); padding: 25px; border-radius: 10px; margin: 25px 0;"> 610 <h3 style="margin: 0 0 20px 0; color: white; font-size: 20px; font-weight: 600;"> 611 ${v.benefits} ${s} ${d?"٠ؤسس Ù Ø¨ÙØ±":"Early Adopter"}: 612 </h3> 613 <ul style="margin: 0; padding-left: 20px; color: white;"> 614 ${h.map(E=>` 615 <li style="margin-bottom: 12px; line-height: 1.5;">${E}</li> 616 `).join("")} 617 </ul> 618 </div> 619 620 ${o?` 621 <div style="background: #f0f9ff; border-left: 4px solid #0ea5e9; padding: 20px; border-radius: 8px; margin: 25px 0;"> 622 <h4 style="margin: 0 0 10px 0; color: #0369a1; font-size: 16px; font-weight: 600;"> 623 ${d?"ر٠ز Ø§ÙØ¥ØØ§ÙØ© Ø§ÙØ®Ø§Øµ بÙ":"Your Referral Code"}: 624 </h4> 625 <p style="margin: 0; font-size: 18px; font-weight: 700; color: #0c4a6e; font-family: monospace;"> 626 ${o} 627 </p> 628 <p style="margin: 10px 0 0 0; font-size: 14px; color: #64748b;"> 629 ${d?"شارÙ٠٠ع Ø§ÙØ¢Ø®Ø±ÙÙ ÙØ§ØØµÙ عÙÙ Ù Ø²Ø§ÙØ§ ØØµØ±ÙØ©":"Share it with others for exclusive rewards"} 630 </p> 631 </div> 632 `:""} 633 </div> 634 635 <div style="background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); margin-bottom: 25px;"> 636 <h3 style="margin: 0 0 15px 0; color: #1e293b; font-size: 20px; font-weight: 600;"> 637 ${v.nextSteps} 638 </h3> 639 <ol style="margin: 0; padding-left: 20px; color: #64748b;"> 640 <li style="margin-bottom: 10px;"> 641 ${d?"Ø§ÙØ¶Ù Ø¥Ù٠٠جت٠ع Discord Ø§ÙØ®Ø§Øµ Ø¨ÙØ§":"Join our exclusive Discord community"} 642 </li> 643 <li style="margin-bottom: 10px;"> 644 ${d?"شار٠أÙÙØ§Ø±Ù ÙÙØ¯Ù Ù ÙØ§ØØ¸Ø§ØªÙ":"Share your ideas and feedback"} 645 </li> 646 <li style="margin-bottom: 10px;"> 647 ${d?"Ø§ØØµÙ عÙÙ ÙØµÙÙ Ù Ø¨ÙØ± Ø¥ÙÙ Zenith":"Get early access to Zenith features"} 648 </li> 649 <li style="margin-bottom: 10px;"> 650 ${d?"ساعد Ù٠تشÙÙÙ Ù Ø³ØªÙØ¨Ù اÙÙ ÙØªØ¬":"Help shape the future of the product"} 651 </li> 652 </ol> 653 654 <div style="text-align: center; margin: 30px 0 20px 0;"> 655 <a href="https://discord.gg/zenith" style="display: inline-block; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px 30px; text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 16px;"> 656 ${d?"Ø§ÙØ¶Ù Ø¥ÙÙ Discord":"Join Discord Community"} 657 </a> 658 </div> 659 </div> 660 661 ${c?` 662 <div style="background: #fef3c7; border: 1px solid #f59e0b; padding: 20px; border-radius: 8px; margin-bottom: 25px;"> 663 <p style="margin: 0; color: #92400e; font-size: 14px;"> 664 ${d?"ð ÙØÙ Ù ØªØÙ سÙÙ ÙØ¯Ø¹Ù Ù ÙØ·ÙØ© MENA":"ð Excited to support the MENA region"} ⢠665 ${d?"خصÙ٠ات خاصة Ø¨Ø§ÙØ¹Ù ÙØ© اÙÙ ØÙÙØ©":"Special local currency discounts"} â¢
666 ${d?"دع٠عرب٠٠تÙÙØ±":"Arabic support available"} 667 </p> 668 </div> 669 `:""} 670 671 <div style="text-align: center; margin-top: 40px; padding-top: 30px; border-top: 1px solid #e2e8f0;"> 672 <p style="margin: 0 0 10px 0; color: #64748b; font-size: 16px; font-weight: 500;"> 673 ${v.thankYou} ${d?"ÙØ§Ùض٠ا٠٠إÙÙÙØ§":"for joining us"} 674 </p> 675 <p style="margin: 0; color: #94a3b8; font-size: 14px;"> 676 ${v.team} 677 </p> 678 </div> 679 680 </body> 681 </html> 682 `},roiReport:(t,e)=>{const r=s=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(s),n=s=>Math.round(s).toLocaleString();return` 683 <!DOCTYPE html> 684 <html> 685 <head> 686 <meta charset="UTF-8"> 687 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 688 <title>Your Zenith ROI Analysis Report</title> 689 </head> 690 <body style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif; max-width: 600px; margin: 0 auto; padding: 20px; background-color: #f8fafc; color: #1e293b;"> 691 692 <div style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 40px 30px; border-radius: 16px; text-align: center; margin-bottom: 30px;"> 693 <h1 style="margin: 0; color: white; font-size: 32px; font-weight: 700; line-height: 1.2;"> 694 Your Zenith ROI Analysis Report 695 </h1> 696 <p style="margin: 15px 0 0 0; color: rgba(255,255,255,0.95); font-size: 18px; font-weight: 500;"> 697 Discover how much time and money Zenith can save your team 698 </p> 699 </div> 700 701 <div style="background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); margin-bottom: 25px;"> 702 <h2 style="margin: 0 0 20px 0; color: #4f46e5; font-size: 24px; font-weight: 600;"> 703 Your ROI Results 704 </h2> 705 <p style="margin: 0 0 20px 0; font-size: 16px; line-height: 1.6; color: #64748b;"> 706 Based on your inputs for a team of <strong>${e.teamSize}</strong> in the <strong>${e.industry}</strong> industry: 707 </p> 708 709 <div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 25px 0;"> 710 <div style="text-align: center; padding: 20px; background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); border-radius: 10px;"> 711 <p style="margin: 0; color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 500;"> 712 Hours Saved Per Week 713 </p> 714 <p style="margin: 10px 0 0 0; color: white; font-size: 32px; font-weight: 700;"> 715 ${n(t.timeSavings.hoursPerWeek)} 716 </p> 717 </div> 718 719 <div style="text-align: center; padding: 20px; background: linear-gradient(135deg, #10b981 0%, #059669 100%); border-radius: 10px;"> 720 <p style="margin: 0; color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 500;"> 721 Monthly Savings 722 </p> 723 <p style="margin: 10px 0 0 0; color: white; font-size: 32px; font-weight: 700;"> 724 ${r(t.costSavings.monthlySavings)} 725 </p> 726 </div> 727 728 <div style="text-align: center; padding: 20px; background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); border-radius: 10px;"> 729 <p style="margin: 0; color: rgba(255,255,255,0.9); font-size: 14px; font-weight: 500;"> 730 ROI in First Year 731 </p> 732 <p style="margin: 10px 0 0 0; color: white; font-size: 32px; font-weight: 700;"> 733 ${t.roi.percentage}% 734 </p> 735 </div> 736 </div> 737 </div> 738 739 <div style="background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); margin-bottom: 25px;"> 740 <h3 style="margin: 0 0 20px 0; color: #1e293b; font-size: 20px; font-weight: 600;"> 741 Detailed Breakdown 742 </h3> 743 744 <div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;"> 745 <div> 746 <p style="margin: 0 0 5px 0; color: #64748b; font-size: 14px;">Annual Savings</p> 747 <p style="margin: 0; color: #10b981; font-size: 24px; font-weight: 700;"> 748 ${r(t.costSavings.annualSavings)} 749 </p> 750 </div> 751 752 <div> 753 <p style="margin: 0 0 5px 0; color: #64748b; font-size: 14px;">Payback Period</p> 754 <p style="margin: 0; color: #3b82f6; font-size: 24px; font-weight: 700;"> 755 ${t.roi.paybackPeriod.isImmediate?"Immediate":`${t.roi.paybackPeriod.months} months`} 756 </p> 757 </div> 758 759 <div> 760 <p style="margin: 0 0 5px 0; color: #64748b; font-size: 14px;">Efficiency Improvement</p> 761 <p style="margin: 0; color: #8b5cf6; font-size: 24px; font-weight: 700;">
762 +${t.efficiency.percentageImprovement}% 763 </p> 764 </div> 765 766 <div> 767 <p style="margin: 0 0 5px 0; color: #64748b; font-size: 14px;">3-Year Value</p> 768 <p style="margin: 0; color: #6366f1; font-size: 24px; font-weight: 700;"> 769 ${r(t.roi.threeYearValue)} 770 </p> 771 </div> 772 </div> 773 </div> 774 775 <div style="background: white; padding: 30px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); margin-bottom: 25px;"> 776 <h3 style="margin: 0 0 20px 0; color: #1e293b; font-size: 20px; font-weight: 600;"> 777 Implementation Details 778 </h3> 779 780 <div style="display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;"> 781 <div> 782 <p style="margin: 0 0 5px 0; color: #64748b; font-size: 14px;">Estimated Implementation Time</p> 783 <p style="margin: 0; color: #1e293b; font-size: 20px; font-weight: 600;"> 784 ${t.implementation.timeToValue} 785 </p> 786 </div> 787 788 <div> 789 <p style="margin: 0 0 5px 0; color: #64748b; font-size: 14px;">Implementation Hours</p> 790 <p style="margin: 0; color: #1e293b; font-size: 20px; font-weight: 600;"> 791 ${n(t.implementation.estimatedHours)} hours 792 </p> 793 </div> 794 </div> 795 </div> 796 797 <div style="background: #f0f9ff; border-left: 4px solid #0ea5e9; padding: 25px; border-radius: 8px; margin: 25px 0;"> 798 <h3 style="margin: 0 0 15px 0; color: #0369a1; font-size: 18px; font-weight: 600;"> 799 Ready to Get Started? 800 </h3> 801 <p style="margin: 0 0 15px 0; color: #0c4a6e; line-height: 1.6;"> 802 Your ROI analysis shows significant potential savings with Zenith. Take the next step: 803 </p> 804 805 <div style="text-align: center; margin: 20px 0;"> 806 <a href="https://usezenith.ai?utm_source=roi_report&utm_medium=email" style="display: inline-block; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px 30px; text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 16px;"> 807 Schedule a Demo 808 </a> 809 </div> 810 811 <p style="margin: 10px 0 0 0; text-align: center; color: #64748b; font-size: 14px;"> 812 Or email us at <a href="mailto:[email protected]" style="color: #4f46e5; text-decoration: none;">[email protected]</a> 813 </p> 814 </div> 815 816 <div style="text-align: center; margin-top: 40px; padding-top: 30px; border-top: 1px solid #e2e8f0;"> 817 <p style="margin: 0 0 10px 0; color: #64748b; font-size: 16px; font-weight: 500;"> 818 Thank you for using Zenith's ROI Calculator 819 </p> 820 <p style="margin: 0; color: #94a3b8; font-size: 14px;"> 821 Transform your team's productivity with AI-powered task management 822 </p> 823 </div> 824 825 </body> 826 </html> 827 `}},VP=["VITE_SUPABASE_URL","VITE_SUPABASE_PUBLISHABLE_KEY"],qP=["VITE_CLERK_PUBLISHABLE_KEY","VITE_BREVO_API_KEY","VITE_GA_MEASUREMENT_ID","VITE_API_URL"];let Wc=null;function HP(){if(Wc)return{...Wc,config:Dh()};const t=Dh(),e=[],r=[];for(const n of VP)(!t[n]||t[n].trim()==="")&&e.push(n);for(const n of qP)(!t[n]||t[n].trim()==="")&&r.push(n);return Wc={isValid:e.length===0,missing:e,warnings:r},{...Wc,config:t}}function Dh(){return{VITE_SUPABASE_URL:"https://lhioylodbbmwnfulkykc.supabase.co",VITE_SUPABASE_PUBLISHABLE_KEY:"sb_publishable_oygZUv3qDD5YYmuJyPCn0w_hi1NNENQ",VITE_SUPABASE_ANON_KEY:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpnaWJkbnFyeHFhc3VyYm9ybHpjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Mzc1NDg0NDMsImV4cCI6MjA1MzEyNDQ0M30.ldFP5T9P6LX7KqomlRRfi2jXP_NtHRJ2U0EOjdykQRY",VITE_CLERK_PUBLISHABLE_KEY:"pk_test_ZGFybGluZy1zYXdmbHktNTEuY2xlcmsuYWNjb3VudHMuZGV2JA",VITE_BREVO_API_KEY:"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",VITE_GA_MEASUREMENT_ID:"G-YBHJ3LXWXE",VITE_API_URL:void 0}}function ir(t){const e=Dh();switch(t){case"supabase":return!!(e.VITE_SUPABASE_URL&&(e.VITE_SUPABASE_PUBLISHABLE_KEY||e.VITE_SUPABASE_ANON_KEY));case"clerk":return!!e.VITE_CLERK_PUBLISHABLE_KEY;case"analytics":return!!e.VITE_GA_MEASUREMENT_ID;case"email":return!!e.VITE_BREVO_API_KEY;default:return!1}}function ri(){return{isConfigured:HP().isValid,features:{supabase:ir("supabase"),clerk:ir("clerk"),analytics:ir("analytics"),email:ir("email")},issues:[]}}ri();const Ha={COOKIE_FLAGS:"SameSite=Lax;Secure",DEFAULT_REGION:"unknown",DEFAULT_PLATFORM:"general",MOCK_MEASUREMENT_ID:"G-0000000000",MAX_ERROR_LOGS_PER_FUNCTION:3,MAX_PARAMETER_LENGTH:1e4},Pf=new Map,kb=new Map,Yr=()=>{try{return typeof window<"u"&&window!==null}catch{return!1}},GP=()=>{try{return typeof document<"u"&&document!==null}catch{return!1}},YP=t=>{const e=t,r=Date.now(),n=kb.get(e)||0;r-n>300*1e3&&Pf.set(e,0);const s=Pf.get(e)||0;return s>=Ha.MAX_ERROR_LOGS_PER_FUNCTION?!1:(Pf.set(e,s+1),kb.set(e,r),!0)},ls=(t,e,r)=>{if(YP(t)){const n=r?`${r}: ${e.message}`:e.message;console.warn(`[Analytics] ${t}: ${n}`)}},Ut=(t,e,r)=>{try{return t()}catch(n){return n instanceof Error&&ls(r,n),e}},Rt=t=>{try{if(t==null)return"";if(typeof t!="string")t=String(t);else if(typeof t!="string")return Ha.DEFAULT_REGION;const e=t;return e.length>Ha.MAX_PARAMETER_LENGTH?e.substring(0,Ha.MAX_PARAMETER_LENGTH)+"...":e.replace(/[\x00-\x1F\x7F-\x9F]/g,"").trim()}catch{return Ha.DEFAULT_REGION}},Lp=t=>{try{const e=new WeakSet,r={};for(const[n,s]of Object.entries(t))if(typeof s=="object"&&s!==null){if(e.has(s))continue;e.add(s),r[n]=Array.isArray(s)?s.map(o=>typeof o=="object"&&o!==null?"[Object]":Rt(o)):"[Object]"}else r[n]=Rt(s);return r}catch{return{}}},JP=()=>{window.dataLayer=window.dataLayer||[]},KP=()=>(window.gtag=window.gtag||function(){window.dataLayer.push(arguments)},window.gtag),QP=async t=>new Promise((e,r)=>{try{const n=document.createElement("script");
827n.async=!0,n.src=`https://www.googletagmanager.com/gtag/js?id=${t}`,n.onload=()=>e(),n.onerror=()=>r(new Error("Failed to load GA script")),document.head.appendChild(n)}catch(n){r(n)}}),Gw=async t=>Ut(async()=>{if(!Yr())return;if(!ir("analytics")&&!t){console.info("Analytics not configured - tracking disabled");return}const e=t||"G-YBHJ3LXWXE";if(!e||!e.startsWith("G-")){console.info("Analytics initialization skipped: Invalid measurement ID format");return}if(window.GA_INITIALIZED)return;JP();const r=KP();r("js",new Date),r("config",e,{page_location:window.location.href,anonymize_ip:!0,send_page_view:!1,cookie_flags:Ha.COOKIE_FLAGS,allow_google_signals:!1}),window.GA_INITIALIZED=!0;try{await QP(e)}catch(n){ls("initializeAnalytics",n instanceof Error?n:new Error("Script loading failed"),"GA script loading failed")}},void 0,"initializeAnalytics"),_n=()=>Ut(()=>Yr()&&window.GA_INITIALIZED&&typeof window.gtag=="function"?window.gtag:null,null,"getAnalyticsInstance"),Yw=t=>{Ut(()=>{if(!ir("analytics"))return;const e=_n();if(!e)return;const r=t&&Yr()?`${window.location.origin}${t}`:Yr()?window.location.href:"",n=GP()?document.title:"";e("event","page_view",{page_title:n,page_location:r})},void 0,"trackPageView")},Su=(t,e,r,n)=>{Ut(()=>{if(!ir("analytics"))return;const s=_n();if(!s)return;const o={button_text:Rt(t),location:Rt(e),platform:Rt(r||Ha.DEFAULT_PLATFORM),custom_parameters:n?Lp(n):void 0};s("event","cta_click",o)},void 0,"trackCTAClick")},Jw=t=>{Ut(()=>{if(!ir("analytics"))return;const e=_n();!e||!t||typeof t.email!="string"||!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t.email.trim())||e("event","waitlist_submission",{event_category:"engagement",company_size:Rt(t.company_size),region:Rt(t.region),platform_interest:Rt(t.platform_interest)})},void 0,"trackWaitlistSubmission")},Ne=(t,e)=>{Ut(()=>{if(!ir("analytics"))return;const r=_n();if(!r)return;const n=Rt(t),s=e?Lp(e):{};r("event",n,s)},void 0,"trackEvent")},Kw=t=>{Ut(()=>{if(!ir("analytics"))return;const e=_n();if(!e)return;const r=`hero_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;if(Yr()&&Hu("session"))try{const s={impressionId:r,timestamp:Date.now(),titleVariant:t.title_variant,hasDualCTA:t.has_dual_cta};sessionStorage.setItem("zenith_hero_impression",JSON.stringify(s))}catch(s){ls("trackHeroImpression",s instanceof Error?s:new Error("Session storage failed"),"Failed to store impression data")}const n={event_category:"engagement",custom_parameters:{impression_id:r,title_variant:Rt(t.title_variant)||"control",title_lines:typeof t.title_lines=="number"?t.title_lines:0,title_words:typeof t.title_words=="number"?t.title_words:0,has_dual_cta:!!t.has_dual_cta,urgency_badge_visible:!!t.urgency_badge_visible,device_type:Rt(t.device_type)||"unknown",viewport_height:typeof t.viewport_height=="number"?t.viewport_height:0,page_path:Yr()?window.location.pathname:""}};e("event","hero_impression",n)},void 0,"trackHeroImpression")},Mh=t=>{Ut(()=>{if(!ir("analytics"))return;const e=_n();if(!e)return;let r="";if(Yr()&&Hu("session"))try{const s=sessionStorage.getItem("zenith_hero_impression");
827s&&(r=JSON.parse(s).impressionId||"")}catch(s){ls("trackHeroScrollDepth",s instanceof Error?s:new Error("Failed to parse impression data"),"Corrupted impression data in session storage")}const n={event_category:"engagement",custom_parameters:{impression_id:r,max_scroll_percentage:Math.round(Number(t.max_scroll_percentage)||0),time_to_scroll:Number(t.time_to_scroll)||0,time_in_section:Number(t.time_in_section)||0,title_variant:Rt(t.title_variant)||"control",scrolled_below_fold:Number(t.max_scroll_percentage)>=100}};e("event","hero_scroll_depth",n)},void 0,"trackHeroScrollDepth")},au=t=>{Ut(()=>{if(!ir("analytics"))return;const e=_n();if(!e||!t||!t.action||!["view","hover","click"].includes(t.action))return;let r=Number(t.time_to_interaction)||0;if(!r&&Yr()&&Hu("session"))try{const s=sessionStorage.getItem("zenith_hero_impression");if(s){const o=JSON.parse(s);o.timestamp&&(r=Date.now()-o.timestamp)}}catch(s){ls("trackUrgencyBadgeInteraction",s instanceof Error?s:new Error("Failed to parse impression data"),"Corrupted impression data when calculating interaction time")}const n={event_category:"engagement",custom_parameters:{action:Rt(t.action),badge_text:Rt(t.badge_text),title_variant:Rt(t.title_variant)||"control",time_to_interaction:r}};e("event","urgency_badge_interaction",n)},void 0,"trackUrgencyBadgeInteraction")},Qw=(t,e,r)=>{Ut(()=>{if(!ir("analytics"))return;const n=_n();if(!n||!t||!e)return;let s="",o=0;if(Yr()&&Hu("session"))try{const d=sessionStorage.getItem("zenith_hero_impression");if(d){const m=JSON.parse(d);s=m.impressionId||"",m.timestamp&&(o=Date.now()-m.timestamp)}}catch(d){ls("trackTitleConversion",d instanceof Error?d:new Error("Failed to parse impression data"),"Corrupted impression data when tracking conversion")}const c={event_category:"conversion",custom_parameters:{conversion_type:Rt(t),title_variant:Rt(e),impression_id:s,time_to_convert:o}};if(r){const d=Lp(r);Object.assign(c.custom_parameters,d)}n("event","title_conversion",c)},void 0,"trackTitleConversion")},Hu=t=>Ut(()=>{if(!Yr())return!1;const e=t==="local"?localStorage:sessionStorage,r="__storage_test__";return e.setItem(r,"test"),e.removeItem(r),!0},!1,`canUseStorage(${t})`);function Fp(t){return a.useEffect(()=>{Ut(()=>{Gw(t).catch(e=>{e instanceof Error&&ls("useAnalytics",e,"Failed to initialize analytics")})},void 0,"useAnalytics initialization")},[t]),{trackEvent:Ut(()=>Ne,()=>{},"useAnalytics.trackEvent"),trackCTAClick:Ut(()=>Su,()=>{},"useAnalytics.trackCTAClick"),trackWaitlistSubmission:Ut(()=>Jw,()=>{},"useAnalytics.trackWaitlistSubmission"),trackPageView:Ut(()=>Yw,()=>{},"useAnalytics.trackPageView")}}const Nb=Object.freeze(Object.defineProperty({__proto__:null,getAnalyticsInstance:_n,initializeAnalytics:Gw,trackCTAClick:Su,trackEvent:Ne,trackHeroImpression:Kw,trackHeroScrollDepth:Mh,trackPageView:Yw,trackTitleConversion:Qw,trackUrgencyBadgeInteraction:au,trackWaitlistSubmission:Jw,useAnalytics:Fp},Symbol.toStringTag,{value:"Module"})),ZP="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",XP="[email protected]",eO="Zenith",Sb=3,tO=1e3;async function rO(t){return new Promise(e=>setTimeout(e,t))}async function gl(t,e,r,n=0){console.log("Attempting to send email via REST API:",{to:t,subject:e,hasContent:!!r,retryCount:n,hasApiKey:!0,hasSenderEmail:!0});try{const s={sender:{email:XP,name:eO},to:[{email:t}],subject:e,htmlContent:r};console.log("Sending email with REST API:",{to:s.to,subject:s.subject,sender:s.sender,endpoint:"https://api.brevo.com/v3/smtp/email"});const o=await fetch("https://api.brevo.com/v3/smtp/email",{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","api-key":ZP},body:JSON.stringify(s)});if(!o.ok){const d=await o.json();if(console.error("Email API error response:",{status:o.status,statusText:o.statusText,data:d}),(o.status>=500||o.status===429)&&n<Sb)return console.log(`Retrying email send (attempt ${n+1}/${Sb})...`),await rO(tO*Math.pow(2,n)),gl(t,e,r,n+1);throw new Error(d.message||"Failed to send email")}const c=await o.json();return console.log("Email sent successfully via REST API:",{messageId:c.messageId,to:t}),{success:!0}}catch(s){return console.error("Failed to send email via REST API:",s),{success:!1,error:s}}}async function su(t,e=!1){return console.log(`Starting waitlist ${e?"reminder":"confirmation"} email process for:`,t),gl(t,e?"Zenith Waitlist - You're Already Registered!":"Welcome to Zenith Waitlist!",e?ol.waitlistReminder:ol.waitlist)}async function nO(t,e){return console.log("Starting demo request confirmation email process for:",t),gl(t,"Demo Request Received - Zenith",ol.demoRequest(e))}async function aO(t,e,r){return console.log("Starting lifetime deal confirmation email process for:",t),gl(t,"ð Your Zenith Lifetime Deal - Payment Instructions",ol.lifetimeDeal(e,r))}async function sO(t,e,r){return console.log("Starting ROI report email process for:",t),!t||!t.includes("@")?(console.error("Invalid email address provided for ROI report"),{success:!1,error:"Invalid email address"}):!e||!r?(console.error("Missing ROI results or inputs"),{success:!1,error:"Missing ROI data"}):(Ne("roi_report_sent",{email:t,team_size:r.teamSize,industry:r.industry,roi_percentage:e.roi?.percentage||0,monthly_savings:e.costSavings?.monthlySavings||0}),gl(t,"Your Zenith ROI Analysis Report",ol.roiReport(e,r)))}function iO({className:t,buttonText:e="Request Demo",buttonVariant:r="default",buttonSize:n="default"}
827){const[s,o]=a.useState({name:"",email:"",company:"",teamSize:"",message:""}),[c,d]=a.useState(!1),[m,h]=a.useState(!1),[p,g]=a.useState(!1),[v,E]=a.useState(null),N=C=>{const{name:_,value:T}=C.target;o(A=>({...A,[_]:T}))},k=async C=>{C.preventDefault(),d(!0),E(null);try{const{error:_}=await et.from("demo_requests").insert([{name:s.name,email:s.email,company:s.company,team_size:s.teamSize,message:s.message}]);if(_)throw _;await nO(s.email,s.name),g(!0)}catch(_){E(_ instanceof Error?_.message:"Failed to submit demo request")}finally{d(!1)}},w=()=>{h(!1),g(!1),o({name:"",email:"",company:"",teamSize:"",message:""})};return a.createElement(Ii,{open:m,onOpenChange:h},a.createElement(LI,{asChild:!0},a.createElement(ce,{variant:r,size:n,className:t},e)),a.createElement(is,{className:"sm:max-w-[500px]"},p?a.createElement("div",{className:"text-center py-8"},a.createElement("div",{className:"w-12 h-12 rounded-full bg-green-100 dark:bg-green-900 mx-auto mb-4 flex items-center justify-center"},a.createElement("svg",{className:"w-6 h-6 text-green-600 dark:text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))),a.createElement(Hr,{className:"mb-2 text-slate-900 dark:text-white"},"Demo Request Received!"),a.createElement(Gr,{className:"text-slate-600 dark:text-slate-300"}
827,"Thank you for your interest in Zenith. Our team will contact you within 24 hours to schedule your personalized demo."),a.createElement(ce,{className:"mt-6",onClick:w},"Close")):a.createElement(a.Fragment,null,a.createElement(Pi,null,a.createElement(Hr,{className:"text-slate-900 dark:text-white"},"Request a Demo"),a.createElement(Gr,{className:"text-slate-600 dark:text-slate-300"},"Schedule a personalized demo to see how Zenith can transform your team's communication.")),a.createElement("form",{onSubmit:k,className:"space-y-4 mt-4"},v&&a.createElement("div",{className:"p-3 text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 rounded-md"},v),a.createElement("div",{className:"grid grid-cols-2 gap-4"},a.createElement("div",null,a.createElement("label",{htmlFor:"name",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Name"),a.createElement("input",{type:"text",id:"name",name:"name",value:s.name,onChange:N,required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"})),a.createElement("div",null,a.createElement("label",{htmlFor:"email",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Email"),a.createElement("input",{type:"email",id:"email",name:"email",value:s.email,onChange:N,required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"}))),a.createElement("div",{className:"grid grid-cols-2 gap-4"},a.createElement("div",null,a.createElement("label",{htmlFor:"company",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Company"),a.createElement("input",{type:"text",id:"company",name:"company",value:s.company,onChange:N,required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"})),a.createElement("div",null,a.createElement("label",{htmlFor:"teamSize",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Team Size"),a.createElement("select",{id:"teamSize",name:"teamSize",value:s.teamSize,onChange:N,required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"},a.createElement("option",{value:""},"Select size"),a.createElement("option",{value:"1-10"},"1-10"),a.createElement("option",{value:"11-50"},"11-50"),a.createElement("option",{value:"51-200"},"51-200"),a.createElement("option",{value:"201-500"},"201-500"),a.createElement("option",{value:"500+"},"500+")))),a.createElement("div",null,a.createElement("label",{htmlFor:"message",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Message (Optional)"),a.createElement("textarea",{id:"message",name:"message",value:s.message,onChange:N,rows:3,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"})),a.createElement("div",{className:"flex justify-end"},a.createElement(ce,{type:"submit",disabled:c},c?"Submitting...":"Request Demo"))))))}function Lh({className:t="",variant:e="default",showDescription:r=!1}){const n="https://slack.usezenith.ai/slack/oauth/direct-install",s="inline-flex items-center font-semibold transition-all",o={default:"px-8 py-4 bg-gradient-to-r from-blue-600 to-purple-600 text-white rounded-lg text-lg hover:from-blue-700 hover:to-purple-700 transform hover:scale-105 shadow-lg",header:"px-4 py-2 bg-white/10 hover:bg-white/20 text-white rounded-lg text-sm border border-white/20"};return a.createElement(a.Fragment,null,a.createElement("a",{href:n,className:`${s} ${o[e]} ${t}`},a.createElement("svg",{className:`${e==="header"?"w-5 h-5 mr-2":"w-6 h-6 mr-3"}`,viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M19.712 7.42498C19.712 4.34331 17.1937 1.82498 14.112 1.82498C11.0303 1.82498 8.51196 4.34331 8.51196 7.42498C8.51196 10.5066 11.0303 13.025 14.112 13.025H19.712V7.42498Z",fill:"white"}),a.createElement("path",{d:"M22.512 7.42498C22.512 10.5066 25.0303 13.025 28.112 13.025C31.1937 13.025 33.712 10.5066 33.712 7.42498V7.42498C33.712 4.34331 31.1937 1.82498 28.112 1.82498C25.0303 1.82498 22.512 4.34331 22.512 7.42498V7.42498Z",fill:"white"}),a.createElement("path",{d:"M8.51196 22.025C8.51196 18.9433 11.0303 16.425 14.112 16.425C17.1937 16.425 19.712 18.9433 19.712 22.025C19.712 25.1066 17.1937 27.625 14.112 27.625H8.51196V22.025Z",fill:"white"}),a.createElement("path",{d:"M8.51196 24.825C8.51196 27.9066 11.0303 30.425 14.112 30.425H14.112C17.1937 30.425 19.712 32.9433 19.712 36.025C19.712 39.1066 17.1937 41.625 14.112 41.625C11.0303 41.625 8.51196 39.1066 8.51196 36.025V24.825Z",fill:"white"}),a.createElement("path",{d:"M22.512 36.025C22.512 32.9433 25.0303 30.425 28.112 30.425C31.1937 30.425 33.712 32.9433 33.712 36.025C33.712 39.1066 31.1937 41.625 28.112 41.625H22.512V36.025Z",fill:"white"}),a.createElement("path",{d:"M19.712 36.025C19.712 39.1066 17.1937 41.625 14.112 41.625H14.112C11.0303 41.625 8.51196 44.1433 8.51196 47.225C8.51196 50.3066 11.0303 52.825 14.112 52.825C17.1937 52.825 19.712 50.3066 19.712 47.225V36.025Z",fill:"white"}),a.createElement("path",{d:"M33.712 22.025C33.712 25.1066 31.1937 27.625 28.112 27.625C25.0303 27.
827625 22.512 25.1066 22.512 22.025C22.512 18.9433 25.0303 16.425 28.112 16.425H33.712V22.025Z",fill:"white"}),a.createElement("path",{d:"M33.712 19.225C33.712 16.1433 31.1937 13.625 28.112 13.625H28.112C25.0303 13.625 22.512 11.1066 22.512 8.02498C22.512 4.94331 25.0303 2.42498 28.112 2.42498C31.1937 2.42498 33.712 4.94331 33.712 8.02498V19.225Z",fill:"white"})),"Add to Slack"),r&&a.createElement("p",{className:"text-sm text-slate-400 mt-4"},"Free for 100 actions/month ⢠Works instantly ⢠No credit card"))}function oO(){const{isSignedIn:t,isLoaded:e}=fl(),r=ba(),n=wn(),[s,o]=x.useState(!1),[c,d]=x.useState(!1);x.useEffect(()=>{const h=()=>{o(window.scrollY>10)};return window.addEventListener("scroll",h),()=>window.removeEventListener("scroll",h)},[]);const m=h=>{if(n.pathname!=="/"){r("/",{state:{scrollTo:h}});return}const p=document.getElementById(h);if(p){const E=p.getBoundingClientRect().top+window.pageYOffset-80;window.scrollTo({top:E,behavior:"smooth"})}};return x.useEffect(()=>{n.state?.scrollTo&&setTimeout(()=>{const h=document.getElementById(n.state.scrollTo);if(h){const v=h.getBoundingClientRect().top+window.pageYOffset-80;window.scrollTo({top:v,behavior:"smooth"})}},100)},[n]),a.createElement("header",{className:`fixed top-0 w-full z-50 transition-all duration-300 ${s?"bg-slate-900/95 backdrop-blur-md shadow-lg":"bg-slate-900/80 backdrop-blur-sm"}`},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"flex h-16 items-center justify-between"},a.createElement(Tt,{to:"/",className:"flex items-center gap-2 group"},c?a.createElement(vr,{className:"w-8 h-8 text-primary"}):a.createElement("img",{src:"/images/logo.svg",alt:"Zenith Logo",className:"w-8 h-8 group-hover:opacity-90 transition-opacity",onError:()=>d(!0)}),a.createElement("span",{className:"text-2xl font-heading font-bold bg-gradient-to-r from-primary via-primary-light to-secondary bg-clip-text text-transparent"},"Zenith")),a.createElement("nav",{className:"hidden md:flex items-center gap-6"},a.createElement("button",{onClick:()=>m("features"),className:"text-sm font-medium text-white hover:text-primary transition-colors"},"Features"),a.createElement("button",{onClick:()=>m("integrations"),className:"text-sm font-medium text-white hover:text-primary transition-colors"},"Integrations"),a.createElement("button",{onClick:()=>m("pricing"),className:"text-sm font-medium text-white hover:text-primary transition-colors"},"Pricing"),a.createElement(Tt,{to:"/blog",className:"text-sm font-medium text-white hover:text-primary transition-colors"},"Blog"),t?a.createElement(Tt,{to:"/referrals",className:"text-sm font-medium text-white hover:text-primary transition-colors"},"My Referrals"):a.createElement(Tt,{to:"/referrals",className:"text-sm font-medium text-white hover:text-primary transition-colors"},"Referrals"),a.createElement(Tt,{to:"/early-adopter-program",className:"text-sm font-medium text-white hover:text-primary transition-colors"},"Early Adopter"),n.pathname!=="/slack/install"&&a.createElement(Tt,{to:"/slack/install",className:"text-sm font-medium text-white hover:text-primary transition-colors"},"Slack Integration")),a.createElement("div",{className:"flex items-center gap-4"},a.createElement(MI,null),a.createElement("div",{className:"hidden md:block"},a.createElement(Lh,{variant:"header"})),e&&a.createElement(a.Fragment,null,t?a.createElement(DC,{afterSignOutUrl:"/"}):a.createElement(a.Fragment,null,a.createElement(ce,{variant:"ghost",className:"hidden md:inline-flex items-center gap-2 text-white hover:bg-white/10 border border-white/20",onClick:()=>r("/sign-in")},a.createElement(pw,{className:"h-4 w-4"}),"Sign in"),a.createElement(ce,{variant:"default",className:"hidden md:inline-flex items-center gap-2 bg-gradient-to-r from-primary via-primary-light to-secondary hover:opacity-90 transition-opacity border border-primary/20",onClick:()=>r("/sign-up")},a.createElement(Ew,{className:"h-4 w-4"}),"Sign up"))),a.createElement(iO,{buttonSize:"default",className:"bg-gradient-to-r from-primary via-primary-light to-secondary hover:opacity-90 transition-opacity border border-primary/20",buttonVariant:"default"}),a.createElement(DI,null)))))}function lO(){const t=new Date().getFullYear(),e=ba(),r=wn(),[n,s]=x.useState(!1),[o,c]=x.useState({name:"",email:"",message:""}),[d,m]=x.useState(!1),[h,p]=x.useState(!1),g=N=>{if(r.pathname!=="/"){e("/",{state:{scrollTo:N}});return}const k=document.getElementById(N);k&&window.scrollTo({top:k.offsetTop-80,behavior:"smooth"})},v=async N=>{N.preventDefault(),m(!0);try{const{error:k}=await et.from("contact_messages").insert([{name:o.name,email:o.email,message:o.message}]);if(k)throw k;p(!0),c({name:"",email:"",message:""})}catch(k){console.error("Error submitting contact form:",k)}finally{m(!1)}},E=N=>
827{const{name:k,value:w}=N.target;c(C=>({...C,[k]:w}))};return a.createElement("footer",{className:"bg-slate-900 text-slate-300"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8 py-16"},a.createElement("div",null,a.createElement("div",{className:"mb-4"},a.createElement(Tt,{to:"/",className:"flex items-center gap-2 group"},a.createElement("img",{src:"/images/logo.svg",alt:"Zenith Logo",className:"w-8 h-8 group-hover:opacity-90 transition-opacity"}),a.createElement("span",{className:"text-2xl font-heading font-bold bg-gradient-primary bg-clip-text text-transparent"},"Zenith"))),a.createElement("p",{className:"text-slate-400 mb-4"},"Transforming communication with AI-powered intelligence."),a.createElement("div",{className:"flex items-center gap-4"},a.createElement("a",{href:"https://www.linkedin.com/company/zenithassistant",target:"_blank",rel:"noopener noreferrer",className:"text-slate-400 hover:text-primary transition-colors","aria-label":"Follow us on LinkedIn"},a.createElement(fw,{className:"h-5 w-5"})),a.createElement("button",{onClick:()=>s(!0),className:"text-slate-400 hover:text-primary transition-colors","aria-label":"Contact us"},a.createElement(al,{className:"h-5 w-5"})))),a.createElement("div",null,a.createElement("h3",{className:"font-semibold text-white mb-4"},"Product"),a.createElement("ul",{className:"space-y-2"},a.createElement("li",null,a.createElement("button",{onClick:()=>g("features"),className:"hover:text-white transition-colors"},"Features")),a.createElement("li",null,a.createElement("button",{onClick:()=>g("integrations"),className:"hover:text-white transition-colors"},"Integrations")),a.createElement("li",null,a.createElement("button",{onClick:()=>g("pricing"),className:"hover:text-white transition-colors"},"Pricing")),a.createElement("li",null,a.createElement(Tt,{to:"/slack/install",className:"hover:text-white transition-colors"},"Slack Integration")),a.createElement("li",null,a.createElement(Tt,{to:"/platforms",className:"hover:text-white transition-colors"},"All Platforms")))),a.createElement("div",null,a.createElement("h3",{className:"font-semibold text-white mb-4"},"Company"),a.createElement("ul",{className:"space-y-2"},a.createElement("li",null,a.createElement("button",{onClick:()=>s(!0),className:"hover:text-white transition-colors"},"Contact Us")),a.createElement("li",null,a.createElement("a",{href:"https://www.linkedin.com/company/zenithassistant",target:"_blank",rel:"noopener noreferrer",className:"hover:text-white transition-colors"},"LinkedIn")))),a.createElement("div",null,a.createElement("h3",{className:"font-semibold text-white mb-4"},"Legal"),a.createElement("ul",{className:"space-y-2"},a.createElement("li",null,a.createElement(Tt,{to:"/privacy",className:"hover:text-white transition-colors"},"Privacy Policy")),a.createElement("li",null,a.createElement(Tt,{to:"/terms",className:"hover:text-white transition-colors"},"Terms of Service")),a.createElement("li",null,a.createElement(Tt,{to:"/support",className:"hover:text-white transition-colors"},"Support")),a.createElement("li",null,a.createElement(Tt,{to:"/subprocessors",className:"hover:text-white transition-colors"},"Subprocessors"))))),a.createElement("div",{className:"border-t border-slate-800 py-8"},a.createElement("div",{className:"flex flex-col md:flex-row justify-between items-center gap-4"},a.createElement("p",null,"© ",t," Ethos Tech FZE LLC. All rights reserved."),a.createElement("div",{className:"flex gap-6"},a.createElement("a",{href:"https://www.linkedin.com/company/zenithassistant",target:"_blank",rel:"noopener noreferrer",className:"hover:text-white transition-colors"},"LinkedIn"),a.createElement("button",{onClick:()=>s(!0),className:"hover:text-white transition-colors"},"Contact"))))),a.createElement(Ii,{open:n,onOpenChange:s},a.createElement(is,{className:"sm:max-w-[425px] bg-white dark:bg-slate-900"},a.createElement(Pi,null,a.createElement(Hr,{className:"text-slate-900 dark:text-white"},"Contact Us"),a.createElement(Gr,{className:"text-slate-600 dar
827k:text-slate-300"},"Send us a message and we'll get back to you soon.")),h?a.createElement("div",{className:"text-center py-6"},a.createElement("div",{className:"w-12 h-12 rounded-full bg-green-100 dark:bg-green-900 mx-auto mb-4 flex items-center justify-center"},a.createElement(SI,{className:"h-6 w-6 text-green-600 dark:text-green-400"})),a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-2"},"Message Sent!"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},"Thank you for reaching out. We'll get back to you shortly."),a.createElement(ce,{className:"mt-6",onClick:()=>{s(!1),p(!1)}},"Close")):a.createElement("form",{onSubmit:v,className:"space-y-4"},a.createElement("div",null,a.createElement("label",{htmlFor:"name",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Name"),a.createElement("input",{type:"text",id:"name",name:"name",value:o.name,onChange:E,required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white"})),a.createElement("div",null,a.createElement("label",{htmlFor:"email",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Email"),a.createElement("input",{type:"email",id:"email",name:"email",value:o.email,onChange:E,required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white"})),a.createElement("div",null,a.createElement("label",{htmlFor:"message",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Message"),a.createElement("textarea",{id:"message",name:"message",value:o.message,onChange:E,required:!0,rows:4,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white"})),a.createElement("div",{className:"flex justify-end"},a.createElement(ce,{type:"submit",disabled:d},d?"Sending...":"Send Message"))))))}function cO({children:t}){const{isLoaded:e,isSignedIn:r}=fl(),n=wn();return e?r?a.createElement(a.Fragment,null,t):a.createElement(WE,{to:"/sign-in",state:{from:n},replace:!0}):a.createElement("div",{className:"min-h-screen flex items-center justify-center"},a.createElement("div",{className:"animate-pulse text-slate-600 dark:text-slate-300"},"Loading..."))}var Of,_b;function uO(){if(_b)return Of;_b=1;var t=typeof Element<"u",e=typeof Map=="function",r=typeof Set=="function",n=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function s(o,c){if(o===c)return!0;if(o&&c&&typeof o=="object"&&typeof c=="object"){if(o.constructor!==c.constructor)return!1;var d,m,h;if(Array.isArray(o)){if(d=o.length,d!=c.length)return!1;for(m=d;m--!==0;)if(!s(o[m],c[m]))return!1;return!0}var p;if(e&&o instanceof Map&&c instanceof Map){if(o.size!==c.size)return!1;for(p=o.entries();!(m=p.next()).done;)if(!c.has(m.value[0]))return!1;for(p=o.entries();!(m=p.next()).done;)if(!s(m.value[1],c.get(m.value[0])))return!1;return!0}if(r&&o instanceof Set&&c instanceof Set){if(o.size!==c.size)return!1;for(p=o.entries();!(m=p.next()).done;)if(!c.has(m.value[0]))return!1;return!0}if(n&&ArrayBuffer.isView(o)&&ArrayBuffer.isView(c)){if(d=o.length,d!=c.length)return!1;for(m=d;m--!==0;)if(o[m]!==c[m])return!1;return!0}if(o.constructor===RegExp)return o.source===c.source&&o.flags===c.flags;if(o.valueOf!==Object.prototype.valueOf&&typeof o.valueOf=="function"&&typeof c.valueOf=="function")return o.valueOf()===c.valueOf();if(o.toString!==Object.prototype.toString&&typeof o.toString=="function"&&typeof c.toString=="function")return o.toString()===c.toString();if(h=Object.keys(o),d=h.length,d!==Object.keys(c).length)return!1;for(m=d;m--!==0;)if(!Object.prototype.hasOwnProperty.call(c,h[m]))return!1;if(t&&o instanceof Element)return!1;for(m=d;m--!==0;)if(!((h[m]==="_owner"||h[m]==="__v"||h[m]==="__o")&&o.$$typeof)&&!s(o[h[m]],c[h[m]]))return!1;return!0}return o!==o&&c!==c}return Of=function(c,d){try{return s(c,d)}catch(m){if((m.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw m}},Of}var dO=uO();const mO=ya(dO);var Rf,Cb;function fO(){if(Cb)return Rf;Cb=1;var t=function(e,r,n,s,o,c,d,m){if(!e){var h;if(r===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var p=[n,s,o,c,d,m],g=0;h=new Error(r.replace(/%s/g,function(){return p[g++]}
827)),h.name="Invariant Violation"}throw h.framesToPop=1,h}};return Rf=t,Rf}var hO=fO();const Tb=ya(hO);var Df,Ab;function pO(){return Ab||(Ab=1,Df=function(e,r,n,s){var o=n?n.call(s,e,r):void 0;if(o!==void 0)return!!o;if(e===r)return!0;if(typeof e!="object"||!e||typeof r!="object"||!r)return!1;var c=Object.keys(e),d=Object.keys(r);if(c.length!==d.length)return!1;for(var m=Object.prototype.hasOwnProperty.bind(r),h=0;h<c.length;h++){var p=c[h];if(!m(p))return!1;var g=e[p],v=r[p];if(o=n?n.call(s,g,v,p):void 0,o===!1||o===void 0&&g!==v)return!1}return!0}),Df}var gO=pO();const yO=ya(gO);var Zw=(t=>(t.BASE="base",t.BODY="body",t.HEAD="head",t.HTML="html",t.LINK="link",t.META="meta",t.NOSCRIPT="noscript",t.SCRIPT="script",t.STYLE="style",t.TITLE="title",t.FRAGMENT="Symbol(react.fragment)",t))(Zw||{}),Mf={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},Ib=Object.values(Zw),jp={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},vO=Object.entries(jp).reduce((t,[e,r])=>(t[r]=e,t),{}),Pr="data-rh",di={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},mi=(t,e)=>{for(let r=t.length-1;r>=0;r-=1){const n=t[r];if(Object.prototype.hasOwnProperty.call(n,e))return n[e]}return null},bO=t=>{let e=mi(t,"title");const r=mi(t,di.TITLE_TEMPLATE);if(Array.isArray(e)&&(e=e.join("")),r&&e)return r.replace(/%s/g,()=>e);const n=mi(t,di.DEFAULT_TITLE);return e||n||void 0},EO=t=>mi(t,di.ON_CHANGE_CLIENT_STATE)||(()=>{}),Lf=(t,e)=>e.filter(r=>typeof r[t]<"u").map(r=>r[t]).reduce((r,n)=>({...r,...n}),{}),xO=(t,e)=>e.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const s=Object.keys(n);for(let o=0;o<s.length;o+=1){const d=s[o].toLowerCase();if(t.indexOf(d)!==-1&&n[d])return r.concat(n)}}return r},[]),wO=t=>console&&typeof console.warn=="function"&&console.warn(t),Io=(t,e,r)=>{const n={};return r.filter(s=>Array.isArray(s[t])?!0:(typeof s[t]<"u"&&wO(`Helmet: ${t} should be of type "Array". Instead found type "${typeof s[t]}"`),!1)).map(s=>s[t]).reverse().reduce((s,o)=>{const c={};o.filter(m=>{let h;const p=Object.keys(m);for(let v=0;v<p.length;v+=1){const E=p[v],N=E.toLowerCase();e.indexOf(N)!==-1&&!(h==="rel"&&m[h].toLowerCase()==="canonical")&&!(N==="rel"&&m[N].toLowerCase()==="stylesheet")&&(h=N),e.indexOf(E)!==-1&&(E==="innerHTML"||E==="cssText"||E==="itemprop")&&(h=E)}if(!h||!m[h])return!1;const g=m[h].toLowerCase();return n[h]||(n[h]={}),c[h]||(c[h]={}),n[h][g]?!1:(c[h][g]=!0,!0)}).reverse().forEach(m=>s.push(m));const d=Object.keys(c);for(let m=0;m<d.length;m+=1){const h=d[m],p={...n[h],...c[h]};n[h]=p}return s},[]).reverse()},kO=(t,e)=>{if(Array.isArray(t)&&t.length){for(let r=0;r<t.length;r+=1)if(t[r][e])return!0}return!1},NO=t=>({baseTag:xO(["href"],t),bodyAttributes:Lf("bodyAttributes",t),defer:mi(t,di.DEFER),encode:mi(t,di.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Lf("htmlAttributes",t),linkTags:Io("link",["rel","href"],t),metaTags:Io("meta",["name","charset","http-equiv","property","itemprop"],t),noscriptTags:Io("noscript",["innerHTML"],t),onChangeClientState:EO(t),scriptTags:Io("script",["src","innerHTML"],t),styleTags:Io("style",["cssText"],t),title:bO(t),titleAttributes:Lf("titleAttributes",t),prioritizeSeoTags:kO(t,di.PRIORITIZE_SEO_TAGS)}),Xw=t=>Array.isArray(t)?t.join(""):t,SO=(t,e)=>{const r=Object.keys(t);for(let n=0;n<r.length;n+=1)if(e[r[n]]&&e[r[n]].includes(t[r[n]]))return!0;return!1},Ff=(t,e)=>Array.isArray(t)?t.reduce((r,n)=>(SO(n,e)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:t,priority:[]},Pb=(t,e)=>({...t,[e]:void 0}),_O=["noscript","script","style"],Fh=(t,e=!0)=>e===!1?String(t):String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),ek=t=>Object.keys(t).reduce((e,r)=>{const n=typeof t[r]<"u"?`${r}="${t[r]}"`:`${r}`;return e?`${e} ${n}`:n},""),CO=(t,e,r,n)=>{const s=ek(r),o=Xw(e);return s?`<${t} ${Pr}="true" ${s}>${Fh(o,n)}</${t}>`:`<${t} ${Pr}="true">${Fh(o,n)}</${t}>`}
827,TO=(t,e,r=!0)=>e.reduce((n,s)=>{const o=s,c=Object.keys(o).filter(h=>!(h==="innerHTML"||h==="cssText")).reduce((h,p)=>{const g=typeof o[p]>"u"?p:`${p}="${Fh(o[p],r)}"`;return h?`${h} ${g}`:g},""),d=o.innerHTML||o.cssText||"",m=_O.indexOf(t)===-1;return`${n}<${t} ${Pr}="true" ${c}${m?"/>":`>${d}</${t}>`}`},""),tk=(t,e={})=>Object.keys(t).reduce((r,n)=>{const s=jp[n];return r[s||n]=t[n],r},e),AO=(t,e,r)=>{const n={key:e,[Pr]:!0},s=tk(r,n);return[a.createElement("title",s,e)]},iu=(t,e)=>e.map((r,n)=>{const s={key:n,[Pr]:!0};return Object.keys(r).forEach(o=>{const d=jp[o]||o;if(d==="innerHTML"||d==="cssText"){const m=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:m}}else s[d]=r[o]}),a.createElement(t,s)}),pr=(t,e,r=!0)=>{switch(t){case"title":return{toComponent:()=>AO(t,e.title,e.titleAttributes),toString:()=>CO(t,e.title,e.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>tk(e),toString:()=>ek(e)};default:return{toComponent:()=>iu(t,e),toString:()=>TO(t,e,r)}}},IO=({metaTags:t,linkTags:e,scriptTags:r,encode:n})=>{const s=Ff(t,Mf.meta),o=Ff(e,Mf.link),c=Ff(r,Mf.script);return{priorityMethods:{toComponent:()=>[...iu("meta",s.priority),...iu("link",o.priority),...iu("script",c.priority)],toString:()=>`${pr("meta",s.priority,n)} ${pr("link",o.priority,n)} ${pr("script",c.priority,n)}`},metaTags:s.default,linkTags:o.default,scriptTags:c.default}},PO=t=>{const{baseTag:e,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:o,styleTags:c,title:d="",titleAttributes:m,prioritizeSeoTags:h}=t;let{linkTags:p,metaTags:g,scriptTags:v}=t,E={toComponent:()=>{},toString:()=>""};return h&&({priorityMethods:E,linkTags:p,metaTags:g,scriptTags:v}=IO(t)),{priority:E,base:pr("base",e,n),bodyAttributes:pr("bodyAttributes",r,n),htmlAttributes:pr("htmlAttributes",s,n),link:pr("link",p,n),meta:pr("meta",g,n),noscript:pr("noscript",o,n),script:pr("script",v,n),style:pr("style",c,n),title:pr("title",{title:d,titleAttributes:m},n)}},jh=PO,Vc=[],rk=!!(typeof window<"u"&&window.document&&window.document.createElement),Uh=class{instances=[];canUseDOM=rk;context;value={setHelmet:t=>{this.context.helmet=t},helmetInstances:{get:()=>this.canUseDOM?Vc:this.instances,add:t=>{(this.canUseDOM?Vc:this.instances).push(t)},remove:t=>{const e=(this.canUseDOM?Vc:this.instances).indexOf(t);(this.canUseDOM?Vc:this.instances).splice(e,1)}}};constructor(t,e){this.context=t,this.canUseDOM=e||!1,e||(t.helmet=jh({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},OO={},nk=a.createContext(OO),ak=class sk extends x.Component{static canUseDOM=rk;helmetData;constructor(e){super(e),this.helmetData=new Uh(this.props.context||{},sk.canUseDOM)}render(){return a.createElement(nk.Provider,{value:this.helmetData.value},this.props.children)}},Ys=(t,e)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${t}[${Pr}]`),s=[].slice.call(n),o=[];let c;return e&&e.length&&e.forEach(d=>{const m=document.createElement(t);for(const h in d)if(Object.prototype.hasOwnProperty.call(d,h))if(h==="innerHTML")m.innerHTML=d.innerHTML;else if(h==="cssText")m.styleSheet?m.styleSheet.cssText=d.cssText:m.appendChild(document.createTextNode(d.cssText));else{const p=h,g=typeof d[p]>"u"?"":d[p];m.setAttribute(h,g)}m.setAttribute(Pr,"true"),s.some((h,p)=>(c=p,m.isEqualNode(h)))?s.splice(c,1):o.push(m)}),s.forEach(d=>d.parentNode?.removeChild(d)),o.forEach(d=>r.appendChild(d)),{oldTags:s,newTags:o}},zh=(t,e)=>{const r=document.getElementsByTagName(t)[0];if(!r)return;const n=r.getAttribute(Pr),s=n?n.split(","):[],o=[...s],c=Object.keys(e);for(const d of c){const m=e[d]||"";r.getAttribute(d)!==m&&r.setAttribute(d,m),s.indexOf(d)===-1&&s.push(d);const h=o.indexOf(d);h!==-1&&o.splice(h,1)}for(let d=o.length-1;d>=0;d-=1)r.removeAttribute(o[d]);s.length===o.length?r.removeAttribute(Pr):r.getAttribute(Pr)!==c.join(",")&&r.setAttribute(Pr,c.join(","))},RO=(t,e)=>{typeof t<"u"&&document.title!==t&&(document.title=Xw(t)),zh("title",e)},Ob=(t,e)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:o,metaTags:c,noscriptTags:d,onChangeClientState:m,scriptTags:h,styleTags:p,title:g,titleAttributes:v}=t;zh("body",n),zh("html",s),RO(g,v);const E={baseTag:Ys("base",r),linkTags:Ys("link",o),metaTags:Ys("meta",c),noscriptTags:Ys("noscript",d),scriptTags:Ys("script",h),styleTags:Ys("style",p)},N={},k={};
827Object.keys(E).forEach(w=>{const{newTags:C,oldTags:_}=E[w];C.length&&(N[w]=C),_.length&&(k[w]=E[w].oldTags)}),e&&e(),m(t,N,k)},Po=null,DO=t=>{Po&&cancelAnimationFrame(Po),t.defer?Po=requestAnimationFrame(()=>{Ob(t,()=>{Po=null})}):(Ob(t),Po=null)},MO=DO,Rb=class extends x.Component{rendered=!1;shouldComponentUpdate(t){return!yO(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:e}=this.props.context;let r=null;const n=NO(t.get().map(s=>{const o={...s.props};return delete o.context,o}));ak.canUseDOM?MO(n):jh&&(r=jh(n)),e(r)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},$h=class extends x.Component{static defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1};shouldComponentUpdate(t){return!mO(Pb(this.props,"helmetData"),Pb(t,"helmetData"))}mapNestedChildrenToProps(t,e){if(!e)return null;switch(t.type){case"script":case"noscript":return{innerHTML:e};case"style":return{cssText:e};default:throw new Error(`<${t.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(t,e,r,n){return{...e,[t.type]:[...e[t.type]||[],{...r,...this.mapNestedChildrenToProps(t,n)}]}}mapObjectTypeChildren(t,e,r,n){switch(t.type){case"title":return{...e,[t.type]:n,titleAttributes:{...r}};case"body":return{...e,bodyAttributes:{...r}};case"html":return{...e,htmlAttributes:{...r}};default:return{...e,[t.type]:{...r}}}}mapArrayTypeChildrenToProps(t,e){let r={...e};return Object.keys(t).forEach(n=>{r={...r,[n]:t[n]}}),r}warnOnInvalidChildren(t,e){return Tb(Ib.some(r=>t.type===r),typeof t.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${Ib.join(", ")} are allowed. Helmet does not support rendering <${t.type}> elements. Refer to our API for more information.`),Tb(!e||typeof e=="string"||Array.isArray(e)&&!e.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${t.type}>. Did you forget to wrap your children in braces? ( <${t.type}>{\`\`}</${t.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(t,e){let r={};return a.Children.forEach(t,n=>{if(!n||!n.props)return;const{children:s,...o}=n.props,c=Object.keys(o).reduce((m,h)=>(m[vO[h]||h]=o[h],m),{});let{type:d}=n;
827switch(typeof d=="symbol"?d=d.toString():this.warnOnInvalidChildren(n,s),d){case"Symbol(react.fragment)":e=this.mapChildrenToProps(s,e);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,c,s);break;default:e=this.mapObjectTypeChildren(n,e,c,s);break}}),this.mapArrayTypeChildrenToProps(r,e)}render(){const{children:t,...e}=this.props;let r={...e},{helmetData:n}=e;if(t&&(r=this.mapChildrenToProps(t,r)),n&&!(n instanceof Uh)){const s=n;n=new Uh(s.context,!0),delete r.helmetData}return n?a.createElement(Rb,{...r,context:n.value}):a.createElement(nk.Consumer,null,s=>a.createElement(Rb,{...r,context:s}))}};const LO=[{id:"slack",name:"Slack",status:"available",icon:"ð¬",description:"Transform your Slack workspace into an intelligent task hub",users:"20M+ daily active users"},{id:"teams",name:"Microsoft Teams",status:"coming-soon",releaseDate:"Q2 2025",icon:"ð¥",description:"Bring AI task intelligence to your Teams channels",users:"280M+ users worldwide"},{id:"email",name:"Email",status:"coming-soon",releaseDate:"Q3 2025",icon:"ð§",description:"Extract tasks from any email conversation",users:"4.26B email users"},{id:"whatsapp",name:"WhatsApp",status:"coming-soon",releaseDate:"Q4 2025",icon:"ð",description:"AI assistant for WhatsApp Business conversations",users:"200M+ business users"}];function FO({onClose:t}){const[e,r]=x.useState(null),[n,s]=x.useState(""),[o,c]=x.useState(!1),[d,m]=x.useState(!1),h=g=>{g.status==="available"&&g.id==="slack"?window.location.href="/slack/install":r(g)},p=async g=>{g.preventDefault(),c(!0),await new Promise(v=>setTimeout(v,1e3)),m(!0),c(!1),setTimeout(()=>{r(null),m(!1),s("")},3e3)};return a.createElement("div",{className:"w-full max-w-2xl mx-auto"},e?a.createElement("div",{className:"space-y-4"},d?a.createElement("div",{className:"text-center py-8"},a.createElement("div",{className:"w-16 h-16 bg-green-500 rounded-full flex items-center justify-center mx-auto mb-4"},a.createElement(Za,{className:"h-8 w-8 text-white"})),a.createElement("h3",{className:"text-xl font-semibold text-slate-900 dark:text-white mb-2"},"You're on the list!"),a.createElement("p",{className:"text-slate-600 dark:text-slate-400"},"We'll notify you when Zenith is available for ",e.name)):a.createElement(a.Fragment,null,a.createElement("div",{className:"text-center mb-6"},a.createElement("span",{className:"text-4xl mb-4 block"},e.icon),a.createElement("h3",{className:"text-xl font-semibold text-slate-900 dark:text-white"},e.name," - Coming ",e.releaseDate),a.createElement("p",{className:"text-slate-600 dark:text-slate-400 mt-2"},"Be the first to know when Zenith launches on ",e.name)),a.createElement("form",{onSubmit:p,className:"space-y-4"},a.createElement("input",{type:"email",value:n,onChange:g=>s(g.target.value),placeholder:"Enter your email",required:!0,className:"w-full px-4 py-3 rounded-lg border border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 text-slate-900 dark:text-white focus:outline-none focus:ring-2 focus:ring-primary"}),a.createElement("div",{className:"flex gap-3"},a.createElement(ce,{type:"submit",disabled:o,className:"flex-1"},o?"Joining...":"Join Waitlist"),a.createElement(ce,{type:"button",variant:"outline",onClick:()=>r(null)},"Back"))),a.createElement("p",{className:"text-xs text-center text-slate-500 dark:text-slate-400"},"We'll only email you when ",e.name," integration is ready"))):a.createElement("div",{className:"space-y-4"},a.createElement("h3",{className:"text-xl font-semibold text-center mb-6 text-slate-900 dark:text-white"},"Choose your platform to get started"),a.createElement("div",{className:"grid gap-3"},LO.map(g=>a.createElement("button",{key:g.id,onClick:()=>h(g),className:` 828 relative p-4 rounded-lg border-2 transition-all duration-200 829 hover:shadow-lg hover:scale-[1.02] text-left 830 ${g.status==="available"?"border-green-500 bg-green-50 dark:bg-green-500/10 hover:bg-green-100 dark:hover:bg-green-500/20":"border-slate-300 dark:border-slate-600 bg-white dark:bg-slate-800 hover:border-primary"} 831 `},a.createElement("div",{className:"flex items-center justify-between"},a.createElement("div",{className:"flex items-center gap-3"},a.createElement("span",{className:"text-2xl"},g.icon),a.createElement("div",null,a.createElement("h4",{className:"font-semibold text-slate-900 dark:text-white flex items-center gap-2"},g.name,g.status==="available"&&a.createElement("span",{className:"text-xs bg-green-500 text-white px-2 py-0.5 rounded-full"},"Available Now")),a.createElement("p",{className:"text-sm text-slate-600 dar
831k:text-slate-400"},g.description),g.users&&a.createElement("p",{className:"text-xs text-slate-500 dark:text-slate-500 mt-1"},g.users))),a.createElement("div",{className:"flex items-center gap-2"},g.status==="available"?a.createElement(a.Fragment,null,a.createElement(Za,{className:"h-5 w-5 text-green-500"}),a.createElement(Rr,{className:"h-5 w-5 text-slate-400"})):a.createElement(a.Fragment,null,a.createElement(Dr,{className:"h-4 w-4 text-slate-400"}),a.createElement("span",{className:"text-sm text-slate-500 dark:text-slate-400"},g.releaseDate))))))),a.createElement("p",{className:"text-center text-sm text-slate-500 dark:text-slate-400 mt-6"},"One AI assistant that works across all your communication platforms")))}function jO({isOpen:t,onClose:e}){return a.createElement(Ii,{open:t,onOpenChange:e},a.createElement(is,{className:"max-w-2xl"},a.createElement(Hr,{className:"text-2xl font-bold text-center mb-2"},"Get Started with Zenith"),a.createElement(Gr,{className:"text-center mb-6 text-slate-600 dark:text-slate-400"},"AI workspace intelligence that adapts to how you work"),a.createElement(FO,{onClose:e})))}const UO="zenith_user_region",zO="en",$O="USD",ik={"Asia/Dubai":{code:"ae",name:"United Arab Emirates",currency:"AED"},"Asia/Riyadh":{code:"sa",name:"Saudi Arabia",currency:"SAR"},"Africa/Cairo":{code:"eg",name:"Egypt",currency:"EGP"},"Asia/Amman":{code:"jo",name:"Jordan",currency:"JOD"},"Asia/Qatar":{code:"qa",name:"Qatar",currency:"QAR"},"Asia/Bahrain":{code:"bh",name:"Bahrain",currency:"BHD"},"Asia/Kuwait":{code:"kw",name:"Kuwait",currency:"KWD"},"Asia/Muscat":{code:"om",name:"Oman",currency:"OMR"},"Asia/Beirut":{code:"lb",name:"Lebanon",currency:"LBP"}},ok={ae:{en:"ae",ar:"ae-ar"},sa:{en:"sa-en",ar:"sa"},eg:{en:"eg",ar:"eg-ar"}},BO=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"UTC"}},WO=()=>{const t=navigator.languages||[navigator.language];for(const e of t){const r=e.toLowerCase();if(r.startsWith("ar"))return"ar";if(r.startsWith("en"))return"en"}return zO},VO=(t,e,r)=>{if(r){const n=r.code;return{code:ok[n]?.[e]||n,name:r.name,timezone:t,language:e,currency:r.currency,isMENA:!0}}return{code:"global",name:"Global",timezone:t,language:e,currency:$O,isMENA:!1}},qO=()=>{try{const t=localStorage.getItem(UO);if(!t)return null;const e=JSON.parse(t);return e&&e.code?e:null}catch(t){return console.warn("Failed to read saved region preference:",t),null}},pn=()=>{const t=qO();if(t)return t;const e=BO(),r=WO(),n=ik[e];return VO(e,r,n)},Gu=t=>{const e=Object.values(ik).map(n=>n.code),r=Object.values(ok).flatMap(n=>Object.values(n));return[...e,...r].includes(t)};function Yu(){return{primaryCTA:"Apply for Early Access",secondaryCTA:"Join the Waitlist",headline:"Shape the future of AI workspace intelligence",description:"Transform conversations into action as a founding member co-creator",exclusivity:"Founding member access with exclusive community benefits",tiers:{PIONEER:["Early access to Zenith AI","Community Discord access","Founding member badge","Monthly progress updates"],INFLUENCER:["All PIONEER benefits","Team consultation call","Custom workspace setup","Priority feature requests"],VISIONARY:["All INFLUENCER benefits","CEO demo session","Regional pricing advantage","Direct product roadmap influence"],FOUNDING_PARTNER:["All VISIONARY benefits","Free 3-month pilot program","Dedicated success manager","Lifetime discount (50% off)","Advisory board consideration"]},regional:{arabic:{headline:"Ø´ÙÙ Ù
Ø³ØªÙØ¨Ù Ø§ÙØ°Ùاء Ø§ÙØ§ØµØ·Ùاع٠ÙÙ Ù
ÙØ§Ù Ø§ÙØ¹Ù
Ù",description:"ØÙ٠اÙÙ
ØØ§Ø¯Ø«Ø§Øª Ø¥Ù٠إجراءات ÙØ¹Ø¶Ù Ù
ؤسس Ù
شار٠ÙÙ Ø®Ù٠اÙÙ
Ø³ØªÙØ¨Ù",urgency:"ÙØ±Øµ Ù
ØØ¯Ùدة ÙÙØ£Ø¹Ø¶Ø§Ø¡ اÙÙ
ؤسسÙÙ"},english:{headline:"Shape the future of AI workspace intelligence",description:"Transform conversations into action as a founding member co-creator",urgency:"Limited founding member spots available"}}}}function HO(t){const e=Yu();if(!e.tiers[t])throw new Error(`Invalid tier: ${t}`);switch(t){case"PIONEER":return e.tiers.PIONEER;case"INFLUENCER":return[...e.tiers.PIONEER,...e.tiers.INFLUENCER].filter(r=>!r.startsWith("All "));case"VISIONARY":return[...e.tiers.PIONEER,...e.tiers.INFLUENCER,...e.tiers.VISIONARY].filter(r=>!r.startsWith("All "));case"FOUNDING_PARTNER":return[...e.tiers.PIONEER,...e.tiers.INFLUENCER,...e.tiers.VISIONARY,...e.tiers.FOUNDING_PARTNER].filter(r=>!r.startsWith("All "));default:return e.tiers[t]}}function Bh(t,e="en"){const r=Yu();return e==="ar"&&(t==="MENA"||t==="UAE"||t==="KSA"||t==="EGYPT"||t==="JORDAN"||t==="QATAR")?r.regional.arabic:r.regional.english}const GO={PROGRAM_SIGNUP:"early_adopter_signup",TIER_UPGRADE:"early_adopter_tier_upgrade",REFerral_CONVERSION:"early_adopter_referral",BENEFIT_REDEEMED:"early_adopter_benefit_redeemed"},_u={en:{countdown:["Limited time offer - {time} remaining!","Offer ends in {time}","Last chance: {time} left"],scarcity:["Only {spots} spots left!","{spots} spots remaining at this price","Almost gone: {spots} spots left","Join {count} others who signed up today"],progress:["{current} of {goal} professionals have joined","{percentage}% capacity reached"]},ar:{countdown:["ÙØ±ØµØ© Ù
ØØ¯Ùدة - {time} Ù
تبÙÙØ©!","ÙÙØªÙÙ Ø§ÙØ¹Ø±Ø¶ ÙÙ {time}","اÙÙØ±ØµØ© Ø§ÙØ£Ø®Ùرة: {time} Ù
تبÙÙØ©"],scarcity:["Ù
تبÙÙ {spots} Ø£Ù
اÙÙ ÙÙØ·!","{spots} Ø£Ù
اÙÙ Ù
تبÙÙØ© Ø¨ÙØ°Ø§ Ø§ÙØ³Ø¹Ø±","Ø´Ø¨Ù Ø§ÙØªÙ
Ù: {spots} Ø£Ù
اÙÙ Ù
تبÙÙØ©","Ø§ÙØ¶Ù
Ø¥ÙÙ {count} آخرÙ٠سجÙÙØ§ اÙÙÙÙ
"],progress:["{current} Ù
Ù {goal} Ù
ØØªØ±Ù Ø§ÙØ¶Ù
ÙØ§","تÙ
اÙÙØµÙ٠إÙÙ {percentage}%"]}},un={DAY:1440*60*1e3,HOUR:3600*1e3,MINUTE:60*1e3,SECOND:1e3},hn={HIGH_URGENCY_THRESHOLD:20,TOTAL_SPOTS:100,COUNTDOWN_DAYS:7,REAL_TIME_INTERVAL_MIN:5e3,REAL_TIME_INTERVAL_MAX:15e3,SIGNUP_SIMULATION_PROBABILITY:.7},YO={ae:"Asia/Dubai",sa:"Asia/Riyadh",eg:"Africa/Cairo"},JO=["sa","ae-ar"],qc={CRITICAL:90,HIGH:75,MEDIUM:50};function KO(t){return JO.includes(t)}function lk(t,e,r){return Math.min(Math.max(t,e),r)}function Ua(t,e=0){const r=typeof t=="string"?parseInt(t,10):Number(t);return isNaN(r)?e:r}class ck{deadline;options;timerId=null;_isActive=!0;constructor(e,r={}){if(!e||!(e instanceof Date)||isNaN(e.getTime()))throw new Error("Invalid deadline: must be a valid Date object");this.deadline=e,this.options={region:"global",language:"en",timezone:"UTC",...r}}get isActive(){return this._isActive}get timeRemaining(){return this.getTimeRemaining()}getTimeRemaining(){const e=new Date,r=this.deadline.getTime()-e.getTime();if(r<=0)return this._isActive=!1,"0s";const n=Math.floor(r/un.DAY),s=Math.floor(r%un.DAY/un.HOUR),o=Math.floor(r%un.HOUR/un.MINUTE),c=Math.floor(r%un.MINUTE/un.SECOND);return n>0?`${n}d ${s}h`:s>0?`${s}h ${o}m`:o>0?`${o}m`:`${c}s`}getFormattedTime(){const e=this.getTimeRemaining(),{language:r}=this.options;return r!=="ar"?e:this.formatArabicTime(e)}formatArabicTime(e){return e.includes("d")?e.replace(/(\d+)d (\d+)h/,(r,n,s)=>{const o=Ua(n),c=Ua(s);return`${o} ÙÙÙ
${o>1,""} Ù${c} ساعة${c>1,""}`}).replace(/(\d+)d/,(r,n)=>`${n}
831 ÙÙÙ
`):e.includes("h")?e.replace(/(\d+)h (\d+)m/,(r,n,s)=>{const o=Ua(n),c=Ua(s);return c===0?`${o} ساعات`:`${o} ساعة Ù${c} دÙÙÙØ©`}).replace(/(\d+)h/,(r,n)=>{const s=Ua(n);return s===1?"1 ساعة":s===2?"ساعتاÙ":`${s} ساعات`}):e.includes("m")?e.replace(/(\d+)m/,(r,n)=>{const s=Ua(n);return s===1?"1 دÙÙÙØ©":s===2?"دÙÙÙØªØ§Ù":`${s} دÙÙÙØ©`}):e.includes("s")?e.replace(/(\d+)s/,(r,n)=>{const s=Ua(n);return s===1?"1 ثاÙÙØ©":s===2?"ثاÙÙØªØ§Ù":`${s} ثاÙÙØ©`}):e}start(){this.timerId||(this.options.onTick?.(this.getFormattedTime()),this.timerId=window.setInterval(()=>{const e=this.getFormattedTime();this.options.onTick?.(e),this._isActive||(this.stop(),this.options.onExpire?.())},un.SECOND))}stop(){this.timerId&&(clearInterval(this.timerId),this.timerId=null)}destroy(){this.stop()}}class uk{currentCount;totalSpots;options;constructor(e,r,n={}){if(e<0||r<=0)throw new Error("Invalid count values: current must be >= 0 and total must be > 0");this.currentCount=Math.min(e,r),this.totalSpots=r,this.options={language:"en",highUrgencyThreshold:hn.HIGH_URGENCY_THRESHOLD,...n}}get remainingSpots(){return Math.max(0,this.totalSpots-this.currentCount)}get isHighUrgency(){return this.getPercentageRemaining()<=(this.options.highUrgencyThreshold??hn.HIGH_URGENCY_THRESHOLD)}getRemainingMessage(){const e=this.remainingSpots,{language:r}=this.options;return this.isHighUrgency?r==="ar"?`Ù
تبÙÙ ${e} Ø£Ù
اÙÙ ÙÙØ·!`:`Only ${e} spots left!`:r==="ar"?`${e} Ù
ÙØ§Ù Ù
تبÙÙ`:`${e} spots remaining`}getPercentageRemaining(){return Math.round(this.remainingSpots/this.totalSpots*100)}update(e){this.currentCount=lk(e,0,this.totalSpots)}}class dk{current;total;options;constructor(e,r,n={}){if(r<=0)throw new Error("Total must be greater than 0");this.current=Math.max(0,e),this.total=r,this.options={showCount:!1,animated:!1,message:"",...n}}get percentage(){return Math.min(100,Math.round(this.current/this.total*100))}get isAnimated(){return(this.options.animated??!1)||this.percentage>=qc.CRITICAL}getStyleClass(){const e=this.percentage;return e>=qc.CRITICAL?"progress-critical":e>=qc.HIGH?"progress-high":e>=qc.MEDIUM?"progress-medium":"progress-low"}getMessage(){return this.options.message?this.options.message.replace("{current}",String(this.current)).replace("{goal}",String(this.total)).replace("{percentage}",String(this.percentage)):""}update(e){this.current=Math.max(0,e)}}function mk(t){const e=new Date;return{showCountdown:!0,showScarcity:!0,showProgress:!0,deadline:new Date(e.getTime()+hn.COUNTDOWN_DAYS*un.DAY),totalSpots:hn.TOTAL_SPOTS,language:KO(t)?"ar":"en",timezone:YO[t]||"UTC",culturalAdaptations:{urgencyStyle:"respectful",colorScheme:"purple",weekendAdjustment:!0}}}function QO(t){const e=mk(t),r=e.language,n=_u[r]||_u.en,s=25,o=e.totalSpots-s;return{countdown:{message:n.countdown[0].replace("{time}","7d 0h"),timeRemaining:"7d 0h",isActive:!0},scarcity:{message:r==="ar"?`Ù
تبÙÙ ${o} Ø£Ù
اÙÙ ÙÙØ·!`:`Only ${o} spots left!`,spotsRemaining:o,percentage:Math.round(o/e.totalSpots*100),isHighUrgency:o<=hn.HIGH_URGENCY_THRESHOLD},progress:{percentage:25,current:s,total:e.totalSpots,message:r==="ar"?`${s} Ù
Ù ${e.totalSpots} Ù
ØØªØ±Ù Ø§ÙØ¶Ù
ÙØ§`:`${s} of ${e.totalSpots} professionals have joined`},messages:[...n.countdown,...n.scarcity,...n.progress]}}class ZO{region;config;timer=null;scarcity=null;progress=null;onUpdateCallback;isRealTimeActive=!1;realTimeInterval=null;signupCount=0;events=[];constructor(e){if(!e||typeof e!="string")throw new Error("Region must be a non-empty string");this.region=e,this.config=mk(e)}get realTimeStatus(){return this.isRealTimeActive}async initialize(){this.timer=new ck(this.config.deadline,{region:this.region,language:this.config.language,timezone:this.config.timezone,onTick:()=>this.triggerUpdate(),onExpire:()=>this.handleExpiry()}),this.scarcity=new uk(this.signupCount,this.config.totalSpots,{language:this.config.language}),this.progress=new dk(this.signupCount,this.config.totalSpots,{showCount:!0,animated:!1}),this.timer.start()}setOnUpdateCallback(e){this.onUpdateCallback=e}updateSignupCount(e){this.signupCount=lk(e,0,this.config.totalSpots),this.scarcity?.update(this.signupCount),this.progress?.update(this.signupCount),this.triggerUpdate(),this.trackEvent("urgency_update",{signupCount:this.signupCount,percentage:Math.round(this.signupCount/this.config.totalSpots
831*100)})}getProgress(){if(!this.progress)throw new Error("Progress component not initialized. Call initialize() first.");return this.progress}startRealTimeUpdates(){if(this.isRealTimeActive)return;this.isRealTimeActive=!0;const e=hn.REAL_TIME_INTERVAL_MIN+Math.random()*(hn.REAL_TIME_INTERVAL_MAX-hn.REAL_TIME_INTERVAL_MIN);this.realTimeInterval=window.setInterval(()=>{this.simulateSignupActivity()},e)}stopRealTimeUpdates(){this.isRealTimeActive=!1,this.realTimeInterval&&(clearInterval(this.realTimeInterval),this.realTimeInterval=null)}shouldShowUrgency(){const e=new Date().getHours();return!(this.region==="sa"&&(e<6||e>23)||this.region==="ae"&&(e<7||e>23))}trackEvent(e,r){const n={event:e,data:r,timestamp:Date.now()};this.events.push(n),console.log("Urgency Event:",e,r)}getTrackedEvents(){return[...this.events]}triggerUpdate(){if(!this.onUpdateCallback)return;const e=this.getContent();this.onUpdateCallback(e)}getContent(){const e=this.config.language,r=_u[e]||_u.en;return{countdown:{message:r.countdown[0].replace("{time}",this.timer?.getTimeRemaining()||"0s"),timeRemaining:this.timer?.getTimeRemaining()||"0s",isActive:this.timer?.isActive??!1},scarcity:{message:this.scarcity?.getRemainingMessage()||"",spotsRemaining:this.config.totalSpots-this.signupCount,percentage:this.scarcity?.getPercentageRemaining()||0,isHighUrgency:this.scarcity?.isHighUrgency??!1},progress:{percentage:this.progress?.percentage||0,current:this.signupCount,total:this.config.totalSpots,message:this.progress?.getMessage()||""},messages:[...r.countdown,...r.scarcity,...r.progress]}}simulateSignupActivity(){Math.random()>hn.SIGNUP_SIMULATION_PROBABILITY&&this.signupCount<this.config.totalSpots&&this.updateSignupCount(this.signupCount+1)}handleExpiry(){this.trackEvent("urgency_expired",{region:this.region})}destroy(){this.stopRealTimeUpdates(),this.timer?.destroy(),this.timer=null,this.scarcity=null,this.progress=null,this.onUpdateCallback=void 0}}const jf={global:{"hero.title":"Zenith AI Assistant","hero.subtitle":"Advanced AI solutions for modern teams","hero.cta.primary":"Get Started","hero.cta.secondary":"Book a Demo","features.productivity.title":"Boost Productivity","features.productivity.desc":"Automate repetitive tasks and focus on what matters","features.integration.title":"Seamless Integration","features.integration.desc":"Works with Slack, Teams, Email, and WhatsApp","features.security.title":"Enterprise Security","features.security.desc":"Bank-level encryption and compliance","pricing.plans.free.title":"Free Personal","pricing.plans.free.desc":"Perfect for individuals","pricing.plans.pro.title":"Personal Pro","pricing.plans.pro.desc":"For power users","pricing.plans.business.title":"Business","pricing.plans.business.desc":"For teams of 5+","waitlist.title":"Join the Waitlist","waitlist.subtitle":"Be among the first to experience Zenith's AI-powered communication platform.","waitlist.placeholder":"Enter your email","waitlist.submit":"Join Now","waitlist.form.email":"Email","waitlist.form.email.placeholder":"[email protected]","waitlist.form.submit":"Join Waitlist","waitlist.form.submitting":"Joining...","waitlist.success":"Join {count}+ professionals from {region} on the waitlist!","waitlist.success.title":"Thank You for Joining!","waitlist.success.message":"We've added you to our waitlist. You'll be among the first to know when we launch.","waitlist.existing.title":"Welcome Back!","waitlist.existing.message":"You're already on our waitlist! We've sent you another confirmation email with the latest updates.","waitlist.close":"Close"},ae:{"hero.title":"Zenith AI Assistant","hero.subtitle":"Advanced AI solutions for modern teams in UAE","hero.cta.primary":"Get Started","hero.cta.secondary":"Book a Demo","waitlist.success":"Join {count}+ professionals from {region} on the waitlist!","waitlist.title":"Join the Waitlist","waitlist.subtitle":"Be among the first to experience Zenith's AI-powered communication platform.","waitlist.form.email":"Email","waitlist.form.email.placeholder":"[email protected]","waitlist.form.fullName":"Full Name","waitlist.form.fullName.placeholder":"Enter your full name","waitlist.form.company":"Company","waitlist.form.company.placeholder":"Enter your company name","waitlist.form.country":"Country","waitlist.form.country.select":"Select your country","waitlist.form.phone":"Phone Number","waitlist.form.phone.placeholder":"Enter your phone number","waitlist.form.submit":"Join Waitlist","waitlist.form.submitting":"Joining...","waitlist.success.title":"Thank You for Joining!","waitlist.success.message":"We've added you to our waitlist. You'll be among the first to know when we launch.","waitlist.existing.title":"Welcome Back!","waitlist.existing.message":"You're already on our waitlist! We've sent you another confirmation email with the latest updates.","waitlist.close"
831:"Close"},"ae-ar":{"hero.title":"Ù
Ø³Ø§Ø¹Ø¯Ù Ø§ÙØ°Ù٠زÙÙØ«","hero.subtitle":"ØÙÙÙ Ø°ÙØ§Ø¡ Ø§ØµØ·ÙØ§Ø¹Ù Ù
ØªÙØ¯Ù
Ø© ÙÙØ±Ù Ø§ÙØ¹Ù
Ù Ø§ÙØØ¯ÙØ«Ø©","hero.cta.primary":"ابدأ Ø§ÙØ¢Ù","hero.cta.secondary":"Ø§ØØ¬Ø² Ø¹Ø±Ø¶Ø§Ù ØªÙØ¶ÙØÙاÙ","features.productivity.title":"ØªØ¹Ø²ÙØ² Ø§ÙØ¥ÙØªØ§Ø¬ÙØ©","features.productivity.desc":"أتÙ
تة اÙÙ
ÙØ§Ù
اÙÙ
ØªÙØ±Ø±Ø© ÙØ§ÙترÙÙØ² عÙÙ Ù
ا ÙÙÙ
","features.integration.title":"ØªÙØ§Ù
Ù Ø³ÙØ³","features.integration.desc":"ÙØ¹Ù
Ù Ù
ع Slack Ù Teams ÙØ§ÙØ¨Ø±ÙØ¯ Ø§ÙØ¥ÙÙØªØ±ÙÙÙ Ù WhatsApp","features.security.title":"Ø£Ù
ا٠عÙÙ Ù
ستÙ٠اÙÙ
ؤسسات","features.security.desc":"تشÙÙØ± عÙÙ Ù
ستÙÙ Ø§ÙØ¨ÙÙÙ ÙØ§ÙاÙ
تثاÙ","waitlist.title":"Ø§ÙØ¶Ù
Ø¥ÙÙ ÙØ§Ø¦Ù
Ø© Ø§ÙØ§Ùتظار","waitlist.subtitle":"ÙÙ Ù
Ù Ø£ÙØ§Ø¦Ù Ù
Ù ÙØ¬Ø±Ø¨ÙÙ Ù
ÙØµØ© زÙÙØ« ÙÙØ°Ùاء Ø§ÙØ§ØµØ·ÙاعÙ","waitlist.placeholder":"Ø£Ø¯Ø®Ù Ø¨Ø±ÙØ¯Ù Ø§ÙØ¥ÙÙØªØ±ÙÙÙ","waitlist.submit":"Ø§ÙØ¶Ù
Ø§ÙØ¢Ù","waitlist.form.email":"Ø§ÙØ¨Ø±Ùد Ø§ÙØ¥ÙÙØªØ±ÙÙÙ","waitlist.form.email.placeholder":"[email protected]","waitlist.form.fullName":"Ø§ÙØ§Ø³Ù
اÙÙØ§Ù
Ù","waitlist.form.fullName.placeholder":"أدخ٠اسÙ
٠اÙÙØ§Ù
Ù","waitlist.form.company":"Ø§ÙØ´Ø±ÙØ©","waitlist.form.company.placeholder":"أدخ٠اسÙ
Ø´Ø±ÙØªÙ","waitlist.form.country":"Ø§ÙØ¯ÙÙØ©","waitlist.form.country.select":"اختر دÙÙØªÙ","waitlist.form.phone":"رÙÙ
اÙÙØ§ØªÙ","waitlist.form.phone.placeholder":"أدخ٠رÙÙ
ÙØ§ØªÙÙ","waitlist.form.submit":"Ø§ÙØ¶Ù
Ø¥Ù٠اÙÙØ§Ø¦Ù
Ø©","waitlist.form.submitting":"Ø¬Ø§Ø±Ù Ø§ÙØ§ÙضÙ
اÙ
...","waitlist.success":"Ø§ÙØ¶Ù
Ø¥ÙÙ {count}+ Ù
ØØªØ±Ù Ù
Ù {region} ÙÙ ÙØ§Ø¦Ù
Ø© Ø§ÙØ§Ùتظار!","waitlist.success.title":"Ø´ÙØ±Ø§Ù ÙØ§ÙضÙ
اÙ
Ù!","waitlist.success.message":"تÙ
Ø¥Ø¶Ø§ÙØªÙ Ø¥ÙÙ ÙØ§Ø¦Ù
Ø© Ø§ÙØ§Ùتظار. ستÙÙÙ Ù
٠أÙÙ Ù
Ù ÙØ¹Ø±Ù Ø¹ÙØ¯ Ø¥Ø·ÙØ§ÙÙØ§.","waitlist.existing.title":"Ù
Ø±ØØ¨Ø§Ù Ø¨Ø¹ÙØ¯ØªÙ!","waitlist.existing.message":"Ø£ÙØª باÙÙØ¹Ù ÙÙ ÙØ§Ø¦Ù
Ø© Ø§ÙØ§Ùتظار! أرسÙÙØ§ ÙÙ Ø¨Ø±ÙØ¯Ø§Ù Ø¥ÙÙØªØ±ÙÙÙØ§Ù آخر Ø¨Ø§ÙØªØØ¯Ùثات Ø§ÙØ£Ø®Ùرة.","waitlist.close":"Ø¥ØºÙØ§Ù"},sa:{"hero.title":"Ù
ساعد زÙÙØ« Ø§ÙØ°ÙÙ","hero.subtitle":"ØÙÙÙ Ø°ÙØ§Ø¡ Ø§ØµØ·ÙØ§Ø¹Ù Ù
ØªÙØ¯Ù
Ø© ÙÙØ±Ù Ø§ÙØ¹Ù
Ù","hero.cta.primary":"ابدأ Ø§ÙØ¢Ù","hero.cta.secondary":"Ø§ØØ¬Ø² عرضاÙ","waitlist.title":"Ø§ÙØ¶Ù
Ø¥ÙÙ ÙØ§Ø¦Ù
Ø© Ø§ÙØ§Ùتظار","waitlist.subtitle":"ÙÙ Ù
Ù Ø£ÙØ§Ø¦Ù Ù
Ù ÙØ¬Ø±Ø¨ÙÙ Ù
ÙØµØ© زÙÙØ« ÙÙØ°Ùاء Ø§ÙØ§ØµØ·ÙاعÙ","waitlist.placeholder":"Ø£Ø¯Ø®Ù Ø¨Ø±ÙØ¯Ù Ø§ÙØ¥ÙÙØªØ±ÙÙÙ","waitlist.submit":"Ø§ÙØ¶Ù
Ø§ÙØ¢Ù","waitlist.form.email":"Ø§ÙØ¨Ø±Ùد Ø§ÙØ¥ÙÙØªØ±ÙÙÙ","waitlist.form.email.placeholder":"[email protected]","waitlist.form.fullName":"Ø§ÙØ§Ø³Ù
اÙÙØ§Ù
Ù","waitlist.form.fullName.placeholder":"أدخ٠اسÙ
٠اÙÙØ§Ù
Ù","waitlist.form.company":"Ø§ÙØ´Ø±ÙØ©","waitlist.form.company.placeholder":"أدخ٠اسÙ
Ø´Ø±ÙØªÙ","waitlist.form.country":"Ø§ÙØ¯ÙÙØ©","waitlist.form.country.select":"اختر دÙÙØªÙ","waitlist.form.phone":"رÙÙ
اÙÙØ§ØªÙ","waitlist.form.phone.placeholder":"أدخ٠رÙÙ
ÙØ§ØªÙÙ","waitlist.form.submit":"Ø§ÙØ¶Ù
Ø¥Ù٠اÙÙØ§Ø¦Ù
Ø©","waitlist.form.submitting":"Ø¬Ø§Ø±Ù Ø§ÙØ§ÙضÙ
اÙ
...","waitlist.success":"Ø§ÙØ¶Ù
Ø¥ÙÙ {count}+ Ù
ØØªØ±Ù Ù
Ù {region} ÙÙ ÙØ§Ø¦Ù
Ø© Ø§ÙØ§Ùتظار!","waitlist.success.title":"Ø´ÙØ±Ø§Ù ÙØ§ÙضÙ
اÙ
Ù!","waitlist.success.message":"تÙ
Ø¥Ø¶Ø§ÙØªÙ Ø¥ÙÙ ÙØ§Ø¦Ù
Ø© Ø§ÙØ§Ùتظار. ستÙÙÙ Ù
٠أÙÙ Ù
Ù ÙØ¹Ø±Ù Ø¹ÙØ¯ Ø¥Ø·ÙØ§ÙÙØ§.","waitlist.existing.title":"Ù
Ø±ØØ¨Ø§Ù Ø¨Ø¹ÙØ¯ØªÙ!","waitlist.existing.message":"Ø£ÙØª باÙÙØ¹Ù ÙÙ ÙØ§Ø¦Ù
Ø© Ø§ÙØ§Ùتظار! أرسÙÙØ§ ÙÙ Ø¨Ø±ÙØ¯Ø§Ù Ø¥ÙÙØªØ±ÙÙÙØ§Ù آخر Ø¨Ø§ÙØªØØ¯Ùثات Ø§ÙØ£Ø®Ùرة.","waitlist.close":"Ø¥ØºÙØ§Ù"},"sa-en":{"hero.title":"Zenith AI Assistant","hero.subtitle":"Advanced AI solutions for Saudi teams","hero.cta.primary":"Get Started","hero.cta.secondary":"Book a Demo","waitlist.title":"Join the Waitlist","waitlist.subtitle":"Be among the first to experience Zenith's AI-powered communication platform.","waitlist.form.email":"Email","waitlist.form.email.placeholder":"[email protected]","waitlist.form.fullName":"Full Name","waitlist.form.fullName.placeholder":"Enter your full name","waitlist.form.company":"Company","waitlist.form.company.placeholder":"Enter your company name","waitlist.form.country":"Country","waitlist.form.country.select":"Select your country","waitlist.form.phone":"Phone Number","waitlist.form.phone.placeholder":"Enter your phone number","waitlist.form.submit":"Join Waitlist","waitlist.form.submitting":"Joining...","waitlist.success":"Join {count}+ professionals from {region} on the waitlist!","waitlist.success.title":"Thank You for Joining!","waitlist.success.message":"We've added you to our waitlist. You'll be among the first to know when we launch.","waitlist.existing.title":"Welcome Back!","waitlist.existing.message":"You're already on our waitlist! We've sent you another confirmation email with the latest updates.","waitlist.close"
831:"Close"},eg:{"hero.title":"Zenith AI Assistant","hero.subtitle":"Advanced AI solutions for Egyptian teams","hero.cta.primary":"Get Started","hero.cta.secondary":"Book a Demo","waitlist.title":"Join the Waitlist","waitlist.subtitle":"Be among the first to experience Zenith's AI-powered communication platform.","waitlist.form.email":"Email","waitlist.form.email.placeholder":"[email protected]","waitlist.form.fullName":"Full Name","waitlist.form.fullName.placeholder":"Enter your full name","waitlist.form.company":"Company","waitlist.form.company.placeholder":"Enter your company name","waitlist.form.country":"Country","waitlist.form.country.select":"Select your country","waitlist.form.phone":"Phone Number","waitlist.form.phone.placeholder":"Enter your phone number","waitlist.form.submit":"Join Waitlist","waitlist.form.submitting":"Joining...","waitlist.success":"Join {count}+ professionals from {region} on the waitlist!","waitlist.success.title":"Thank You for Joining!","waitlist.success.message":"We've added you to our waitlist. You'll be among the first to know when we launch.","waitlist.existing.title":"Welcome Back!","waitlist.existing.message":"You're already on our waitlist! We've sent you another confirmation email with the latest updates.","waitlist.close":"Close"}},Zt=(t,e="global",r)=>{const s=(jf[e]||jf.global)[t]||jf.global[t]||t;return String(s)},Oo=[{level:1,name:"Early Adopter",minReferrals:1,benefits:["Priority access to beta","Exclusive updates"],priorityAccess:!0},{level:2,name:"Team Leader",minReferrals:3,benefits:["Priority access","Team consultation","Custom setup assistance"],priorityAccess:!0},{level:3,name:"MENA Pioneer",minReferrals:5,benefits:["All previous benefits","Exclusive demo with CEO","Regional pricing advantage"],priorityAccess:!0},{level:4,name:"Enterprise Partner",minReferrals:10,benefits:["All previous benefits","Free 3-month pilot","Dedicated support"],priorityAccess:!0}],Wh={mena:{multiplier:1.5,bonusBenefits:["Arabic language support priority","Regional data center access"]},global:{multiplier:1}};class ni{static instance;baseUrl;apiEndpoint;constructor(){this.baseUrl=typeof window<"u"?window.location.origin:"https://zenithai.com",this.apiEndpoint=`${this.baseUrl}/api/referrals`}static getInstance(){return ni.instance||(ni.instance=new ni),ni.instance}generateReferralCode(e){return`Z${this.hashEmail(e).slice(0,6).toUpperCase()}`}createReferralLink(e,r){const n=this.generateReferralCode(e),s=r?.isMENA||!1,o={utm_source:"referral",utm_medium:e.split("@")[0],utm_campaign:s?"mena_referral":"global_referral"},c=new URLSearchParams({ref:n,...o}),d=`${this.baseUrl}?${c.toString()}`;return{referralCode:n,referralUrl:d,referrerEmail:e,utmParams:o}}extractReferralCode(){if(typeof window>"u")return null;const e=new URLSearchParams(window.location.search);return e.get("ref")||e.get("referral")}async trackReferralClick(e){try{sessionStorage.setItem("zenith_referral_code",e);const{trackEvent:r}=await ts(async()=>{const{trackEvent:n}=await Promise.resolve().then(()=>Nb);return{trackEvent:n}},void 0);r("referral_click",{referral_code:e,timestamp:Date.now(),page_location:window.location.pathname}),await this.trackToBackend("click",e)}catch(r){console.warn("Failed to track referral click:",r)}}async processReferral(e){try{const r=sessionStorage.getItem("zenith_referral_code");if(!r)return{success:!1,message:"No referral code found"};const n=await this.processReferralBackend(e,r);if(n.success){sessionStorage.removeItem("zenith_referral_code");const{trackEvent:s}=await ts(async()=>{const{trackEvent:o}=await Promise.resolve().then(()=>Nb);return{trackEvent:o}},void 0);s("referral_conversion",{referral_code:r,referred_email:this.hashEmail(e),timestamp:Date.now()})}return n}catch(r){return console.error("Failed to process referral:",r),{success:!1,message:"Failed to process referral"}}}async getReferralStats(e){try{return{id:"mock-id",referrerEmail:e,referrerCode:this.generateReferralCode(e),referredEmails:[],referralCount:0,tier:Oo[0],createdAt:new Date().toISOString(),lastActivityAt:new Date().toISOString(),rewards:[],region:"global"}}catch(r){return console.error("Failed to get referral stats:",r),null}}calculateTier(e,r){const n=r==="mena"?Wh.mena.multiplier:Wh.global.multiplier,s=Math.floor(e*n);for(let o=Oo.length-1;o>=0;o--)if(s>=Oo[o].minReferrals)return Oo[o];return Oo[0]}generateShareContent(e,r){const n=r?.isMENA||!1,s=e.referrerEmail.split("@")[0],o=n?"Join me on Zenith AI - the first intelligent communication platform built for the MENA region! Get priority access to AI-powered automation for Slack, WhatsApp, and Microsoft Teams.":"Join me on Zenith AI - the intelligent communication platform that brings AI automation to Slack, WhatsApp, and Microsoft Teams.",d={subject:n?"Join Zenith AI - Priority Access for MENA Region":"Join Zenith AI - Priority Access Invitation",body:`${o} 832 833You'll get priority access when you use my referral link: 834 835${e.referralUrl} 836 837Why join Zenith: 838â AI-powered message automation 839â Smart task extraction from conversations 840â Cross-platform integration
841${n?"â MENA region optimized with Arabic support":""} 842â Priority beta access for early users 843 844Looking forward to seeing you there! 845 846Best, 847${s}`},m=`${o.substring(0,100)}... Join here: ${e.referralUrl}`,h=`I'm excited to join Zenith AI, an intelligent communication platform that's transforming how teams work with AI. You can get priority access too: ${e.referralUrl} #AI #Automation #MENA ${n?"#MENATech":"#FutureOfWork"}`,p=`Getting priority access to Zenith AI - the future of intelligent communication. Join me! ${e.referralUrl} #AI #Automation ${n?"#MENATech":""}`;return{email:d,whatsapp:m,linkedin:h,twitter:p}}hashEmail(e){let r=0;const n=e||"default";for(let s=0;s<n.length;s++){const o=n.charCodeAt(s);r=(r<<5)-r+o,r=r&r}return Math.abs(r).toString(36).padEnd(6,"0").slice(0,6)}async trackToBackend(e,r){console.log(`Tracking ${e} for referral code:`,r)}async processReferralBackend(e,r){return{success:!0,referrerCode:r,message:"Referral processed successfully"}}}const gn=ni.getInstance(),fk=(t,e)=>gn.createReferralLink(t,e),XO=t=>gn.trackReferralClick(t),e3=t=>gn.processReferral(t),t3=t=>gn.getReferralStats(t);function r3({isOpen:t,onClose:e,email:r,region:n,showReferralPrompt:s=!0}){const[o,c]=x.useState(""),[d,m]=x.useState(""),[h,p]=x.useState(!1),[g,v]=x.useState(s),E=n?.isMENA||!1,N=r.split("@")[0];x.useEffect(()=>{if(t&&r){const _=fk(r,n);c(_.referralUrl),m(_.referralCode),Ne("referral_success_modal_view",{email_hash:r.substring(0,3)+"***",region:n?.code,show_referral_prompt:s})}},[t,r,n,s]);const k=async()=>{try{await navigator.clipboard.writeText(o),p(!0),setTimeout(()=>p(!1),2e3),Ne("referral_link_copied_modal",{referral_code:d,location:"success_modal"})}catch(_){console.error("Failed to copy link:",_)}},w=()=>{const _=E?`Join me on Zenith AI! Priority access for the MENA region with AI automation for Slack, WhatsApp, and Teams. Use my link: ${o}`:`Join me on Zenith AI! Get priority access to AI-powered communication automation. Use my link: ${o}`;window.open(`https://wa.me/?text=${encodeURIComponent(_)}`,"_blank"),Ne("referral_whatsapp_share_modal",{referral_code:d,location:"success_modal"})},C=()=>{const _=gn.generateShareContent({referralCode:d,referralUrl:o,referrerEmail:r,utmParams:{}},n);window.location.href=`mailto:?subject=${encodeURIComponent(_.email.subject)}&body=${encodeURIComponent(_.email.body)}`,Ne("referral_email_share_modal",{referral_code:d,location:"success_modal"})};return t?a.createElement("div",{className:"fixed inset-0 z-50 overflow-y-auto"},a.createElement("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity",onClick:e}),a.createElement("div",{className:"flex min-h-full items-center justify-center p-4"},a.createElement("div",{className:"relative w-full max-w-md bg-white rounded-2xl shadow-xl transition-all",onClick:_=>_.stopPropagation()},a.createElement("button",{onClick:e,className:"absolute right-4 top-4 p-2 text-slate-400 hover:text-slate-600 transition-colors"},a.createElement("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}))),a.createElement("div",{className:"p-6"},a.createElement("div",{className:"w-16 h-16 mx-auto mb-4 bg-green-100 rounded-full flex items-center justify-center"},a.createElement("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))),a.createElement("div",{className:"text-center mb-6"},a.createElement("h3",{className:"text-2xl font-bold text-slate-900 mb-2"},"You're on the Waitlist!"),a.createElement("p",{className:"text-slate-600"},"Thanks for joining Zenith AI, ",N,"!",E&&" You'll receive priority access for the MENA region.")),g&&a.createElement("div",{className:"border-t border-slate-100 pt-6"},a.createElement("div",{className:"text-center mb-4"},a.createElement("h4",{className:"text-lg font-semibold text-slate-900 mb-2"},"Boost Your Priority Access"),a.createElement("p",{className:"text-sm text-slate-600"}
847,"Invite colleagues and unlock exclusive benefits",E&&" - MENA referrals earn 50% bonus points!")),a.createElement("div",{className:"mb-4"},a.createElement("div",{className:"flex items-center space-x-2"},a.createElement("input",{type:"text",value:o,readOnly:!0,className:"flex-1 px-3 py-2 bg-slate-50 border border-slate-200 rounded-lg text-sm text-slate-900 font-mono"}),a.createElement("button",{onClick:k,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors text-sm font-medium whitespace-nowrap"},h?"Copied!":"Copy"))),a.createElement("div",{className:"grid grid-cols-2 gap-2 mb-4"},a.createElement("button",{onClick:w,className:"flex items-center justify-center space-x-2 px-3 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors text-sm font-medium"},a.createElement("svg",{className:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.149-.67.149-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414-.074-.123-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"})),a.createElement("span",null,"WhatsApp")),a.createElement("button",{onClick:C,className:"flex items-center justify-center space-x-2 px-3 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors text-sm font-medium"},a.createElement("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 4.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})),a.createElement("span",null,"Email"))),a.createElement("div",{className:"bg-gradient-to-r from-purple-50 to-blue-50 rounded-lg p-4"},a.createElement("h5",{className:"text-sm font-semibold text-slate-900 mb-2"},"What you can unlock:"),a.createElement("ul",{className:"space-y-1 text-xs text-slate-700"},a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Priority access to Zenith AI beta"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),E?"MENA region priority support":"Early feature access"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),E?"CEO demo with 5 referrals":"Team setup assistance")))),a.createElement("button",{onClick:e,className:"w-full mt-6 px-4 py-2 bg-slate-100 text-slate-700 rounded-lg hover:bg-slate-200 transition-colors text-sm font-medium"},g?"Maybe Later":"Close"))))):null}const Ro=[{code:"AE",name:"United Arab Emirates",dialCode:"+971",flag:"ð¦ðª"},{code:"SA",name:"Saudi Arabia",dialCode:"+966",flag:"ð¸ð¦"},{code:"EG",name:"Egypt",dialCode:"+20",flag:"ðªð¬"},{code:"JO",name:"Jordan",dialCode:"+962",flag:"ð¯ð´"},{code:"QA",name:"Qatar",dialCode:"+974",flag:"ð¶ð¦"},{code:"BH",name:"Bahrain",dialCode:"+973",flag:"ð§ð"},{code:"KW",name:"Kuwait",dialCode:"+965",flag:"ð°ð¼"},{code:"OM",name:"Oman",dialCode:"+968",flag:"ð´ð²"},{code:"LB",name:"Lebanon",dialCode:"+961",flag:"ð±ð§"},{code:"IQ",name:"Iraq",dialCode:"+964",flag:"ð®ð¶"},{code:"US",name:"United States",dialCode:"+1",flag:"ðºð¸"},{code:"GB",name:"United Kingdom",dialCode:"+44",flag:"ð¬ð§"},{code:"CA",name:"Canada",dialCode:"+1",flag:"ð¨ð¦"},{code:"AU",name:"Australia",dialCode:"+61",flag:"ð¦ðº"},{code:"IN",name:"India",dialCode:"+91",flag:"ð®ð³"},{code:"PK",name:"Pakistan",dialCode:"+92",flag:"ðµð°"}];function Ju({className:t,buttonText:e="Join Waitlist",buttonVariant:r="default",buttonSize:n="lg",externalEmail:s,isOpen:o,onClose:c,showTrigger:d=!1}){const[m,h]=x.useState(!1),p=o!==void 0?o:m,g=c||h,[v,E]=x.useState(!1),[N,k]=x.useState(!1),[w,C]=x.useState(!1),_=Yu(),[T,A]=x.useState(null),[I,M]=x.useState(null),[D,$]=x.use
847State(null),[j,B]=x.useState(null),[ee,te]=x.useState(!1),[ne,Z]=x.useState({email:s||"",fullName:"",company:"",country:"",phone:""}),[ae,ke]=x.useState({});x.useEffect(()=>{const J=pn();if(M(J),J.isMENA){const me=Ro.find(ye=>ye.code===J.code.toUpperCase().replace("-AR","").replace("-EN",""));me&&Z(ye=>({...ye,country:me.code}))}},[]),x.useEffect(()=>{if(I?.isMENA&&p){const J=new ZO(I.code);return J.initialize().then(()=>{J.setOnUpdateCallback(me=>{B(me)}),B(QO(I.code)),J.startRealTimeUpdates()}),$(J),()=>{J.destroy()}}},[I,p]),x.useEffect(()=>{if(typeof window<"u"){const J=gn.extractReferralCode();J&&XO(J)}},[]);const se=J=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(J),V=(J,me)=>{if(!I?.isMENA||!me)return!0;const ye=Ro.find(Ye=>Ye.code===me);if(!ye)return!1;let ve=J.replace(/\D/g,"");const $e=ye.dialCode.replace(/\D/g,"");switch(ve.startsWith($e)&&(ve=ve.substring($e.length)),ve=ve.replace(/^0+/,""),me){case"AE":return/^5[024568]\d{7}$/.test(ve)||/^[2-68]\d{6,7}$/.test(ve);case"SA":return/^5[0-9]\d{7}$/.test(ve)||/^[1-9]\d{6,7}$/.test(ve);case"QA":return/^[3-9]\d{7}$/.test(ve);case"BH":return/^[1-9]\d{7}$/.test(ve);case"KW":return/^[1-9]\d{7}$/.test(ve);case"OM":return/^[1-9]\d{7}$/.test(ve);case"EG":return/^1[0-2]\d{8}$/.test(ve)||/^[2-9]\d{7,8}$/.test(ve);case"JO":return/^7[0-9]\d{7}$/.test(ve)||/^[2-8]\d{6,7}$/.test(ve);case"LB":return/^[3-9]\d{7}$/.test(ve)||/^[1-9]\d{6}$/.test(ve);case"IQ":return/^7[0-9]\d{8}$/.test(ve)||/^[1-9]\d{7,8}$/.test(ve);default:return ve.length>=7&&ve.length<=15}},re=J=>{ae[J]&&ke(me=>({...me,[J]:void 0}))},K=()=>{const J={};return ne.email?se(ne.email)||(J.email="Please enter a valid email address"):J.email="Email is required",I?.isMENA&&(ne.fullName?.trim()||(J.fullName="Full name is required"),ne.company?.trim()||(J.company="Company is required"),ne.country||(J.country="Please select your country"),ne.phone?.trim()?V(ne.phone,ne.country)||(J.phone="Please enter a valid phone number"):J.phone="Phone number is required"),ke(J),Object.keys(J).length===0},R=async J=>{if(J.preventDefault(),!v&&K()){E(!0),A(null),C(!1);try{if(!Nu()||Ei()){A("Service configuration error. Please contact support if this persists."),console.error("Form submission attempted with invalid Supabase configuration:",{isConfigured:Nu(),isMockClient:Ei(),url:!0,hasKey:!0});return}{const Ue=await Hw();if(!Ue.connected){A("Service temporarily unavailable. Please try again later."),console.error("Supabase connection failed:",Ue.error);return}}const{data:me,error:ye}=await et.from("waitlist_entries").select("email").eq("email",ne.email).limit(1);if(ye){console.error("Error checking waitlist:",ye),ye.code==="MOCK_CLIENT"?A("Service configuration error. Please contact support."):ye.code==="PGRST301"?A("Database connection error. Please refresh and try again."):ye.message.includes("Invalid API key")||ye.code==="401"?(A("Authentication error. Please refresh the page and try again."),console.error("Invalid API key detected:",{code:ye.code,message:ye.message})):ye.code==="PGRST204"||ye.message.includes("column")?(console.error("Database schema error:",ye),A("Service temporarily unavailable. Please try again later.")):A(`Failed to submit: ${ye.message}. Please try again.`);return}if(me&&Array.isArray(me)&&me.length>0){console.log("Email already exists in waitlist, sending reminder email"),C(!0);const{success:Ue,error:At}=await su(ne.email,!0);Ue||console.error("Error sending reminder email:",At),k(!0);return}const $e={email:ne.email,region:I?.code||"global",created_at:new Date().toISOString()};I?.isMENA&&($e.full_name=ne.fullName,$e.company=ne.company,$e.country=ne.country,$e.phone=ne.phone);const{error:Ye}=await et.from("waitlist_entries").insert([$e]);if(Ye){if(console.error("Error submitting to waitlist:",Ye),Ye.code==="MOCK_CLIENT")A("Service configuration error. Please contact support.");else if(Ye.message.includes("Invalid API key")||Ye.code==="401")A("Authentication error. Please refresh the page and try again.");else if(Ye.code==="42501"||Ye.message.includes("permission denied"))console.error("RLS policy error - anonymous users may not have INSERT permission:",Ye),A("Service temporarily unavailable. Please try again later.");else if(Ye.code==="23505"){console.log("Email already exists (duplicate constraint)"),C(!0);const{success:Ue,error:At}=await su(ne.email,!0);Ue||console.error("Error sending reminder email:",At),k(!0);return}else A(`Failed to submit: ${Ye.message}. Please try again.`);return}D&&D.updateSignupCount(D.getProgress().current+1),console.log("Sending waitlist confirmation email to:",ne.email);const{success:Be,error:Le}=await su(ne.email);Be||console.error("Error sending confirmation email:",Le);let Je=null;try{Je=await e3(ne.email),Je?.success&&console.log("Referral processed:",Je)}catch(Ue){console.warn("Referral processing failed (continuing):",Ue)}Ne(GO.PROGRAM_SIGNUP,{region:I?.code||"global",country:ne.country,isMENA:I?.isMENA||!1,event_category:"early_adopter",form_type:"mena",user_type:w?"existing":"new",formType:I?.isMENA?"enhanced":"simple",referral_code:Je?.referrerCode||null,timestamp:Date.now()}),k(!0)}catch(me){console.error("Error submitting to waitlist:",me),A("An unexpected error occurred. Please try again.")}finally{E(!1)}}},W=()=>{g(!1),k(!1),C(!1),A(null),ke({}),s||Z(J=>({...J,email:""}))},we=I?.isMENA,xe=I?.language==="ar",_e=D?.shouldShowUrgency()||!1;return a.createElement(a.Fragment,null,a.createElement(Ii,{open:p,onOpenChange:g},d&&a.createElement(ce,{variant:r,size:n,className:t,onClick:()=>g(!0),"data-testid":"waitlist-trigger-button"},e),a.createElement(is,{"data-testid":"waitlist-modal",className:`sm:max-w-[95vw] md:max-w-[500px] ${xe?"rtl":"ltr"}`},N?a.createElement("div",{className:"text-center py-8 bg-gradient-to-br from-purple-50 to-blue-50 dark:from-purple-900/20 dark:to-blue-900/20 -m-6 rounded-lg"},a.createElement("div",{className:"w-16 h-16 rounded-full bg-gradient-to-r from-purple-600 to-blue-600 mx-auto mb-4 flex items-center justify-center shadow-lg"}
847,a.createElement("svg",{className:"w-8 h-8 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))),a.createElement(Hr,{className:"mb-2 text-lg font-semibold bg-gradient-to-r from-purple-600 to-blue-600 bg-clip-text text-transparent"},w?`Welcome Back, ${_.primaryCTA}!`:_.headline),a.createElement(Gr,{className:"text-slate-600 dark:text-slate-300 mt-3"},a.createElement("div",{className:"space-y-2"},a.createElement("p",null,_.description),a.createElement("p",{className:"text-purple-600 dark:text-purple-400 font-medium"},_.exclusivity))),a.createElement("div",{className:"mt-6 space-y-3"},a.createElement(ce,{onClick:()=>te(!0),className:"w-full bg-gradient-to-r from-purple-600 to-blue-600 hover:from-purple-700 hover:to-blue-700 text-white font-medium shadow-lg"},"ð ",_.primaryCTA," - Share with Your Network"),a.createElement(ce,{variant:"outline",onClick:W,className:"w-full"},Zt("waitlist.close",I?.code||"global")))):a.createElement(a.Fragment,null,a.createElement(Pi,null,a.createElement(Hr,{className:"text-slate-900 dark:text-white"},Zt("waitlist.title",I?.code||"global")),a.createElement(Gr,{className:"text-slate-600 dark:text-slate-300"},Zt("waitlist.subtitle",I?.code||"global")),we&&_e&&j&&a.createElement("div",{className:"mt-4 space-y-2"},j.countdown.isActive&&a.createElement("div",{className:"text-sm font-medium text-purple-600 dark:text-purple-400"},j.countdown.message),a.createElement("div",{className:`text-sm ${j.scarcity.isHighUrgency?"text-red-600 dark:text-red-400 font-bold":"text-slate-600 dark:text-slate-400"}`},j.scarcity.message),a.createElement("div",{className:"w-full bg-slate-200 dark:bg-slate-700 rounded-full h-2"},a.createElement("div",{className:"bg-purple-600 h-2 rounded-full transition-all duration-300",style:{width:`${j.progress.percentage}%`}})))),a.createElement("form",{onSubmit:R,noValidate:!0,className:"space-y-4 mt-4"},T&&a.createElement("div",{className:"p-3 text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 rounded-md"},T),we?a.createElement(a.Fragment,null,a.createElement("div",null,a.createElement("label",{htmlFor:"fullName",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},Zt("waitlist.form.fullName",I.code)),a.createElement("input",{type:"text",id:"fullName",value:ne.fullName,onChange:J=>{Z(me=>({...me,fullName:J.target.value})),re("fullName")},placeholder:Zt("waitlist.form.fullName.placeholder",I.code),className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"}),ae.fullName&&a.createElement("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400"},ae.fullName)),a.createElement("div",null,a.createElement("label",{htmlFor:"company",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},Zt("waitlist.form.company",I.code)),a.createElement("input",{type:"text",id:"company",value:ne.company,onChange:J=>{Z(me=>({...me,company:J.target.value})),re("company")},placeholder:Zt("waitlist.form.company.placeholder",I.code),className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"}),ae.company&&a.createElement("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400"},ae.company)),a.createElement("div",null,a.createElement("label",{htmlFor:"country",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},Zt("waitlist.form.country",I.code)),a.createElement("select",{id:"country",value:ne.country,onChange:J=>{Z(me=>({...me,country:J.target.value})),re("country")},className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"},a.createElement("option",{value:""},Zt("waitlist.form.country.select",I.code)),Ro.map(J=>a.createElement("option",{key:J.code,value:J.code},J.flag," ",J.name))),ae.country&&a.createElement("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400"},ae.country)),a.createElement("div",null,a.createElement("label",{htmlFor:"phone",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},Zt("waitlist.form.phone",I.code)),a.createElement("div",{className:"flex gap-2"},ne.country&&a.createElement("div",{className:"px-3 py-2 bg-slate-100 dar
847k:bg-slate-700 rounded-md border border-slate-300 dark:border-slate-600"},Ro.find(J=>J.code===ne.country)?.flag," "," ",Ro.find(J=>J.code===ne.country)?.dialCode),a.createElement("input",{type:"tel",id:"phone",value:ne.phone,onChange:J=>{Z(me=>({...me,phone:J.target.value})),re("phone")},placeholder:"e.g., 50 123 4567",autoComplete:"tel",className:`flex-1 px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 848 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent 849 dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500`})),ae.phone&&a.createElement("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400"},ae.phone))):null,a.createElement("div",null,a.createElement("label",{htmlFor:"email",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},Zt("waitlist.form.email",I?.code||"global")),a.createElement("input",{type:"email",id:"email",value:ne.email,onChange:J=>{Z(me=>({...me,email:J.target.value})),re("email")},placeholder:Zt("waitlist.form.email.placeholder",I?.code||"global"),required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"}),ae.email&&a.createElement("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400"},ae.email)),a.createElement("div",{className:"flex justify-end"},a.createElement(ce,{type:"submit",disabled:v,className:"w-full sm:w-auto"},Zt(v?"waitlist.form.submitting":"waitlist.form.submit",I?.code||"global"))))))),a.createElement(r3,{isOpen:ee,onClose:()=>te(!1),email:ne.email,region:I||void 0,showReferralPrompt:!w}))}const Js=(t,e)=>{try{t()}catch{}},Do={direct:{id:"direct",title:"AI Workplace Automation",subtitle:"",lines:1,words:3},benefit_led:{id:"benefit_led",title:"AI-powered teamwork that saves 20+ hours weekly",subtitle:"",lines:1,words:7},simple_direct:{id:"simple_direct",title:"Automate team workflows with AI",subtitle:"",lines:1,words:5},aspirational:{id:"aspirational",title:"Where great teams work smarter",subtitle:"",lines:1,words:5},problem_solution:{id:"problem_solution",title:"Stop managing tasks. Start achieving goals.",subtitle:"",lines:2,words:7}},n3=()=>{const t=x.useRef({maxScrollDepth:0,startTime:Date.now(),lastScrollTime:Date.now(),hasTrackedBelowFold:!1}),[e,r]=x.useState(!1),s=(()=>{try{const m="zenith_hero_title_variant",h=sessionStorage.getItem(m);if(h){const w=JSON.parse(h);if(w in Do)return Do[w]}const p=w=>{let C=0;for(let _=0;_<w.length;_++){const T=w.charCodeAt(_);C=(C<<5)-C+T,C=C&C}return Math.abs(C)},g=`${navigator.userAgent}-${Date.now()}`,v=p(g),E=Object.keys(Do),N=v%E.length,k=E[N];return sessionStorage.setItem(m,JSON.stringify(k)),Do[k]}catch{return Do.direct}})();x.useEffect(()=>{Js(()=>{const m=()=>{try{const p=window.innerWidth;return p<768?"mobile":p<1024?"tablet":"desktop"}catch{return"desktop"}},h=()=>{try{return Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}catch{return 0}};Kw({title_variant:s.id,title_lines:s.lines,title_words:s.words,has_dual_cta:!1,urgency_badge_visible:!0,device_type:m(),viewport_height:h()}),au({action:"view",badge_text:"Limited to 100 founding companies",title_variant:s.id})})},[s]),x.useEffect(()=>{const m=()=>{Js(()=>{try{const v=Date.now(),E=window.scrollY,N=window.innerHeight,k=document.documentElement.scrollHeight,w=Math.min(Math.max(0,E/Math.max(1,k-N)*100),100);w>t.current.maxScrollDepth&&(t.current.maxScrollDepth=w),!t.current.hasTrackedBelowFold&&w>=100&&(t.current.hasTrackedBelowFold=!0,Mh({max_scroll_percentage:w,time_to_scroll:v-t.current.startTime,time_in_section:v-t.current.startTime,title_variant:s.id})),t.current.lastScrollTime=v}catch{}})},h=()=>{Js(()=>{const E=Date.now()-t.current.startTime;Mh({max_scroll_percentage:t.current.maxScrollDepth,time_to_scroll:0,time_in_section:E,title_variant:s.id})})};let p;const g=()=>{p||(p=setTimeout(()=>{m(),p=null},500))};try{window.addEventListener("scroll",g,{passive:!0}),window.addEventListener("beforeunload",h)}catch{}return()=>{try{window.removeEventListener("scroll",g),window.removeEventListener("beforeunload",h),p&&clearTimeout(p)}catch{}}},[s]);const o=()=>{e||(r(!0),Js(()=>{au({action:"hover",badge_text:"Limited to 100 founding companies",title_variant:s.id,time_to_interaction:Date.now()-t.current.startTime})}))},c=()=>{Js(()=>{au({action:"click",badge_text:"Limited to 100 founding companies",title_variant:s.id,time_to_interaction:Date.now()-t.current.startTime})})},d=m=>{Js(()=>{Qw(m,s.id,{cta_type:m,time_to_conversion:Date.now()-t.current.startTime,max_scroll_depth:t.current.maxScrollDepth})})};return{variant:s,titleText:s.title,subtitleText:s.subtitle,testId:"ab_hero_title_variant",trackUrgencyBadgeHover:o,trackUrgencyBadgeClick:c,trackCTAConversion:d}};function a3(){const[t,e]=x.useState(!1),[r,n]=x.useState(!1),[s,o]=x.useState(!1),c="https://www.loom.com/embed/fdbaf3dfe8fd46748f276a8294d03083?autoplay=1",d=n3(),m=()=>{d.trackCTAConversion("early_access_application"),o(!0)};return a.createElement("section",{className:"relative min-h-[85vh] flex items-center bg-white dark:bg-slate-900 pt-16"},a.createElement("div",{className:"absolute inset-0 overflow-hidden"},a.createElement("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0zNiAxOGMzLjMxIDAgNiAyLjY5IDYgNnMtMi42OSA2LTYgNi02LTIuNjktNi02IDIuNjktNiA2LTZ6IiBzdHJva2U9IiM2MzY2RjExQSIgc3Ryb2tlLXdpZHRoPSIyIi8+PC9nPjwvc3ZnPg==')] opacity-20 dark:opacity-10"}),a.createElement("div",{className:"absolute inset-0 bg-gradient-to-r from-primary/5 to-secondary/5 dark:from-primary/10 dark:to-secondary/10"})),a.createElement("div",{className:"container relative mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center"},a.createElement("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-gradient-to-r from-amber-600 to-orange-600 border border-amber-400/50 shadow-lg shadow-amber-500/25 mb-4 cursor-pointer hover:from-amber-500 hover:to-orange-500 hover:shadow-amber-400/40 transition-all duration-200 relative overflow-hidden",onMouseEnter:d.trackUrgencyBadgeHover,onClick:d.trackUrgencyBadgeClick},a.createElement("div",{className:"absolute inset-0 bg-gradient-to-r from-amber-400/20 to-orange-400/20"}),a.createElement(vi,{className:"w-4 h-4 text-white relative z-10 drop-shadow-sm"}),a.createElement("span",{className:"text-sm font-semibold text-white relative z-10 drop-shadow-sm"},"Limited to 100 founding companies")),a.createElement("h1",{className:"text-4xl md:text-6xl lg:text-7xl font-bold text-slate-900 dark:text-white mb-6 leading-tight"},a.createElement("span",{className:"bg-clip-text text-transparent bg-gradient-to-r from-primary via-primary-light to-secondary"},d.titleText),d.subtitleText&&a.createElement(a.Fragment,null,a.createElement("br",null),a.createElement("span",{className:"text-slate-900 dark:text-white"},d.subtitleText))),a.createElement("p",{className:"text-xl md:text-2xl text-slate-600 dar
849k:text-slate-300 mb-8 max-w-2xl mx-auto"},"Intelligent collaboration that works where you already work"),a.createElement("div",{className:"flex flex-col sm:flex-row justify-center items-center gap-8 mb-12"},a.createElement("div",{className:"flex items-center gap-3 px-6 py-3 rounded-lg bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700"},a.createElement(Dr,{className:"w-5 h-5 text-primary"}),a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-lg font-bold text-primary dark:text-primary-light"},"20+"),a.createElement("div",{className:"text-xs text-slate-600 dark:text-slate-400"},"Hours Saved Weekly"))),a.createElement("div",{className:"flex items-center gap-3 px-6 py-3 rounded-lg bg-slate-50 dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700"},a.createElement(vr,{className:"w-5 h-5 text-primary"}),a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-lg font-bold text-primary dark:text-primary-light"},"5min"),a.createElement("div",{className:"text-xs text-slate-600 dark:text-slate-400"}
849,"Setup Time")))),a.createElement("div",{className:"flex flex-col items-center gap-4"},a.createElement(ce,{onClick:m,size:"lg",className:"px-12 py-6 text-lg font-semibold shadow-xl hover:shadow-2xl transform hover:scale-105 transition-all duration-200"},"Apply for Early Access",a.createElement(Rr,{className:"ml-2 h-5 w-5"}))),a.createElement("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-4"},"⨠Slack integration live ⢠Free for up to 100 tasks/month ⢠No credit card required"),a.createElement("button",{onClick:()=>{d.trackCTAConversion("slack_demo"),n(!0)},className:"text-sm text-slate-600 dark:text-slate-400 hover:text-primary dark:hover:text-primary transition-colors inline-flex items-center gap-1 group"},a.createElement(yw,{className:"w-4 h-4 group-hover:text-primary transition-colors"}),"See how it works in Slack",a.createElement(Rr,{className:"w-3 h-3 opacity-0 group-hover:opacity-100 transition-all duration-200 -ml-1 group-hover:ml-0"})),a.createElement("div",{className:"mt-16 pt-8 border-t border-slate-200 dark:border-slate-800"},a.createElement("p",{className:"text-xs uppercase tracking-wider text-slate-500 dark:text-slate-400 mb-6"},"Works with your favorite platforms"),a.createElement("div",{className:"flex items-center justify-center gap-8 opacity-60"},a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-3xl mb-2"},"ð¬"),a.createElement("p",{className:"text-xs text-slate-600 dark:text-slate-400"},"Slack"),a.createElement("p",{className:"text-xs text-green-600 dark:text-green-400 font-medium"},"Available")),a.createElement("div",{className:"text-center opacity-50"},a.createElement("div",{className:"text-3xl mb-2"},"ð¥"),a.createElement("p",{className:"text-xs text-slate-600 dark:text-slate-400"},"Teams"),a.createElement("p",{className:"text-xs text-slate-500 dark:text-slate-500"},"Q2 2025")),a.createElement("div",{className:"text-center opacity-50"},a.createElement("div",{className:"text-3xl mb-2"},"ð§"),a.createElement("p",{className:"text-xs text-slate-600 dark:text-slate-400"},"Email"),a.createElement("p",{className:"text-xs text-slate-500 dark:text-slate-500"},"Q3 2025")),a.createElement("div",{className:"text-center opacity-50"},a.createElement("div",{className:"text-3xl mb-2"},"ð"),a.createElement("p",{className:"text-xs text-slate-600 dark:text-slate-400"},"WhatsApp"),a.createElement("p",{className:"text-xs text-slate-500 dark:text-slate-500"},"Q4 2025"))),a.createElement("div",{className:"text-center mt-6"},a.createElement(Tt,{to:"/slack/install",className:"text-sm text-slate-600 dark:text-slate-400 hover:text-primary dark:hover:text-primary transition-colors inline-flex items-center gap-1"},"Explore Slack integration in detail",a.createElement(Rr,{className:"w-3 h-3"})))))),a.createElement(jO,{isOpen:t,onClose:()=>e(!1)}),s&&a.createElement(Ju,{isOpen:s,onClose:()=>o(!1)}),r&&a.createElement("div",{className:"fixed inset-0 bg-black/80 z-50 flex items-center justify-center p-4",onClick:()=>n(!1)},a.createElement("div",{className:"relative w-full max-w-4xl rounded-lg overflow-hidden",onClick:h=>h.stopPropagation()},a.createElement("button",{onClick:()=>n(!1),className:"absolute top-4 right-4 z-10 w-10 h-10 bg-white/10 hover:bg-white/20 rounded-full flex items-center justify-center text-white transition-colors"},"Ã"),a.createElement("div",{className:"relative pt-[56.25%]"},a.createElement("iframe",{className:"absolute inset-0 w-full h-full",src:c,title:"Zenith Product Demo",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})))))}function fa(){return fa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fa.apply(null,arguments)}const Ce=x.forwardRef(({className:t,...e},r)=>x.createElement("div",fa({ref:r,className:Oe("rounded-lg border border-slate-200 bg-white text-slate-950 shadow-sm dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",t)},e)));
849Ce.displayName="Card";const ct=x.forwardRef(({className:t,...e},r)=>x.createElement("div",fa({ref:r,className:Oe("flex flex-col space-y-1.5 p-6",t)},e)));ct.displayName="CardHeader";const pt=x.forwardRef(({className:t,...e},r)=>x.createElement("h3",fa({ref:r,className:Oe("text-2xl font-semibold leading-none tracking-tight",t)},e)));pt.displayName="CardTitle";const fi=x.forwardRef(({className:t,...e},r)=>x.createElement("p",fa({ref:r,className:Oe("text-sm text-slate-500 dark:text-slate-400",t)},e)));fi.displayName="CardDescription";const Ve=x.forwardRef(({className:t,...e},r)=>x.createElement("div",fa({ref:r,className:Oe("p-6 pt-0",t)},e)));Ve.displayName="CardContent";const s3=x.forwardRef(({className:t,...e},r)=>x.createElement("div",fa({ref:r,className:Oe("flex items-center p-6 pt-0",t)},e)));s3.displayName="CardFooter";const i3=[{title:"Automatic task extraction",description:"AI identifies action items from conversations across all platforms - starting with Slack, expanding to Teams and email",icon:dI},{title:"Universal search",description:"Find any message, task, or decision across all your communication channels in one place",icon:sl},{title:"Smart conversation summaries",description:"Get AI-powered summaries of lengthy discussions with key decisions highlighted, regardless of platform",icon:gI},{title:"Cross-platform context",description:"Maintain conversation context even when team discussions span multiple communication tools",icon:or},{title:"Works with your workflow",description:"Seamlessly integrates with the tools you already use - no workflow changes required",icon:vr},{title:"Enterprise-grade security",description:"Bank-level encryption and compliance that works across all integrated platforms",icon:Mr}];function o3(){return a.createElement("section",{id:"features",className:"py-12 bg-slate-50 dark:bg-slate-900 scroll-mt-16"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center mb-12"},a.createElement("h2",{className:"text-3xl font-bold mb-4"},a.createElement("span",{className:"bg-clip-text text-transparent bg-gradient-to-r from-primary via-primary-light to-secondary"},"Everything your team needs"),a.createElement("br",null),a.createElement("span",{className:"text-slate-900 dark:text-white"},"to stay organized, anywhere")),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-300"},"Zenith captures tasks, generates summaries, and makes everything searchable across all your communication platforms")),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-5xl mx-auto"},i3.map(t=>a.createElement(Ce,{key:t.title,className:"bg-white dark:bg-white/5 hover:bg-slate-50 dark:hover:bg-white/10 border-slate-200 dark:border-slate-700/50 hover:border-primary/50 dark:hover:border-primary/50 transition-all duration-300"},a.createElement(Ve,{className:"p-6"},a.createElement("div",{className:"w-12 h-12 rounded-full bg-primary/10 dark:bg-primary/20 flex items-center justify-center mb-4"},a.createElement(t.icon,{className:"h-6 w-6 text-primary dark:text-primary-light"})),a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-2"},t.title),a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},t.description)))))))}function l3(){return a.createElement("section",{id:"video",className:"py-24 bg-white dark:bg-slate-900 scroll-mt-16"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-5xl mx-auto"},a.createElement("div",{className:"text-center mb-12"},a.createElement("h2",{className:"text-3xl md:text-4xl font-bold text-slate-900 dark:text-white mb-4"},"See Zenith in Action"),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-300 max-w-2xl mx-auto"},"Watch how Zenith transforms your communication")),a.createElement("div",{className:"relative rounded-2xl p-1 bg-gradient-to-r from-primary via-primary-light to-secondary"},a.createElement("div",{className:"relative rounded-xl overflow-hidden bg-slate-100 dar
849k:bg-slate-900"},a.createElement("div",{className:"relative pt-[56.25%]"},a.createElement("iframe",{className:"absolute inset-0 w-full h-full",src:"https://www.youtube.com/embed/2hw0xl7GNt8",title:"Zenith Product Demo",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})))),a.createElement("div",{className:"mt-12 grid grid-cols-1 md:grid-cols-3 gap-8"},a.createElement("div",{className:"text-center"},a.createElement("div",{className:"w-12 h-12 bg-primary/10 dark:bg-primary/20 rounded-full flex items-center justify-center mx-auto mb-4"},a.createElement(yw,{className:"w-6 h-6 text-primary dark:text-primary-light"})),a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-2"},"Live Demo"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},"See real-time AI assistance in action")),a.createElement("div",{className:"text-center"},a.createElement("div",{className:"w-12 h-12 bg-primary/10 dark:bg-primary/20 rounded-full flex items-center justify-center mx-auto mb-4"},a.createElement("svg",{className:"w-6 h-6 text-primary dark:text-primary-light",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"}))),a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-2"},"Key Features"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},"Explore our powerful capabilities")),a.createElement("div",{className:"text-center"},a.createElement("div",{className:"w-12 h-12 bg-primary/10 dark:bg-primary/20 rounded-full flex items-center justify-center mx-auto mb-4"},a.createElement("svg",{className:"w-6 h-6 text-primary dark:text-primary-light",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"}))),a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-2"},"Quick Setup"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},"Get started in minutes"))))))}const Uf=[{id:"engineering-coordination",title:"Engineering Team Task Coordination",industry:"Technology",companySize:"medium",challenge:{problem:"Action items from standups, code reviews, and incident discussions get buried in Slack channels across engineering teams",painPoints:[`Commitments like "I'll fix that bug" lost in daily standup threads`,"Code review follow-ups scattered across multiple channels","Post-mortem action items not tracked across teams","Cross-team dependencies dropped between channel conversations"],impact:"30-40% of action items fall through the cracks, leading to delayed releases and increased rework"},solution:{approach:"AI-powered task extraction from Slack conversations with automatic assignment and deadline detection",features:["Automatic task extraction from engineering discussions","Owner detection from @mentions and conversation context","Deadline identification from language patterns","Task summaries posted back to channels for visibility","Cross-channel task search and tracking"],implementation:"Install Zenith Slack app, connect engineering channels, enable automatic task creation"},outcomes:{timeSaved:"5-10 hours per week per engineering manager",efficiencyGain:"40-50% reduction in dropped action items",errorReduction:"80% fewer missed commitments",roi:"Based on early access program feedback and industry research on task tracking efficiency"},metrics:{tasksPerMonth:200,timeSavedPerWeek:40,teamSize:25,implementationTime:"5-10 minutes"},testimonial:{quote:"We're currently working with our first customers as part of our Early Access Program. Join to provide feedback and shape the product.",role:"Early Access Program",company:"Apply Now"},featured:!0},{id:"product-workflows",title:"Cross-Functional Product Workflows",industry:"Product Management",companySize:"medium",challenge:{problem:"Product decisions, stakeholder feedback, and cross-functional handoffs fragmented across multiple Slack channels",painPoints:["Feature requests buried in #sales, #supp
849ort, and #product channels","Engineering handoffs missing requirements discussed in product threads","Decision tracking lost across multiple concurrent discussions","No shared view of cross-functional commitments and deadlines"],impact:"Cross-functional misalignment causes 25-30% rework on features and delayed roadmap execution"},solution:{approach:"AI extracts decisions and action items from product discussions with cross-channel search and conversation summaries",features:["Task extraction from product channel discussions","Cross-platform search across all product conversations","Automatic conversation summarization (after 50+ messages)","Decision tracking with searchable audit trail","Smart reminders for stakeholder follow-ups"],implementation:"Install Zenith, connect product and engineering channels, enable cross-channel search"},outcomes:{timeSaved:"6-8 hours per week per product manager",efficiencyGain:"35-45% improvement in cross-functional alignment",errorReduction:"70% fewer dropped handoffs",roi:"Based on beta user feedback on product workflow efficiency"},metrics:{tasksPerMonth:150,timeSavedPerWeek:35,teamSize:15,implementationTime:"5-10 minutes"},testimonial:{quote:"We're currently working with our first customers as part of our Early Access Program. Share your email to be among the first to provide feedback.",role:"Early Access Program",company:"Join the Program"},featured:!0},{id:"operations-coordination",title:"Cross-Departmental Operations Coordination",industry:"Operations",companySize:"medium",challenge:{problem:"Recurring tasks, process handoffs, and compliance reminders lost in conversation noise across operations teams",painPoints:["Process commitments made in channels without tracking","Cross-departmental handoffs not documented","Recurring operational tasks lack reminder systems",'No visibility into "who committed to what" across departments'],impact:"Operational inefficiencies cause 20-25% time spent on follow-ups and status checks"},solution:{approach:"AI extracts operational tasks with multi-channel tracking and reminder system",features:["Task extraction from operations channel conversations","Multi-channel task assignment and tracking","Recurring task reminders with deadline notifications","Cross-platform search for operational decisions","Task status updates and completion tracking"],implementation:"Install Zenith, connect operations channels, configure reminder preferences"},outcomes:{timeSaved:"4-6 hours per week per operations manager",efficiencyGain:"30-40% reduction in follow-up time",errorReduction:"75% fewer missed operational commitments",roi:"Based on industry research on operational workflow automation"},metrics:{tasksPerMonth:180,timeSavedPerWeek:25,teamSize:20,implementationTime:"5-15 minutes"},testimonial:{quote:"We're currently working with our first customers as part of our Early Access Program. Join to provide feedback and shape the product.",role:"Early Access Program",company:"Apply Now"},featured:!0},{id:"customer-triage",title:"Customer Issue Triage",industry:"Customer Service",companySize:"medium",challenge:{problem:"Customer issues and requests mentioned in Slack channels require manual tracking and prioritization",painPoints:["Customer questions buried in support channels","No system for prioritizing requests from conversations","Follow-up commitments not tracked automatically","Context switching between Slack and ticketing systems"],impact:"Response time variability and 15-20% requests lack proper tracking"},solution:{approach:"AI identifies customer issues in Slack with task creation and reminder system",features:["Customer request extraction from Slack conversations","Task prioritization based on conversation context","Automatic assignment to team members","Deadline reminders for follow-ups","Search across customer conversations for context"],implementation:"Install Zenith, connect customer-facing channels, enable task creation"},outcomes:{timeSaved:"3-5 hours per week per support lead",efficiencyGain:"25-35% improvement in request tracking",errorReduction:"60% fewer missed customer follow-ups",roi:"Based on early access program feedback on support workflow efficie
849ncy"},metrics:{tasksPerMonth:300,timeSavedPerWeek:20,teamSize:15,implementationTime:"5-10 minutes"},testimonial:{quote:"We're currently working with our first customers as part of our Early Access Program. Share your email to be among the first to provide feedback.",role:"Early Access Program",company:"Join the Program"}},{id:"marketing-campaigns",title:"Marketing Campaign Coordination",industry:"Marketing",companySize:"small",challenge:{problem:"Campaign tasks and deadlines scattered across marketing channels and stakeholder discussions",painPoints:["Campaign deliverables mentioned in #marketing without due dates","Content handoffs between design and marketing not tracked","Stakeholder feedback not captured systematically","No shared view of campaign commitments"],impact:"Campaign delays and 20-25% time spent on status meetings"},solution:{approach:"AI extracts campaign tasks with deadline detection and cross-channel coordination",features:["Campaign task extraction from marketing discussions","Deadline detection from conversation context","Stakeholder assignment based on mentions","Task reminders for campaign milestones","Search for campaign decisions and feedback"],implementation:"Install Zenith, connect marketing channels, enable deadline tracking"},outcomes:{timeSaved:"4-6 hours per week per marketing manager",efficiencyGain:"30-40% reduction in missed campaign deadlines",errorReduction:"65% fewer dropped campaign tasks",roi:"Based on industry research on marketing workflow efficiency"},metrics:{tasksPerMonth:100,timeSavedPerWeek:25,teamSize:8,implementationTime:"5-10 minutes"},testimonial:{quote:"We're currently working with our first customers as part of our Early Access Program. Join to provide feedback and shape the product.",role:"Early Access Program",company:"Apply Now"}},{id:"client-engagement",title:"Client Engagement Tracking",industry:"Professional Services",companySize:"small",challenge:{problem:"Client commitments and follow-ups mentioned in Slack channels without systematic tracking",painPoints:["Client deliverable promises not tracked automatically","Follow-up commitments across client channels lost","No clear view of client-related deadlines","Manual status checking time-consuming"],impact:"15-20% client commitments missed or delayed, impacting client satisfaction"},solution:{approach:"AI extracts client-related tasks with deadline tracking and reminder system",features:["Client commitment extraction from conversations","Deadline detection and reminder system","Client channel organization","Task status tracking across engagements","Search for client-related decisions"],implementation:"Install Zenith, connect client channels, enable task tracking"},outcomes:{timeSaved:"3-5 hours per week per consultant",efficie
849ncyGain:"35-45% reduction in missed client commitments",errorReduction:"70% fewer dropped client follow-ups",roi:"Based on early access program feedback on client workflow efficiency"},metrics:{tasksPerMonth:120,timeSavedPerWeek:20,teamSize:10,implementationTime:"5-10 minutes"},testimonial:{quote:"We're currently working with our first customers as part of our Early Access Program. Share your email to be among the first to provide feedback.",role:"Early Access Program",company:"Join the Program"}},{id:"academic-admin",title:"Academic Administration Coordination",industry:"Education",companySize:"enterprise",challenge:{problem:"Administrative tasks and committee decisions scattered across academic department channels",painPoints:["Faculty meeting action items not tracked systematically","Committee decisions lost in long conversations","Cross-departmental coordination lacks visibility","Recurring administrative tasks not automated"],impact:"25-30% administrative time spent on follow-up and status checking"},solution:{approach:"AI extracts administrative tasks with conversation summaries and task tracking",features:["Administrative task extraction from faculty discussions","Automatic conversation summarization for long threads","Committee decision tracking with search","Recurring task reminders for deadlines","Cross-department task visibility"],implementation:"Install Zenith, connect administrative channels, enable summarization"},outcomes:{timeSaved:"5-8 hours per week per administrator",efficiencyGain:"35-45% reduction in administrative follow-up",errorReduction:"75% fewer missed administrative deadlines",roi:"Based on industry research on administrative workflow efficiency"},metrics:{tasksPerMonth:250,timeSavedPerWeek:40,teamSize:50,implementationTime:"10-15 minutes"},testimonial:{quote:"We're currently working with our first customers as part of our Early Access Program. Share your email to be among the first to provide feedback.",role:"Early Access Program",company:"Join the Program"}},{id:"ecommerce-operations",title:"E-commerce Operations Workflows",industry:"Retail",companySize:"medium",challenge:{problem:"Operational tasks and process discussions fragmented across e-commerce team channels",painPoints:["Process commitments mentioned in operations channels not tracked","Cross-functional handoffs between teams not documented","No system for recurring operational task reminders","Operational decisions not searchable across channels"],impact:"20-25% operational time spent on status checks and manual tracking"},solution:{approach:"AI extracts operational tasks with cross-team visibility and reminder system",features:["Operational task extraction from team discussions","Cross-channel task assignment and tracking","Process decision tracking with search","Recurring task reminders for operations","Team-wide task visibility"],implementation:"Install Zenith, connect operations channels, enable task tracking"},outcomes:{timeSaved:"4-7 hours per week per operations manager",efficiencyGain:"30-40% reduction in missed operational tasks",errorReduction:"70% fewer dropped operational commitments",roi:"Based on industry research on e-commerce workflow efficiency"},metrics:{tasksPerMonth:200,timeSavedPerWeek:30,teamSize:20,implementationTime:"5-15 minutes"},testimonial:{quote:"We're currently working with our first customers as part of our Early Access Program. Share your email to be among the first to provide feedback.",role:"Early Access Program",company:"Apply Now"}}],c3=[{id:"all",name:"All Industries",icon:"ð"},{id:"technology",name:"Technology",icon:"ð»"},{id:"product-management",name:"Product Management",icon:"ð¯"},{id:"customer-service",name:"Customer Service",icon:"ð§"},{id:"marketing",name:"Marketing",icon:"ð¢"},{id:"professional-services",name:"Professional Services",icon:"ð¼"},{id:"education",name:"Education",icon:"ð"},{id:"retail",name:"Retail/E-commerce",icon:"ð"},{id:"operations",name:"Operations",icon:"âï¸"}],u3=[{id:"all",name:"All Sizes",range:"1-10,000+"},{id:"startup",name:"Startup",range:"1-10"},{id:"small",name:"Small",range:"11-50"},{id:"medium",name:"Medium",range:"51-500"},{id:"enterprise",name:"Enterprise",range:"500+"}];function d3(t,e,r){return t.filter(n=>{const s=e.toLowerCase().replace(/-/g," "),o=e==="all"||n.industry.toLowerCase().includes(s)||s.includes(n.industry.toLowerCase()),c=r==="all"||n.companySize===r;return o&&c})}function m3(t){return t.reduce((e,r)=>({totalTasksPerMonth:e.totalTasksPerMonth+r.metrics.tasksPerMonth,totalHoursSavedPerWeek:e.totalHoursSavedPerWeek+r.metrics.timeSavedPerWeek,totalTeamsImpacted:e.totalTeamsImpacted+r.metrics.teamSize}),{totalTasksPerMonth:0,totalHoursSavedPerWeek:0,totalTeamsImpacted:0})}function Vh(){return Vh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}
849).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vh.apply(null,arguments)}const f3=kp("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 dark:focus:ring-slate-300",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",destructive:"border-transparent bg-red-500 text-white hover:bg-red-500/80",outline:"text-slate-950 dark:text-slate-50",secondary:"border-transparent bg-slate-100 text-slate-900 hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80"}},defaultVariants:{variant:"default"}}),rs=x.forwardRef(({className:t,variant:e,...r},n)=>x.createElement("span",Vh({className:Oe(f3({variant:e}),t),ref:n},r)));rs.displayName="Badge";const h3=t=>({"ð»":a.createElement(vr,{className:"w-5 h-5"}),"ð¥":a.createElement(Mr,{className:"w-5 h-5"}),"ð§":a.createElement(or,{className:"w-5 h-5"}),"ð¢":a.createElement(Ip,{className:"w-5 h-5"}),"ð¼":a.createElement(cI,{className:"w-5 h-5"}),"ð":a.createElement(vI,{className:"w-5 h-5"}),"ð":a.createElement(_I,{className:"w-5 h-5"}),"ð¦":a.createElement(hI,{className:"w-5 h-5"}),"ð":a.createElement(sl,{className:"w-5 h-5"})})[t]||a.createElement(sl,{className:"w-5 h-5"});function p3({className:t="",featuredOnly:e=!1}){const[r,n]=x.useState("all"),[s,o]=x.useState("all"),[c,d]=x.useState(null),[m,h]=x.useState(!1),[p,g]=x.useState(null),v=x.useMemo(()=>{const A=e?Uf.filter(I=>I.featured):Uf;return d3(A,r,s)},[e,r,s]),E=x.useMemo(()=>m3(v),[v]),N=A=>{n(A),Ne("use_case_filter",{filter_type:"industry",filter_value:A})},k=A=>{o(A),Ne("use_case_filter",{filter_type:"company_size",filter_value:A})},w=(A,I,M)=>{g({id:A,industry:I,companySize:M}),Ne("use_case_cta_click",{use_case_id:A,industry:I,companySize:M}),Ne("waitlist_modal_open",{source:"use_case_learn_more",use_case_id:A,industry:I}),h(!0)},C=()=>{Ne("demo_cta_click",{source:"use_cases_section_bottom",section:"use_cases"}),Ne("waitlist_modal_open",{source:"use_cases_demo_cta",section:"use_cases_bottom"}),h(!0)},_=()=>{h(!1),g(null)},T=A=>{d(c===A?null:A)};return x.useEffect(()=>{Ne("use_cases_impression",{total_use_cases:Uf.length,filtered_count:v.length})},[]),a.createElement("section",{id:"use-cases","data-testid":"use-cases-section",className:`py-24 bg-white dark:bg-slate-900 scroll-mt-16 ${t}`},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-4xl mx-auto text-center mb-16"},a.createElement("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-slate-900 dark:text-white mb-4"},a.createElement("span",{className:"bg-clip-text text-transparent bg-gradient-to-r from-primary via-primary-light to-secondary"},"Real-World Applications"),a.createElement("br",null),a.createElement("span",{className:"text-slate-900 dark:text-white"},"Zenith in Action")),a.createElement("p",{className:"text-lg md:text-xl text-slate-600 dark:text-slate-300 max-w-3xl mx-auto"},"See how teams across industries leverage Zenith to transform their workflow and achieve measurable business results")),a.createElement("div",{className:"mb-12"},a.createElement("div",{className:"flex flex-wrap justify-center gap-3 mb-6"},a.createElement("span",{className:"text-sm font-medium text-slate-500 dark:text-slate-400 self-center mr-2"},"Industry:"),c3.map(A=>a.createElement(ce,{key:A.id,variant:r===A.id?"default":"outline",size:"sm",onClick:()=>N(A.id),className:` 850 flex items-center gap-2 851 ${r===A.id?"":"bg-slate-100 text-slate-700 border-slate-300 hover:bg-slate-200 hover:text-slate-900 dark:bg-slate-800 dark:text-slate-200 dark:border-slate-600 dark:hover:bg-slate-700 dark:hover:text-white"} 852 `},a.createElement("span",null,h3(A.icon)),A.name))),a.createElement("div",{className:"flex flex-wrap justify-center gap-3"},a.createElement("span",{className:"text-sm font-medium text-slate-500 dark:text-slate-400 self-center mr-2"},"Size:"),u3.map(A=>a.createElement(ce,{key:A.id,variant:s===A.id?"default":"outline",size:"sm",onClick:()=>k(A.id),className:` 853 ${s===A.id?"":"bg-slate-100 text-slate-700 border-slate-300 hover:bg-slate-200 hover:text-slate-900 dark:bg-slate-800 dark:text-slate-200 dark:border-slate-600 dar
853k:hover:bg-slate-700 dark:hover:text-white"} 854 `},A.name)))),v.length>0&&a.createElement("div",{className:"mb-12 text-center"},a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-300 mb-4"},"Showing ",a.createElement("span",{className:"font-semibold"},v.length)," use case",v.length!==1?"s":""),a.createElement("div",{className:"flex flex-wrap justify-center gap-8 text-sm"},a.createElement("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-400"},a.createElement(Dr,{className:"w-4 h-4"}),a.createElement("span",null,a.createElement("strong",null,E.totalHoursSavedPerWeek.toLocaleString())," hours/week saved")),a.createElement("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-400"},a.createElement(ma,{className:"w-4 h-4"}),a.createElement("span",null,a.createElement("strong",null,E.totalTasksPerMonth.toLocaleString())," tasks/month")),a.createElement("div",{className:"flex items-center gap-2 text-slate-600 dark:text-slate-400"},a.createElement(or,{className:"w-4 h-4"}),a.createElement("span",null,a.createElement("strong",null,E.totalTeamsImpacted.toLocaleString())," team members")))),a.createElement("div",{"data-testid":"use-cases-grid",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 max-w-7xl mx-auto"},v.map(A=>a.createElement("div",{key:A.id,className:` 855 relative bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 856 hover:border-primary/50 dark:hover:border-primary/50 transition-all duration-300 857 hover:shadow-lg hover:shadow-xl hover:-translate-y-1 858 ${A.featured?"ring-2 ring-primary/20 shadow-lg":""} 859 cursor-pointer 860 `,onClick:()=>T(A.id)},A.featured&&a.createElement("div",{className:"absolute -top-2 -right-2"},a.createElement(rs,{className:"bg-primary text-primary-foreground"},"Featured")),a.createElement("div",{className:"p-6"},a.createElement("div",{className:"flex items-start justify-between mb-4"},a.createElement("div",null,a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-1"},A.title),a.createElement("div",{className:"flex items-center gap-2 text-sm text-slate-500 dark:text-slate-400"},a.createElement("span",null,A.industry),a.createElement("span",null,"â¢"),a.createElement("span",{className:"capitalize"},A.companySize))),a.createElement("div",{className:"w-10 h-10 bg-primary/10 dark:bg-primary/20 rounded-lg flex items-center justify-center"},a.createElement(oI,{className:"w-5 h-5 text-primary"}))),a.createElement("div",{className:"mb-4"},a.createElement("h4",{className:"text-sm font-medium text-red-600 dark:text-red-400 mb-2"},"Challenge"),a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-300"},A.challenge.problem)),c===A.id&&a.createElement("div",{className:"mb-4 space-y-3"},a.createElement("div",null,a.createElement("h4",{className:"text-sm font-medium text-primary dark:text-primary-light mb-2"},"Solution"),a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-300"},A.solution.approach)),a.createElement("div",null,a.createElement("h5",{className:"text-xs font-medium text-slate-500 dark:text-slate-400 mb-2"},"Key Features"),a.createElement("ul",{className:"space-y-1"},A.solution.features.slice(0,3).map((I,M)=>a.createElement("li",{key:M,className:"flex items-start gap-2 text-xs text-slate-600 dark:text-slate-300"},a.createElement(qr,{className:"w-3 h-3 text-primary flex-shrink-0 mt-0.5"}),I))))),a.createElement("div",{className:"grid grid-cols-3 gap-3 mb-4 text-center"},a.createElement("div",null,a.createElement("div",{className:"text-lg font-bold text-slate-900 dark:text-white"},A.metrics.tasksPerMonth),a.createElement("div",{className:"text-xs text-slate-500 dark:text-slate-400"},"Tasks/month")),a.createElement("div",null,a.createElement("div",{className:"text-lg font-bold text-slate-900 dark:text-white"},A.metrics.timeSavedPerWeek),a.createElement("div",{className:"text-xs text-slate-500 dark:text-slate-400"},"Hours/week")),a.createElement("div",null,a.createElement("div",{className:"text-lg font-bold text-slate-900 dark:text-white"},A.metrics.teamSize),a.createElement("div",{className:"text-xs text-slate-500 dark:text-slate-400"},"Team size"))),a.createElement("div",{className:"border-t border-slate-200 dark:border-slate-700 pt-4"},a.createElement("div",{className:"grid grid-cols-1 gap-2 text-xs"},a.createElement("div",{className:"flex items-center gap-2"},a.createElement(Dr,{className:"w-3 h-3 text-green-600 dark:text-green-400"}
860),a.createElement("span",{className:"text-slate-600 dark:text-slate-300"},A.outcomes.timeSaved," saved")),a.createElement("div",{className:"flex items-center gap-2"},a.createElement(ma,{className:"w-3 h-3 text-blue-600 dark:text-blue-400"}),a.createElement("span",{className:"text-slate-600 dark:text-slate-300"},A.outcomes.efficiencyGain)),a.createElement("div",{className:"flex items-center gap-2"},a.createElement(qr,{className:"w-3 h-3 text-purple-600 dark:text-purple-400"}),a.createElement("span",{className:"text-slate-600 dark:text-slate-300"},A.outcomes.errorReduction)))),a.createElement("div",{className:"mt-4"},a.createElement(ce,{className:"w-full",onClick:I=>{I.stopPropagation(),w(A.id,A.industry,A.companySize)}},"Learn More",a.createElement(Rr,{className:"w-4 h-4 ml-2"}))))))),v.length===0&&a.createElement("div",{className:"text-center py-12"},a.createElement("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-slate-100 dark:bg-slate-800 rounded-full mb-4"},a.createElement(sl,{className:"w-8 h-8 text-slate-400"})),a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-2"},"No use cases found"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300 mb-4"},"Try adjusting your filters to see more use cases"),a.createElement(ce,{variant:"outline",onClick:()=>{n("all"),o("all")}},"Reset Filters")),a.createElement("div",{className:"mt-16 text-center"},a.createElement("h3",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-4"},"See Zenith in Your Context"),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-300 mb-8 max-w-2xl mx-auto"},"Every organization has unique workflows. Let us show you how Zenith can be configured for your specific needs and industry requirements."),a.createElement(ce,{size:"lg",className:"text-lg px-8",onClick:C},"Get Personalized Demo",a.createElement(Rr,{className:"w-5 h-5 ml-2"})),a.createElement("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-4"},"No credit card required ⢠15-minute personalized walkthrough")),a.createElement(Ju,{isOpen:m,onClose:_})))}function qh(){return qh=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},qh.apply(null,arguments)}const $o=x.forwardRef(({className:t,type:e,...r},n)=>x.createElement("input",qh({type:e,className:Oe("flex h-9 w-full rounded-md border border-slate-200 bg-white px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-slate-500 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-950 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50 dark:placeholder:text-slate-400 dark:focus-visible:ring-slate-300",t),ref:n},r)));$o.displayName="Input";const Db={technology:1.5,healthcare:1.8,"customer-service":1.6,marketing:1.4,"professional-services":1.5,education:1.3,retail:1.4,finance:1.7,default:1.3},g3={simple:{hours:2,hourlyRate:150},medium:{hours:4,hourlyRate:150},complex:{hours:8,hourlyRate:150}};function y3(t){return Db[t.toLowerCase()]||Db.default}function v3(t){const{teamSize:e,industry:r,currentToolHours:n}=t,s=y3(r),c=.3*s,d=Math.round(n*c*e),m=d*4.33,h=Math.round(m/8);return{hoursPerWeek:d,hoursPerMonth:m,daysPerMonth:h,multiplier:s}}function b3(t,e){const r=e/2080,n=Math.round(t.hoursPerMonth*r),s=n*12,o=Math.round(s/(t.hoursPerMonth/4.33/8/12)),c=10,d=c*3;return{monthlySavings:n,annualSavings:s,savingsPerEmployee:o,currentToolCost:d,zenithCost:c}}function E3(t,e){if(t<=0)return{months:0,days:0,isImmediate:!1};const r=t-e;if(r>=0)return{months:0,days:0,isImmediate:!0};const n=Math.ceil(Math.abs(e/r)),s=Math.ceil((n-Math.floor(n))*30);return{months:Math.floor(n),days:s,isImmediate:!1}}function x3(t){if(t.teamSize<=0||t.averageSalary<=0||t.currentToolHours<0||t.currentToolCost<0)throw new Error("Invalid input values: All values must be positive");const e=v3({teamSize:t.teamSize,industry:t.industry,currentToolHours:t.currentToolHours}),r=b3(e,t.averageSalary),n={percentageImprovement:Math.round(e.hoursPerWeek/(t.currentToolHours*t.teamSize)*100),tasksPerMonthIncrease:M
860ath.round(t.teamSize*50*e.multiplier),errorReduction:Math.round(85*e.multiplier)},s=g3[t.implementationComplexity],o=t.teamSize*s.hours,c=o*s.hourlyRate,d={estimatedHours:o,estimatedCost:c,timeToValue:t.implementationComplexity==="simple"?"1 day":t.implementationComplexity==="medium"?"1 week":"2 weeks"},m=t.teamSize*10,h=r.monthlySavings-m,p=h*12,g=E3(h,m),v={percentage:Math.round(p/c*100),paybackPeriod:g,threeYearValue:p*3};return{timeSavings:e,costSavings:r,efficiency:n,roi:v,implementation:d}}function w3({className:t=""}){const[e,r]=x.useState({teamSize:10,industry:"technology",averageSalary:75e3,currentToolHours:20,currentToolCost:30,implementationComplexity:"medium"}),[n,s]=x.useState(null),[o,c]=x.useState({}),[d,m]=x.useState(!1),[h,p]=x.useState(!1),[g,v]=x.useState(""),[E,N]=x.useState(!1),[k,w]=x.useState(null),[C,_]=x.useState(!1),T=[{value:"technology",label:"Technology"},{value:"healthcare",label:"Healthcare"},{value:"customer-service",label:"Customer Service"},{value:"marketing",label:"Marketing"},{value:"professional-services",label:"Professional Services"},{value:"education",label:"Education"},{value:"retail",label:"Retail/E-commerce"},{value:"finance",label:"Finance"}],A=x.useCallback((j,B)=>{r(ee=>({...ee,[j]:B})),c(ee=>({...ee,[j]:""})),Ne("roi_calculator_input",{field:j,value:B})},[]),I=x.useCallback(()=>{const j={};return!e.teamSize||e.teamSize<1?j.teamSize="Team size must be at least 1":e.teamSize>1e3&&(j.teamSize="Team size cannot exceed 1000"),(!e.averageSalary||e.averageSalary<=0)&&(j.averageSalary="Please enter a valid salary"),(!e.currentToolHours||e.currentToolHours<0)&&(j.currentToolHours="Hours must be a positive number"),c(j),Object.keys(j).length===0},[e]),M=x.useCallback(async()=>{if(I()){m(!0);try{Ne("roi_calculator_calculate",{inputs:e});const j=x3(e);s(j),setTimeout(()=>p(!0),500)}catch(j){console.error("Error calculating ROI:",j),c({general:"An error occurred while calculating your ROI. Please try again."})}finally{m(!1)}}},[e,I]),D=j=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(j),$=j=>`${Math.round(j).toLocaleString()} hours`;return a.createElement("section",{className:`py-16 bg-white dark:bg-slate-900 ${t}`},a.createElement("div",{className:"container mx-auto px-4"},a.createElement(Ce,{className:"max-w-4xl mx-auto"},a.createElement(ct,{className:"text-center"},a.createElement(pt,{className:"text-3xl font-bold text-slate-900 dark:text-white"},"Calculate Your ROI"),a.createElement("p",{className:"mt-4 text-lg text-slate-600 dark:text-slate-300"},"Discover how much time and money Zenith can save your team")),a.createElement(Ve,null,a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6"},a.createElement("div",{className:"space-y-2"},a.createElement("label",{htmlFor:"teamSize",className:"text-sm font-medium text-slate-700 dark:text-slate-300"},"Team Size"),a.createElement($o,{id:"teamSize",type:"number",min:"1",max:"1000",value:e.teamSize||"",onChange:j=>A("teamSize",parseInt(j.target.value)||0),className:o.teamSize?"border-red-500":"","aria-label":"Team Size"}),o.teamSize&&a.createElement("p",{className:"text-sm text-red-600"},o.teamSize)),a.createElement("div",{className:"space-y-2"},a.createElement("label",{htmlFor:"industry",className:"text-sm font-medium text-slate-700 dark:text-slate-300"},"Industry"),a.createElement("select",{id:"industry",value:e.industry,onChange:j=>A("industry",j.target.value),className:"w-full px-3 py-2 border border-slate-300 dark:border-slate-600 rounded-md bg-white dark:bg-slate-800 text-slate-900 dark:text-slate-100 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent","aria-label":"Industry"},a.createElement("option",{value:"",disabled:!0},"Select your industry"),T.map(j=>a.createElement("option",{key:j.value,value:j.value},j.label)))),a.createElement("div",{className:"space-y-2"},a.createElement("label",{htmlFor:"averageSalary",className:"text-sm font-medium text-slate-700 dark:text-slate-300"},"Average Salary (USD)"),a.createElement($o,{id:"averageSalary",type:"number",min:"1",value:e.averageSalary||"",onChange:j=>A("averageSalary",parseInt(j.target.value)||0),className:o.averageSalary?"border-red-500":"","aria-label":"Average Salary in USD"}),o.averageSalary&&a.createElement("p",{className:"text-sm text-red-600"},o.averageSalary)),a.createElement("div",{className:"space-y-2"},a.createElement("label",{htmlFor:"currentToolHours",className:"text-sm font-medium text-slate-700 dark:text-slate-300"},"Hours/Week on Task Management"),a.createElement($o,{id:"currentToolHours",type:"number",min:"0",max:"168",value:e.currentToolHours||"",onChange:j=>A("currentToolHours",parseInt(j.target.value)||0),className:o.currentToolHours?"border-red-500":"","aria-label":"Hours per week spent on task management"}),o.currentToolHours&&a.createElement("p",{className:"text-sm text-red-600"},o.currentToolHours))),a.createElement("div",{className:"mt-8 text-center"},a.createElement(ce,{onClick:M,disabled:d,size:"lg",className:"w-full md:w-auto px-8"},d?"Calculating...":"Calculate Your ROI")),o.general&&a.createElement("div",{className:"mt-4 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg"},a.createElement("p",{className:"text-red-600 dark:text-red-400"},o.general)),n&&!d&&a.createElement("div",{className:"mt-8 space-y-6"},a.createElement("h3",{className:"text-2xl font-bold text-center text-slate-900 dark:text-white"},"Your ROI Results"),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4"},a.createElement(Ce,null,a.createElement(Ve,{className:"p-6 text-center"},a.createElement("p",{className:"text-3xl font-bold text-primary"},$(n.timeSavings.hoursPerWeek)),a.createElement("p",{className:"text-sm text-slate-600 dar
860k:text-slate-400 mt-2"},"Hours Saved Per Week"))),a.createElement(Ce,null,a.createElement(Ve,{className:"p-6 text-center"},a.createElement("p",{className:"text-3xl font-bold text-green-600"},D(n.costSavings.monthlySavings)),a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-400 mt-2"},"Monthly Savings"))),a.createElement(Ce,null,a.createElement(Ve,{className:"p-6 text-center"},a.createElement("p",{className:"text-3xl font-bold text-purple-600"},n.roi.percentage,"%"),a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-400 mt-2"},"ROI in First Year")))),a.createElement(Ce,null,a.createElement(Ve,{className:"p-6"},a.createElement("h4",{className:"text-lg font-semibold mb-4 text-slate-900 dark:text-white"},"Detailed Breakdown"),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6"},a.createElement("div",null,a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-400"},"Annual Savings"),a.createElement("p",{className:"text-2xl font-bold text-green-600"},D(n.costSavings.annualSavings))),a.createElement("div",null,a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-400"},"Payback Period"),a.createElement("p",{className:"text-2xl font-bold text-blue-600"},n.roi.paybackPeriod.isImmediate?"Immediate":`${n.roi.paybackPeriod.months} months`)),a.createElement("div",null,a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-400"},"Efficiency Improvement"),a.createElement("p",{className:"text-2xl font-bold text-purple-600"},"+",n.efficiency.percentageImprovement,"%")),a.createElement("div",null,a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-400"},"3-Year Value"),a.createElement("p",{className:"text-2xl font-bold text-indigo-600"},D(n.roi.threeYearValue)))))),h&&a.createElement(Ce,{className:"bg-gradient-to-r from-primary/10 to-purple-600/10"},a.createElement(Ve,{className:"p-6 text-center"},a.createElement("h4",{className:"text-xl font-semibold mb-4 text-slate-900 dark:text-white"},"Get Your Full Report"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300 mb-6"},"Enter your email to receive a detailed ROI analysis and personalized implementation plan"),a.createElement("div",{className:"flex flex-col sm:flex-row gap-4 max-w-md mx-auto"},a.createElement($o,{type:"email",placeholder:"Enter your email",value:g,onChange:j=>v(j.target.value),className:"flex-1"}),a.createElement(ce,{onClick:async()=>{N(!0),w(null);const j=await sO(g,n,e);j.success?(_(!0),Ne("roi_calculator_email_sent",{email:g,results:JSON.stringify(n)})):(w(j.error?.message||"Failed to send report"),Ne("roi_calculator_email_error",{email:g,error:j.error})),N(!1)},disabled:!g||!g.includes("@")||E},E?"Sending...":C?"Report Sent!":"Send Report")),k&&a.createElement("div",{className:"mt-4 p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg"},a.createElement("p",{className:"text-sm text-red-600 dark:text-red-400"},k)))))))))}const k3=[{name:"Slack",description:"Seamlessly integrate with your Slack workspace",logo:"https://cdn.brandfolder.io/5H442O3W/at/pl546j-7le8zk-6gwiyo/Slack_Mark.svg",status:"available"},{name:"Microsoft Teams",description:"Connect directly with Microsoft Teams",logo:"https://upload.wikimedia.org/wikipedia/commons/c/c9/Microsoft_Office_Teams_%282018%E2%80%93present%29.svg",status:"coming-soon",releaseDate:"Q3 2025"},{name:"Gmail",description:"Seamless email integration",logo:"https://upload.wikimedia.org/wikipedia/commons/7/7e/Gmail_icon_%282020%29.svg",status:"coming-soon",releaseDate:"Q4 2025"},{name:"WhatsApp Business",description:"Enhance your business communication",logo:"https://upload.wikimedia.org/wikipedia/commons/6/6b/WhatsApp.svg",status:"coming-soon",releaseDate:"2026"},{name:"Discord",description:"Connect with your Discord communities",logo:"https://assets-global.website-files.com/6257adef93867e50d84d30e2/636e0a6a49cf127bf92de1e2_icon_clyde_blurple_RGB.png",status:"coming-soon",releaseDate:"2026"},{name:"Telegram",description:"Integrate with Telegram channels and groups",logo:"https://upload.wikimedia.org/wikipedia/commons/8/82/Telegram_logo.svg",status:"coming-soon",releaseDate:"2026"},{name:"Signal",description:"Secure messaging integration",logo:"https://upload.wikimedia.org/wikipedia/commons/8/8d/Signal-Logo.svg",status:"coming-soon",releaseDate:"2026"}];function N3(){return a.createElement("section",{id:"integrations",className:"py-24 bg-slate-50 dark:bg-slate-800/50 scroll-mt-16"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center mb-16"},a.createElement("h2",{className:"text-3xl font-heading font-bold text-slate-900 dark:text-white mb-4"},"Works Where You Work"),a.createElement("p",{className:"text-lg text-slate-600 dar
860k:text-slate-300"},"Integrate Zenith with your favorite platforms for a seamless experience")),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-8 max-w-7xl mx-auto"},k3.map(t=>a.createElement(Ce,{key:t.name,className:`overflow-hidden transition-all ${t.status==="available"?"dark:bg-green-900/20 dark:border-green-600 border-green-500 bg-green-50":"dark:bg-slate-800 dark:border-slate-700"}`},a.createElement("div",{className:"aspect-video w-full overflow-hidden bg-white dark:bg-slate-900 flex items-center justify-center p-8 relative"},a.createElement("div",{className:`absolute top-2 right-2 px-3 py-1 rounded-full text-xs font-semibold flex items-center gap-1 ${t.status==="available"?"bg-green-100 text-green-800 dark:bg-green-800 dark:text-green-100":"bg-yellow-100 text-yellow-800 dark:bg-yellow-800 dark:text-yellow-100"}`},t.status==="available"?a.createElement(a.Fragment,null,a.createElement(Za,{className:"h-3 w-3"}),"Available Now"):a.createElement(a.Fragment,null,a.createElement(Dr,{className:"h-3 w-3"}),"Coming Soon")),a.createElement("img",{src:t.logo,alt:`${t.name} logo`,className:"h-12 w-auto object-contain"})),a.createElement(ct,null,a.createElement(pt,{className:"text-slate-900 dark:text-white flex items-center justify-between"},t.name,t.releaseDate&&a.createElement("span",{className:"text-sm font-normal text-slate-500 dark:text-slate-400"},t.releaseDate))),a.createElement(Ve,null,a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},t.description,t.status==="available"&&a.createElement("span",{className:"block mt-2 text-green-600 dark:text-green-400 font-medium"},"â
Ready to use"))))))))}const S3=[{name:"Free Personal",price:"0",features:["5 tasks/month, single platform","7-day search history, basic text search"]},{name:"Personal Pro",price:"15",features:["50 tasks/month, 3 platforms","30-day history, cross-platform search"]},{name:"Business Starter",price:"15",period:"/user/month (min 5)",features:["100 tasks/user/month, 3 platforms","60-day history, team-wide search"]},{name:"Enterprise",price:"Custom",period:"(min 100)",features:["Custom deployment, API access","Advanced security, compliance tools"]}];function _3(){return a.createElement("section",{id:"pricing",className:"py-24 bg-gradient-to-b from-slate-50 to-white dark:from-slate-900 dark:to-slate-800"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center mb-16"},a.createElement("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white mb-4"},"Business Model")),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 max-w-7xl mx-auto"},S3.map(t=>a.createElement(Ce,{key:t.name,className:"relative bg-primary/5 border-primary/20 dark:bg-primary/10 dark:border-primary/30 flex flex-col"},a.createElement(ct,{className:"text-center pb-8 flex-grow"},a.createElement("div",{className:"w-16 h-16 bg-primary rounded-full mx-auto mb-4 flex items-center justify-center"},a.createElement(Za,{className:"h-8 w-8 text-white"})),a.createElement(pt,{className:"text-xl text-slate-900 dark:text-white mb-6"},t.name),a.createElement("div",{className:"flex items-baseline justify-center gap-1"},t.price==="Custom"?a.createElement("span",{className:"text-4xl font-bold text-primary"},t.price," Pricing"):a.createElement(a.Fragment,null,a.createElement("span",{className:"text-4xl font-bold text-primary"},"$",t.price),a.createElement("span",{className:"text-slate-600 dark:text-slate-400"},"/month"))),t.period&&a.createElement("div",{className:"text-sm text-slate-600 dark:text-slate-400 mt-1"},t.period)),a.createElement(Ve,{className:"flex flex-col h-full"},a.createElement("ul",{className:"space-y-4 mb-8 flex-grow"},t.features.map(e=>a.createElement("li",{key:e,className:"flex items-center gap-2"},a.createElement(Za,{className:"h-5 w-5 text-primary"}),a.createElement("span",{className:"text-slate-600 dark:text-slate-300"},e)))),a.createElement(ce,{className:"w-full mt-auto"},"Get Started")))))))}const C3=[{title:"The Future of AI-Powered Communication",excerpt:"Discover how AI is transforming the way teams communicate and collaborate.",image:"https://images.unsplash.com/photo-1522071820081-009f0129c71c?auto=format&fit=crop&w=800",date:"Mar 15, 2024",readTime:"5 min read"},{title:"Maximizing Productivity with Smart Task Management",excerpt:"Learn how to leverage AI to automatically extract and manage tasks from conversations.",image:"https://images.unsplash.com/photo-1553877522-43269d4ea984?auto=format&fit=crop&w=800",date:"Mar 10, 2024",readTime:"4 min read"},{title:"Building Better Team Communication",excerpt:"Best practices for implementing AI tools in your team's communication workflow.",image:"https://images.unsplash.com/photo-1600880292203-757bb62b4baf?auto=format&fit=crop&w=800",date:"Mar 5, 2024",readTime:"6 min read"}];function T3(){return a.createElement("section",{id:"blog",className:"py-24 bg-white dark:bg-slate-900 scroll-mt-16"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center mb-16"},a.createElement("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white mb-4"},"Latest from Our Blog"),a.createElement("p",{className:"text-lg text-slate-600 dar
860k:text-slate-400"},"Insights and updates from the world of AI-powered communication")),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-6xl mx-auto"},C3.map(t=>a.createElement(Ce,{key:t.title,className:"overflow-hidden hover:shadow-lg transition-shadow dark:bg-slate-800 dark:border-slate-700 flex flex-col"},a.createElement("div",{className:"aspect-video w-full overflow-hidden"},a.createElement("img",{src:t.image,alt:t.title,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-300"})),a.createElement(ct,null,a.createElement("div",{className:"flex items-center gap-4 text-sm text-slate-500 dark:text-slate-400 mb-2"},a.createElement("span",null,t.date),a.createElement("span",null,t.readTime)),a.createElement(pt,{className:"text-xl dark:text-white"},t.title)),a.createElement(Ve,{className:"flex flex-col flex-grow"},a.createElement("p",{className:"text-slate-600 dark:text-slate-300 flex-grow"},t.excerpt)))))))}class hk{updateInterval;enableRealTime;enableSimulation;updateTimer=null;callbacks=new Set;lastMetrics;destroyed=!1;constructor(e={}){this.updateInterval=e.updateInterval||1e4,this.enableRealTime=e.enableRealTime??!0,this.enableSimulation=e.enableSimulation??!0,this.lastMetrics={waitlistCount:0,slackInstalls:0,tasksProcessed:0,activeUsers:0}}async getMetrics(){if(this.destroyed)return this.lastMetrics;try{const e=await this.fetchWaitlistCount(),r=this.enableSimulation?this.getSimulatedMetrics():this.getStaticMetrics(),n={waitlistCount:e,...r};return this.lastMetrics=n,n}catch(e){return console.error("Failed to fetch metrics:",e),this.lastMetrics}}async fetchWaitlistCount(){try{const{count:e,error:r}=await et.from("waitlist_entries").select("*",{count:"exact",head:!0});return r?(console.warn("Supabase error, using fallback:",r.message),this.getWaitlistFallback()):e||0}catch(e){return console.warn("Failed to connect to Supabase, using fallback:",e),this.getWaitlistFallback()}}getWaitlistFallback(){const e=new Date("2025-01-01"),n=Math.floor((new Date().getTime()-e.getTime())/(1e3*60*60*24)),o=Math.max(0,n*2)+127;return Math.max(0,o)}getSimulatedMetrics(){const e=this.lastMetrics.waitlistCount||this.getWaitlistFallback(),n=Math.floor(e*.18),o=Math.floor(n*.65),d=o*30;return{slackInstalls:n,tasksProcessed:d,activeUsers:o}}getStaticMetrics(){return{slackInstalls:89,tasksProcessed:15420,activeUsers:342}}startRealTimeUpdates(e){this.destroyed||!this.enableRealTime||(this.callbacks.add(e),this.callbacks.size===1&&!this.updateTimer&&(this.updateTimer=setInterval(()=>{this.updateAllCallbacks()},this.updateInterval)),e(this.lastMetrics))}stopRealTimeUpdates(e){this.callbacks.delete(e),this.callbacks.size===0&&this.updateTimer&&(clearInterval(this.updateTimer),this.updateTimer=null)}async updateAllCallbacks(){if(!(this.destroyed||this.callbacks.size===0))try{const e=await this.getMetrics();JSON.stringify(e)!==JSON.stringify(this.lastMetrics)&&this.callbacks.forEach(n=>{try{n(e)}catch(s){console.error("Error in metrics callback:",s)}})}catch(e){console.error("Failed to update metrics:",e)}}destroy(){this.destroyed=!0,this.callbacks.clear(),this.updateTimer&&(clearInterval(this.updateTimer),this.updateTimer=null)}getFormattedMetrics(){return this.getMetrics().then(e=>({waitlistCount:e.waitlistCount.toLocaleString(),slackInstalls:e.slackInstalls.toLocaleString(),tasksProcessed:e.tasksProcessed.toLocaleString(),activeUsers:e.activeUsers.toLocaleString()}))}}let Hc=null;function A3(t){return(!Hc||Hc.destroyed)&&(Hc=new hk(t)),Hc}function pk(t,e={}){const{duration:r=2e3,start:n=0,enabled:s=!0,easing:o=I3,once:c=!0}=e,[d,m]=x.useState(n),h=x.useRef(null),p=x.useRef(null),g=x.useRef(!1),v=x.useRef(t);return x.useEffect(()=>{(g.current||!s)&&(m(t),v.current=t)},[t,s]),x.useEffect(()=>{if(!s||n===t){m(t);return}if(c&&g.current){m(t);return}const E=N=>{p.current===null&&(p.current=N);const k=N-p.current,w=Math.min(k/r,1),C=o(w),_=n+(t-n)*C;m(_),w<1?h.current=requestAnimationFrame(E):g.current=!0};return h.current=requestAnimationFrame(E),()=>{h.current!==null&&cancelAnimationFrame(h.current)}},[t,n,r,s,o,c]),Math.round(d)}function I3(t){return 1-Math.pow(1-t,4)}const Gc=({title:t,value:e,previousValue:r,icon:n,color:s,isLoading:o,isIncreasing:c,animate:d=!0})=>{const m=pk(e,{duration:2e3,start:0,enabled:d&&!o}
860),h=(d&&!o?m:e).toLocaleString(),p=!o&&r!==void 0&&r!==e;return a.createElement("div",{className:Oe("relative p-6 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 transition-all duration-300 hover:shadow-lg","group cursor-default"),"aria-label":`${t}: ${h}`},a.createElement("div",{className:Oe("w-12 h-12 rounded-full flex items-center justify-center mb-4 transition-colors",s)},n),a.createElement("div",{className:"space-y-1"},a.createElement("h3",{className:"text-sm font-medium text-slate-600 dark:text-slate-400"},t),a.createElement("div",{className:"flex items-center gap-2"},a.createElement("span",{className:Oe("text-3xl font-bold text-slate-900 dark:text-white transition-all duration-500",o&&"animate-pulse bg-slate-200 dark:bg-slate-700 rounded w-20 h-8")},!o&&h),p&&a.createElement("div",{className:Oe("flex items-center gap-1 text-sm font-medium transition-colors duration-300",c?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400")},a.createElement(ma,{className:Oe("w-4 h-4",!c&&"rotate-180")}),a.createElement("span",{className:"font-mono text-xs"},Math.abs((e-r)/r*100).toFixed(1),"%")))),o&&a.createElement("div",{className:"absolute inset-0 bg-white/80 dark:bg-slate-800/80 rounded-xl flex items-center justify-center"},a.createElement("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-primary"})),a.createElement("div",{className:"absolute inset-0 rounded-xl bg-gradient-to-r from-transparent via-white/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 pointer-events-none"}))},gk=({className:t,showGrowthIndicators:e=!0,updateInterval:r=1e4,enableRealTimeUpdates:n=!1})=>{const[s,o]=x.useState({waitlistCount:0,slackInstalls:0,tasksProcessed:0,activeUsers:0}),[c,d]=x.useState({waitlistCount:0,slackInstalls:0,tasksProcessed:0,activeUsers:0}),[m,h]=x.useState(!0),[p,g]=x.useState(null),v=x.useRef(null),E=x.useCallback(k=>{d(w=>({...w})),o(k)},[]),N=x.useCallback(async()=>{try{h(!0),g(null);const k=new hk;v.current=k;const w=await k.getMetrics();o(w),d(w),n&&k.startRealTimeUpdates(E),Ne("metrics_impression",{metrics_loaded:!0,metrics_count:4})}catch(k){console.error("Failed to fetch metrics:",k),g("Unable to load metrics")}finally{h(!1)}},[E]);return x.useEffect(()=>(N(),()=>{v.current&&(v.current.destroy(),v.current=null)}),[N]),x.useEffect(()=>{if(p&&v.current){const k=setTimeout(()=>{g(null),N()},5e3);return()=>clearTimeout(k)}},[p,N]),a.createElement("section",{className:Oe("py-16 bg-slate-50 dark:bg-slate-900/50",t)},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-6xl mx-auto"},a.createElement("div",{className:"text-center mb-12"},a.createElement("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white mb-4"},"Growing Community"),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-300"},s.waitlistCount>0?a.createElement("span",null,a.createElement("strong",{className:"text-primary dark:text-primary-light"},s.waitlistCount.toLocaleString())," ","early adopters and counting"):a.createElement("span",null,"Be among the first to join"))),p&&a.createElement("div",{className:"text-center py-12"},a.createElement("div",{className:"inline-flex items-center gap-3 px-6 py-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg"},a.createElement(Uo,{className:"w-5 h-5 text-red-500"}),a.createElement("div",null,a.createElement("h3",{className:"font-semibold text-red-800 dark:text-red-200"},"Unable to load metrics"),a.createElement("p",{className:"text-sm text-red-600 dark:text-red-400 mt-1"},"Please try again later")))),!p&&a.createElement("div",{"data-testid":"live-metrics-container",className:Oe("grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4",t)},a.createElement(Gc,{title:"Total Waitlist",value:s.waitlistCount,previousValue:e?c.waitlistCount:void 0,icon:a.createElement(or,{className:"w-6 h-6"}),color:"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400",isLoading:m,isIncreasing:e&&s.waitlistCount>c.waitlistCount}),a.createElement(Gc,{title:"Active Installations",value:s.slackInstalls,previousValue:e?c.slackInstalls:void 0,icon:a.createElement(qr,{className:"w-6 h-6"}),color:"bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400",isLoading:m,isIncreasing:e&&s.slackInstalls>c.slackInstalls}),a.createElement(Gc,{title:"Tasks Processed",value:s.tasksProcessed,previousValue:e?c.tasksProcessed:void 0,icon:a.createElement(vr,{className:"w-6 h-6"}
860),color:"bg-purple-100 dark:bg-purple-900/30 text-purple-600 dark:text-purple-400",isLoading:m,isIncreasing:e&&s.tasksProcessed>c.tasksProcessed}),a.createElement(Gc,{title:"Active Users",value:s.activeUsers,previousValue:e?c.activeUsers:void 0,icon:a.createElement(ma,{className:"w-6 h-6"}),color:"bg-amber-100 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400",isLoading:m,isIncreasing:e&&s.activeUsers>c.activeUsers})),!p&&a.createElement("div",{className:"mt-12 flex flex-wrap justify-center items-center gap-8 text-slate-600 dark:text-slate-400"},a.createElement("div",{className:"flex items-center gap-2"},a.createElement("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),a.createElement("span",{className:"text-sm"},"Live updates every ",r/1e3,"s")),a.createElement("div",{className:"flex items-center gap-2"},a.createElement(qr,{className:"w-4 h-4"}),a.createElement("span",{className:"text-sm"},"Real-time data"))),m&&!p&&a.createElement("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4"},[...Array(4)].map((k,w)=>a.createElement("div",{key:w,"data-testid":"metric-skeleton",className:"p-6 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700"},a.createElement("div",{className:"w-12 h-12 bg-slate-200 dark:bg-slate-700 rounded-full mb-4"}),a.createElement("div",{className:"space-y-2"},a.createElement("div",{className:"h-4 bg-slate-200 dark:bg-slate-700 rounded w-24"}),a.createElement("div",{className:"h-8 bg-slate-200 dark:bg-slate-700 rounded w-32"}))))))))},Yc=({title:t,value:e,previousValue:r,icon:n,color:s,isLoading:o,isIncreasing:c,onClick:d,animate:m=!0})=>{const h=pk(e,{duration:2e3,start:0,enabled:m&&!o}),p=(m&&!o?h:e).toLocaleString(),g=!o&&r!==void 0&&r!==e,v=g?Math.abs((e-r)/r*100).toFixed(1):null;return a.createElement("button",{onClick:d,className:Oe("relative p-6 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700","transition-all duration-300 hover:shadow-lg hover:scale-[1.02] focus:outline-none focus:ring-2 focus:ring-primary","group cursor-default"),"aria-label":`${t}: ${p}`},a.createElement("div",{className:Oe("w-12 h-12 rounded-lg flex items-center justify-center mb-4 transition-colors",`bg-${s}/10 dark:bg-${s}/20`)},a.createElement("div",{className:Oe(`text-${s}`)},n)),a.createElement("div",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-1"},o?a.createElement("div",{className:"h-8 w-20 bg-slate-200 dark:bg-slate-700 rounded animate-pulse"}):p),a.createElement("div",{className:"text-sm text-slate-600 dark:text-slate-400 mb-2"},t),g&&a.createElement("div",{className:Oe("flex items-center text-xs font-medium",c?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400")},c?a.createElement(ma,{className:"w-3 h-3 mr-1"}):a.createElement(TI,{className:"w-3 h-3 mr-1"}),v,"%"))};function P3({className:t="",showGrowthIndicators:e=!0,updateInterval:r=12e3,showActivityFeed:n=!0,showUrgency:s=!0,showCompanyLogos:o=!1,showTestimonials:c=!1,theme:d="light",customLabels:m={},enableRealTimeUpdates:h=!1}){const[p,g]=x.useState({waitlistCount:0,slackInstalls:0,tasksProcessed:0,activeUsers:0}),[v,E]=x.useState(null),[N,k]=x.useState([]),[w,C]=x.useState(!0),[_,T]=x.useState(null),[A,I]=x.useState(!1),M=x.useRef(),D=x.useRef(p),$=A3(),j=x.useMemo(()=>({waitlist:"Early Adopters",installs:"Teams Connected",tasks:"Tasks Processed",users:"Active Users",...m}),[m]),B=x.useCallback(async()=>{try{const se=D.current,V=await $.getMetrics();E(se),g(V),T(null),Ne("metrics_updated",{waitlistCount:V.waitlistCount,slackInstalls:V.slackInstalls,activeUsers:V.activeUsers})}catch(se){console.error("Failed to fetch metrics:",se),T("Metrics temporarily unavailable")}finally{C(!1)}},[$]),ee=x.useCallback(async()=>{try{const se=[{id:"activity-1",type:"signup",company:"Tech Corp",location:"San Francisco, CA",time:new Date(Date.now()-9e5),description:"Joined waitlist"},{id:"activity-2",type:"install",company:"Innovate Labs",location:"New York, NY",time:new Date(Date.now()-27e5),description:"Installed Slack integration"},{id:"activity-3",type:"task",company:"Growth Co",location:"London, UK",time:new Date(Date.now()-72e5),description:"Processed 100+ tasks"},{id:"activity-4",type:"milestone",company:"Startup Inc",location:"Dubai, UAE",t
860ime:new Date(Date.now()-108e5),description:"Reached milestone"},{id:"activity-5",type:"signup",company:"Enterprise Solutions",location:"Singapore",time:new Date(Date.now()-144e5),description:"Joined waitlist"}];k(se.slice(0,5))}catch(se){console.error("Failed to generate activity:",se)}},[]),te=x.useCallback(se=>{Ne("metric_card_click",{metric:se,value:D.current[se]})},[]),ne=x.useCallback(se=>{Ne("activity_item_click",{company:se.company,type:se.type})},[]);x.useEffect(()=>{D.current=p},[p]),x.useEffect(()=>{B(),ee()},[B,ee]),x.useEffect(()=>{if(h&&r>0)return M.current=setInterval(()=>{B(),ee()},r),()=>{M.current&&clearInterval(M.current)}},[h,r,B,ee]);const Z=se=>{switch(se.type){case"signup":return`${se.company} joined the waitlist`;case"install":return`${se.company} installed Slack integration`;case"task":return`${se.company} processed 100+ tasks`;case"milestone":return`${se.company} reached a new milestone`;default:return`${se.company} is active`}},ae=se=>{switch(se){case"signup":return a.createElement(or,{className:"w-4 h-4 text-blue-500"});case"install":return a.createElement(vr,{className:"w-4 h-4 text-green-500"});case"task":return a.createElement(Uo,{className:"w-4 h-4 text-purple-500"});case"milestone":return a.createElement(ma,{className:"w-4 h-4 text-yellow-500"});default:return a.createElement(Uo,{className:"w-4 h-4 text-slate-500"})}},ke=(se,V)=>{if(!(!V||V===0))return se>V};return _?a.createElement("div",{className:Oe("p-6 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700",t)},a.createElement("div",{className:"text-center"},a.createElement(qv,{className:"w-12 h-12 text-red-500 mx-auto mb-4"}),a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-2"},_),a.createElement("button",{onClick:B,className:"mt-4 px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors"},a.createElement(NI,{className:"w-4 h-4 inline-block mr-2"}),"Retry"))):a.createElement("div",{className:Oe("space-y-6",t)},a.createElement("div",{className:"text-center"},a.createElement("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-2"},"Growing Community"),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-300"},p.slackInstalls,"+ teams transforming their workflow with AI"),s&&a.createElement("div",{className:"mt-4 inline-flex items-center px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg"},a.createElement(qv,{className:"w-4 h-4 text-yellow-600 dark:text-yellow-400 mr-2"}),a.createElement("span",{className:"text-sm font-medium text-yellow-800 dark:text-yellow-200"},"Only ",Math.max(100-Math.floor(p.waitlistCount/10),10)," spots left in Early Adopter Program"))),a.createElement("div",{"data-testid":"metrics-container",className:Oe("grid gap-4","grid-cols-1 sm:grid-cols-2 lg:grid-cols-4",d==="dark"&&"theme-dark"),role:"region","aria-label":"Live metrics"},a.createElement(Yc,{title:j.waitlist,value:p.waitlistCount,previousValue:v?.waitlistCount,icon:a.createElement(or,{className:"w-6 h-6"}),color:"blue",isLoading:w,isIncreasing:ke(p.waitlistCount,v?.waitlistCount),onClick:()=>te("waitlistCount")}),a.createElement(Yc,{title:j.installs,value:p.slackInstalls,previousValue:v?.slackInstalls,icon:a.createElement(vr,{className:"w-6 h-6"}),color:"green",isLoading:w,isIncreasing:ke(p.slackInstalls,v?.slackInstalls),onClick:()=>te("slackInstalls")}),a.createElement(Yc,{title:j.tasks,value:p.tasksProcessed,previousValue:v?.tasksProcessed,icon:a.createElement(Uo,{className:"w-6 h-6"}),color:"purple",isLoading:w,isIncreasing:ke(p.tasksProcessed,v?.tasksProcessed),onClick:()=>te("tasksProcessed")}),a.createElement(Yc,{title:j.users,value:p.activeUsers,previousValue:v?.activeUsers,icon:a.createElement(ma,{className:"w-6 h-6"}),color:"indigo",isLoading:w,isIncreasing:ke(p.activeUsers,v?.activeUsers),onClick:()=>te("activeUsers")})),n&&N.length>0&&a.createElement("div",{className:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-6","data-testid":"activity-feed"},a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-4 flex items-center"},a.createElement(Uo,{className:"w-5 h-5 mr-2 text-primary"}),"Recent Activity",a.createElement("span",{className:"ml-2 text-sm font-normal text-slate-500"},"(Last 24 hours)")),a.createElement("ul",{className:"space-y-3",role:"list","aria-label":"Recent activity feed"},N.map((se,V)=>a.createElement("li",{key:`${se.id}-${V}`,"data-testid":`activity-notification-${V}`,className:"flex items-center justify-between p-3 bg-slate-50 dark:bg-slate-700/50 rounded-lg animate-slide-in cursor-pointer hover:bg-slate-100 dar
860k:hover:bg-slate-700 transition-colors",onClick:()=>ne(se),role:"listitem"},a.createElement("div",{className:"flex items-center space-x-3"},ae(se.type),a.createElement("div",null,a.createElement("p",{className:"text-sm font-medium text-slate-900 dark:text-white"},Z(se)),a.createElement("div",{className:"flex items-center text-xs text-slate-500 dark:text-slate-400 mt-1"},a.createElement(EI,{className:"w-3 h-3 mr-1"}),se.location,a.createElement("span",{className:"mx-2"},"â¢"),new Date(se.time).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})))),a.createElement("span",{className:"text-xs text-green-500 font-medium"},"â"))))),a.createElement("div",{className:"flex flex-wrap items-center justify-center gap-4 text-sm text-slate-500 dark:text-slate-400"},a.createElement("span",{className:"flex items-center"},a.createElement("span",{className:"w-2 h-2 bg-green-500 rounded-full mr-2 animate-pulse"}),"Real-time updates"),a.createElement("span",{className:"flex items-center"},a.createElement("span",{className:"mr-2"},"â"),"SSL secured"),a.createElement("span",{className:"flex items-center"},a.createElement("span",{className:"mr-2"},"ð"),"99.9% uptime")))}function Qn(t,e,r){const n=r||"technology",s=d=>{switch(d){case"enterprise":return 1e3+Math.floor(Math.random()*9e3);case"growth":return 100+Math.floor(Math.random()*400);case"innovator":default:return 10+Math.floor(Math.random()*90)}},o=d=>{const m={enterprise:["Global","Leading","Enterprise","Fortune"],growth:["Growing","Innovative","Dynamic","Rapid"],innovator:["Agile","Emerging","Startup","Next-Gen"]},h=["Solutions","Technologies","Systems","Innovations","Labs"],p=m[d][Math.floor(Math.random()*m[d].length)],g=h[Math.floor(Math.random()*h.length)];return`${p} ${g}`},c=d=>{switch(d){case"enterprise":return"Global leader transforming enterprise collaboration";case"growth":return"Scaling innovation with intelligent workflow automation";case"innovator":default:return"Pioneering the future of AI-powered productivity"}};return{id:t,name:o(e),tier:e,category:n,isPlaceholder:!0,employeeCount:s(e),description:c(e),joinedDate:new Date}}function yk(t){const e={enterprise:0,growth:1,innovator:2};return[...t].sort((r,n)=>{const s=e[r.tier]-e[n.tier];return s!==0?s:r.name.localeCompare(n.name)})}function O3(){const t=[];return t.push(Qn("placeholder-1","enterprise","technology"),Qn("placeholder-2","enterprise","finance"),Qn("placeholder-3","growth","healthcare"),Qn("placeholder-4","growth","consulting"),Qn("placeholder-5","innovator","technology"),Qn("placeholder-6","innovator","education"),Qn("placeholder-7","growth","retail"),Qn("placeholder-8","enterprise","manufacturing")),yk(t)}function R3({logos:t,isLoading:e=!1,error:r,variant:n="default",maxLogos:s=8,autoScroll:o=!1,autoScrollInterval:c=3e3}){const[d,m]=x.useState(null),[h,p]=x.useState(new Set),[g,v]=x.useState(0),E=x.useRef(null),N=x.useRef(new Map),k=x.useMemo(()=>{const B=t||O3();return yk(B).slice(0,s)},[t,s]);x.useEffect(()=>{const B=new IntersectionObserver(te=>{te.forEach(ne=>{const Z=ne.target.getAttribute("data-logo-id");Z&&ne.isIntersecting&&p(ae=>new Set(ae).add(Z))})},{threshold:.5});return E.current?.querySelectorAll("[data-logo-id]")?.forEach(te=>B.observe(te)),()=>B.disconnect()},[k]),x.useEffect(()=>{if(h.size>0){const B=k.filter(ee=>ee.isPlaceholder).length;Ne("customer_logos_impression",{visibleLogos:h.size,totalLogos:k.length,placeholderCount:B,variant:n})}},[h,k,n]),x.useEffect(()=>{if(!o||!E.current)return;const B=setInterval(()=>{if(E.current){const ee=E.current.scrollWidth-E.current.clientWidth,te=g>=ee?0:g+200;E.current.scrollTo({left:te,behavior:"smooth"}),v(te)}},c);return()=>clearInterval(B)},[o,c,g]);const w=x.useCallback(B=>{Ne("customer_logo_click",{logoId:B.id,company:B.name,tier:B.tier,isPlaceholder:B.isPlaceholder}),B.website&&!B.isPlaceholder&&window.open(B.website,"_blank","noopener,noreferrer")},[]),C=x.useCallback(B=>{m(B.id),N.current.set(B.id,Date.now())},[]),_=x.useCallback(B=>{m(null);const ee=N.current.get(B.id);if(ee){const te=Date.now()-ee;Ne("customer_logo_hover",{logoId:B.id,company:B.name,tier:B.tier,duration:te}),N.current.delete(B.id)}},[]),T=x.useCallback(B=>{const ee=B.currentTarget,te=ee.scrollLeft,ne=ee.scrollWidth-ee.clientWidth;
860v(te),Ne("customer_logos_scroll",{scrollPosition:te,maxScroll:ne,percentage:te/ne*100})},[]),A=B=>new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:0}).format(B),I=()=>{switch(n){case"compact":return"py-8 bg-slate-50 dark:bg-slate-800";case"featured":return"py-16 bg-gradient-to-r from-slate-50 to-blue-50 dark:from-slate-900 dark:to-slate-800";default:return"py-12 bg-white dark:bg-slate-900"}},M=B=>{const ee={Building2:Hv,Cpu:fI,Globe:Ap,Zap:vr,Rocket:vw,Shield:Mr,Target:Ip,TrendingUp:ma},te=B.name.charCodeAt(0)%Object.keys(ee).length;return Object.values(ee)[te]||Hv},D=()=>{switch(n){case"featured":return{title:"Trusted by industry leaders",subtitle:"Join thousands of teams revolutionizing their workflow with AI"};default:return{title:"Join 100+ companies",subtitle:"transforming their workflow with AI"}}};if(e)return a.createElement("section",{className:`py-12 ${I()}`},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"text-center mb-8"},a.createElement("div",{className:"h-8 w-64 bg-slate-200 dark:bg-slate-700 rounded animate-pulse mx-auto mb-4"}),a.createElement("div",{className:"h-4 w-96 bg-slate-200 dark:bg-slate-700 rounded animate-pulse mx-auto"})),a.createElement("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4","data-testid":"customer-logos-carousel"},Array.from({length:8}).map((B,ee)=>a.createElement("div",{key:`skeleton-${ee}`,"data-testid":"skeleton",className:"h-20 bg-slate-200 dark:bg-slate-700 rounded animate-pulse"})))));if(r)return a.createElement("section",{className:`py-12 ${I()}`},a.createElement("div",{className:"container mx-auto px-4 text-center"},a.createElement("h3",{className:"text-lg font-semibold text-red-600 dark:text-red-400 mb-2"},r),a.createElement("p",{className:"text-slate-600 dark:text-slate-400"},"Please try again later")));if(k.length===0)return a.createElement("section",{className:`py-12 ${I()}`},a.createElement("div",{className:"container mx-auto px-4 text-center"},a.createElement("p",{className:"text-slate-600 dark:text-slate-400"},"No customer logos to display")));const{title:$,subtitle:j}=D();return a.createElement("section",{className:`${I()}`},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"text-center mb-8"},a.createElement("h2",{className:`font-bold text-slate-900 dark:text-white mb-4 ${n==="featured"?"text-4xl md:text-5xl lg:text-6xl":"text-2xl md:text-3xl"}`},$),a.createElement("p",{className:`text-slate-600 dark:text-slate-300 ${n==="featured"?"text-xl md:text-2xl":"text-lg"}`},j)),a.createElement("div",{ref:E,className:` 861 grid gap-4 overflow-x-auto pb-2 862 ${n==="compact"?"grid-cols-2 sm:grid-cols-3 md:grid-cols-4":"grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-4"} 863 `,"data-variant":n,onScroll:T,"data-testid":"customer-logos-carousel",role:"region","aria-label":"Customer logos"},k.map(B=>a.createElement(Ce,{key:B.id,"data-logo-id":B.id,className:` 864 relative cursor-pointer transition-all duration-200 hover:shadow-lg 865 ${n==="compact"?"p-4":"p-6"} 866 ${B.isPlaceholder?"opacity-75":""} 867 ${d===B.id?"ring-2 ring-primary ring-offset-2":""} 868 `,onClick:()=>w(B),onMouseEnter:()=>C(B),onMouseLeave:()=>_(B),tabIndex:0,onKeyDown:ee=>{(ee.key==="Enter"||ee.key===" ")&&(ee.preventDefault(),w(B))}},a.createElement(Ve,{className:"p-0 text-center"},a.createElement("div",{className:`mx-auto mb-3 bg-gradient-to-br from-primary/10 to-primary/5 dark:from-primary/20 dark:to-primary/10 rounded-xl flex items-center justify-center ${n==="compact"?"w-12 h-12":"w-16 h-16"}`},B.logoUrl?a.createElement("img",{src:B.logoUrl,alt:`${B.name} logo`,className:"w-full h-full object-contain p-2"}):a.createElement(M(B),{className:"w-full h-full p-3 text-primary dark:text-primary/80",strokeWidth:1.5})),a.createElement("h3",{className:`font-semibold text-slate-900 dark:text-white ${n==="compact"?"text-xs":"text-sm"} mb-1`},B.name),B.employeeCount&&n!=="compact"&&a.createElement("p",{className:"text-xs text-slate-600 dar
868k:text-slate-400"},A(B.employeeCount)," employees"),B.description&&a.createElement(a.Fragment,null,a.createElement("p",{className:"mt-2 text-xs text-slate-500 dark:text-slate-400 line-clamp-2 md:hidden"},B.description),d===B.id&&a.createElement("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 z-10 hidden md:block"},a.createElement("div",{className:"bg-slate-900 dark:bg-slate-100 text-white dark:text-slate-900 text-xs rounded-lg px-3 py-2 whitespace-nowrap shadow-lg max-w-xs"},B.description,a.createElement("div",{className:"absolute top-full left-1/2 transform -translate-x-1/2 -mt-1"},a.createElement("div",{className:"border-4 border-transparent border-t-slate-900 dark:border-t-slate-100"}))))),B.isPlaceholder&&a.createElement("div",{className:"absolute top-2 right-2"},a.createElement("span",{className:"text-xs bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-400 px-2 py-1 rounded"},"Soon")))))),o&&a.createElement("div",{className:"flex justify-center mt-4 space-x-1"},k.map((B,ee)=>a.createElement("div",{key:ee,className:` 869 h-1 w-8 rounded-full transition-opacity duration-300 870 ${ee===Math.floor(g/200)%k.length?"bg-primary":"bg-slate-300 dark:bg-slate-600"} 871 `})))))}const D3=[{id:"soc2",name:"SOC 2 Type II",category:"security",description:"Independently audited for security controls",verified:!0},{id:"gdpr",name:"GDPR Compliant",category:"security",description:"Full compliance with EU data protection regulations",verified:!0},{id:"ssl",name:"256-bit SSL",category:"security",description:"Enterprise-grade encryption for all data",verified:!0},{id:"hipaa",name:"HIPAA Ready",category:"compliance",description:"Healthcare data protection standards met",verified:!0},{id:"iso27001",name:"ISO 27001",category:"compliance",description:"Information security management certified",verified:!0}
871,{id:"uptime",name:"99.9% Uptime",category:"infrastructure",description:"Guaranteed availability SLA",verified:!0},{id:"cloudflare",name:"Cloudflare CDN",category:"infrastructure",description:"Global edge network for performance",verified:!0}],M3={security:a.createElement(hw,{className:"w-5 h-5"}),compliance:a.createElement(Mr,{className:"w-5 h-5"}),infrastructure:a.createElement(bw,{className:"w-5 h-5"})};function L3({className:t="",variant:e="default",showSecurity:r=!0,showCompliance:n=!0,showInfrastructure:s=!0,badges:o,isLoading:c=!1,error:d}){const[m,h]=x.useState(null),[p,g]=x.useState(new Set),[v,E]=x.useState(0),N=x.useRef(null),k=o||D3.filter(I=>!(I.category==="security"&&!r||I.category==="compliance"&&!n||I.category==="infrastructure"&&!s));x.useEffect(()=>{const I=new IntersectionObserver(M=>{M.forEach(D=>{D.isIntersecting&&(Ne("trust_badges_impression",{visibleBadges:k.length,totalBadges:k.length}),Ne("section_visible",{section:"trust_badges"}))})},{threshold:.5});return N.current&&I.observe(N.current),()=>I.disconnect()},[k.length]);const w=x.useCallback(I=>{h(I.id),E(Date.now())},[]),C=x.useCallback(I=>{h(null);const M=Date.now()-v;Ne("trust_badge_hover",{badge:I.name,category:I.category,duration:M})},[v]),_=x.useCallback(I=>{Ne("trust_badge_click",{badge:I.name,category:I.category}),I.link&&window.open(I.link,"_blank","noopener,noreferrer")},[]),T=()=>{switch(e){case"compact":return"py-8 bg-slate-50 dark:bg-slate-800";case"featured":return"py-16 bg-gradient-to-br from-slate-50 to-blue-50 dark:from-slate-900 dark:to-slate-800";default:return"py-12 bg-white dark:bg-slate-900"}},A=I=>I.icon?I.icon:M3[I.category];return c?a.createElement("section",{className:Oe(T(),t)},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"text-center mb-8"},a.createElement("div",{className:"h-8 w-64 bg-slate-200 dark:bg-slate-700 rounded animate-pulse mx-auto mb-4"}),a.createElement("div",{className:"h-4 w-96 bg-slate-200 dark:bg-slate-700 rounded animate-pulse mx-auto"})),a.createElement("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4"},Array.from({length:6}).map((I,M)=>a.createElement("div",{key:`skeleton-${M}`,"data-testid":"skeleton",className:"h-20 bg-slate-200 dark:bg-slate-700 rounded animate-pulse"}))))):d?a.createElement("section",{className:Oe(T(),t)},a.createElement("div",{className:"container mx-auto px-4 text-center"},a.createElement(Mr,{className:"w-12 h-12 text-slate-400 mx-auto mb-4"}),a.createElement("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white mb-2"},"Security information temporarily unavailable"),a.createElement("p",{className:"text-slate-600 dark:text-slate-400"},"Please try again later"))):a.createElement("section",{ref:N,className:Oe(T(),t),"data-variant":e,"data-testid":"trust-badges-section"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"text-center mb-8"},a.createElement("h2",{className:"text-2xl md:text-3xl font-bold text-slate-900 dark:text-white mb-4"},"Enterprise-Grade Security"),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-300"},"Your data is safe with us. We meet the highest security standards.")),a.createElement("div",{"data-testid":"trust-badges-container",className:"grid gap-4 grid-cols-2 md:grid-cols-3 lg:grid-cols-6",role:"region","aria-label":"Trust and security badges"},k.map(I=>a.createElement("button",{key:I.id,"data-testid":`badge-${I.id}`,className:Oe("relative p-4 bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700","transition-all duration-200 hover:shadow-lg hover:scale-105 focus:outline-none focus:ring-2 focus:ring-primary","flex flex-col items-center justify-center text-center","group cursor-default"),onClick:()=>_(I),onMouseEnter:()=>w(I),onMouseLeave:()=>C(I),"aria-label":`${I.name}: ${I.description}`},a.createElement("div",{className:"w-10 h-10 rounded-full flex items-center justify-center mb-3 bg-primary/10 dark:bg-primary/20 text-primary"},A(I)),a.createElement("h3",{className:"text-sm font-semibold text-slate-900 dark:text-white mb-1"},I.name),I.verified&&a.createElement(qr,{className:"w-4 h-4 text-green-500 mb-2","aria-label":"Verified"}),m===I.id&&a.createElement("div",{className:"absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 z-10 w-48"},a.createElement("div",{className:"bg-slate-900 dark:bg-slate-100 text-white dark:text-slate-900 text-xs rounded px-3 py-2 text-center shadow-lg"},I.description,a.createElement("div",{className:"absolute top-full left-1/2 transform -translate-x-1/2 -mt-1"},a.createElement("div",{className:"border-4 border-transparent border-t-slate-900 dark:border-t-slate-100"})))),a.createElement("div",{className:"absolute top-2 right-2"},a.createElement("span",{className:Oe("text-xs px-2 py-1 rounded",I.category==="security"&&"bg-blue-100 dar
871k:bg-blue-900/30 text-blue-700 dark:text-blue-300",I.category==="compliance"&&"bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300",I.category==="infrastructure"&&"bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300")},I.category))))),a.createElement("div",{className:"flex flex-wrap items-center justify-center gap-6 mt-8 text-sm text-slate-600 dark:text-slate-400"},a.createElement("div",{className:"flex items-center"},a.createElement(Mr,{className:"w-4 h-4 mr-2 text-green-500"}),a.createElement("span",null,"Audited & Certified")),a.createElement("div",{className:"flex items-center"},a.createElement(hw,{className:"w-4 h-4 mr-2 text-green-500"}),a.createElement("span",null,"End-to-end Encryption")),a.createElement("div",{className:"flex items-center"},a.createElement(bw,{className:"w-4 h-4 mr-2 text-green-500"}),a.createElement("span",null,"24/7 Monitoring"))),e==="featured"&&a.createElement("div",{className:"mt-8 text-center"},a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-400"},"We maintain strict security protocols and undergo regular third-party audits to ensure your data remains protected at all times."))))}function F3(){return a.createElement(a.Fragment,null,a.createElement(a3,null),a.createElement(gk,{showGrowthIndicators:!0,updateInterval:12e3}),a.createElement(o3,null),a.createElement(l3,null),a.createElement(p3,null),a.createElement(w3,null),a.createElement(R3,{variant:"featured",maxLogos:8,autoScroll:!1}),a.createElement(P3,{showGrowthIndicators:!0,showActivityFeed:!0,showUrgency:!0,updateInterval:12e3}),a.createElement(L3,{variant:"default",showSecurity:!0,showCompliance:!0,showInfrastructure:!0}),a.createElement(N3,null),a.createElement(_3,null),a.createElement(T3,null))}function j3(){const t=ba();return a.createElement("div",{className:"min-h-screen pt-20 flex items-center justify-center p-4 bg-slate-900"},a.createElement("div",{className:"w-full max-w-md relative"},a.createElement(ce,{variant:"ghost",size:"icon",className:"absolute -top-2 -right-2 rounded-full hover:bg-slate-800 z-50",onClick:()=>t("/")},a.createElement(hl,{className:"h-5 w-5 text-slate-200"}),a.createElement("span",{className:"sr-only"},"Close")),a.createElement(IC,{path:"/sign-in",routing:"path",signUpUrl:"/sign-up",afterSignInUrl:"/",appearance:{elements:{rootBox:"w-full",card:"bg-white dark:bg-slate-800 shadow-xl border dark:border-slate-700",headerTitle:"text-slate-900 dark:text-white",headerSubtitle:"text-slate-600 dark:text-slate-300",socialButtonsBlockButton:"dark:bg-slate-700 dark:text-white dark:border-slate-600 dark:hover:bg-slate-600",formButtonPrimary:"bg-primary hover:bg-primary-dark text-white",footerActionLink:"text-primary hover:text-primary-dark",formFieldInput:"bg-white dark:bg-slate-900 border-slate-300 dark:border-slate-600 text-slate-900 dark:text-white",formFieldLabel:"text-slate-700 dark:text-slate-300",alert:"text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20",formFieldWarning:"text-red-600 dark:text-red-400",formFieldSuccess:"text-green-600 dark:text-green-400",dividerLine:"bg-slate-200 dark:bg-slate-700",dividerText:"text-slate-600 dark:text-slate-400",identityPreviewText:"text-slate-700 dark:text-slate-300",identityPreviewEditButton:"text-primary hover:text-primary-dark",formResendCodeLink:"text-primary hover:text-primary-dark",otpCodeFieldInput:"bg-white dark:bg-slate-900 border-slate-300 dark:border-slate-600 text-slate-900 dark:text-white",phoneInputBox:"bg-white dark:bg-slate-900 border-slate-300 dark:border-slate-600 text-slate-900 dark:text-white",phoneInputInput:"bg-white dark:bg-slate-900 text-slate-900 dark:text-white",formFieldInputShowPasswordButton:"text-slate-600 dark:text-slate-400",formFieldAction:"text-primary hover:text-primary-dark",alternativeMethodsBlockButton:"dark:hover:bg-slate-700 text-slate-900 dark:text-white",footer:"text-slate-600 dark:text-slate-400",headerBackIcon:"text-slate-600 dark:text-slate-400",headerBackLink:"text-slate-600 dark:text-slate-400",navbar:"hidden"},variables:{colorPrimary:"#6366F1",colorText:"rgb(15 23 42)",colorTextSecondary:"rgb(71 85 105)",colorBackgroun
871d:"white"}}})))}function U3(){const t=ba();return a.createElement("div",{className:"min-h-screen pt-20 flex items-center justify-center p-4 bg-slate-900"},a.createElement("div",{className:"w-full max-w-md relative"},a.createElement(ce,{variant:"ghost",size:"icon",className:"absolute -top-2 -right-2 rounded-full hover:bg-slate-800 z-50",onClick:()=>t("/")},a.createElement(hl,{className:"h-5 w-5 text-slate-200"}),a.createElement("span",{className:"sr-only"},"Close")),a.createElement(PC,{path:"/sign-up",routing:"path",signInUrl:"/sign-in",afterSignUpUrl:"/",appearance:{elements:{rootBox:"w-full",card:"bg-white dark:bg-slate-800 shadow-xl border dark:border-slate-700",headerTitle:"text-slate-900 dark:text-white",headerSubtitle:"text-slate-600 dark:text-slate-300",socialButtonsBlockButton:"dark:bg-slate-700 dark:text-white dark:border-slate-600 dark:hover:bg-slate-600",formButtonPrimary:"bg-primary hover:bg-primary-dark text-white",footerActionLink:"text-primary hover:text-primary-dark",formFieldInput:"bg-white dark:bg-slate-900 border-slate-300 dark:border-slate-600 text-slate-900 dark:text-white",formFieldLabel:"text-slate-700 dark:text-slate-300",alert:"text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20",formFieldWarning:"text-red-600 dark:text-red-400",formFieldSuccess:"text-green-600 dark:text-green-400",dividerLine:"bg-slate-200 dark:bg-slate-700",dividerText:"text-slate-600 dark:text-slate-400",identityPreviewText:"text-slate-700 dark:text-slate-300",identityPreviewEditButton:"text-primary hover:text-primary-dark",formResendCodeLink:"text-primary hover:text-primary-dark",otpCodeFieldInput:"bg-white dark:bg-slate-900 border-slate-300 dark:border-slate-600 text-slate-900 dark:text-white",phoneInputBox:"bg-white dark:bg-slate-900 border-slate-300 dark:border-slate-600 text-slate-900 dark:text-white",phoneInputInput:"bg-white dark:bg-slate-900 text-slate-900 dark:text-white",formFieldInputShowPasswordButton:"text-slate-600 dark:text-slate-400",formFieldAction:"text-primary hover:text-primary-dark",alternativeMethodsBlockButton:"dark:hover:bg-slate-700 text-slate-900 dark:text-white",footer:"text-slate-600 dark:text-slate-400",headerBackIcon:"text-slate-600 dark:text-slate-400",headerBackLink:"text-slate-600 dark:text-slate-400",navbar:"hidden"},variables:{colorPrimary:"#6366F1",colorText:"rgb(15 23 42)",colorTextSecondary:"rgb(71 85 105)",colorBackground:"white"}}})))}function z3(){const[t,e]=x.useState([]),[r,n]=x.useState([]),[s,o]=x.useState(!0),[c,d]=x.useState(null);x.useEffect(()=>{m()},[]);async function m(){try{const[p,g]=await Promise.all([et.from("waitlist_entries").select("*"),et.from("demo_requests").select("*")]);if(p.error)throw p.error;if(g.error)throw g.error;e(p.data||[]),n(g.data||[])}catch(p){d(p instanceof Error?p.message:"Failed to fetch data")}finally{o(!1)}}async function h(p,g){try{const{error:v}=await et.from(p).delete().eq("id",g);if(v)throw v;await m()}catch(v){d(v instanceof Error?v.message:"Failed to delete entry")}}return s?a.createElement("div",null,"Loading..."):c?a.createElement("div",null,"Error: ",c):a.createElement("div",{className:"p-6 space-y-8"},a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-bold mb-4"},"Waitlist Entries"),a.createElement("div",{className:"space-y-4"},t.map(p=>a.createElement("div",{key:p.id,className:"flex items-center justify-between p-4 bg-white rounded-lg shadow"},a.createElement("div",null,a.createElement("p",{className:"font-medium"},p.email),a.createElement("p",{className:"text-sm text-slate-500"},new Date(p.created_at).toLocaleString())),a.createElement(ce,{variant:"destructive",onClick:()=>h("waitlist_entries",p.id)},"Delete"))))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-bold mb-4"},"Demo Requests"),a.createElement("div",{className:"space-y-4"},r.map(p=>a.createElement("div",{key:p.id,className:"flex items-center justify-between p-4 bg-white rounded-lg shadow"},a.createElement("div",null,a.createElement("p",{className:"font-medium"},p.name," (",p.email,")"),a.createElement("p",{className:"text-sm text-slate-500"}
871,p.company," - Team size: ",p.team_size),a.createElement("p",{className:"text-sm text-slate-500"},new Date(p.created_at).toLocaleString())),a.createElement(ce,{variant:"destructive",onClick:()=>h("demo_requests",p.id)},"Delete"))))))}function $3(){return a.createElement("div",{className:"min-h-screen bg-slate-900 text-white"},a.createElement("div",{className:"container mx-auto px-4 py-16 max-w-4xl"},a.createElement("h1",{className:"text-4xl font-bold mb-8"},"Privacy Policy"),a.createElement("p",{className:"text-slate-300 mb-8"},"Last Updated: August 1, 2025"),a.createElement("div",{className:"prose prose-invert max-w-none space-y-8"},a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Introduction"),a.createElement("p",{className:"text-slate-300"},'Ethos Tech FZE LLC ("Zenith", "we", "our", or "us") is committed to protecting your privacy. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our Zenith application for Slack.')),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Information We Collect"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Information You Provide"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,a.createElement("strong",null,"Account Information"),": Email address, name, and contact details"),a.createElement("li",null,a.createElement("strong",null,"Workspace Information"),": Slack workspace ID, team name, and configuration"),a.createElement("li",null,a.createElement("strong",null,"User Preferences"),": Settings and configurations you choose")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Information Collected Automatically"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,a.createElement("strong",null,"Slack Messages"),": Content from channels where Zenith is invited"),a.createElement("li",null,a.createElement("strong",null,"User Interactions"),": How you interact with extracted tasks"),a.createElement("li",null,a.createElement("strong",null,"Usage Data"),": Features used, frequency of use, performance metrics"),a.createElement("li",null,a.createElement("strong",null,"Technical Data"),": IP addresses, browser types, operating systems")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Information from Slack"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,a.createElement("strong",null,"OAuth Tokens"),": For authentication and API access"),a.createElement("li",null,a.createElement("strong",null,"User Profiles"),": Names and email addresses of workspace members"),a.createElement("li",null,a.createElement("strong",null,"Channel Information"),": Channel names and membership"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"How We Use Your Information"),a.createElement("p",{className:"text-slate-300 mb-4"},"We use collected information to:"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,a.createElement("strong",null,"Provide Services"),": Extract tasks, generate summaries, enable search"),a.createElement("li",null,a.createElement("strong",null,"Improve Features"),": Enhance AI accuracy and user experience"),a.createElement("li",null,a.createElement("strong",null,"Communicate"),": Send service updates and support responses"),a.createElement("li",null,a.createElement("strong",null,"Security"),": Detect and prevent fraudulent activity"),a.createElement("li",null,a.createElement("strong",null,"Compliance"),": Meet legal obligations"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Data Processing"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"AI Processing"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Messages are processed by our AI to i
871dentify tasks and generate summaries"),a.createElement("li",null,"Processing occurs in real-time as messages are posted"),a.createElement("li",null,"We do not use your data to train general AI models"),a.createElement("li",null,"Workspace data remains isolated from other customers")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Data Storage"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"All data is encrypted at rest using AES-256-GCM"),a.createElement("li",null,"Data is stored in secure DigitalOcean data centers in the US"),a.createElement("li",null,"Backups are encrypted and retained for 30 days"),a.createElement("li",null,"Data is logically separated by workspace ID"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Data Sharing"),a.createElement("p",{className:"text-slate-300 mb-4"},"We do not sell your personal information. We may share information:"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,a.createElement("strong",null,"With Your Consent"),": When you explicitly approve"),a.createElement("li",null,a.createElement("strong",null,"Service Providers"),": Third parties who assist our operations"),a.createElement("li",null,a.createElement("strong",null,"Legal Requirements"),": To comply with laws or legal processes"),a.createElement("li",null,a.createElement("strong",null,"Business Transfers"),": In connection with mergers or acquisitions"),a.createElement("li",null,a.createElement("strong",null,"Aggregated Data"),": Non-identifiable statistics"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Data Security"),a.createElement("p",{className:"text-slate-300 mb-4"},"We implement industry-standard security measures:"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Encryption in transit (TLS 1.2+) and at rest (AES-256)"),a.createElement("li",null,"Access controls and authentication"),a.createElement("li",null,"Regular security audits and penetration testing"),a.createElement("li",null,"Incident response procedures"),a.createElement("li",null,"Employee security training"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Data Retention"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,a.createElement("strong",null,"Active Data"),": Retained while your subscription is active"),a.createElement("li",null,a.createElement("strong",null,"Deleted Tasks"),": Removed within 24 hours of deletion request"),a.createElement("li",null,a.createElement("strong",null,"Backup Data"),": Retained for 30 days after deletion"),a.createElement("li",null,a.createElement("strong",null,"Account Closure"),": All data deleted within 90 days"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Your Rights"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"GDPR Rights (EU Users)"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Access your personal data"),a.createElement("li",null,"Correct inaccurate data"),a.createElement("li",null,"Request data deletion"),a.createElement("li",null,"Object to processing"),a.createElement("li",null,"Data portability"),a.createElement("li",null,"Withdraw consent")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"CCPA Rights (California Users)"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"}
871,a.createElement("li",null,"Know what information we collect"),a.createElement("li",null,"Delete personal information"),a.createElement("li",null,"Opt-out of data sales (we don't sell data)"),a.createElement("li",null,"Non-discrimination for exercising rights"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Children's Privacy"),a.createElement("p",{className:"text-slate-300"},"Zenith is not intended for users under 18. We do not knowingly collect information from children.")),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"International Data Transfers"),a.createElement("p",{className:"text-slate-300"},"Data may be transferred to and processed in the United States. We ensure appropriate safeguards for international transfers.")),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Changes to This Policy"),a.createElement("p",{className:"text-slate-300"},"We may update this policy periodically. We'll notify you of material changes via email or in-app notification.")),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Contact Us"),a.createElement("p",{className:"text-slate-300 mb-4"},"For privacy questions or to exercise your rights:"),a.createElement("div",{className:"text-slate-300 space-y-2"},a.createElement("p",null,a.createElement("strong",null,"Email"),": ",a.createElement("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:underline"},"[email protected]")),a.createElement("p",null,a.createElement("strong",null,"Address"),": Ethos Tech FZE LLC",a.createElement("br",null),"United Arab Emirates"),a.createElement("p",null,a.createElement("strong",null,"Data Protection Officer"),": ",a.createElement("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:underline"},"[email protected]")))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Cookie Policy"),a.createElement("p",{className:"text-slate-300"},"We use essential cookies for authentication and functionality. No tracking or advertising cookies are used.")),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Third-Party Services"),a.createElement("p",{className:"text-slate-300 mb-4"},"We integrate with:"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,a.createElement("strong",null,"Slack"),": Subject to Slack's privacy policy"),a.createElement("li",null,a.createElement("strong",null,"DigitalOcean"),": Infrastructure provider"),a.createElement("li",null,a.createElement("strong",null,"Stripe"),": Payment processing (Pro/Enterprise plans)"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Compliance"),a.createElement("p",{className:"text-slate-300 mb-4"},"We comply with:"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"General Data Protection Regulation (GDPR)"),a.createElement("li",null,"California Consumer Privacy Act (CCPA)"),a.createElement("li",null,"Other applicable data protection laws"))),a.createElement("div",{className:"border-t border-slate-700 mt-12 pt-8"},a.createElement("p",{className:"text-slate-400 text-sm"},"This privacy policy is effective as of the date stated above. For questions, contact"," ",a.createElement("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:underline"},"[email protected]"))))))}function B3(){return a.createElement("div",{className:"min-h-screen bg-slate-900 text-white"},a.createElement("div",{className:"container mx-auto px-4 py-16 max-w-4xl"},a.createElement("h1",{className:"text-4xl font-bold mb-8"},"Terms of Service"),a.createElement("p",{className:"text-slate-300 mb-8"},"Last Updated: August 1, 2025"),a.createElement("div",{className:"prose prose-invert max-w-none space-y-8"},a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"1. Agreement to Terms"),a.createElement("p",{className:"text-slate-300"},'By accessing or using Zenith ("Service"), you agree to be bound by these Terms of Service ("Terms"). If you disagree with any part of these terms, you may
871not use our Service.')),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"2. Description of Service"),a.createElement("p",{className:"text-slate-300 mb-4"},"Zenith is an AI-powered task management application for Slack that:"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Automatically extracts tasks from conversations"),a.createElement("li",null,"Tracks task progress and ownership"),a.createElement("li",null,"Provides conversation summaries"),a.createElement("li",null,"Enables cross-channel search"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"3. Account Registration"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Eligibility"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"You must be 18 years or older"),a.createElement("li",null,"You must have authority to bind your organization"),a.createElement("li",null,"You must provide accurate information")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Account Security"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"You are responsible for maintaining account security"),a.createElement("li",null,"You must notify us immediately of unauthorized access"),a.createElement("li",null,"We are not liable for losses due to unauthorized access"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"4. Acceptable Use"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"You agree to:"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Use the Service in compliance with all laws"),a.createElement("li",null,"Respect intellectual property rights"),a.createElement("li",null,"Not interfere with Service operation"),a.createElement("li",null,"Not attempt to gain unauthorized access")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"You agree not to:"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Use the Service for illegal purposes"),a.createElement("li",null,"Harass, abuse, or harm others"),a.createElement("li",null,"Transmit malware or harmful code"),a.createElement("li",null,"Violate Slack's Terms of Service"),a.createElement("li",null,"Reverse engineer our Service"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"5. Intellectual Property"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Our Property"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Zenith owns all rights to the Service"),a.createElement("li",null,"This includes our AI technology, algorithms, and interface"),a.createElement("li",null,"You may not copy, modify, or distribute our IP")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Your Content"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"You retain ownership of your content"),a.createElement("li",null,"You grant us license to process content for Service operation"),a.createElement("li",null,"We don't claim ownership of your tasks or messages"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"6. Privacy and Data"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Our Privacy Policy governs data collection and use"),a.createElement("li",null,"You consent to data processing as described"),a.createElement("li",null,"You ensure you have rights to share workspace data"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"7. Subscription and Payment"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Free Plan"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Limited to 100 tasks per month"),a.createElement("li",null,"1 workspace"),a.createElement("li",null,"Community support only"),a.createElement("li",null,"May be discontinued with 30 days notice")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Paid Plans"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Pro: $10/user/month"),a.createElement("li",null,"Enterprise: Custom pricing"),a.createElement("li",null,"Billed monthly or annually"),a.createElement("li",null,"Prices subject to change with 30 days notice")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Payment Terms"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Payment due upon subscription"),a.createElement("li",null,"No refunds for partial periods"),a.createElement("li",null,"Automatic renew
871al unless cancelled"),a.createElement("li",null,"Late payments may result in suspension"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"8. Service Availability"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"We strive for 99.9% uptime"),a.createElement("li",null,"No guarantee of uninterrupted service"),a.createElement("li",null,"Scheduled maintenance with notice"),a.createElement("li",null,"No liability for downtime"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"9. Limitation of Liability"),a.createElement("div",{className:"bg-slate-800 p-4 rounded-lg mb-4"},a.createElement("p",{className:"text-slate-300 font-semibold"},"TO THE MAXIMUM EXTENT PERMITTED BY LAW:")),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,'Service provided "AS IS" without warranties'),a.createElement("li",null,"We disclaim all implied warranties"),a.createElement("li",null,"Not liable for indirect, incidental, or consequential damages"),a.createElement("li",null,"Total liability limited to fees paid in last 12 months"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"10. Indemnification"),a.createElement("p",{className:"text-slate-300 mb-4"},"You agree to indemnify and hold harmless Zenith from claims arising from:"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Your use of the Service"),a.createElement("li",null,"Your violation of these Terms"),a.createElement("li",null,"Your violation of any rights of another"),a.createElement("li",null,"Your content or data"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"11. Termination"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"By You"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Cancel subscription anytime"),a.createElement("li",null,"Request data deletion"),a.createElement("li",null,"Termination effective at end of billing period")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"By Us"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"For violation of Terms"),a.createElement("li",null,"For non-payment"),a.createElement("li",null,"For security reasons"),a.createElement("li",null,"With 30 days notice without cause")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Effect of Termination"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Access to Service ends"),a.createElement("li",null,"Data deleted per Privacy Policy"),a.createElement("li",null,"No refund for unused time"),a.createElement("li",null,"Survival of applicable Terms"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"12. Changes to Terms"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"We may modify Terms with 30 days notice"),a.createElement("li",null,"Continued use constitutes acceptance"),a.createElement("li",null,"Material changes require explicit consent"),a.createElement("li",null,"Current Terms always available online"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"13. Dispute Resolution"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Informal Resolution"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Contact us first to resolve disputes"),a.createElement("li",null,"Good faith effort required"),a.createElement("li",null,"60-day resolution period")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Binding Arbitration"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Disputes resolved through arbitration"),a.createElement("li",null,"JAMS arbitration rules apply"),a.createElement("li",null,"Indiv
871idual claims only (no class actions)"),a.createElement("li",null,"Arbitration in Delaware"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"14. General Provisions"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Governing Law"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Delaware law governs these Terms"),a.createElement("li",null,"Exclusive jurisdiction in Delaware courts")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Miscellaneous"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Entire agreement between parties"),a.createElement("li",null,"Severability of provisions"),a.createElement("li",null,"No waiver without writing"),a.createElement("li",null,"Assignment requires consent"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"15. Service-Specific Terms"),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"AI Processing"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"No guarantee of 100% task capture"),a.createElement("li",null,"AI suggestions are not professional advice"),a.createElement("li",null,"You remain responsible for task management")),a.createElement("h3",{className:"text-xl font-semibold mb-3 mt-6"},"Slack Integration"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Subject to Slack's terms"),a.createElement("li",null,"We're not responsible for Slack changes"),a.createElement("li",null,"Integration may be affected by Slack policies"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"16. Contact Information"),a.createElement("div",{className:"text-slate-300 space-y-2"},a.createElement("p",null,a.createElement("strong",null,"General Inquiries"),": ",a.createElement("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:underline"},"[email protected]")),a.createElement("p",null,a.createElement("strong",null,"Legal"),": ",a.createElement("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:underline"},"[email protected]")),a.createElement("p",null,a.createElement("strong",null,"Address"),": Ethos Tech FZE LLC",a.createElement("br",null),"United Arab Emirates"))),a.createElement("section",null,a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"17. Definitions"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,a.createElement("strong",null,"Service"),": The Zenith application and related services"),a.createElement("li",null,a.createElement("strong",null,"User"),": Individual using the Service"),a.createElement("li",null,a.createElement("strong",null,"Workspace"),": Slack workspace where Service is installed"),a.createElement("li",null,a.createElement("strong",null,"Content"),": Messages, files, and data processed by Service"))),a.createElement("div",{className:"border-t border-slate-700 mt-12 pt-8"},a.createElement("p",{className:"text-slate-400 text-sm"},"By using Zenith, you acknowledge that you have read, understood, and agree to be bound by these Terms of Service.")))))}const W3=[{question:"How does Zenith extract tasks from Slack conversations?",answer:"Zenith uses advanced AI to analyze messages in real-time. It identifies action items, deadlines, and assignments automatically. Tasks are extracted based on context, keywords, and natural language patterns."},{question:"Which Slack channels can Zenith access?",answer:"Zenith only accesses channels where it's explicitly invited. You have complete control over which channels to monitor. Simply invite @zenith to any channel where you want task tracking enabled."},{question:"How secure is my data?",answer:"We take security seriously. All data is encrypted at rest (AES-256-GCM) and in transit (TLS 1.2+). Your workspace data is logically isolated and never shared with other customers. We're GDPR and CCPA compliant."},{question:"Can I edit or delete tasks after they're created?",answer:"Yes! You can update task status, assign owners, and delete tasks directly from Slack using interactive buttons. All changes are synchronized in real-time across your workspace."},{question:"What's included in the Free plan?",answer:"The Free plan includes up to 100 tasks per month, 1 workspace, conversation summaries, and community support. It's perfect for small teams getting started with automated task management."},{question:"How do I upgrade to Pro or Enterprise?",answer:"You can upgrade directly from your Slack workspace settings or contact our sales team for Enterprise plans. Pro plans are $10/user/month with unlimited tasks and priority support."}];function V3(){const[t,e]=x.useState(null),r=n=>{e(t===n?null:n)};return a.createElement("div",{className:"min-h-screen bg-slate-900 text-white"},a.createElement("div",{className:"container mx-auto px-4 py-16 max-w-6xl"},a.createElement("div",{className:"text-center mb-12"},a.createElement("h1",{className:"text-4xl font-bold mb-4"},"How can we help?"),a.createElement("p",{className:"text-xl text-slate-300"},"Get support, browse documentation, or contact our team")),a.createElement("div",{className:"grid md:grid-cols-3 gap-6 mb-16"},a.createElement("div",{className:"bg-slate-800 rounded-lg p-6 border border-slate-700"},a.createElement("div",{className:"flex items-center mb-4"},a.createElement(al,{className:"h-8 w-8 text-blue-400 mr-3"}),a.createElement("h2",{className:"text-xl font-semibold"},"Email Support")),a.createElement("p",{className:"text-slate-300 mb-4"},"Get help from our support team. We typically respond within 24 hours."),a.createElement("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:text-blue-300 font-medium inline-flex items-center"},"[email protected]",a.createElement(kf,{className:"h-4 w-4 ml-1"}))),a.createElement("div",{className:"bg-slate-800 rounded-lg p-6 border border-slate-700"},a.createElement("div",{className:"flex items-center mb-4"},a.createElement(lI,{className:"h-8 w-8 text-green-400 mr-3"}),a.createElement("h2",{className:"text-xl font-semibold"},"Documentation")),a.createElement("p",{className:"text-slate-300 mb-4"},"Browse our comprehensive guides, API references, and tutorials."),a.createElement("a",{href:"https://docs.usezenith.ai",target:"_blank",rel:"noopener noreferrer",className:"text-green-400 hover:text-green-300 font-medium inline-flex items-center"},"View Documentation",a.createElement(kf,{className:"h-4 w-4 ml-1"}))),a.createElement("div",{className:"bg-slate-800 rounded-lg p-6 border border-slate-700"},a.createElement("div",{className:"flex items-center mb-4"},a.createElement(gw,{className:"h-8 w-8 text-purple-400 mr-3"}),a.createElement("h2",{className:"text-xl font-semibold"},"Community")),a.createElement("p",{className:"text-slate-300 mb-4"},"Join our Slack community to connect with other users and our team."),a.createElement("a",{href:"https://community.usezenith.ai",target:"_blank",rel:"noopener noreferrer",className:"text-purple-400 hover:text-purple-300 font-medium inline-flex items-center"},"Join Community",a.createElement(kf,{className:"h-4 w-4 ml-1"})))),a.createElement("div",{className:"bg-slate-800 rounded-lg p-8 mb-16 border border-slate-700"},a.createElement("h2",{className:"text-2xl font-semibold mb-6 text-center"},"Support Response Times"),a.createElement("div",{className:"grid md:grid-cols-3 gap-6 text-center"},a.createElement("div",null,a.createElement("div",{className:"flex items-center justify-center mb-2"},a.createElement(Dr,{className:"h-5 w-5 text-slate-400 mr-2"}),a.createElement("h3",{className:"font-semibold"},"Free Plan")),a.createElement("p",{className:"text-slate-300"},"Community support"),a.createElement("p",{className:"text-sm text-slate-400"},"Best effort response")),a.createElement("div",null,a.createElement("div",{className:"flex items-center justify-center mb-2"},a.createElement(Dr,{className:"h-5 w-5 text-blue-400 mr-2"}),a.createElement("h3",{className:"font-semibold"},"Pro Plan")),a.createElement("p",{className:"text-slate-300"},"Priority support"),a.createElement("p",{className:"text-sm text-slate-400"},"Within 24 hours")),a.createElement("div",null,a.createElement("div",{className:"flex items-center justify-center mb-2"},a.createElement(Dr,{className:"h-5 w-5 text-purple-400 mr-2"}),a.createElement("h3",{className:"font-semibold"},"Enterprise")),a.createElement("p",{className:"text-slate-300"},"Dedicated support"),a.createElement("p",{className:"text-sm text-slate-400"},"Within 4 hours")))),a.createElement("div",{className:"mb-16"},a.createElement("h2",{className:"text-2xl font-semibold mb-8 text-center"},"Frequently Asked Questions"),a.createElement("div",{className:"space-y-4 max-w-3xl mx-auto"},W3.map((n,s)=>a.createElement("div",{key:s,className:"bg-slate-800 rounded-lg border border-slate-700 overflow-hidden"},a.createElement("button",{onClick:()=>r(s),className:"w-full px-6 py-4 text-left flex items-center justify-between hover:bg-slate-700/50 transition-colors"},a.createElement("span",{className:"font-medium"},n.question),t===s?a.createElement(mI,{className:"h-5 w-5 text-slate-400"}):a.createElement(dw,{className:"h-5 w-5 text-slate-400"})),t===s&&a.createElement("div",{className:"px-6 pb-4"},a.createElement("p",{className:"text-slate-300"},n.answer)))))),a.createElement("div",{className:"text-center bg-gradient-to-r from-blue-600 to-purple-600 rounded-lg p-12"},a.createElement("h2",{className:"text-3xl font-bold mb-4"},"Still need help?"),a.createElement("p",{className:"text-xl mb-8 text-slate-100"},"Our support team is here to assist you with any questions or issues."),a.createElement(ce,{size:"lg",variant:"secondary",className:"bg-white text-slate-900 hover:bg-slate-100",onClick:()=>window.location.href="mailto:[email protected]"},a.createElement(al,{className:"h-5 w-5 mr-2"}),"Contact Support"))))}function q3({className:t=""}){return a.createElement("section",{className:`py-16 bg-white dark:bg-slate-900 ${t}`},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-4xl mx-auto"},a.createElement("h2",{className:"text-3xl font-bold text-center mb-12 text-slate-900 dark:text-white"},"Built by a Founder Who Gets It"),a.createElement("div",{className:"grid md:grid-cols-2 gap-12 items-center"},a.createElement("div",{className:"flex justify-center"},a.createElement("div",{className:"relative"},a.createElement("div",{className:"w-48 h-48 rounded-full bg-gradient-to-r from-blue-500 to-purple-600 p-1"},a.createElement("div",{className:"w-full h-full rounded-full bg-white dark:bg-slate-900 p-2"},a.createElement("div",{className:"w-full h-full rounded-full bg-slate-200 dark:bg-slate-700 flex items-center justify-center"},a.createElement("span",{className:"text-4xl font-bold text-slate-500 dark:text-slate-400"},"NK")))),a.createElement("div",{className:"absolute -bottom-2 -right-2 px-3 py-1 bg-green-100 dark:bg-green-900/30 border border-green-200 dark:border-green-700 rounded-full"},a.createElement("span",{className:"text-sm font-medium text-green-700 dark:text-green-400"},"Solo Founder")))),a.createElement("div",{className:"space-y-6"},a.createElement("div",null,a.createElement("h3",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-2"},"Nilesh Kumar"),a.createElement("p",{className:"text-lg text-primary dark:text-primary-light font-medium mb-4"},"Founder & Engineer")),a.createElement("p",{className:"text-slate-600 dar
871k:text-slate-300 leading-relaxed"},"After spending 8+ years building enterprise AI systems at Google and Microsoft, I experienced the pain of managing tasks across scattered conversations. I built Zenith to solve my own problem â automatically capturing action items from the tools we already use every day."),a.createElement("p",{className:"text-slate-600 dark:text-slate-300 leading-relaxed"},"Unlike big companies adding AI as a feature, Zenith is 100% focused on making task management effortless. No context switching, no manual tracking â just AI that understands your work in progress."),a.createElement("div",{className:"grid grid-cols-2 gap-4 pt-4"},a.createElement("div",{className:"flex items-center gap-2"},a.createElement("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),a.createElement("span",{className:"text-sm text-slate-600 dark:text-slate-400"},"8+ years AI/ML experience")),a.createElement("div",{className:"flex items-center gap-2"},a.createElement("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),a.createElement("span",{className:"text-sm text-slate-600 dark:text-slate-400"},"Former Google, Microsoft")),a.createElement("div",{className:"flex items-center gap-2"},a.createElement("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),a.createElement("span",{className:"text-sm text-slate-600 dark:text-slate-400"},"Built enterprise-scale AI")),a.createElement("div",{className:"flex items-center gap-2"},a.createElement("div",{className:"w-2 h-2 bg-blue-500 rounded-full"}),a.createElement("span",{className:"text-sm text-slate-600 dark:text-slate-400"},"1000+ tasks automated"))),a.createElement("div",{className:"flex items-center gap-4 pt-4"},a.createElement("a",{href:"https://github.com/nileshkumar",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-slate-600 dark:text-slate-400 hover:text-primary dark:hover:text-primary-light transition-colors"},a.createElement(yI,{className:"w-5 h-5"}),a.createElement("span",{className:"text-sm"},"GitHub")),a.createElement("a",{href:"https://linkedin.com/in/nileshkumar",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-slate-600 dark:text-slate-400 hover:text-primary dark:hover:text-primary-light transition-colors"},a.createElement(fw,{className:"w-5 h-5"}),a.createElement("span",{className:"text-sm"},"LinkedIn")),a.createElement("a",{href:"mailto:[email protected]",className:"flex items-center gap-2 text-slate-600 dark:text-slate-400 hover:text-primary dark:hover:text-primary-light transition-colors"},a.createElement(al,{className:"w-5 h-5"}),a.createElement("span",{className:"text-sm"},"Email"))),a.createElement("div",{className:"mt-6 p-4 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg"},a.createElement("p",{className:"text-sm text-blue-800 dark:text-blue-200 italic"},`"I personally respond to every email and guide each customer through setup. Your success is my success, and I'm committed to making Zenith work perfectly for your team."`),a.createElement("p",{className:"text-sm font-medium text-blue-700 dark:text-blue-300 mt-2"},"â Nilesh")))),a.createElement("div",{className:"mt-16 text-center"},a.createElement("h3",{className:"text-xl font-semibold text-slate-900 dark:text-white mb-4"},"The Mission"),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-300 max-w-2xl mx-auto"},"To eliminate manual task tracking forever by making AI so intelligent it captures everything, so you can focus on the work that matters.")))))}const H3=[{icon:vr,title:"Automatic Task Extraction",description:"AI identifies and tracks tasks from your conversations without manual input"},{icon:or,title:"Team Collaboration",description:"Assign tasks, track ownership, and keep everyone aligned across channels"},{icon:sl,title:"Cross-Channel Search",description:"Find any task or conversation across your entire workspace instantly"},{icon:gw,title:"Smart Summaries",description:"Get AI-generated summaries of long conversations with key action items"},{icon:iI,title:"Progress Tracking",description:"Monitor task completion rates and team productivity at a glance"},{icon:Mr,title:"Enterprise Security",description:"Bank-level encryption and compliance with GDPR, CCPA, and SOC 2"}],Mb=[{number:"1",title:"Click Add to Slack",description:"Authorize Zenith to connect with your workspace"}
871,{number:"2",title:"Choose Channels",description:"Invite @zenith to channels where you want task tracking"},{number:"3",title:"Start Working",description:"Continue conversations as normal - Zenith handles the rest"}];function G3(){return a.createElement("div",{className:"min-h-screen bg-slate-900 text-white"},a.createElement("div",{className:"container mx-auto px-4 py-16 text-center"},a.createElement("div",{className:"max-w-3xl mx-auto mb-12"},a.createElement("h1",{className:"text-5xl font-bold mb-6"},"Supercharge your Slack with AI"),a.createElement("p",{className:"text-xl text-slate-300 mb-8"},"Zenith brings three AI superpowers to your Slack workspace:",a.createElement("br",null),a.createElement("br",null),"ð ",a.createElement("strong",null,"Task Intelligence")," - Never manually track action items again",a.createElement("br",null),"ð ",a.createElement("strong",null,"Smart Summaries")," - Understand long conversations in seconds",a.createElement("br",null),"ð ",a.createElement("strong",null,"Universal Search")," - Find anything across all channels instantly",a.createElement("br",null),a.createElement("br",null),"Built for teams that want to automate their workflows directly in Slack."),a.createElement("a",{href:"https://slack.usezenith.ai/slack/oauth/direct-install",className:"inline-flex items-center px-8 py-4 bg-gradient-to-r from-blue-600 to-purple-600 text-white rounded-lg font-semibold text-lg hover:from-blue-700 hover:to-purple-700 transition-all transform hover:scale-105 shadow-lg"},a.createElement("svg",{className:"w-6 h-6 mr-3",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M19.712 7.42498C19.712 4.34331 17.1937 1.82498 14.112 1.82498C11.0303 1.82498 8.51196 4.34331 8.51196 7.42498C8.51196 10.5066 11.0303 13.025 14.112 13.025H19.712V7.42498Z",fill:"white"}),a.createElement("path",{d:"M22.512 7.42498C22.512 10.5066 25.0303 13.025 28.112 13.025C31.1937 13.025 33.712 10.5066 33.712 7.42498V7.42498C33.712 4.34331 31.1937 1.82498 28.112 1.82498C25.0303 1.82498 22.512 4.34331 22.512 7.42498V7.42498Z",fill:"white"}),a.createElement("path",{d:"M8.51196 22.025C8.51196 18.9433 11.0303 16.425 14.112 16.425C17.1937 16.425 19.712 18.9433 19.712 22.025C19.712 25.1066 17.1937 27.625 14.112 27.625H8.51196V22.025Z",fill:"white"}),a.createElement("path",{d:"M8.51196 24.825C8.51196 27.9066 11.0303 30.425 14.112 30.425H14.112C17.1937 30.425 19.712 32.9433 19.712 36.025C19.712 39.1066 17.1937 41.625 14.112 41.625C11.0303 41.625 8.51196 39.1066 8.51196 36.025V24.825Z",fill:"white"}),a.createElement("path",{d:"M22.512 36.025C22.512 32.9433 25.0303 30.425 28.112 30.425C31.1937 30.425 33.712 32.9433 33.712 36.025C33.712 39.1066 31.1937 41.625 28.112 41.625H22.512V36.025Z",fill:"white"}),a.createElement("path",{d:"M19.712 36.025C19.712 39.1066 17.1937 41.625 14.112 41.625H14.112C11.0303 41.625 8.51196 44.1433 8.51196 47.225C8.51196 50.3066 11.0303 52.825 14.112 52.825C17.1937 52.825 19.712 50.3066 19.712 47.225V36.025Z",fill:"white"}),a.createElement("path",{d:"M33.712 22.025C33.712 25.1066 31.1937 27.625 28.112 27.625C25.0303 27.625 22.512 25.1066 22.512 22.025C22.512 18.9433 25.0303 16.425 28.112 16.425H33.712V22.025Z",fill:"white"}),a.createElement("path",{d:"M33.712 19.225C33.712 16.1433 31.1937 13.625 28.112 13.625H28.112C25.0303 13.625 22.512 11.1066 22.512 8.02498C22.512 4.94331 25.0303 2.42498 28.112 2.42498C31.1937 2.42498 33.712 4.94331 33.712 8.02498V19.225Z",fill:"white"})),"Add to Slack"),a.createElement("p",{className:"text-sm text-slate-400 mt-4"},"Free for up to 100 tasks/month ⢠No credit card required")),a.createElement("div",{className:"flex flex-wrap justify-center items-center gap-8 text-slate-400"},a.createElement("div",{className:"flex items-center gap-2"},a.createElement(Mr,{className:"h-5 w-5"}),a.createElement("span",null,"SOC 2 Compliant")),a.createElement("div",{className:"flex items-center gap-2"},a.createElement(qr,{className:"h-5 w-5"}),a.createElement("span",null,"GDPR Ready")),a.createElement("div",{className:"flex items-center gap-2"},a.createElement(or,{className:"h-5 w-5"}),a.createElement("span",null,"Production Ready")))),a.createElement(gk,{showGrowthIndicators:!0,updateInterval:15e3}),a.createElement("section",{className:"py-16 bg-slate-800/50"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("h2",{className:"text-3xl font-bold text-center mb-12"},"Get started in minutes"),a.createElement("div",{className:"grid md:grid-cols-3 gap-8 max-w-4xl mx-auto"},Mb.map((t,e)=>a.createElement("div",{key:e,className:"text-center"},a.createElement("div",{className:"w-16 h-16 bg-gradient-to-r from-blue-600 to-purple-600 rounded-full flex items-center justify-center text-2xl font-bold mx-auto mb-4"},t.number),a.createElement("h3",{className:"text-xl font-semibold mb-2"},t.title),a.createElement("p",{className:"text-slate-300"},t.description),e<Mb.length-1&&a.createElement(Rr,{className:"hidden md:block h-6 w-6 text-slate-600 absolute right-0 top-1/2 -translate-y-1/2 translate-x-1/2"})))))),a.createElement("section",{className:"py-16"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("h2",{className:"text-3xl font-bold text-center mb-12"},"Everything you need to stay organized"),a.createElement("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-6xl mx-auto"},H3.map((t,e)=>a.createElement("div",{key:e,className:"bg-slate-800 rounded-lg p-6 border border-slate-700"},a.createElement(t.icon,{className:"h-10 w-10 text-blue-400 mb-4"}),a.createElement("h3",{className:"text-xl font-semibold mb-2"},t.title),a.createElement("p",{className:"text-slate-300"},t.description)))))),a.createElement("section",{className:"py-16 bg-slate-800/50"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-4xl mx-auto"},a.createElement("h3",{className:"text-2xl font-bold text-center mb-12 text-white"},"Enterprise-Grade Security & Trust"),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 text-center"},a.createElement("div",{className:"bg-slate-900/50 p-6 rounded-xl"},a.createElement("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4"},a.createElement("svg",{className:"lucide lucide-shield h-6 w-6 text-primary",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}))),a.createElement("h4",{className:"font-semibold text-white mb-2"},"SOC 2 Compliant"),a.createElement("p",{className:"text-sm text-slate-400"},"Enterprise-grade security controls and continuous monitoring")),a.createElement("div",{className:"bg-slate-900/50 p-6 rounded-xl"},a.createElement("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4"},a.createElement("svg",{className:"lucide lucide-lock h-6 w-6 text-primary",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},a.createElement("rect",{height:"12",rx:"2",width:"18",x:"3",y:"11"}),a.createElement("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"}))),a.createElement("h4",{className:"font-semibold text-white mb-2"},"End-to-End Encryption"),a.createElement("p",{className:"text-sm text-slate-400"},"Your data is encrypted at rest and in transit with AES-256")),a.createElement("div",{className:"bg-slate-900/50 p-6 rounded-xl"},a.createElement("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4"}
871,a.createElement("svg",{className:"lucide lucide-users h-6 w-6 text-primary",fill:"none",height:"24",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),a.createElement("circle",{cx:"9",cy:"7",r:"4"}),a.createElement("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),a.createElement("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"}))),a.createElement("h4",{className:"font-semibold text-white mb-2"},"GDPR Compliant"),a.createElement("p",{className:"text-sm text-slate-400"},"Full compliance with EU data protection regulations")))))),a.createElement(q3,null),a.createElement("section",{className:"py-20"},a.createElement("div",{className:"container mx-auto px-4 text-center"},a.createElement("h2",{className:"text-4xl font-bold mb-6"},"Ready to supercharge your Slack workflow?"),a.createElement("p",{className:"text-xl text-slate-300 mb-8 max-w-2xl mx-auto"},"Join thousands of teams who've eliminated task management friction. Install Zenith and let AI handle the heavy lifting."),a.createElement("a",{href:"https://slack.usezenith.ai/slack/oauth/direct-install",className:"inline-flex items-center px-8 py-4 bg-gradient-to-r from-blue-600 to-purple-600 text-white rounded-lg font-semibold text-lg hover:from-blue-700 hover:to-purple-700 transition-all transform hover:scale-105 shadow-lg"},a.createElement("svg",{className:"w-6 h-6 mr-3",viewBox:"0 0 54 54",fill:"none",xmlns:"http://www.w3.org/2000/svg"},a.createElement("path",{d:"M19.712 7.42498C19.712 4.34331 17.1937 1.82498 14.112 1.82498C11.0303 1.82498 8.51196 4.34331 8.51196 7.42498C8.51196 10.5066 11.0303 13.025 14.112 13.025H19.712V7.42498Z",fill:"white"}),a.createElement("path",{d:"M22.512 7.42498C22.512 10.5066 25.0303 13.025 28.112 13.025C31.1937 13.025 33.712 10.5066 33.712 7.42498V7.42498C33.712 4.34331 31.1937 1.82498 28.112 1.82498C25.0303 1.82498 22.512 4.34331 22.512 7.42498V7.42498Z",fill:"white"}),a.createElement("path",{d:"M8.51196 22.025C8.51196 18.9433 11.0303 16.425 14.112 16.425C17.1937 16.425 19.712 18.9433 19.712 22.025C19.712 25.1066 17.1937 27.625 14.112 27.625H8.51196V22.025Z",fill:"white"}),a.createElement("path",{d:"M8.51196 24.825C8.51196 27.9066 11.0303 30.425 14.112 30.425H14.112C17.1937 30.425 19.712 32.9433 19.712 36.025C19.712 39.1066 17.1937 41.625 14.112 41.625C11.0303 41.625 8.51196 39.1066 8.51196 36.025V24.825Z",fill:"white"}),a.createElement("path",{d:"M22.512 36.025C22.512 32.9433 25.0303 30.425 28.112 30.425C31.1937 30.425 33.712 32.9433 33.712 36.025C33.712 39.1066 31.1937 41.625 28.112 41.625H22.512V36.025Z",fill:"white"}),a.createElement("path",{d:"M19.712 36.025C19.712 39.1066 17.1937 41.625 14.112 41.625H14.112C11.0303 41.625 8.51196 44.1433 8.51196 47.225C8.51196 50.3066 11.0303 52.825 14.112 52.825C17.1937 52.825 19.712 50.3066 19.712 47.225V36.025Z",fill:"white"}),a.createElement("path",{d:"M33.712 22.025C33.712 25.1066 31.1937 27.625 28.112 27.625C25.0303 27.625 22.512 25.1066 22.512 22.025C22.512 18.9433 25.0303 16.425 28.112 16.425H33.712V22.025Z",fill:"white"}),a.createElement("path",{d:"M33.712 19.225C33.712 16.1433 31.1937 13.625 28.112 13.625H28.112C25.0303 13.625 22.512 11.1066 22.512 8.02498C22.512 4.94331 25.0303 2.42498 28.112 2.42498C31.1937 2.42498 33.712 4.94331 33.712 8.02498V19.225Z",fill:"white"})),"Install Zenith Now"),a.createElement("div",{className:"mt-12 flex justify-center gap-8 text-sm text-slate-400"},a.createElement("a",{href:"/privacy",className:"hover:text-white transition-colors"},"Privacy Policy"),a.createElement("a",{href:"/terms",className:"hover:text-white transition-colors"},"Terms of Service"),a.createElement("a",{href:"/support",className:"hover:text-white transition-colors"},"Support")))))}function Y3(){const t=[{name:"Anthropic",details:{Service:"Claude API",Purpose:"AI-powered task extraction and summarization","Data Processing":"Message excerpts for task identification",Location:"United States",Retention:"Zero retention policy"}},{name:"OpenAI",details:{Service:"GPT API",Purpose:"Backup LLM for task extraction","Data Processing":"Message excerpts (fallback only)",Location:"United States",Retention:"Zero retention policy"}},{name:"DigitalOcean Spaces",details:{Service:"Object Storage",Purpose:"File attachment storage","Data Processing":"User-uploaded files",Location:"NYC3 (New York)",Retention:"Until user deletion"}}];return a.createElement("div",{className:"min-h-screen bg-slate-900 text-white"},a.createElement("div",{className:"container mx-auto px-4 py-16 max-w-4xl"},a.createElement("h1",{className:"text-4xl font-bold mb-4"},"Zenith Subprocessors"),a.createElement("p",{className:"text-slate-400 mb-8"}
871,"Last updated: August 1, 2025"),a.createElement("section",{className:"mb-12"},a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Overview"),a.createElement("p",{className:"text-slate-300 leading-relaxed"},"Zenith uses a limited number of third-party subprocessors to provide our services. We ensure all subprocessors meet our security and privacy standards.")),a.createElement("section",{className:"mb-12"},a.createElement("h2",{className:"text-2xl font-semibold mb-6"},"Current Subprocessors"),t.map((e,r)=>a.createElement("div",{key:r,className:"bg-slate-800 border border-slate-700 rounded-lg p-6 mb-6"},a.createElement("h3",{className:"text-xl font-semibold text-blue-400 mb-4"},e.name),a.createElement("table",{className:"w-full"},a.createElement("tbody",null,Object.entries(e.details).map(([n,s])=>a.createElement("tr",{key:n,className:"border-b border-slate-700 last:border-0"},a.createElement("td",{className:"py-3 pr-4 font-medium text-slate-400 w-1/3"},n),a.createElement("td",{className:"py-3 text-slate-300"},s)))))))),a.createElement("section",{className:"mb-12"},a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Subprocessor Guidelines"),a.createElement("div",{className:"space-y-6"},a.createElement("div",null,a.createElement("h3",{className:"text-xl font-semibold mb-3"},"Selection Criteria"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"Strong security and privacy practices"),a.createElement("li",null,"SOC 2 or equivalent certification (where applicable)"),a.createElement("li",null,"Clear data processing agreements"),a.createElement("li",null,"Commitment to data protection"),a.createElement("li",null,"Zero retention policies for AI services"))),a.createElement("div",null,a.createElement("h3",{className:"text-xl font-semibold mb-3"},"Data Protection"),a.createElement("ul",{className:"list-disc list-inside text-slate-300 space-y-2"},a.createElement("li",null,"All data transmitted to subprocessors is encrypted in transit"),a.createElement("li",null,"Minimal data sharing - only what's necessary for the service"),a.createElement("li",null,"No subprocessor has access to your complete data"),a.createElement("li",null,"Regular security reviews of all subprocessors"))),a.createElement("div",null,a.createElement("h3",{className:"text-xl font-semibold mb-3"},"Updates to Subprocessors"),a.createElement("p",{className:"text-slate-300"},"We will update this page when adding or removing subprocessors. For material changes, we will notify customers via email at least 30 days in advance.")))),a.createElement("section",{className:"mb-12"},a.createElement("h2",{className:"text-2xl font-semibold mb-4"},"Contact"),a.createElement("p",{className:"text-slate-300"},"For questions about our subprocessors, please contact:"," ",a.createElement("a",{href:"mailto:[email protected]",className:"text-blue-400 hover:text-blue-300"},"[email protected]")))))}function Ks({name:t,status:e,description:r,action:n,available:s,users:o,icon:c}){return a.createElement("div",{className:`rounded-lg p-6 border transition-all hover:shadow-lg ${s?"bg-green-50 dark:bg-green-500/10 border-green-500":e.includes("Coming")?"bg-yellow-50 dark:bg-yellow-500/10 border-yellow-500":"bg-slate-50 dark:bg-slate-800/50 border-slate-200 dark:border-slate-700"}`},a.createElement("div",{className:"flex items-start justify-between mb-3"},a.createElement("div",{className:"flex items-center gap-3"},c&&a.createElement("span",{className:"text-2xl"},c),a.createElement("h3",{className:"text-xl font-semibold"},t)),s&&a.createElement(Za,{className:"h-5 w-5 text-green-500"}),e.includes("Coming")&&a.createElement(Dr,{className:"h-5 w-5 text-yellow-500"})),a.createElement("p",{className:`text-sm mb-2 font-medium ${s?"text-green-600 dark:text-green-400":e.includes("Coming")?"text-yellow-600 dark:text-yellow-400":"text-slate-500 dark:text-slate-400"}`},e),o&&a.createElement("p",{className:"text-sm text-slate-500 dark:text-slate-400 mb-3"},o),a.createElement("p",{className:"text-slate-600 dark:text-slate-300 mb-6"},r),n)}function Mo({platform:t,text:e="Join Waitlist"}){return a.createElement("button",{className:"w-full px-4 py-2 bg-slate-200 dark:bg-slate-700 text-slate-700 dark:text-slate-200 rounded-lg hover:bg-slate-300 dark:hover:bg-slate-600 transition-colors",onClick:()=>{const r=document.getElementById("platform");if(r){r.value=t;const n=new Event("change",{bubbles:!0});r.dispatchEvent(n)}document.getElementById("waitlist-form")?.scrollIntoView({behavior:"smooth"})}},e)}function J3(){const[t,e]=x.useState(""),[r,n]=x.useState(""),[s,o]=x.useState(!1),[c,d]=x.useState(!1),m=async h=>{h.preventDefault(),o(!0),await new Promise(p=>setTimeout(p,1e3)),d(!0),o(!1),e(""),n(""),setTimeout(()=>d(!1),3e3)};return a.createElement("div",{className:"min-h-screen bg-white dark:bg-slate-900 text-slate-900 dark:text-white"},a.createElement("div",{className:"container mx-auto px-4 py-16"},a.createElement("div",{className:"max-w-4xl mx-auto"},a.createElement("h1",{className:"text-4xl md:text-5xl font-bold mb-6 text-center"},"AI that works where you work"),a.createElement("p",{className:"text-xl text-slate-600 dar
871k:text-slate-300 text-center mb-12 max-w-3xl mx-auto"},"Zenith brings intelligent task management, search, and summaries to all your communication platforms. Start with Slack today, or join the waitlist for your preferred platform."),a.createElement("div",{className:"grid md:grid-cols-3 gap-6 mb-12"},a.createElement(Ks,{name:"Slack",status:"Available Now",description:"Full integration with channels, threads, and direct messages",action:a.createElement(Lh,{className:"w-full justify-center"}),available:!0,users:"15M+ users",icon:"ð¬"}),a.createElement(Ks,{name:"Microsoft Teams",status:"Coming Q3 2025",description:"Native integration with Teams channels and Office 365",action:a.createElement(Mo,{platform:"teams"}),available:!1,users:"280M+ users",icon:"ð¼"}),a.createElement(Ks,{name:"Email",status:"Coming Q4 2025",description:"Works with Gmail, Outlook, and other major email providers",action:a.createElement(Mo,{platform:"email"}),available:!1,users:"4B+ users",icon:"ð§"})),a.createElement("div",{className:"grid md:grid-cols-3 gap-6 mb-12"},a.createElement(Ks,{name:"WhatsApp Business",status:"Join Waitlist",description:"Manage customer conversations and team communications",action:a.createElement(Mo,{platform:"whatsapp"}),available:!1,users:"2B+ users",icon:"ð"}),a.createElement(Ks,{name:"Discord",status:"Join Waitlist",description:"Perfect for communities and collaborative teams",action:a.createElement(Mo,{platform:"discord"}),available:!1,users:"150M+ users",icon:"ð®"}),a.createElement(Ks,{name:"Google Chat",status:"Join Waitlist",description:"Seamless integration with Google Workspace",action:a.createElement(Mo,{platform:"google-chat"}),available:!1,users:"3B+ users",icon:"ð·"})),a.createElement("div",{className:"bg-slate-100 dark:bg-slate-800 rounded-lg p-8 mb-12"},a.createElement("h2",{className:"text-2xl font-bold mb-4 text-center"},"Expanding your reach"),a.createElement("div",{className:"flex flex-col md:flex-row items-center justify-center gap-8"},a.createElement("div",{className:"text-center"},a.createElement("p",{className:"text-3xl font-bold text-primary"},"15M+"),a.createElement("p",{className:"text-slate-600 dark:text-slate-400"},"Slack users today")),a.createElement("div",{className:"text-4xl"},"â"),a.createElement("div",{className:"text-center"},a.createElement("p",{className:"text-3xl font-bold text-green-600 dark:text-green-400"},"1B+"),a.createElement("p",{className:"text-slate-600 dark:text-slate-400"},"Total addressable market")))),a.createElement("div",{id:"waitlist-form",className:"max-w-md mx-auto bg-slate-100 dark:bg-slate-800 rounded-lg p-8"},a.createElement("h2",{className:"text-2xl font-bold mb-4 text-center"},"Be the first to know"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300 text-center mb-6"},"Get early access when Zenith launches on your platform"),c&&a.createElement("div",{className:"mb-4 p-4 bg-green-100 dark:bg-green-500/20 border border-green-500 rounded-lg flex items-center gap-2"},a.createElement(Za,{className:"h-5 w-5 text-green-600 dark:text-green-400"}),a.createElement("span",{className:"text-green-700 dark:text-green-400"},"You're on the list! We'll notify you soon.")),a.createElement("form",{onSubmit:m,className:"space-y-4"},a.createElement("div",null,a.createElement("label",{htmlFor:"platform",className:"block text-sm font-medium mb-2"},"Platform preference"),a.createElement("select",{id:"platform",value:r,onChange:h=>n(h.target.value),className:"w-full px-3 py-2 bg-white dark:bg-slate-700 border border-slate-300 dark:border-slate-600 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent",required:!0},a.createElement("option",{value:""},"Select a platform"),a.createElement("option",{value:"teams"},"Microsoft Teams (Q3 2025)"),a.createElement("option",{value:"email"},"Email (Q4 2025)"),a.createElement("option",{value:"whatsapp"},"WhatsApp Business"),a.createElement("option",{value:"discord"},"Discord"),a.createElement("option",{value:"google-chat"},"Google Chat"),a.createElement("option",{value:"other"},"Other platform"))),a.createElement("div",null,a.createElement("label",{htmlFor:"email",className:"block text-sm font-medium mb-2"},"Email address"),a.createElement("input",{type:"email",id:"email",value:t,onChange:h=>e(h.target.value),placeholder:"[email protected]",className:"w-full px-3 py-2 bg-white dark:bg-slate-700 border border-slate-300 dark:border-slate-600 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent",required:!0})),a.createElement(ce,{type:"submit",disabled:s,className:"w-full bg-gradient-to-r from-primary to-secondary hover:opacity-90"},s?"Joining...":"Join Waitlist"))),a.createElement("div",{className:"text-center mt-12"}
871,a.createElement("p",{className:"text-slate-600 dark:text-slate-400 mb-4"},"Don't want to wait? Start using Zenith on Slack today"),a.createElement(Lh,{showDescription:!0})))))}function K3({email:t,region:e,className:r="",onReferralGenerated:n}){const[s,o]=x.useState(null),[c,d]=x.useState(null),[m,h]=x.useState(!0),[p,g]=x.useState(!1),[v,E]=x.useState("link"),[N,k]=x.useState({to:"",subject:"",body:""}),w=e?.isMENA||!1,C=c?gn.calculateTier(c.referralCount,e?.code):null;x.useEffect(()=>{t&&_()},[t]);const _=async()=>{try{h(!0);const $=fk(t,e);o($);const j=await t3(t);d(j),Ne("referral_dashboard_view",{email_hash:t.substring(0,3)+"***",region:e?.code,has_referrals:j?j.referralCount>0:!1}),n&&n($)}catch($){console.error("Failed to load referral data:",$)}finally{h(!1)}},T=async()=>{if(s)try{await navigator.clipboard.writeText(s.referralUrl),g(!0),setTimeout(()=>g(!1),2e3),Ne("referral_link_copied",{referral_code:s.referralCode})}catch($){console.error("Failed to copy link:",$)}},A=$=>{if(!s)return;const j=gn.generateShareContent(s,e),B={email:`mailto:?subject=${encodeURIComponent(j.email.subject)}&body=${encodeURIComponent(j.email.body)}`,whatsapp:`https://wa.me/?text=${encodeURIComponent(j.whatsapp)}`,linkedin:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(s.referralUrl)}&summary=${encodeURIComponent(j.linkedin)}`,twitter:`https://twitter.com/intent/tweet?text=${encodeURIComponent(j.twitter)}&url=${encodeURIComponent(s.referralUrl)}`};window.open(B[$]||"","_blank"),Ne("referral_share_attempt",{platform:$,referral_code:s.referralCode})},I=async $=>{if($.preventDefault(),!(!s||!N.to))try{window.location.href=`mailto:${N.to}?subject=${encodeURIComponent(N.subject)}&body=${encodeURIComponent(N.body)}`,Ne("referral_email_sent",{recipient_count:N.to.split(",").length,referral_code:s.referralCode}),k({to:"",subject:"",body:""}),E("link")}catch(j){console.error("Failed to send referral email:",j)}};if(m)return a.createElement("div",{className:`bg-white rounded-xl border border-slate-200 p-6 ${r}`},a.createElement("div",{className:"animate-pulse space-y-4"},a.createElement("div",{className:"h-4 bg-slate-200 rounded w-1/4"}),a.createElement("div",{className:"h-8 bg-slate-200 rounded w-full"}),a.createElement("div",{className:"h-4 bg-slate-200 rounded w-1/2"})));if(!s)return a.createElement("div",{className:`bg-red-50 border border-red-200 rounded-xl p-6 ${r}`},a.createElement("p",{className:"text-red-700"},"Unable to load referral data. Please try again."));const M=C?(c?.referralCount||0)/C.minReferrals*100:0,D=C?gn.calculateTier(C.minReferrals+1,e?.code):null;return a.createElement("div",{className:`bg-white rounded-xl border border-slate-200 shadow-sm ${r}`},a.createElement("div",{className:"p-6 border-b border-slate-100"},a.createElement("div",{className:"flex items-center justify-between"},a.createElement("div",null,a.createElement("h3",{className:"text-lg font-semibold text-slate-900"},"Refer & Earn Priority Access"),a.createElement("p",{className:"text-sm text-slate-600 mt-1"},"Invite colleagues and unlock exclusive benefits")),C&&a.createElement("div",{className:`px-3 py-1 rounded-full text-xs font-medium ${C.level>=3?"bg-purple-100 text-purple-700":C.level>=2?"bg-blue-100 text-blue-700":"bg-green-100 text-green-700"}`},C.name))),a.createElement("div",{className:"p-6 border-b border-slate-100"},a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4"},a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-2xl font-bold text-slate-900"},c?.referralCount||0),a.createElement("div",{className:"text-sm text-slate-600"},"Total Referrals")),a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-2xl font-bold text-primary"},w?`${(c?.referralCount||0)*1.5}`:c?.referralCount||0),a.createElement("div",{className:"text-sm text-slate-600"},w&&"+",w?"MENA Bonus Points":"Points")),a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-2xl font-bold text-purple-600"},C?.level||1),a.createElement("div",{className:"text-sm text-slate-600"},"Current Tier"))),D&&a.createElement("div",{className:"space-y-2"},a.createElement("div",{className:"flex justify-between text-sm"},a.createElement("span",{className:"text-slate-600"},"Progress to ",D.name),a.createElement("span",{className:"text-slate-900 font-medium"},c?.referralCount||0,"/",D.minReferrals)),a.createElement("div",{className:"w-full bg-slate-200 rounded-full h-2"},a.createElement("div",{className:"bg-gradient-to-r from-primary to-purple-600 h-2 rounded-full transition-all duration-500",style:{width:`${Math.min(M,100)}%`}})))),a.createElement("div",{className:"p-6"},a.createElement("div",{className:"mb-4"},a.createElement("div",{className:"flex items-center space-x-2 mb-3"},a.createElement("span",{className:"text-sm font-medium text-slate-700"},"Share via:"),a.createElement("div",{className:"flex space-x-2"},["link","email","whatsapp","linkedin"].map($=>a.createElement("button",{key:$,onClick:()=>E($),className:`px-3 py-1 rounded-lg text-sm font-medium transition-colors ${v===$?"bg-primary text-white":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`},$.charAt(0).toUpperCase()+$.slice(1))))),v==="link"&&a.createElement("div",{className:"space-y-3"},a.createElement("div",{className:"flex items-center space-x-2"},a.createElement("input",{type:"text",value:s.referralUrl,readOnly:!0,className:"flex-1 px-3 py-2 bg-slate-50 border border-slate-200 rounded-lg text-sm text-slate-900"}),a.createElement("button",{onClick:T,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors text-sm font-medium"},p?"Copied!":"Copy")),a.createElement("p",{className:"text-xs text-slate-600"},"Share this link with colleagues to earn referral credit")),v==="email"&&a.createElement("form",{onSubmit:I,className:"space-y-3"},a.createElement("input",{type:"email",value:N.to,onChange:$=>k({...N,to:$.target.value}),placeholder:"Enter colleague emails (comma separated)",className:"w-full px-3 py-2 border border-slate-200 rounded-lg text-sm",required:!0}),a.createElement("button",{type:"submit",className:"w-full px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors text-sm font-medium"},"Send Invitation Email")),(v==="whatsapp"||v==="linkedin")&&a.createElement("button",{onClick:()=>A(v),className:"w-full px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors text-sm font-medium"},"Share on ",v.charAt(0).toUpperCase()+v.slice(1))),C&&a.createElement("div",{className:"mt-6 p-4 bg-slate-50 rounded-lg"},a.createElement("h4",{className:"text-sm font-semibold text-slate-900 mb-2"},C.name," Benefits:"),a.createElement("ul",{className:"space-y-1 text-sm text-slate-700"},C.benefits.map(($,j)=>a.createElement("li",{key:j,className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),$)),w&&Wh.mena.bonusBenefits.map(($,j)=>a.createElement("li",{key:`mena-${j}`,className:"flex items-start"},a.createElement("span",{className:"text-purple-500 mr-2"},"â
"),$))))))}class Q3{supabase;constructor(){if(!Nu()){console.warn("ReferralBridgeService: Supabase not configured. Using mock implementation."),this.supabase=null;return}this.supabase=WP()}async checkSupabaseConnection(){if(!this.supabase)throw new Error("Supabase not configured. Please check environment variables.");return!0}async createReferralRecord(e,r,n="global",s,o=!1){try{await this.checkSupabaseConnection();const c=await this.getReferralData(e);if(c)return Ne("referral_record_exists",{clerk_user_id:e,email_hash:r.substring(0,3)+"***"}),c;const{data:d,error:m}=await this.supabase.rpc("upsert_referral_record",{p_clerk_user_id:e,p_email:r,p_referral_code:null,p_region:n,p_company_
871size:s,p_is_mena:o});if(m){const{data:h,error:p}=await this.supabase.from("referral_data").insert({clerk_user_id:e,email:r,referral_code:this.generateReferralCode(r),region:n,company_size:s,is_mena:o}).select().single();if(p)throw new Error(`Failed to create referral record: ${p.message}`);return Ne("referral_record_created",{clerk_user_id:e,email_hash:r.substring(0,3)+"***",region:n}),h}return Ne("referral_record_created",{clerk_user_id:e,email_hash:r.substring(0,3)+"***",region:n}),d}catch(c){throw console.error("Error creating referral record:",c),c}}async getReferralData(e){try{const{data:r,error:n}=await this.supabase.from("referral_data").select("*").eq("clerk_user_id",e).single();if(n&&n.code!=="PGRST116")throw n;return r}catch(r){return console.error("Error fetching referral data:",r),null}}async updateReferralCount(e,r,n){try{const{data:s,error:o}=await this.supabase.from("referred_users").insert({referrer_id:e,referred_email:r,status:"pending",referral_source:n?"referral_code":"direct"}).select().single();if(o)throw o.code==="23505"?new Error("Referral already tracked"):o;const{error:c}=await this.supabase.rpc("increment_referral_count",{p_clerk_user_id:e});if(c){const m=await this.getReferralData(e);if(m){const h=m.referral_count+1,p=this.calculateTier(h,m.is_mena);await this.supabase.from("referral_data").update({referral_count:h,tier_level:p}).eq("clerk_user_id",e)}}const d=await this.getReferralData(e);return Ne("referral_count_updated",{clerk_user_id:e,referred_email_hash:r.substring(0,3)+"***",new_count:d?.referral_count||0}),d}catch(s){throw console.error("Error updating referral count:",s),s}}calculateTier(e,r=!1){const n=r?Math.ceil(e*1.5):e;return n>=50?4:n>=15?3:n>=5?2:1}async linkWaitlistToUser(e,r){try{const{data:n,error:s}=await this.supabase.from("waitlist_entries").select("*").eq("email",r).single();if(s||!n)return console.log("No waitlist entry found for email:",r),null;const{data:o,error:c}=await this.supabase.from("referral_data").select("referral_code, referral_count").eq("email",r).single(),{data:d,error:m}=await this.supabase.from("referral_data").upsert({clerk_user_id:e,email:r,referral_code:o?.referral_code||this.generateReferralCode(r),referral_count:o?.referral_count||0,tier_level:this.calculateTier(o?.referral_count||0,n.region==="mena"),region:n.region,company_size:n.company,is_mena:n.region==="mena"}).select().single();if(m)throw new Error(`Failed to link waitlist data: ${m.message}`);return await this.supabase.from("waitlist_entries").update({migrated_at:new Date().toISOString(),migrated_to_clerk_id:e}).eq("email",r),Ne("waitlist_to_auth_linked",{clerk_user_id:e,email_hash:r.substring(0,3)+"***",region:n.region,had_existing_referrals:!!o?.referral_count}),d}catch(n){throw console.error("Error linking waitlist to user:",n),n}}async getReferralStats(e){try{const{data:r,error:n}=await this.supabase.rpc("get_referral_stats",{p_clerk_user_id:e});if(n){const s=await this.getReferralData(e);if(!s)return null;const{data:o,error:c}=await this.supabase.from("referred_users").select("status").eq("referrer_id",e);if(c)throw c;const d=o?.filter(g=>g.status==="converted").length||0,m=o?.filter(g=>g.status==="pending").length||0,h=this.getTierName(s.tier_level),p=this.getNextTier(s.tier_level);return{referral_count:s.referral_count,tier_level:s.tier_level,converted_count:d,pending_count:m,total_rewards:s.total_rewards_earned,current_tier_name:h,next_tier_name:p?.name||null,referrals_to_next_tier:p?p.minReferrals-s.referral_count:0}}return r?.[0]||null}catch(r){return console.error("Error fetching referral stats:",r),null}}getTiers(){return[{level:1,name:"Early Adopter",minReferrals:0,benefits:["Priority access","Exclusive updates","Founder community access"]},{level:2,name:"Team Leader",minReferrals:5,benefits:["All Early Adopter benefits","Team management features","Advanced analytics"]},{level:3,name:"MENA Pioneer",minReferrals:15,benefits:["All Team Leader benefits","Regional priority support","Enhanced rewards (1.5x)","Exclusive events"]},{level:4,name:"Enterprise Partner",minReferrals:50,benefits:["All MENA Pioneer benefits","Dedicated account manager","Custom integrations","API access","Revenue sharing"]}]}getTierName(e){return this.getTiers().find(n=>n.level===e)?.name||"Unknown"}getNextTier(e){const r=this.getTiers(),n=r.findIndex(s=>s.level===e);return n<r.length-1?r[n+1]:null}generateReferralCode(e){const r=this.simpleHash(e+"salt1"),n=this.simpleHash(e+"salt2");return`Z${r}${n}`}simpleHash(e){let r=0;for(let s=0;s<e.length;s++){const o=e.charCodeAt(s);r=(r<<5)-r+o,r=r&r}return Math.abs(r).toString(36).padStart(3,"0").substring(0,3).toUpperCase()}}const zf=new Q3;function Z3({className:t=""}){const{user:e,isLoaded:r}=qC(),{isSignedIn:n}=fl(),[s,o]=x.useState(null),[c,d]=x.useState(null),[m,h]=x.useState(!0),[p,g]=x.use
871State(null),[v,E]=x.useState(!1),[N,k]=x.useState(!1),w=s?`${window.location.origin}?ref=${s.referral_code}`:"",C=s?.is_mena?Math.round((c?.referral_count||0)*1.5*10)/10:c?.referral_count||0;x.useEffect(()=>{r&&n&&e?_():r&&!n&&(h(!1),g("Please sign in to view your referral dashboard"))},[r,n,e]);const _=async()=>{if(e)try{h(!0),g(null);const M=e.primaryEmailAddress?.emailAddress;if(!M)throw new Error("User email not found");let D=await zf.getReferralData(e.id);if(D||(D=await zf.createReferralRecord(e.id,M,"global",void 0,!1)),D){o(D);const $=await zf.getReferralStats(e.id);d($)}Ne("authenticated_referral_dashboard_view",{clerk_user_id:e.id,email_hash:M.substring(0,3)+"***",has_referral_data:!!D,referral_count:c?.referral_count||0})}catch(M){console.error("Failed to load referral data:",M),g(M instanceof Error?M.message:"Failed to load referral data")}finally{h(!1)}},T=async()=>{k(!0),await _(),k(!1)},A=async()=>{if(w)try{await navigator.clipboard.writeText(w),E(!0),setTimeout(()=>E(!1),2e3),Ne("authenticated_referral_link_copied",{clerk_user_id:e?.id,referral_code:s?.referral_code})}catch(M){console.error("Failed to copy link:",M)}},I=M=>{if(!w||!s)return;const D=`Join me on Zenith - the AI-powered operations platform for modern teams! Use my referral code: ${s.referral_code}`,$={whatsapp:`https://wa.me/?text=${encodeURIComponent(D+" "+w)}`,linkedin:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(w)}`,twitter:`https://twitter.com/intent/tweet?text=${encodeURIComponent(D)}&url=${encodeURIComponent(w)}`};window.open($[M],"_blank"),Ne("authenticated_referral_share",{clerk_user_id:e?.id,platform:M,referral_code:s.referral_code})};return m?a.createElement(Ce,{className:`w-full max-w-4xl mx-auto ${t}`},a.createElement(ct,null,a.createElement("div",{className:"animate-pulse space-y-3"},a.createElement("div",{className:"h-6 bg-slate-200 rounded w-1/3"}),a.createElement("div",{className:"h-4 bg-slate-200 rounded w-1/2"}))),a.createElement(Ve,null,a.createElement("div",{className:"animate-pulse space-y-4"},a.createElement("div",{className:"grid grid-cols-3 gap-4"},a.createElement("div",{className:"h-16 bg-slate-200 rounded"}),a.createElement("div",{className:"h-16 bg-slate-200 rounded"}),a.createElement("div",{className:"h-16 bg-slate-200 rounded"})),a.createElement("div",{className:"h-24 bg-slate-200 rounded"})))):p||!n||!e?a.createElement(Ce,{className:`w-full max-w-4xl mx-auto ${t}`},a.createElement(Ve,{className:"pt-6"},a.createElement("div",{className:"text-center py-8"},a.createElement("p",{className:"text-red-600 mb-4"},p||"Please sign in to view your referral dashboard"),a.createElement(ce,{onClick:()=>window.location.href="/sign-in"},"Sign In")))):a.createElement("div",{className:`w-full max-w-4xl mx-auto space-y-6 ${t}`},a.createElement(Ce,null,a.createElement(ct,null,a.createElement("div",{className:"flex items-center justify-between"},a.createElement("div",null,a.createElement(pt,{className:"text-2xl"},"Your Referral Dashboard"),a.createElement("p",{className:"text-slate-600 mt-1"},"Welcome back, ",e.firstName||e.username||"User","!"),a.createElement("p",{className:"text-sm text-slate-500"},e.primaryEmailAddress?.emailAddress)),a.createElement(ce,{variant:"outline",onClick:T,disabled:N,"aria-label":"Refresh data"},N?"Refreshing...":"Refresh")))),a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,"Referral Statistics")),a.createElement(Ve,null,a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6"},a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-3xl font-bold text-slate-900"},c?.referral_count||0),a.createElement("div",{className:"text-sm text-slate-600 mt-1"},"Total Referrals")),a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-3xl font-bold text-blue-600"},C),a.createElement("div",{className:"text-sm text-slate-600 mt-1"},s?.is_mena?"MENA Bonus Points":"Points")),a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-3xl font-bold text-purple-600"},c?.tier_level||1),a.createElement("div",{className:"text-sm text-slate-600 mt-1"},"Current Tier")),a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-3xl font-bold text-green-600"},c?.converted_count||0),a.createElement("div",{className:"text-sm text-slate-600 mt-1"},"Converted"))))),c&&c.next_tier_name&&a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,"Progress to ",c.next_tier_name)),a.createElement(Ve,null,a.createElement("div",{className:"space-y-3"},a.createElement("div",{className:"flex justify-between text-sm"},a.createElement("span",{className:"text-slate-600"},"Current Progress"),a.createElement("span",{className:"font-medium"},c.referral_count,"/",c.referral_count+c.referrals_to_next_tier)),a.createElement("div",{className:"w-full bg-slate-200 rounded-full h-3",role:"progressbar","aria-valuenow":c.referral_count,"aria-valuemin":0,"aria-valuemax":c.referral_count+c.referrals_to_next_tier,"data-testid":"progress-bar"},a.createElement("div",{className:"bg-gradient-to-r from-blue-500 to-purple-600 h-3 rounded-full transition-all duration-500",style:{width:`${c.referral_count/(c.referral_count+c.referrals_to_next_tier)*100}%`}})),a.createElement("p",{className:"text-sm text-slate-600"},c.referrals_to_next_tier," more referrals to unlock ",c.next_tier_name," benefits")))),a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,"Share Your Referral Link")),a.createElement(Ve,{className:"space-y-4"},a.createElement("div",null,a.createElement("label",{className:"block text-sm font-medium text-slate-700 mb-2"},"Your Referral Code: ",a.createElement("span",{className:"font-mono bg-slate-100 px-2 py-1 rounded"},s?.referral_code)),a.createElement("div",{className:"flex space-x-2"},a.createElement("input",{type:"text",value:w,readOnly:!0,className:"flex-1 px-3 py-2 border border-slate-300 rounded-lg bg-slate-50 font-mono text-sm"}),a.createElement(ce,{onClick:A},v?"Copied!":"Copy"))),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3"},a.createElement(ce,{variant:"outline",onClick:()=>I("whatsapp"),className:"flex items-center justify-center space-x-2"},a.createElement("span",null,"Share on Whatsapp")),a.createElement(ce,{variant:"outline",onClick:()=>I("linkedin"),className:"flex items-center justify-center space-x-2"},a.createElement("span",null,"Share on LinkedIn")),a.createElement(ce,{variant:"outline",onClick:()=>I("twitter"),className:"flex items-center justify-center space-x-2"},a.createElement("span",null,"Share on Twitter"))))),c&&a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,c.current_tier_name," Benefits")),a.createElement(Ve,null,a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6"},a.createElement("div",null,a.createElement("h4",{className:"font-medium text-slate-900 mb-3"},"Current Benefits:"),a.createElement("ul",{className:"space-y-2 text-sm text-slate-700"},s?.tier_level===1&&a.createElement(a.Fragment,null,a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Priority access to new features"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Exclusive updates and newsletters"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Founder community access")),s?.tier_level===2&&a.createElement(a.Fragment,null,a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"All Early Adopter benefits"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Team management features"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Advanced analytics dashboard")),s?.tier_level===3&&a.createElement(a.Fragment,null,a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"All Team Leader benefits"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Regional priority support"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Enhanced rewards (1.5x multiplier)"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Exclusive MENA community events")),s?.tier_level===4&&a.createElement(a.Fragment,null,a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"All MENA Pioneer benefits"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Dedicated account manager"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"}
871,"â"),"Custom integrations support"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"API access and developer support"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-green-500 mr-2"},"â"),"Revenue sharing opportunities")))),s?.is_mena&&a.createElement("div",null,a.createElement("h4",{className:"font-medium text-slate-900 mb-3"},"MENA Region Bonus:"),a.createElement("ul",{className:"space-y-2 text-sm text-slate-700"},a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-purple-500 mr-2"},"â
"),"1.5x points multiplier on all referrals"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-purple-500 mr-2"},"â
"),"Regional priority support"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-purple-500 mr-2"},"â
"),"MENA-exclusive community events"),a.createElement("li",{className:"flex items-start"},a.createElement("span",{className:"text-purple-500 mr-2"},"â
"),"Localized payment options")))))))}const Lb=t=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);function X3(){const[t]=W2(),{isSignedIn:e}=fl(),[r,n]=x.useState(""),[s,o]=x.useState(!1),[c,d]=x.useState(null);x.useEffect(()=>{const p=t.get("email");p&&Lb(p)&&(n(p),o(!0))},[t]);const m=p=>{if(p.preventDefault(),!r){d("Please enter your email address");return}if(!Lb(r)){d("Please enter a valid email address");return}o(!0),d(null)},h=p=>{n(p.target.value),d(null)};return a.createElement("div",{className:"min-h-screen bg-slate-900 text-white py-12 px-4"},a.createElement("div",{className:"max-w-6xl mx-auto"},a.createElement("div",{className:"text-center mb-12"},a.createElement("h1",{className:"text-4xl font-bold mb-4 bg-gradient-to-r from-blue-400 to-purple-600 bg-clip-text text-transparent"},"Your Referral Dashboard"),a.createElement("p",{className:"text-xl text-slate-300"},"Track your referrals and unlock exclusive rewards")),e?a.createElement(Z3,null):s?a.createElement("div",null,a.createElement("div",{className:"mb-6"},a.createElement(ce,{variant:"outline",onClick:()=>o(!1),className:"border-slate-600 text-slate-300 hover:bg-slate-800"},"â Back")),a.createElement(K3,{email:r,region:{code:"ae",name:"United Arab Emirates",timezone:"Asia/Dubai",language:"en",currency:"AED",isMENA:!0},onReferralGenerated:p=>{console.log("Referral generated:",p)}})):a.createElement("div",{className:"max-w-md mx-auto"},a.createElement(Ce,{className:"bg-slate-800 border-slate-700"},a.createElement(ct,null,a.createElement(pt,{className:"text-white"},"Access Your Dashboard"),a.createElement(fi,{className:"text-slate-400"},"Sign in or enter your email address to view your referral statistics and rewards")),a.createElement(Ve,null,a.createElement("div",{className:"space-y-4"},a.createElement(ce,{onClick:()=>window.location.href="/sign-in",className:"w-full bg-gradient-to-r from-blue-500 to-purple-600 hover:from-blue-600 hover:to-purple-700"},"Sign In to Access Dashboard"),a.createElement("div",{className:"relative"},a.createElement("div",{className:"absolute inset-0 flex items-center"},a.createElement("span",{className:"w-full border-t border-slate-600"})),a.createElement("div",{className:"relative flex justify-center text-sm"},a.createElement("span",{className:"px-2 bg-slate-900 text-slate-400"},"Or continue with email"))),a.createElement("form",{onSubmit:m,className:"space-y-4"},a.createElement("div",null,a.createElement("input",{type:"email",placeholder:"Enter your email address",value:r,onChange:h,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-700 dark:border-slate-600 dark:text-white dark:placeholder-slate-500"})),c&&a.createElement("div",{className:"p-3 text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 rounded-md"},c),a.createElement(ce,{type:"submit",variant:"outline",className:"w-full border-slate-600 text-slate-300 hover:bg-slate-800"},"Access with Email"))),a.createElement("div",{className:"mt-6 pt-6 border-t border-slate-700"},a.createElement("p",{className:"text-sm text-slate-400 text-center"},"Don't have a referral code?",a.createElement("a",{href:"/",className:"text-blue-400 hover:text-blue-300 ml-1"},"Join the waitlist"))))))))}
871function eR({isOpen:t,onClose:e,title:r,description:n}){return a.createElement(Ii,{open:t,onOpenChange:e},a.createElement(is,{className:"sm:max-w-[425px]"},a.createElement(Pi,null,a.createElement(Hr,{className:"flex items-center gap-2 text-red-600 dark:text-red-400"},a.createElement(hl,{className:"h-5 w-5"}),r),a.createElement(Gr,{className:"text-slate-600 dark:text-slate-300"},n)),a.createElement("div",{className:"mt-4 flex justify-end"},a.createElement(ce,{onClick:e},"Close"))))}function Fb({className:t,buttonText:e="Get Lifetime Deal",buttonVariant:r="default",buttonSize:n="lg"}){const[s,o]=x.useState(!1),[c,d]=x.useState(!1),[m,h]=x.useState(!1),[p,g]=x.useState(null),[v,E]=x.useState(!1),[N,k]=x.useState({title:"",description:""}),[w,C]=x.useState({email:"",fullName:"",company:"",teamSize:"",referralCode:""}),[_,T]=x.useState({}),[A,I]=x.useState(13),M=()=>!0;x.useEffect(()=>{s&&D()},[s]);const D=async()=>{try{const{data:Z,error:ae}=await et.from("lifetime_deal_stats").select("spots_remaining, total_spots").single();ae?(console.error("Error checking spots:",ae),I(13)):I(Z.spots_remaining||0)}catch(Z){console.error("Failed to check spots:",Z),I(13)}},$=Z=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(Z),j=()=>{const Z={};return w.email?$(w.email)||(Z.email="Please enter a valid email address"):Z.email="Email is required",w.fullName?.trim()||(Z.fullName="Full name is required"),w.company?.trim()||(Z.company="Company is required"),w.teamSize||(Z.teamSize="Please select team size"),T(Z),Object.keys(Z).length===0},B=Z=>{_[Z]&&T(ae=>({...ae,[Z]:void 0}))},ee=(Z,ae)=>{console.error(`Error in ${ae}:`,Z),Z?.code==="PGRST301"||Z?.message?.includes("502")?g("Service temporarily unavailable. Please refresh and try again."):Z?.message?.includes("Invalid API key")?(k({title:"Configuration Error",description:"The service is experiencing configuration issues. Please try again later."}),E(!0)):Z?.message?.includes("connection")?g("Connection error. Please check your internet connection and try again."):Z?.message?.includes("duplicate")||Z?.code==="23505"?g("This email has already been registered for the lifetime deal."):g(Z?.message||"An unexpected error occurred. Please try again.")},te=async Z=>{if(Z.preventDefault(),!c&&M()&&j()){if(A<=0){g("All lifetime deal spots have been taken. Join our waitlist to be notified of future offers.");return}d(!0),g(null);try{const{data:ae,error:ke}=await et.from("lifetime_deal_purchases").select("email, status").eq("email",w.email).single();if(ke&&ke.code!=="PGRST116"){ee(ke,"checking existing entry");return}if(ae){ae.status==="completed"?g("This email has already purchased the lifetime deal."):ae.status==="pending"?g("You have a pending purchase. Please check your email for payment instructions."):g("This email is already registered. Please contact support if you need assistance.");return}const se={email:w.email,full_name:w.fullName,company:w.company,team_size:w.teamSize,referral_code:w.referralCode||null,status:"pending",amount:299,currency:"USD",created_at:new Date().toISOString()},{error:V}=await et.from("lifetime_deal_purchases").insert([se]);if(V){ee(V,"submitting lifetime deal");return}try{await et.rpc("decrement_lifetime_spots"),I(R=>Math.max(0,R-1))}catch(R){console.error("Failed to update spots:",R)}const{success:re,error:K}=await aO(w.email,w.fullName,{company:w.company,teamSize:w.teamSize,referralCode:w.referralCode});re?h(!0):(console.error("Failed to send confirmation email:",K),k({title:"Registration Successful",description:"Your registration is complete! However, we had trouble sending the confirmation email. Please check your spam folder or contact support for payment instructions."}),E(!0))}catch(ae){ee(ae,"lifetime deal submission")}finally{d(!1)}}},ne=()=>{o(!1),h(!1),g(null),T({}),C({email:"",fullName:"",company:"",teamSize:"",referralCode:""})};return a.createElement(a.Fragment,null,a.createElement(ce,{variant:r,size:n,className:t,onClick:()=>o(!0),disabled:A<=0},e," ",A<=5&&`(${A} left)`),a.createElement(Ii,{open:s,onOpenChange:o},a.createElement(is,{className:"sm:max-w-[500px]"},m?a.createElement("div",{className:"text-center py-8"},a.createElement("div",{className:"w-12 h-12 rounded-full bg-green-100 dark:bg-green-900 mx-auto mb-4 flex items-center justify-center"},a.createElement("svg",{className:"w-6 h-6 text-green-600 dark:text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))),a.createElement(Hr,{className:"mb-2 text-slate-900 dark:text-white"},"ð Registration Successful!"),a.createElement(Gr,{className:"text-slate-600 dar
871k:text-slate-300"},"Check your email for payment instructions to complete your lifetime deal purchase for $299."),a.createElement("div",{className:"mt-6 p-4 bg-yellow-50 dark:bg-yellow-900/20 rounded-lg"},a.createElement("p",{className:"text-sm text-yellow-800 dark:text-yellow-200"},a.createElement("strong",null,"Important:")," Your spot is reserved for 24 hours. Complete your payment to secure lifetime access.")),a.createElement(ce,{className:"mt-6",onClick:ne},"Close")):a.createElement(a.Fragment,null,a.createElement(Pi,null,a.createElement(Hr,{className:"text-slate-900 dark:text-white"},"ð Get Zenith Lifetime Deal"),a.createElement(Gr,{className:"text-slate-600 dark:text-slate-300"},"Save $1,188/year with one-time payment of $299. Limited to ",A," spots only!"),a.createElement("div",{className:"mt-4 p-3 bg-red-50 dark:bg-red-900/20 rounded-lg"},a.createElement("div",{className:"flex items-center justify-between"},a.createElement("span",{className:"text-sm font-medium text-red-800 dark:text-red-200"},A<=5?"â ï¸ Almost gone!":"ð¥ Limited time offer"),a.createElement("span",{className:"text-sm font-bold text-red-800 dark:text-red-200"},A," spots remaining")))),a.createElement("form",{onSubmit:te,noValidate:!0,className:"space-y-4 mt-4"},p&&a.createElement("div",{className:"p-3 text-sm text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 rounded-md"},p),a.createElement("div",null,a.createElement("label",{htmlFor:"fullName",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Full Name *"),a.createElement("input",{type:"text",id:"fullName",value:w.fullName,onChange:Z=>{C(ae=>({...ae,fullName:Z.target.value})),B("fullName")},placeholder:"John Doe",required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"}),_.fullName&&a.createElement("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400"},_.fullName)),a.createElement("div",null,a.createElement("label",{htmlFor:"email",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Email Address *"),a.createElement("input",{type:"email",id:"email",value:w.email,onChange:Z=>{C(ae=>({...ae,email:Z.target.value})),B("email")},placeholder:"[email protected]",required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"}),_.email&&a.createElement("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400"},_.email)),a.createElement("div",null,a.createElement("label",{htmlFor:"company",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Company *"),a.createElement("input",{type:"text",id:"company",value:w.company,onChange:Z=>{C(ae=>({...ae,company:Z.target.value})),B("company")},placeholder:"Acme Corp",required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"}),_.company&&a.createElement("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400"},_.company)),a.createElement("div",null,a.createElement("label",{htmlFor:"teamSize",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Team Size *"),a.createElement("select",{id:"teamSize",value:w.teamSize,onChange:Z=>{C(ae=>({...ae,teamSize:Z.target.value})),B("teamSize")},required:!0,className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"},a.createElement("option",{value:""},"Select team size"),a.createElement("option",{value:"1"},"Just me"),a.createElement("option",{value:"2-10"},"2-10 members"),a.createElement("option",{value:"11-50"},"11-50 members"),a.createElement("option",{value:"51-200"},"51-200 members"),a.createElement("option",{value:"201+"},"201+ members")),_.teamSize&&a.createElement("p",{className:"mt-1 text-sm text-red-600 dark:text-red-400"},_.teamSize)),a.createElement("div",null,a.createElement("label",{htmlFor:"referralCode",className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1"},"Referral Code (Optional)"),a.createElement("input",{type:"text",id:"referralCode",value:w.referralCode,onChange:Z=>C(ae=>({...ae,referralCode:Z.target.value})),placeholder:"Enter referral code if you have one",className:"w-full px-3 py-2 border border-slate-300 rounded-md shadow-sm placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent dark:bg-slate-800 dark:border-slate-700 dark:text-white dark:placeholder-slate-500"})),a.createElement("div",{className:"flex justify-end"},a.createElement(ce,{type:"submit",disabled:c||A<=0,className:"w-full sm:w-auto"},c?"Processing...":A<=0?"Sold Out":"Continue to Payment")),a.createElement("p",{className:"text-xs text-slate-500 dark:text-slate-400 text-center"}
871,"By registering, you agree to receive payment instructions via email. No payment will be collected on this page."))))),a.createElement(eR,{isOpen:v,onClose:()=>E(!1),title:N.title,description:N.description}))}function tR(){const t=[{icon:vr,text:"All AI Features Included",description:"Current and future AI-powered tools"},{icon:or,text:"Unlimited Team Members",description:"No caps on team size or usage"},{icon:qr,text:"All Platform Integrations",description:"Slack, Teams, and more"},{icon:Xa,text:"Priority Support",description:"Direct access to founders"},{icon:Mr,text:"30-Day Money Back",description:"Risk-free purchase guarantee"},{icon:Dr,text:"Lifetime Updates",description:"Every new feature, forever"}];return a.createElement("div",{className:"min-h-screen bg-gradient-to-b from-slate-50 to-white dark:from-slate-900 dark:to-slate-800"},a.createElement("header",{className:"border-b border-slate-200 dark:border-slate-700 bg-white/80 dark:bg-slate-900/80 backdrop-blur-md sticky top-0 z-50"},a.createElement("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4"},a.createElement("div",{className:"flex justify-between items-center"},a.createElement("div",{className:"flex items-center gap-2"},a.createElement("h1",{className:"text-2xl font-bold text-slate-900 dark:text-white"},"Zenith"),a.createElement("span",{className:"hidden sm:inline-block px-3 py-1 text-xs bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400 rounded-full font-semibold"},"LIMITED TIME")),a.createElement(ce,{variant:"ghost",onClick:()=>window.location.href="/"},"â Back to Site")))),a.createElement("section",{className:"relative py-20 px-4 overflow-hidden"},a.createElement("div",{className:"max-w-6xl mx-auto text-center"},a.createElement("div",{className:"mb-8"},a.createElement("span",{className:"inline-flex items-center gap-2 px-4 py-2 bg-gradient-to-r from-yellow-100 to-yellow-200 dark:from-yellow-900/30 dark:to-yellow-800/30 text-yellow-800 dark:text-yellow-200 rounded-full text-sm font-medium"},a.createElement(Xa,{className:"w-4 h-4 fill-current"}),"EARLY BIRD SPECIAL - SAVE $1,188/YEAR")),a.createElement("h1",{className:"text-5xl md:text-6xl lg:text-7xl font-bold text-slate-900 dark:text-white mb-6 leading-tight"},"Get Zenith ",a.createElement("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-purple-600 to-blue-600"},"Forever")),a.createElement("p",{className:"text-xl md:text-2xl text-slate-600 dark:text-slate-300 mb-8 max-w-3xl mx-auto"},"One-time payment. Lifetime access. All future updates included."),a.createElement("div",{className:"max-w-md mx-auto mb-12"},a.createElement(Ce,{className:"p-8 shadow-2xl border-2 border-purple-200 dark:border-purple-800 relative overflow-hidden"},a.createElement("div",{className:"absolute top-4 right-4 -rotate-12"},a.createElement("span",{className:"px-3 py-1 bg-gradient-to-r from-purple-600 to-blue-600 text-white text-sm font-bold rounded-full"},"70% OFF")),a.createElement("div",{className:"mb-6"},a.createElement("div",{className:"text-sm text-slate-500 dark:text-slate-400 mb-2"},"Usually $588/year"),a.createElement("div",{className:"text-6xl font-bold text-slate-900 dark:text-white mb-2"},"$299"),a.createElement("div",{className:"text-lg text-slate-600 dark:text-slate-300"},"One-time payment"),a.createElement("div",{className:"text-sm text-green-600 dark:text-green-400 font-medium mt-2"},"You save $1,188 every year!")),a.createElement("div",{className:"mb-6 p-4 bg-red-50 dark:bg-red-900/20 rounded-lg border border-red-200 dark:border-red-800"},a.createElement("div",{className:"text-sm text-red-800 dark:text-red-200 font-medium mb-1"},"â¡ Only 13 spots left at this price"),a.createElement("div",{className:"text-xs text-red-600 dark:text-red-400"},"Once sold out, this offer ends forever")),a.createElement(Fb,{buttonText:"Get Lifetime Access Now",buttonSize:"lg",className:"w-full bg-gradient-to-r from-purple-600 to-blue-600 hover:from-purple-700 hover:to-blue-700 text-white font-semibold shadow-lg hover:shadow-xl transition-all duration-200"}),a.createElement("div",{className:"mt-4 text-xs text-slate-500 dark:text-slate-400 text-center"},"ð Secure payment via Stripe ⢠30-day guarantee"))))),a.createElement("section",{className:"py-20 px-4 bg-slate-50 dark:bg-slate-900/50"},a.createElement("div",{className:"max-w-4xl mx-auto"},a.createElement("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12 text-slate-900 dark:text-white"},"Why Choose Lifetime?"),a.createElement(Ce,{className:"overflow-hidden shadow-xl"},a.createElement("table",{className:"w-full"}
871,a.createElement("thead",{className:"bg-slate-100 dark:bg-slate-800"},a.createElement("tr",null,a.createElement("th",{className:"px-6 py-4 text-left"}),a.createElement("th",{className:"px-6 py-4 text-center text-slate-700 dark:text-slate-300"},"Monthly Plan"),a.createElement("th",{className:"px-6 py-4 text-center bg-gradient-to-r from-purple-50 to-blue-50 dark:from-purple-900/20 dark:to-blue-900/20 text-purple-700 dark:text-purple-300"},"Lifetime Deal"))),a.createElement("tbody",null,a.createElement("tr",{className:"border-t border-slate-200 dark:border-slate-700"},a.createElement("td",{className:"px-6 py-4 font-medium text-slate-700 dark:text-slate-300"},"First Year Cost"),a.createElement("td",{className:"px-6 py-4 text-center text-slate-600 dark:text-slate-400"},"$588"),a.createElement("td",{className:"px-6 py-4 text-center font-bold text-purple-600 dark:text-purple-400"},"$299")),a.createElement("tr",{className:"border-t border-slate-200 dark:border-slate-700"},a.createElement("td",{className:"px-6 py-4 font-medium text-slate-700 dark:text-slate-300"},"3 Year Cost"),a.createElement("td",{className:"px-6 py-4 text-center text-slate-600 dark:text-slate-400"},"$1,764"),a.createElement("td",{className:"px-6 py-4 text-center font-bold text-purple-600 dark:text-purple-400"},"$299")),a.createElement("tr",{className:"border-t border-slate-200 dark:border-slate-700"},a.createElement("td",{className:"px-6 py-4 font-medium text-slate-700 dark:text-slate-300"},"5 Year Cost"),a.createElement("td",{className:"px-6 py-4 text-center text-slate-600 dark:text-slate-400"},"$2,940"),a.createElement("td",{className:"px-6 py-4 text-center font-bold text-purple-600 dark:text-purple-400"},"$299")),a.createElement("tr",{className:"border-t border-slate-200 dark:border-slate-700 bg-gradient-to-r from-purple-50 to-blue-50 dark:from-purple-900/20 dark:to-blue-900/20"},a.createElement("td",{className:"px-6 py-4 font-medium text-slate-700 dark:text-slate-300"},"Price Increases"),a.createElement("td",{className:"px-6 py-4 text-center text-slate-600 dark:text-slate-400"},"Subject to changes"),a.createElement("td",{className:"px-6 py-4 text-center font-bold text-green-600 dark:text-green-400"},"Never"))))))),a.createElement("section",{className:"py-20 px-4"},a.createElement("div",{className:"max-w-6xl mx-auto"},a.createElement("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12 text-slate-900 dark:text-white"},"Everything You Get, Forever"),a.createElement("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6"},t.map((e,r)=>a.createElement(Ce,{key:r,className:"p-6 hover:shadow-lg transition-shadow"},a.createElement("div",{className:"flex items-start gap-4"},a.createElement("div",{className:"p-2 bg-gradient-to-br from-purple-100 to-blue-100 dark:from-purple-900/30 dark:to-blue-900/30 rounded-lg"},a.createElement(e.icon,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"})),a.createElement("div",null,a.createElement("h3",{className:"font-semibold text-slate-900 dark:text-white mb-1"},e.text),a.createElement("p",{className:"text-sm text-slate-600 dark:text-slate-400"},e.description)))))))),a.createElement("section",{className:"py-20 px-4 bg-slate-50 dark:bg-slate-900/50"},a.createElement("div",{className:"max-w-4xl mx-auto"},a.createElement("h2",{className:"text-3xl md:text-4xl font-bold text-center mb-12 text-slate-900 dark:text-white"},"Frequently Asked Questions"),a.createElement("div",{className:"space-y-6"},a.createElement(Ce,{className:"p-6"},a.createElement("h3",{className:"font-semibold text-lg mb-2 text-slate-900 dark:text-white"},"What happens after I purchase?"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},"You'll receive an email with payment instructions within 5 minutes. Once payment is completed, you'll get immediate lifetime access to Zenith with all features unlocked.")),a.createElement(Ce,{className:"p-6"},a.createElement("h3",{className:"font-semibold text-lg mb-2 text-slate-900 dark:text-white"},"Is this really lifetime?"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},"Yes! One payment gives you access to Zenith forever. No monthly fees, no hidden costs, no surprise price increases. All future features are included.")),a.createElement(Ce,{className:"p-6"},a.createElement("h3",{className:"font-semibold text-lg mb-2 text-slate-900 dark:text-white"},"What if I'm not satisfied?"),a.createElement("p",{className:"text-slate-600 dar
871k:text-slate-300"},"We offer a 30-day money-back guarantee. If Zenith doesn't work for your team, we'll refund your entire purchase - no questions asked.")),a.createElement(Ce,{className:"p-6"},a.createElement("h3",{className:"font-semibold text-lg mb-2 text-slate-900 dark:text-white"},"Can I switch from my current subscription?"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},"Yes! Current subscribers can upgrade to lifetime. Contact us at [email protected] and we'll credit your last payment toward the lifetime deal.")),a.createElement(Ce,{className:"p-6"},a.createElement("h3",{className:"font-semibold text-lg mb-2 text-slate-900 dark:text-white"},"How many lifetime deals are available?"),a.createElement("p",{className:"text-slate-600 dark:text-slate-300"},"Only 20 lifetime deals are available at this special price. Once they're gone, this offer will never be repeated. First come, first served."))))),a.createElement("section",{className:"py-20 px-4 bg-gradient-to-r from-purple-600 to-blue-600"},a.createElement("div",{className:"max-w-4xl mx-auto text-center"},a.createElement("h2",{className:"text-4xl font-bold text-white mb-4"},"Ready to Save $1,188/year?"),a.createElement("p",{className:"text-xl text-purple-100 mb-8"},"Join the smart teams who locked in lifetime access"),a.createElement(Fb,{buttonText:"Get Lifetime Access for $299",buttonVariant:"secondary",buttonSize:"lg",className:"bg-white text-purple-600 hover:bg-gray-100 font-semibold"}),a.createElement("p",{className:"text-sm text-purple-100 mt-4"},"ð Secure checkout ⢠ð³ All major cards accepted ⢠â©ï¸ 30-day guarantee"))),a.createElement("footer",{className:"bg-slate-900 text-slate-400 py-12 px-4"},a.createElement("div",{className:"max-w-6xl mx-auto text-center"},a.createElement("p",{className:"mb-4"},"© 2025 Zenith. All rights reserved."),a.createElement("div",{className:"flex justify-center items-center gap-6 text-sm"},a.createElement("a",{href:"/privacy",className:"hover:text-white transition-colors"},"Privacy Policy"),a.createElement("span",null,"â¢"),a.createElement("a",{href:"/terms",className:"hover:text-white transition-colors"},"Terms of Service"),a.createElement("span",null,"â¢"),a.createElement("a",{href:"mailto:[email protected]",className:"hover:text-white transition-colors"},"Contact Us")))))}const rR=()=>{console.log(` 872=== Supabase Configuration Debug ===`),console.log("Environment Variables:"),console.log("- VITE_SUPABASE_URL:","â Set"),console.log("- VITE_SUPABASE_PUBLISHABLE_KEY:","â Set"),console.log("- VITE_SUPABASE_ANON_KEY:","â Set");const e="sb_publishable_oygZUv3qDD5YYmuJyPCn0w_hi1NNENQ",r=e.length>0;return r&&(console.log("- Key format:",e.startsWith("sb_publishable_")?"â Valid (sb_publishable_)":"â Invalid format"),console.log("- Key length:",e.length)),{url:"https://lhioylodbbmwnfulkykc.supabase.co",key:e||"",isConfigured:!!r}},nR=()=>{const t=window.fetch;window.fetch=function(e,r={}){let n,s=r;if(typeof e=="string"?n=e:e instanceof Request?(n=e.url,s={method:e.method,headers:e.headers,body:e.body,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,referrerPolicy:e.referrerPolicy,integrity:e.integrity,keepalive:e.keepalive,signal:e.signal,...r}):e instanceof URL?n=e.href:n="",n&&n.includes("supabase.co")){console.log(` 873=== Supabase Request Debug ===`),console.log("URL:",n),console.log("Method:",s.method||"GET");const c={};s.headers&&(s.headers instanceof Headers?s.headers.forEach((m,h)=>{c[h]=m}):Array.isArray(s.headers)?s.headers.forEach(([m,h])=>{c[m]=h}):typeof s.headers=="object"&&Object.assign(c,s.headers)),console.log("Headers:",{apikey:c.apikey?"â Present":"â Missing",Authorization:c.authorization||c.Authorization?"â Present":"â Missing","Content-Type":c["content-type"]||c["Content-Type"]});const d=c.authorization||c.Authorization;d&&(console.log("- Authorization starts with:",d.startsWith("Bearer ")?"â Bearer":"â No Bearer"),console.log("- Token format:",d.includes("sb_publishable_")?"â Correct":"â Incorrect"))}return t.call(this,e,r).then(c=>{if(n&&n.includes("supabase.co")&&(console.log(` 874=== Supabase Response Debug ===`),console.log("Status:",c.status,c.statusText),console.log("Headers:",Object.fromEntries(c.headers.entries())),!c.ok&&c.clone))try{c.clone().text().then(d=>{console.log("Error Body:",d)}).catch(d=>{console.log("Error Body: Could not read response body:",d.message)})}catch(d){console.log("Error Body: Could not clone response:",d.message)}return c})}};function aR(){const[t,e]=x.useState([]),[r,n]=x.useState(!1),s=c=>{e(d=>[...d,`${new Date().toISOString()} - ${c}`])},o=async()=>{n(!0),e([]),s("Starting form submission trace..."),s("Supabase URL: https://lhioylodbbmwnfulkykc.supabase.co"),s("Supabase Ke
874y exists: true"),s(`Key starts with sb_publishable_: ${"sb_publishable_oygZUv3qDD5YYmuJyPCn0w_hi1NNENQ".startsWith("sb_publishable_")}`),s(`Using mock client: ${et.constructor.name==="MockSupabaseClient"}`);const c=`test-trace-${Date.now()}@example.com`;s(` 875Checking if email exists: ${c}`);const d=window.fetch;window.fetch=function(m,h){const p=typeof m=="string"?m:m instanceof Request?m.url:m.toString();return p.includes("supabase")&&(s(` 876=== FETCH REQUEST ===`),s(`URL: ${p}`),s(`Method: ${h?.method||"GET"}`),s(`Headers: ${JSON.stringify(h?.headers||{},null,2)}`)),d.call(this,m,h).then(g=>(p.includes("supabase")&&(s(`Response Status: ${g.status} ${g.statusText}`),s(`Response Headers: ${JSON.stringify(Object.fromEntries(g.headers.entries()),null,2)}`)),g))};try{const{data:m,error:h}=await et.from("waitlist_entries").select("email").eq("email",c).limit(1);if(s(` 877Query Result:`),s(`Data: ${JSON.stringify(m)}`),h&&(s(`Error Code: ${h.code}`),s(`Error Message: ${h.message}`),s(`Error Details: ${JSON.stringify(h.details)}`),s(`Error Hint: ${h.hint}`)),!h){s(` 878Trying to insert new entry...`);const p={email:c,region:"test",created_at:new Date().toISOString()},{data:g,error:v}=await et.from("waitlist_entries").insert([p]);v?(s(`Insert Error Code: ${v.code}`),s(`Insert Error Message: ${v.message}`),s(`Insert Error Details: ${JSON.stringify(v.details)}`)):s(`Insert Successful: ${JSON.stringify(g)}`)}}catch(m){s(`Caught Exception: ${m.message}`),s(`Stack: ${m.stack}`)}finally{window.fetch=d,n(!1)}};return a.createElement("div",{className:"p-4 bg-slate-900 text-white rounded-lg max-w-4xl mx-auto"},a.createElement("h2",{className:"text-xl font-bold mb-4"},"Network Request Tracer"),a.createElement("button",{onClick:o,disabled:r,className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 disabled:bg-slate-600 rounded mb-4"},r?"Tracing...":"Trace Form Submission"),a.createElement("div",{className:"bg-slate-800 rounded p-4 max-h-96 overflow-y-auto"},a.createElement("pre",{className:"text-xs font-mono whitespace-pre-wrap"},t.join(` 879`)||'Click "Trace Form Submission" to start...')))}async function sR(){console.log(` 880=== SUPABASE HEADER TEST ===`);const t=window.fetch;window.fetch=function(r,n){const s=typeof r=="string"?r:r instanceof Request?r.url:r.toString();return s.includes("supabase")&&(console.log(` 881--- FETCH REQUEST ---`),console.log("URL:",s),console.log("Init:",n),n?.headers&&(console.log("Headers type:",typeof n.headers),console.log("Headers constructor:",n.headers.constructor.name),n.headers instanceof Headers?(console.log("Headers (Headers object):"),n.headers.forEach((c,d)=>{console.log(` ${d}: ${d==="authorization"?c.substring(0,30)+"...":c}`)})):Array.isArray(n.headers)?console.log("Headers (Array):",n.headers):typeof n.headers=="object"&&console.log("Headers (Object):",n.headers))),t.call(this,r,n).then(c=>(s.includes("supabase")&&(console.log(` 882--- FETCH RESPONSE ---`),console.log("Status:",c.status,c.statusText),console.log("Response headers:",Object.fromEntries(c.headers.entries())),c.ok||c.clone().text().then(d=>{console.log("Error body:",d)})),c))},console.log(` 883=== TESTING SUPABASE QUERY ===`);const e=`header-test-${Date.now()}@example.com`;try{const{data:r,error:n}=await et.from("waitlist_entries").select("email").eq("email",e).limit(1);console.log(` 884--- QUERY RESULT ---`),console.log("Data:",r),console.log("Error:",n),n&&(console.log(` 885ERROR ANALYSIS:`),console.log("- Code:",n.code),console.log("- Message:",n.message),console.log("- Details:",n.details),console.log("- Hint:",n.hint),(n.code==="401"||n.message.includes("Invalid API key"))&&(console.log(` 886ð¨ AUTHENTICATION ERROR DETECTED`),console.log("This means headers are NOT being sent correctly!")))}catch(r){console.log(` 887--- EXCEPTION ---`),console.log("Message:",r.message),console.log("Stack:",r.stack)}finally{window.fetch=t}}function iR(){const[t,e]=x.useState([]),[r,n]=x.useState(!1),[s,o]=x.useState(null);a.useEffect(()=>{const v=rR();e(E=>[...E,"=== Initial Config Check ==="]),e(E=>[...E,"Supabase URL: â "]),e(E=>[...E,`Supabase Key: ${v.key?"â ":"â"} (${v.key?.length} chars)`]),e(E=>[...E,`Key Format: ${v.key?.startsWith("sb_publishable_")?"â ":"â"}`]),e(E=>[...E,`Fully Configured: ${v.isConfigured?"â ":"â"}`]),typeof window<"u"&&(nR(),e(E=>[...E,"Fetch interceptor active"]))},[]);const c=v=>{e(E=>[...E,`${new Date().toISOString().split("T")[1].split(".")[0]} - ${v}`])},d=async()=>{c("=== Testing Simple Query ===");try{const{data:v,error:E}
887=await et.from("waitlist_entries").select("count",{count:"exact",head:!0});E?(c(`â Query failed: ${E.code} - ${E.message}`),o({success:!1,error:E})):(c(`â
Query successful: ${v} entries found`),o({success:!0,count:v}))}catch(v){c(`â Exception: ${v.message}`),o({success:!1,error:v.message})}},m=async()=>{n(!0),c("=== Testing Form Submission ===");const v=`debug-test-${Date.now()}@example.com`;c(`Using test email: ${v}`);try{c("Step 1: Checking if email exists...");const{data:E,error:N}=await et.from("waitlist_entries").select("email").eq("email",v).limit(1);if(N){c(`â Check failed: ${N.code} - ${N.message}`),o({success:!1,error:N}),n(!1);return}const k=E&&Array.isArray(E)&&E.length>0;if(c(`Email exists: ${k}`),k)c("â¹ï¸ Email already exists, skipping insert");else{c("Step 2: Inserting new entry...");const w={email:v,region:"global",created_at:new Date().toISOString()};c(`Submission data: ${JSON.stringify(w)}`);const{data:C,error:_}=await et.from("waitlist_entries").insert([w]).select().single();_?(c(`â Insert failed: ${_.code} - ${_.message}`),c(`Error details: ${JSON.stringify(_)}`),o({success:!1,error:_}),_.code==="PGRST204"?c("â¹ï¸ Schema issue - column doesn't exist"):_.code==="401"||_.message.includes("Invalid API key")?c("â¹ï¸ Authentication issue"):_.code==="42501"&&c("â¹ï¸ RLS policy issue")):(c(`â
Insert successful: ${JSON.stringify({id:C.id,email:C.email})}`),o({success:!0,data:C}),c("Step 3: Cleaning up test data..."),await et.from("waitlist_entries").delete().eq("email",v),c("â
Test data cleaned up"))}}catch(E){c(`â Exception: ${E.message}`),o({success:!1,error:E.message})}n(!1)},h=async()=>{c("=== Testing Email Service ===");try{const{success:v,error:E}=await su("[email protected]",!1);c(v?"â
Email service configured (no actual email sent)":`â Email service error: ${E}`)}catch(v){c(`â Email service exception: ${v.message}`)}},p=()=>{e([])},g=async()=>{n(!0),c("=== Running Header Test ==="),c("Check browser console for detailed header information..."),await sR(),n(!1)};return a.createElement("div",{className:"container mx-auto p-6 max-w-4xl"},a.createElement("h1",{className:"text-3xl font-bold mb-6"},"Supabase Debug Page"),a.createElement("div",{className:"grid gap-6 md:grid-cols-2"},a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,"Test Controls"),a.createElement(fi,null,"Run these tests to diagnose issues")),a.createElement(Ve,{className:"space-y-4"},a.createElement(ce,{onClick:d,className:"w-full",disabled:r},"Test Simple Query"),a.createElement(ce,{onClick:m,className:"w-full",disabled:r},r?"Testing...":"Test Form Submission"),a.createElement(ce,{onClick:h,className:"w-full",disabled:r},"Test Email Service"),a.createElement(ce,{onClick:p,variant:"outline",className:"w-full"},"Clear Logs"),a.createElement(ce,{onClick:g,className:"w-full",disabled:r},r?"Testing Headers...":"Test Headers (Console)"))),a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,"Result"),a.createElement(fi,null,"Last test result")),a.createElement(Ve,null,a.createElement("pre",{className:"text-xs bg-gray-100 p-4 rounded overflow-auto max-h-64"},JSON.stringify(s,null,2)))),a.createElement(Ce,{className:"md:col-span-2"},a.createElement(ct,null,a.createElement(pt,null,"Debug Logs"),a.createElement(fi,null,"Real-time debug information")),a.createElement(Ve,null,a.createElement("div",{className:"bg-black text-green-400 p-4 rounded font-mono text-xs overflow-auto max-h-96"},t.map((v,E)=>a.createElement("div",{key:E},v)))))),a.createElement("div",{className:"mt-8"},a.createElement(aR,null)))}function oR(){const[t,e]=x.useState(null),[r,n]=x.useState([]),[s,o]=x.useState(!1),[c,d]=x.useState(null);x.useEffect(()=>{const v="https://lhioylodbbmwnfulkykc.supabase.co",E="sb_publishable_oygZUv3qDD5YYmuJyPCn0w_hi1NNENQ",N={mode:"production",supabaseUrl:v,supabaseKeyPresent:!0,supabaseKeyFormat:E.startsWith("sb_")?"VALID (sb_)":E.startsWith("eyJ")?"VALID (JWT)":"INVALID",supabaseKeyLength:E.length,supabaseKeyPrefix:E.substring(0,Math.min(20,E.length))+"...",isConfigured:Nu(),isUsingMock:Ei()};e(N),m()},[]);const m=async()=>{o(!0),n([]);const v=[],E=await Hw();
887d(E),v.push(await h("/rest/v1/waitlist_entries?select=count","GET")),v.push(await h("/rest/v1/waitlist_entries?select=email&email=eq.test%40example.com&limit=1","GET")),v.push(await p("select count",N=>N.from("waitlist_entries").select("count",{count:"exact",head:!0}))),v.push(await p("check email",N=>N.from("waitlist_entries").select("email").eq("email","[email protected]").limit(1))),n(v),o(!1)},h=async(v,E,N)=>{const k="https://lhioylodbbmwnfulkykc.supabase.co",w="sb_publishable_oygZUv3qDD5YYmuJyPCn0w_hi1NNENQ",C=Date.now();try{const _=await fetch(`${k}${v}`,{method:E,headers:{apikey:w,Authorization:`Bearer ${w}`,"Content-Type":"application/json","X-Client-Info":"zenith-debug/1.0.0"}}),A=Date.now()-C,I={};_.headers.forEach((D,$)=>{($.startsWith("sb-")||$==="content-range"||$==="x-ratelimit-limit")&&(I[$]=D)});const M={endpoint:v,method:E,status:_.status,statusText:_.statusText,ok:_.ok,headers:I,responseTime:A};if(_.ok)try{M.data=await _.json()}catch{M.data="No JSON response"}else try{const D=await _.text();M.error=D}catch{M.error="Could not read error response"}return M}catch(_){return{endpoint:v,method:E,status:0,statusText:"Network Error",ok:!1,headers:{},responseTime:Date.now()-C,error:_.message}}},p=async(v,E)=>{const N=Date.now();try{const k=await E(et),C=Date.now()-N;return k.error?{endpoint:`Supabase Client: ${v}`,method:"CLIENT",status:k.error.code||500,statusText:k.error.message||"Unknown error",ok:!1,headers:{},responseTime:C,error:JSON.stringify(k.error,null,2)}:{endpoint:`Supabase Client: ${v}`,method:"CLIENT",status:200,statusText:"OK",ok:!0,headers:{},responseTime:C,data:k.data}}catch(k){return{endpoint:`Supabase Client: ${v}`,method:"CLIENT",status:0,statusText:"Exception",ok:!1,headers:{},responseTime:Date.now()-N,error:k.message}}},g=v=>v>=200&&v<300?"text-green-600":v===401?"text-red-600":v===403?"text-orange-600":v>=400?"text-red-500":"text-gray-600";return t?a.createElement("div",{className:"min-h-screen bg-slate-900 text-white p-4"},a.createElement("div",{className:"max-w-6xl mx-auto space-y-6"},a.createElement("h1",{className:"text-3xl font-bold mb-6"},"Production Debug Dashboard"),a.createElement(Ce,{className:"p-6 bg-slate-800"},a.createElement("h2",{className:"text-xl font-bold mb-4"},"Environment Information"),a.createElement("div",{className:"grid grid-cols-2 gap-4 font-mono text-sm"},a.createElement("div",{className:"space-y-2"},a.createElement("div",{className:"flex justify-between"},a.createElement("span",null,"Mode:"),a.createElement("span",{className:`font-bold ${t.mode==="production"?"text-green-400":"text-yellow-400"}`},t.mode.toUpperCase())),a.createElement("div",{className:"flex justify-between"},a.createElement("span",null,"Supabase URL:"),a.createElement("span",{className:t.supabaseUrl?"text-green-400":"text-red-400"},t.supabaseUrl?"SET":"MISSING"))),a.createElement("div",{className:"space-y-2"},a.createElement("div",{className:"flex justify-between"},a.createElement("span",null,"API Key:"),a.createElement("span",{className:t.supabaseKeyPresent?"text-green-400":"text-red-400"},t.supabaseKeyPresent?t.supabaseKeyFormat:"MISSING")),a.createElement("div",{className:"flex justify-between"},a.createElement("span",null,"Key Length:"),a.createElement("span",null,t.supabaseKeyLength," chars")))),t.supabaseKeyPresent&&a.createElement("div",{className:"mt-4 p-3 bg-slate-700 rounded"},a.createElement("div",{className:"text-xs text-gray-400"},"Key Preview (first 20 chars):"),a.createElement("div",{className:"font-mono text-sm mt-1"},t.supabaseKeyPrefix)),a.createElement("div",{className:"mt-4 flex gap-4 text-sm"},a.createElement("span",{className:`px-3 py-1 rounded ${t.isConfigured?"bg-green-600":"bg-red-600"}`},"Configured: ",t.isConfigured?"YES":"NO"),a.createElement("span",{className:`px-3 py-1 rounded ${t.isUsingMock?"bg-red-600":"bg-green-600"}`},"Using Mock: ",t.isUsingMock?"YES":"NO"))),c&&a.createElement(Ce,{className:"p-6 bg-slate-800"},a.createElement("h2",{className:"text-xl font-bold mb-4"},"Connection Status"),a.createElement("div",{className:`p-4 rounded ${c.connected?"bg-green-900":"bg-red-900"}`},a.createElement("div",{className:"font-bold"}
887,"Status: ",c.connected?"â CONNECTED":"â FAILED"),c.error&&a.createElement("div",{className:"mt-2 text-sm text-red-300"},"Error: ",c.error),c.usingMock&&a.createElement("div",{className:"mt-2 text-sm text-yellow-300"},"â ï¸ Using mock client - check environment variables"))),a.createElement(Ce,{className:"p-6 bg-slate-800"},a.createElement("div",{className:"flex justify-between items-center mb-4"},a.createElement("h2",{className:"text-xl font-bold"},"API Tests"),a.createElement("button",{onClick:m,disabled:s,className:"px-4 py-2 bg-blue-600 text-white rounded disabled:opacity-50"},s?"Testing...":"Run Tests")),r.length>0&&a.createElement("div",{className:"space-y-4"},r.map((v,E)=>a.createElement("div",{key:E,className:"p-4 bg-slate-700 rounded"},a.createElement("div",{className:"flex justify-between items-center mb-2"},a.createElement("div",{className:"font-mono text-sm"},v.endpoint),a.createElement("div",{className:`font-bold ${g(v.status)}`},v.status," ",v.statusText)),a.createElement("div",{className:"text-xs text-gray-400 mb-2"},"Method: ",v.method," | Time: ",v.responseTime,"ms"),v.headers&&Object.keys(v.headers).length>0&&a.createElement("div",{className:"mt-2 text-xs"},a.createElement("div",{className:"text-gray-400"},"Response Headers:"),a.createElement("pre",{className:"mt-1 text-green-400"},JSON.stringify(v.headers,null,2))),v.error&&a.createElement("div",{className:"mt-2 text-xs text-red-400"},a.createElement("div",{className:"font-bold"},"Error:"),a.createElement("pre",{className:"mt-1 whitespace-pre-wrap"},v.error)),v.data&&a.createElement("div",{className:"mt-2 text-xs"},a.createElement("div",{className:"text-gray-400"},"Response Data:"),a.createElement("pre",{className:"mt-1 text-green-400"},JSON.stringify(v.data,null,2))))))),a.createElement(Ce,{className:"p-6 bg-slate-800"},a.createElement("h2",{className:"text-xl font-bold mb-4"},"Interpretation Guide"),a.createElement("div",{className:"space-y-3 text-sm"},a.createElement("div",{className:"flex items-start gap-2"},a.createElement("span",{className:"text-green-400"},"â "),a.createElement("div",null,a.createElement("strong",null,"200 OK:")," API key is valid and request succeeded")),a.createElement("div",{className:"flex items-start gap-2"},a.createElement("span",{className:"text-red-400"},"â"),a.createElement("div",null,a.createElement("strong",null,"401 Unauthorized:")," API key is invalid or missing")),a.createElement("div",{className:"flex items-start gap-2"},a.createElement("span",{className:"text-orange-400"},"â ï¸"),a.createElement("div",null,a.createElement("strong",null,"403 Forbidden:")," API key is valid but RLS policies block access")),a.createElement("div",{className:"flex items-start gap-2"},a.createElement("span",{className:"text-yellow-400"},"ð¡"),a.createElement("div",null,a.createElement("strong",null,"Note:")," 403 errors are expected for unauthenticated users trying to access protected data. This means RLS is working correctly.")))))):a.createElement("div",{className:"p-4"},"Loading...")}async function lR(){console.log(` 888=== DIRECT SUPABASE API TEST ===`);const t=Ww(),{url:e,key:r}=t;if(console.log("Config:",{url:e?.substring(0,50)+"...",hasKey:!!r,keyLength:r?.length,keyPrefix:r?.substring(0,20)+"..."}),!e||!r)return console.error("â Missing configuration"),{success:!1,error:"Missing configuration"};const n=`${e}/rest/v1/waitlist_entries?select=count&limit=1`,s={apikey:r,Authorization:`Bearer ${r}`,"Content-Type":"application/json",Accept:"application/json"};console.log(` 889=== MAKING DIRECT REQUEST ===`),console.log("URL:",n),console.log("Headers:",{...s,apikey:s.apikey.substring(0,20)+"...",Authorization:s.Authorization.substring(0,30)+"..."});try{const o=await fetch(n,{method:"GET",headers:s});if(console.log(` 890=== RESPONSE ===`),console.log("Status:",o.status,o.statusText),console.log("Response headers:",Object.fromEntries(o.headers.entries())),!o.ok){const d=await o.text();return console.error("Error body:",d),{success:!1,error:`HTTP ${o.status}: ${o.statusText}`,details:d}}const c=await o.json();return console.log("Success! Data:",c),{success:!0,data:c}}catch(o){return console.error(` 891=== EXCEPTION ===`),console.error("Message:",o.message),console.error("Stack:",o.stack),{success:!1,error:o.message}}}function cR(){const[t,e]=x.useState({}),[r,n]=x.useState(""),s=async()=>{try{const o={MODE:"production",VITE_SUPABASE_URL:"https://lhioylodbbmwnfulkykc.supabase.co",VITE_SUPABASE_PUBLISHABLE_KEY:"SET",VITE_SUPABASE_ANON_KEY:"SET"};e(m=>({...m,env:o})),console.log("Testing Supabase connection..."),console.log("Supabase URL:","https://lhioylodbbmwnfulkykc.supabase.co"),console.log("Has API key:",!0);const{data:c,error:d}
891=await et.from("waitlist_entries").select("count",{count:"exact",head:!0});d?(console.error("Supabase test error:",d),d.message?.includes("Double check your Supabase")?n("FOUND THE ERROR: This is the error from Supabase client library"):d.code==="401"||d.message?.includes("Invalid API key")?n("401 Authentication error - API key issue"):n(`Other error: ${d.code} - ${d.message}`)):e(m=>({...m,testResult:`Success: ${c} entries`}))}catch(o){console.error("Debug error:",o);const c=o instanceof Error?o.message:"Unknown error";n(`Exception: ${c}`)}};return x.useEffect(()=>{s()},[]),a.createElement("div",{className:"container mx-auto p-6 max-w-4xl"},a.createElement("h1",{className:"text-2xl font-bold mb-6"},"Supabase Debug Page"),a.createElement("div",{className:"space-y-4"},a.createElement("div",{className:"bg-gray-100 p-4 rounded"},a.createElement("h2",{className:"font-bold mb-2"},"Environment Variables"),a.createElement("pre",{className:"text-sm"},JSON.stringify(t.env,null,2))),r&&a.createElement("div",{className:"bg-red-100 border border-red-400 p-4 rounded"},a.createElement("h2",{className:"font-bold text-red-700 mb-2"},"Error Found"),a.createElement("p",{className:"text-red-700"},r)),a.createElement("div",{className:"bg-gray-100 p-4 rounded"},a.createElement("h2",{className:"font-bold mb-2"},"Manual Tests"),a.createElement("div",{className:"flex gap-4"},a.createElement("button",{onClick:s,className:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"},"Test Supabase Connection"),a.createElement("button",{onClick:async()=>{console.log("Running direct Supabase test...");const o=await lR();e(c=>({...c,testResult:`Direct API Test: ${JSON.stringify(o,null,2)}`}))},className:"px-4 py-2 bg-purple-600 text-white rounded hover:bg-purple-700"},"Test Direct API Call"))),t.testResult&&a.createElement("div",{className:`p-4 rounded ${t.testResult.includes("Success")||t.testResult.includes('"success": true')?"bg-green-100 border border-green-400":"bg-red-100 border border-red-400"}`},a.createElement("h2",{className:"font-bold mb-2"},"Test Result"),a.createElement("pre",{className:"text-sm whitespace-pre-wrap"},t.testResult)),a.createElement("div",{className:"bg-blue-100 border border-blue-400 p-4 rounded"},a.createElement("h2",{className:"font-bold text-blue-700 mb-2"},"Instructions"),a.createElement("ol",{className:"list-decimal list-inside text-sm space-y-1"},a.createElement("li",null,'Check if the error "Double check your Supabase anon or service_role API key" appears in console'),a.createElement("li",null,"If it does, it's coming from the Supabase client library"),a.createElement("li",null,"Your API key is valid (we tested with curl)"),a.createElement("li",null,"The issue is likely environment variables not being available at build time"),a.createElement("li",null,'Make sure Netlify has these under "Build environment variables":'),a.createElement("code",{className:"block bg-gray-200 p-2 mt-2 text-xs"},"VITE_SUPABASE_URL=https://lhioylodbbmwnfulkykc.supabase.co",a.createElement("br",null),"VITE_SUPABASE_PUBLISHABLE_KEY=sb_publishable_oygZUv3qDD5YYmuJyPCn0w_hi1NNENQ")))))}const Up="zenith_ab_test_assignments",vn=t=>{try{const e=t==="local"?localStorage:sessionStorage,r="__storage_test__";return e.setItem(r,"test"),e.removeItem(r),!0}catch{return!1}},uR=()=>{if(!vn("session"))return`test_user_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;let t=sessionStorage.getItem("zenith_user_id");if(!t){t=`user_${Date.now()}_${Math.random().toString(36).substr(2,9)}`;try{sessionStorage.setItem("zenith_user_id",t)}catch{}}return t},zp=()=>{if(!vn("local"))return{};try{const t=localStorage.getItem(Up);return t?JSON.parse(t):{}}catch{return{}}},dR=(t,e)=>{if(vn("local"))try{const r=zp();r[t]=e,localStorage.setItem(Up,JSON.stringify(r))}catch(r){console.warn("Failed to store test assignment:",r)}},mR=(t,e)=>{let r=0;const n=t+e;for(let s=0;s<n.length;s++){const o=n.charCodeAt(s);r=(r<<5)-r+o,r=r&r}return Math.abs(r)},$p=t=>{const[e,r]=x.useState(!1),[n,s]=x.useState(null);return x.useEffect(()=>{const o=`ab_${t.testName}`,c=uR(),d=t.trafficSplit||.5,m=zp();let h;m[o]?h=m[o]:(h=mR(c,o)%100/100<d?"variant":"control",dR(o,h));const p={variant:h,config:h==="control"?t.variants.control:t.variants.variant,testId:o,participate:()=>{t.enableTracking!==!1&&Ne("ab_test_participate",{test_name:t.testName,variant:h,test_id:o,user_id:c,storage_available:vn("local")&&vn("session")})},convert:(g="conversion",v=1)=>{t.enableTracking!==!1&&Ne("ab_test_convert",{test_name:t.testName,variant:h,test_id:o,goal_name:g,value:v,user_id:c})}};s(p),r(!0),t.enableTracking!==!1&&p.participate()},[t]),!e||!n?{variant:"control",config:t.variants.control,testId:`ab_${t.testName}`,participate:()=>{},convert:()=>{}}:n},Ko=()=>
891{if(vn("local"))try{localStorage.removeItem(Up)}catch(t){console.warn("Failed to reset test assignments:",t)}if(vn("session"))try{sessionStorage.removeItem("zenith_user_id")}catch(t){console.warn("Failed to reset user ID:",t)}},fR=()=>({localStorage:vn("local"),sessionStorage:vn("session"),assignments:zp()});function hR(){const[t,e]=x.useState({}),[r,n]=x.useState([]),[s,o]=x.useState(!1),c=$p({testName:"hero_dual_cta",variants:{control:{showDualCTA:!1},variant:{showDualCTA:!0}},trafficSplit:.5,enableTracking:!0}),d=async p=>{o(!0);const g={control:0,variant:0},v=[];Ko(),localStorage.removeItem("zenith_user_id");for(let E=0;E<p;E++){const N=`test_user_${E}_${Date.now()}`;sessionStorage.setItem("zenith_user_id",N),Ko();const k=c.variant;v.push({userId:N,variant:k,index:E}),k==="control"?g.control++:g.variant++}n(v),e({totalTests:p,distribution:g,percentage:{control:(g.control/p*100).toFixed(1),variant:(g.variant/p*100).toFixed(1)}}),o(!1)},m=()=>{const p={localStorage:{available:typeof localStorage<"u",hasUserId:localStorage.getItem("zenith_user_id")!==null,hasAssignments:localStorage.getItem("zenith_ab_test_assignments")!==null},sessionStorage:{available:typeof sessionStorage<"u",hasUserId:sessionStorage.getItem("zenith_user_id")!==null}};e({...t,storage:p})};x.useEffect(()=>{m();const p=()=>{m()};return window.addEventListener("storage",p),()=>{window.removeEventListener("storage",p)}},[]);const h=p=>{const g={ab_hero_dual_cta:p};localStorage.setItem("zenith_ab_test_assignments",JSON.stringify(g)),window.location.reload()};return a.createElement("div",{className:"min-h-screen bg-slate-900 text-white p-8"},a.createElement("div",{className:"max-w-4xl mx-auto space-y-6"},a.createElement("h1",{className:"text-3xl font-bold mb-8"},"A/B Test Debugger - Hero Dual CTA"),a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,"Current Test State")),a.createElement(Ve,{className:"space-y-4"},a.createElement("div",{className:"grid grid-cols-2 gap-4"},a.createElement("div",null,a.createElement("p",{className:"text-sm text-slate-400"},"Test ID"),a.createElement("p",{className:"font-mono"},c.testId)),a.createElement("div",null,a.createElement("p",{className:"text-sm text-slate-400"},"Current Variant"),a.createElement(rs,{variant:c.variant==="control"?"secondary":"default"},c.variant.toUpperCase()))),a.createElement("div",null,a.createElement("p",{className:"text-sm text-slate-400 mb-2"},"Configuration"),a.createElement("pre",{className:"bg-slate-800 p-3 rounded text-sm"},JSON.stringify(c.config,null,2))),a.createElement("div",null,a.createElement("p",{className:"text-sm text-slate-400 mb-2"},"Storage Status"),a.createElement("div",{className:"space-y-1 text-sm"},a.createElement("div",null,"LocalStorage: ",t.storage?.localStorage?.available?"â
":"â"),a.createElement("div",null,"SessionStorage: ",t.storage?.sessionStorage?.available?"â
":"â"),a.createElement("div",null,"User ID: ",t.storage?.sessionStorage?.hasUserId?"â
":"â"),a.createElement("div",null,"Assignments: ",t.storage?.localStorage?.hasAssignments?"â
":"â"))),a.createElement("div",{className:"flex gap-2"},a.createElement(ce,{onClick:()=>h("control"),variant:"outline",size:"sm"},"Force Single CTA"),a.createElement(ce,{onClick:()=>h("variant"),size:"sm"},"Force Dual CTA"),a.createElement(ce,{onClick:()=>{Ko(),window.location.reload()},variant:"outline",size:"sm"},"Reset & Reload")))),a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,"Traffic Distribution Simulation")),a.createElement(Ve,{className:"space-y-4"},a.createElement("p",{className:"text-sm text-slate-400"},"Simulate how traffic is distributed between variants"),a.createElement("div",{className:"flex gap-2"},a.createElement(ce,{onClick:()=>d(100),disabled:s,variant:"outline",size:"sm"},"Run 100 Tests"),a.createElement(ce,{onClick:()=>d(1e3),disabled:s,variant:"outline",size:"sm"},"Run 1000 Tests")),t.totalTests&&a.createElement("div",{className:"space-y-2"},a.createElement("h3",{className:"font-semibold"},"Results (Total: ",t.totalTests,")"),a.createElement("div",{className:"grid grid-cols-2 gap-4"},a.createElement("div",{className:"bg-slate-800 p-4 rounded"},a.createElement("div",{className:"text-2xl font-bold text-blue-400"},t.percentage?.control||0,"%"),a.createElement("div",{className:"text-sm text-slate-400"},"Control (Single CTA)"),a.createElement("div",{className:"text-lg"},"Count: ",t.distribution?.control||0)),a.createElement("div",{className:"bg-slate-800 p-4 rounded"},a.createElement("div",{className:"text-2xl font-bold text-green-400"},t.percentage?.variant||0,"%"),a.createElement("div",{className:"text-sm text-slate-400"},"Variant (Dual CTA)"),a.createElement("div",{className:"text-lg"},"Count: ",t.distribution?.variant||0))),Math.abs(parseFloat(t.percentage?.control||50)-50)>5&&a.createElement("div",{className:"bg-yellow-900/20 border border-yellow-600 p-3 rounded text-sm"},"â ï¸ Distribution is not close to 50/50. This might indicate an issue with the hash function.")))),r.length>0&&a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,"Sample Assignments (First 20)")),a.createElement(Ve,null,a.createElement("div",{className:"max-h-60 overflow-y-auto"},a.createElement("table",{className:"w-full text-sm"},a.createElement("thead",null,a.createElement("tr",{className:"text-left border-b border-slate-700"},a.createElement("th",{className:"pb-2"},"Test #"),a.createElement("th",{className:"pb-2"},"User ID"),a.createElement("th",{className:"pb-2"},"Variant"))),a.createElement("tbody",null,r.slice(0,20).map((p,g)=>a.createElement("tr",{key:g,className:"border-b border-slate-800"},a.createElement("td",{className:"py-2"},p.index+1),a.createElement("td",{className:"py-2 font-mono text-xs"},p.userId.substring(0,20),"..."),a.createElement("td",{className:"py-2"},a.createElement(rs,{variant:p.variant==="control"?"secondary":"default"},p.variant))))))))),a.createElement(Ce,null,a.createElement(ct,null,a.createElement(pt,null,"How to Test in Production")),a.createElement(Ve,{className:"space-y-3 text-sm"},a.createElement("div",{className:"list-decimal list-inside space-y-2 text-slate-300"},a.createElement("li",null,"Open multiple incognito windows or clear your localStorage"),a.createElement("li",null,"Visit your production site in each window"),a.createElement("li",null,"Approximately 50% should show dual CTA, 50% single CTA"),a.createElement("li",null,"Add ",a.createElement("code",{className:"bg-slate-800 px-2 py-1 rounded"},"?debug=abtest")," to the URL to see this debugger"),a.createElement("li",null,"Check the variant badge to confirm which version you're seeing")),a.createElement("div",{className:"bg-blue-900/20 border border-blue-600 p-3 rounded mt-4"},"ð¡ ",a.createElement("strong",null,"Tip:")," The user assignment is persistent. You'll always see the same variant unless you clear storage or use a different browser/device.")))))}function pR(){return a.createElement(hR,null)}function gR(){const[t,e]=x.useState([]),[r,n]=x.useState(0),s=h=>{Ko();const p=[];for(let g=0;g<h;g++){sessionStorage.setItem("zenith_user_id",`test_user_${g}_${Date.now()}`);const v=$p({testName:"hero_dual_cta",variants:{control:{showDualCTA:!1},variant:{showDualCTA:!0}},trafficSplit:.5,enableTracking:!1});p.push({iteration:g+1,userId:sessionStorage.getItem("zenith_user_id"),variant:v.variant,showDualCTA:v.config.showDualCTA,testId:v.testId}),localStorage.removeItem("zenith_ab_test_assignments")}e(p),n(h)},o=t.filter(h=>h.variant==="variant").length,c=t.filter(h=>h.variant==="control").length,d=r>0?(o/r*100).toFixed(1):"0",m=r>0?(c/r*100).toFixed(1):"0";return a.createElement("div",{className:"min-h-screen bg-slate-50 dark:bg-slate-900 p-8"},a.createElement("div",{className:"max-w-4xl mx-auto"},a.createElement("h1",{className:"text-3xl font-bold text-slate-900 dark:text-white mb-8"},"A/B Test Demo - Hero Dual CTA"),a.createElement("div",{className:"bg-white dark:bg-slate-800 rounded-lg p-6 mb-6"},a.createElement("h2",{className:"text-xl font-semibold mb-4"},"Test Configuration"),a.createElement("div",{className:"space-y-2 text-sm"},a.createElement("div",null,a.createElement("strong",null,"Test Name:")," hero_dual_cta"),a.createElement("div",null,a.createElement("strong",null,"Control:")," Single CTA (showDualCTA: false)"),a.createElement("div",null,a.createElement("strong",null,"Variant:")," Dual CTA (showDualCTA: true)"),a.createElement("div",null,a.createElement("strong",null,"Traffic Split:")," 50% (0.5)"),a.createElement("div",null,a.createElement("strong",null,"Expected:")," ~50% should see dual CTA"))),a.createElement("div",{className:"bg-white dark:bg-slate-800 rounded-lg p-6 mb-6"},a.createElement("h2",{className:"text-xl font-semibold mb-4"},"Run Simulation"),a.createElement("div",{className:"flex gap-4 mb-4"},a.createElement("button",{onClick:()=>s(10),className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700"},"Run 10 Tests"),a.createElement("button",{onClick:()=>s(100),className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700"},"Run 100 Tests"),a.createElement("button",{onClick:()=>s(1e3),className:"bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700"},"Run 1000 Tests")),a.createElement("p",{className:"text-sm text-slate-600 dar
891k:text-slate-400"},"Click a button to simulate multiple users visiting the page and check the distribution")),r>0&&a.createElement("div",{className:"bg-white dark:bg-slate-800 rounded-lg p-6 mb-6"},a.createElement("h2",{className:"text-xl font-semibold mb-4"},"Results (",r," tests)"),a.createElement("div",{className:"grid grid-cols-2 gap-4 mb-4"},a.createElement("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-4 rounded"},a.createElement("div",{className:"text-2xl font-bold text-blue-600 dark:text-blue-400"},o),a.createElement("div",{className:"text-sm"},"Variant (Dual CTA)"),a.createElement("div",{className:"text-lg font-semibold"},d,"%")),a.createElement("div",{className:"bg-gray-50 dark:bg-gray-900/20 p-4 rounded"},a.createElement("div",{className:"text-2xl font-bold text-gray-600 dark:text-gray-400"},c),a.createElement("div",{className:"text-sm"},"Control (Single CTA)"),a.createElement("div",{className:"text-lg font-semibold"},m,"%"))),a.createElement("div",{className:"text-sm text-slate-600 dark:text-slate-400"},Math.abs(parseFloat(d)-50)>5&&a.createElement("div",{className:"text-amber-600 dark:text-amber-400 font-semibold"},"â ï¸ Distribution is significantly different from 50/50. This might indicate an issue."),Math.abs(parseFloat(d)-50)<=5&&a.createElement("div",{className:"text-green-600 dark:text-green-400 font-semibold"},"â
Distribution is close to expected 50/50 split."))),t.length>0&&t.length<=20&&a.createElement("div",{className:"bg-white dark:bg-slate-800 rounded-lg p-6"},a.createElement("h2",{className:"text-xl font-semibold mb-4"},"Individual Test Results"),a.createElement("div",{className:"space-y-1 text-xs font-mono"},t.map(h=>a.createElement("div",{key:h.iteration,className:"flex justify-between p-2 bg-slate-50 dark:bg-slate-700 rounded"},a.createElement("span",null,"Test ",h.iteration,":"),a.createElement("span",{className:h.variant==="variant"?"text-blue-600":"text-gray-600"},h.variant," (",h.showDualCTA?"Dual":"Single"," CTA)")))))))}function yR(){const[t,e]=x.useState({}),[r,n]=x.useState(!1),s=$p({testName:"hero_dual_cta",variants:{control:{showDualCTA:!1},variant:{showDualCTA:!0}},trafficSplit:.5,enableTracking:!0});x.useEffect(()=>{const d={timestamp:new Date().toISOString(),environment:"production",isProduction:!0,isDevelopment:!1,abTest:{variant:s.variant,config:s.config,testId:s.testId,showDualCTA:s.config.showDualCTA},storage:fR(),envStatus:ri(),features:{analytics:ri().features.analytics,supabase:ri().features.supabase,clerk:ri().features.clerk,email:ri().features.email},gaMeasurementId:"G-YBHJ3LXWXE"};e(d)},[s]);const o=()=>{Ko(),window.location.reload()};return window.location.search.includes("debug=abtest")?r?a.createElement("div",{className:"fixed bottom-4 right-4 z-50 bg-slate-900 text-white p-4 rounded-lg max-w-md max-h-[80vh] overflow-auto text-xs font-mono"},a.createElement("div",{className:"flex justify-between items-center mb-2"},a.createElement("h3",{className:"text-sm font-bold"},"A/B Test Debug"),a.createElement("button",{onClick:()=>n(!1),className:"text-slate-400 hover:text-white ml-4"},"Ã")),a.createElement("div",{className:"space-y-2"},a.createElement("div",null,a.createElement("strong",null,"Environment:")," ",t.environment," ",t.isProduction&&"(PROD)"),a.createElement("div",{className:"bg-slate-800 p-2 rounded"},a.createElement("div",{className:"text-green-400 mb-1"},"A/B Test Status:"),a.createElement("div",null,"Variant: ",a.createElement("span",{className:"text-yellow-300"},t.abTest?.variant)),a.createElement("div",null,"Show Dual CTA: ",a.createElement("span",{className:"text-yellow-300"},t.abTest?.showDualCTA?"YES":"NO")),a.createElement("div",null,"Test ID: ",t.abTest?.testId)),a.createElement("div",{className:"bg-slate-800 p-2 rounded"},a.createElement("div",{className:"text-blue-400 mb-1"},"Storage:"),a.createElement("div",null,"Local Storage: ",t.storage?.localStorage?"â
":"â"),a.createElement("div",null,"Session Storage: ",t.storage?.sessionStorage?"â
":"â"),a.createElement("div",null,"Saved Assignments: ",JSON.stringify(t.storage?.assignments)||"None")),a.createElement("div",{className:"bg-slate-800 p-2 rounded"},a.createElement("div",{className:"text-purple-400 mb-1"},"Features:"),a.createElement("div",null,"Analytics: ",t.features?.anal
891ytics?"â
":"â"),a.createElement("div",null,"GA ID: ",t.gaMeasurementId||"Not set")),a.createElement("div",{className:"bg-slate-800 p-2 rounded"},a.createElement("div",{className:"text-orange-400 mb-1"},"Raw Data:"),a.createElement("pre",{className:"text-xs overflow-x-auto whitespace-pre-wrap"},JSON.stringify(t,null,2))),a.createElement("div",{className:"flex gap-2 mt-4"},a.createElement("button",{onClick:o,className:"bg-red-600 hover:bg-red-700 px-2 py-1 rounded text-xs"},"Reset A/B Tests"),a.createElement("button",{onClick:()=>window.location.reload(),className:"bg-blue-600 hover:bg-blue-700 px-2 py-1 rounded text-xs"},"Reload")),a.createElement("div",{className:"text-slate-400 text-xs mt-2"},"Traffic Split: 50% (0.5) means 50% should see dual CTA"))):a.createElement("button",{onClick:()=>n(!0),className:"fixed bottom-4 right-4 z-50 bg-slate-900 text-white px-2 py-1 rounded text-xs opacity-50 hover:opacity-100"},"Debug A/B"):null}function vR({className:t=""}){const[e,r]=x.useState(!1),[n,s]=x.useState(Yu()),[o,c]=x.useState(n.regional.english);x.useEffect(()=>{const h=pn(),p=h.language==="ar"?"ar":"en",g=h.isMENA||Gu(h.code);c(g&&p==="ar"?Bh(h.code,"ar"):n.regional.english),Ne("early_adopter_page_view",{page_location:"/early-adopter-program",page_title:"Early Adopter Program - Zenith AI",region:h.code,is_mena:g})},[]);const d=()=>{Su(n.primaryCTA,"early_adopter_hero","early_adopter_program",{button_type:"primary",cta_type:"early_adopter_signup",region:pn().code}),r(!0)},m=()=>{Su(n.secondaryCTA,"early_adopter_hero","early_adopter_program",{button_type:"secondary",cta_type:"waitlist_signup",region:pn().code}),r(!0)};return a.createElement("section",{className:`relative min-h-[85vh] flex items-center bg-slate-900 text-white pt-16 ${t}`},a.createElement("div",{className:"absolute inset-0 overflow-hidden"},a.createElement("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0zNiAxOGMzLjMxIDAgNiAyLjY5IDYgNnMtMi42OSA2LTYgNi02LTIuNjktNi02IDIuNjktNiA2LTZ6IiBzdHJva2U9IiM2MzY2RjExQSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2Utb3BhY2l0eT0iMC4zIi8+PHBhdGggZD0iTTI0IDM2YzMuMzEgMCA2IDIuNjkgNiA2cy0yLjY5IDYtNiA2LTYtMi42OS02LTYgMi42OS02IDYtNnoiIHN0cm9rZT0iIzg2MzlEMiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2Utb3BhY2l0eT0iMC4yIi8+PC9nPjwvc3ZnPg==')] opacity-20"}),a.createElement("div",{className:"absolute inset-0 bg-gradient-to-r from-indigo-900/20 via-slate-900/10 to-purple-900/20"})),a.createElement("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-slate-900/50 to-slate-900 pointer-events-none"}),a.createElement("div",{className:"container relative mx-auto px-4"},a.createElement("div",{className:"max-w-4xl mx-auto text-center"},a.createElement("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-gradient-to-r from-amber-500/20 to-orange-500/20 border border-amber-500/30 mb-8"},a.createElement(vi,{className:"w-4 h-4 text-amber-400"}),a.createElement("span",{className:"text-sm font-medium text-amber-300"},"Limited Founding Member Access")),a.createElement("h1",{className:"text-2xl md:text-3xl font-bold mb-4 text-slate-400"},"Early Adopter Program"),a.createElement("div",{className:"text-4xl md:text-6xl lg:text-7xl font-bold mb-6 leading-tight"},a.createElement("span",{className:"block mb-2"},a.createElement("span",{className:"bg-gradient-to-r from-primary via-primary-light to-secondary bg-clip-text text-transparent"},n.headline))),a.createElement("p",{className:"text-xl md:text-2xl text-slate-300 mb-8 max-w-3xl mx-auto leading-relaxed"},n.description),a.createElement("div",{className:"mb-12 inline-flex items-center gap-2 px-6 py-3 rounded-lg bg-gradient-to-r from-primary/10 to-secondary/10 border border-primary/20"},a.createElement(Xa,{className:"w-5 h-5 text-primary"}),a.createElement("span",{className:"text-primary font-medium"},n.exclusivity)),a.createElement("div",{className:"mb-8 text-lg text-slate-400 italic"},o.urgency),a.createElement("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4 mb-8"},a.createElement(ce,{onClick:d,size:"lg",className:"w-full sm:w-auto px-8 py-4 text-lg font-semibold bg-gradient-to-r from-primary to-primary-light hover:from-primary-light hover:to-primary shadow-xl hover:shadow-2xl transform hover:scale-105 transition-all duration-300 border-0"},a.createElement(vi,{className:"w-5 h-5 mr-2"}),n.primaryCTA,a.createElement(Rr,{className:"ml-2 h-5 w-5"})),a.createElement(ce,{variant:"outline",onClick:m,size:"lg",className:"w-full sm:w-auto px-8 py-4 text-lg font-semibold border-2 border-slate-600 bg-slate-800/50 hover:bg-slate-700/50 hover:border-slate-500 hover:text-white text-slate-300 transition-all duration-300"},a.createElement(or,{className:"mr-2 h-5 w-5"}),n.secondaryCTA)),a.createElement("p",{className:"text-sm text-slate-500 mb-12"},"Join 10,000+ professionals waiting for early access ⢠No credit card required"),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-3xl mx-auto"},a.createElement("div",{className:"text-center p-4 rounded-lg bg-slate-800/30 border border-slate-700/50"},a.createElement("div",{className:"text-3xl mb-2"},"ð"),a.createElement("h3",{className:"font-semibold text-white mb-1"},"Early Access"),a.createElement("p",{className:"text-sm text-slate-400"},"Be the first to experience Zenith AI")),a.createElement("div",{className:"text-center p-4 rounded-lg bg-slate-800/30 border border-slate-700/50"},a.createElement("div",{className:"text-3xl mb-2"},"ð"),a.createElement("h3",{className:"font-semibold text-white mb-1"},"Exclusive Benefits"),a.createElement("p",{className:"text-sm text-slate-400"},"Founding member perks & lifetime discounts")),a.createElement("div",{className:"text-center p-4 rounded-lg bg-slate-800/30 border border-slate-700/50"},a.createElement("div",{className:"text-3xl mb-2"},"ð¯"),a.createElement("h3",{className:"font-semibold text-white mb-1"},"Shape the Future"),a.createElement("p",{className:"text-sm text-slate-400"},"Direct influence on product roadmap"))))),e&&a.createElement(Ju,{isOpen:e,onClose:()=>r(!1)}))}const bR=({onTierSelect:t,className:e=""})=>{const[r,n]=x.useState(null),[s,o]=x.useState(pn()),[c,d]=x.useState(Bh(s.code,s.language));x.useEffect(()=>{const g=pn();o(g),d(Bh(g.code,g.language))},[]);const m=[{id:"PIONEER",name:"PIONEER",description:"Start your journey as an early adopter",icon:a.createElement(Yv,{className:"w-6 h-6"}),gradient:"from-blue-500 to-indigo-600",minReferrals:0},{id:"INFLUENCER",name:"INFLUENCER",description:"Lead your team to success",icon:a.createElement(Xa,{className:"w-6 h-6"}),gradient:"from-purple-500 to-pink-600",isPopular:!0,minReferrals:1},{id:"VISIONARY",name:"VISIONARY",description:"Shape the product vision",icon:a.createElement(vi,{className:"w-6 h-6"}
891),gradient:"from-amber-500 to-orange-600",minReferrals:3},{id:"FOUNDING_PARTNER",name:"FOUNDING PARTNER",description:"Ultimate partnership experience",icon:a.createElement(Gv,{className:"w-6 h-6"}),gradient:"from-emerald-500 to-teal-600",minReferrals:5}],h=g=>{n(g),Ne("tier_selection",{tier:g,location:"tier_showcase",region:s.code,is_mena:s.isMENA}),t&&t(g)},p=(g,v)=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),h(v))};return a.createElement("section",{className:`py-20 bg-slate-800/30 ${e}`},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-6xl mx-auto"},a.createElement("div",{className:"text-center mb-16"},a.createElement("h2",{className:"text-3xl md:text-4xl font-bold text-white mb-4",role:"heading","aria-level":2},"Choose Your Tier"),a.createElement("p",{className:"text-lg text-slate-400 mb-2"},"Progress from PIONEER to FOUNDING PARTNER with increasing benefits"),a.createElement("p",{className:"text-slate-500"},"Each tier builds upon the previous one with cumulative advantages")),Gu(s.code)&&a.createElement("div",{className:"text-center mb-8"},a.createElement("p",{className:"text-sm text-slate-500"},"MENA Region Benefits Available")),a.createElement("div",{"data-testid":"tier-grid",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-12"},m.map(g=>{const v=HO(g.id),E=r===g.id,N=g.isPopular;return a.createElement(Ce,{key:g.id,"data-testid":`tier-card-${g.id}`,className:` 892 relative cursor-pointer transition-all duration-300 hover:scale-105 893 ${N?"ring-2 ring-primary shadow-xl":"hover:shadow-lg"} 894 ${E?"ring-2 ring-primary scale-105":""} 895 bg-slate-800 border-slate-700 text-white 896 `,onClick:()=>
896h(g.id),onKeyDown:k=>p(k,g.id),role:"button",tabIndex:0,"aria-label":`Select ${g.name} tier: ${g.description}`},N&&a.createElement("div",{className:"absolute -top-3 left-1/2 transform -translate-x-1/2"},a.createElement(rs,{className:"bg-primary text-primary-foreground px-3 py-1 text-xs font-semibold"},"Most Popular")),a.createElement(ct,{className:"text-center pb-4"},a.createElement("div",{className:`inline-flex p-3 rounded-full bg-gradient-to-br ${g.gradient} mb-3`},g.icon),a.createElement(pt,{className:"text-xl font-bold"},g.name),a.createElement(fi,{className:"text-slate-400"},g.description),g.minReferrals!==void 0&&a.createElement("p",{className:"text-sm text-slate-500 mt-1"},g.minReferrals===0?"Entry level":`${g.minReferrals}+ referrals`)),a.createElement(Ve,null,a.createElement("ul",{className:"space-y-3"},v.map((k,w)=>a.createElement("li",{key:w,className:"flex items-start gap-2"},a.createElement(qr,{className:"w-4 h-4 text-green-500 mt-0.5 flex-shrink-0"}),a.createElement("span",{className:"text-sm text-slate-300"},k)))),E&&a.createElement("div",{className:"mt-4 pt-4 border-t border-slate-700"},a.createElement("p",{className:"text-xs text-slate-500 text-center"},a.createElement(qr,{className:"w-4 h-4 inline mr-1 text-green-500"}),"Selected tier"))))})),a.createElement("div",{className:"bg-slate-800/50 rounded-xl p-6 border border-slate-700"},a.createElement("h3",{className:"text-lg font-semibold text-white mb-4 text-center"},"Your Journey to Partnership"),a.createElement("div",{className:"flex items-center justify-between max-w-2xl mx-auto"},m.map((g,v)=>a.createElement(a.Fragment,{key:g.id},a.createElement("div",{className:"text-center"},a.createElement("div",{className:`inline-flex p-2 rounded-full ${v===0?"bg-blue-500":v===1?"bg-purple-500":v===2?"bg-amber-500":"bg-emerald-500"} mb-2`},v===0&&a.createElement(Yv,{className:"w-4 h-4 text-white"}),v===1&&a.createElement(Xa,{className:"w-4 h-4 text-white"}),v===2&&a.createElement(vi,{className:"w-4 h-4 text-white"}),v===3&&a.createElement(Gv,{className:"w-4 h-4 text-white"})),a.createElement("p",{className:"text-xs text-slate-400"},g.name)),v<m.length-1&&a.createElement(Rr,{className:"w-5 h-5 text-slate-600 flex-shrink-0"}))))),a.createElement("div",{className:"text-center mt-12"},a.createElement(ce,{size:"lg",className:"bg-primary hover:bg-primary/90 text-primary-foreground px-8 py-3",onClick:()=>r&&h(r),disabled:!r},r?a.createElement(a.Fragment,null,"Join as ",r.replace("_"," "),a.createElement(Rr,{className:"w-4 h-4 ml-2"})):a.createElement(a.Fragment,null,"Select a Tier to Get Started",a.createElement(AI,{className:"w-4 h-4 ml-2"}))),a.createElement("p",{className:"text-sm text-slate-500 mt-3"},"No commitment required ⢠Cancel anytime ⢠Priority access guaranteed")))))},ER=[{id:"early-access",title:"Early access to new features",description:"Be the first to experience cutting-edge AI capabilities before public release",icon:vr},{id:"roadmap-influence",title:"Direct influence on product roadmap",description:"Shape the future of Zenith AI with your feedback and feature requests",icon:Ip},{id:"priority-support",title:"Priority support and communication",description:"Get dedicated support channels and direct access to our engineering team",icon:mw},{id:"discord-access",title:"Exclusive Discord community access",description:"Join a private community of innovators and early adopters",icon:or},{id:"mena-advantages",title:"MENA region-specific advantages",description:"Localized support for GCC countries with Arabic language preference",icon:Ap,isMENAExclusive:!0},{id:"founding-member",title:"Founding member recognition",description:"Permanent recognition as a founding member with exclusive badges",icon:vi},{id:"co-creation",title:"Co-creation opportunities",description:"Collaborate directly with our product team on feature development",icon:bI},{id:"beta-access",title:"Beta feature access",description:"Test and provide feedback on features in active development",icon:vw}];function xR({className:t=""}){const e=pn(),r=Gu(e.code),n=(s,o)=>{Ne("benefit_click",{benefit_id:s,benefit_title:o,location:"early_adopter_benefits",region:e.code,is_mena:r})};
896return a.createElement("section",{id:"benefits",role:"region","aria-labelledby":"benefits-heading",className:`py-16 bg-slate-800/50 ${t}`},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center mb-12"},a.createElement("h2",{id:"benefits-heading",className:"text-3xl md:text-4xl font-bold mb-4"},a.createElement("span",{className:"bg-clip-text text-transparent bg-gradient-to-r from-primary via-primary-light to-secondary"},"Early Adopter Benefits")),a.createElement("p",{className:"text-lg text-slate-300 max-w-2xl mx-auto"},"As a founding member, you'll receive exclusive access and perks designed to accelerate your team's success"),r&&a.createElement("div",{className:"mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-full bg-primary/10 border border-primary/20"},a.createElement(Ap,{className:"w-4 h-4 text-primary","aria-hidden":"true"}),a.createElement("span",{className:"text-sm font-medium text-primary"},"Regional advantages for ",e.name))),a.createElement("div",{"data-testid":"benefits-grid",className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-6xl mx-auto",role:"list"},ER.map(s=>{const o=s.icon,c=s.isMENAExclusive&&r;return a.createElement(Ce,{key:s.id,"data-testid":`benefit-card-${s.id}`,className:` 897 group relative bg-slate-900/50 dark:bg-white/5 898 hover:bg-slate-900/80 dark:hover:bg-white/10 899 border-slate-700/50 hover:border-primary/50 900 transition-all duration-300 hover:scale-105 901 cursor-pointer focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:ring-offset-slate-900 902 ${c?"ring-2 ring-primary shadow-lg shadow-primary/20":""} 903 `,role:"listitem","aria-label":`${s.title}: ${s.description}`,tabIndex:0,onClick:()=>n(s.id,s.title),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),n(s.id,s.title))}},a.createElement(Ve,{className:"p-6","data-testid":"card-content"},a.createElement("div",{"data-testid":"benefit-icon-container",className:` 904 w-12 h-12 rounded-full flex items-center justify-center mb-4 905 ${c?"bg-gradient-to-br from-primary to-primary-light":"bg-primary/10 dark:bg-primary/20"} 906 transition-all duration-300 group-hover:scale-110 907 `},a.createElement(o,{"data-testid":"benefit-icon",className:` 908 h-6 w-6 transition-colors duration-300 909 ${c?"text-white":"text-primary dark:text-primary-light group-hover:text-primary"} 910 `,"aria-hidden":"true"})),s.isMENAExclusive&&r&&a.createElement("div",{className:"absolute top-4 right-4"},a.createElement("span",{className:"inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-primary text-white"},"Regional")),a.createElement("h3",{className:"text-lg font-semibold text-slate-100 dark:text-white mb-2 group-hover:text-primary transition-colors duration-300"},s.title),a.createElement("p",{className:"text-slate-400 dark:text-slate-300 leading-relaxed"},s.description),a.createElement("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-primary to-primary-light transform scale-x-0 group-hover:scale-x-100 transition-transform duration-300"})))})),a.createElement("div",{className:"mt-16 text-center"},a.createElement("p",{className:"text-sm text-slate-500 mb-4"},"Benefits automatically applied when you join the Early Adopter Program"),a.createElement("div",{className:"inline-flex items-center gap-4 text-xs text-slate-600"},a.createElement("span",{className:"flex items-center gap-1"},a.createElement(vr,{className:"w-3 h-3","aria-hidden":"true"}),"Instant activation"),a.createElement("span",null,"â¢"),a.createElement("span",{className:"flex items-center gap-1"},a.createElement(Mr,{className:"w-3 h-3","aria-hidden":"true"}),"No credit card required"),a.createElement("span",null,"â¢"),a.createElement("span",{className:"flex items-center gap-1"},a.createElement(or,{className:"w-3 h-3","aria-hidden":"true"}),"Limited spots available")))))}const Jc=[{id:"program-overview",name:"Program Overview",icon:a.createElement(La,{className:"w-4 h-4"}),items:[{id:"what-is-program",question:"What is the Early Adopter Program?",answer:"The Early Adopter Program is an exclusive opportunity for teams and organizations to be at the forefront of AI workspace innovation. As a foun
910ding member co-creator, you'll get early access to Zenith AI, direct influence on the product roadmap, and special recognition as a pioneering partner in transforming how teams collaborate.",category:"program-overview"},{id:"who-eligible",question:"Who is eligible to join?",answer:"We welcome teams and organizations who want to be at the forefront of AI workspace transformation. Whether you're a small team, growing startup, or enterprise organization, if you're passionate about leveraging AI to improve productivity and collaboration, you're eligible to join.",category:"program-overview"},{id:"different-from-waitlist",question:"How is this different from the regular waitlist?",answer:"The Early Adopter Program offers exclusive benefits beyond regular waitlist access. You'll get priority access, direct influence on product development, dedicated support, special recognition as a founding member, and access to exclusive community channels and beta features.",category:"program-overview"},{id:"benefits",question:"What are the benefits of being an Early Adopter?",answer:"Early Adopters receive: priority access to new features, direct influence on product roadmap, priority support, exclusive Discord community access, founding member recognition, co-creation opportunities, and beta feature access before general availability.",category:"program-overview"}]},{id:"tier-benefits",name:"Tier Benefits",icon:a.createElement(La,{className:"w-4 h-4"}),items:[{id:"tier-differences",question:"What's the difference between tiers?",answer:"Tiers are progressive: PIONEER (basic early access), INFLUENCER (adds team consultation), VISIONARY (adds CEO demo session), and FOUNDING PARTNER (adds free pilot program and lifetime discount). Each tier includes all benefits from previous tiers plus additional perks.",category:"tier-benefits"},{id:"upgrade-tier",question:"Can I upgrade my tier later?",answer:"Yes! You can progress through tiers as your engagement and commitment grow. Your contributions to the community and product development will be recognized with tier advancements when appropriate.",category:"tier-benefits"},{id:"tier-requirements",question:"What happens if I don't meet the tier requirements?",answer:"Tier progression is flexible and based on mutual fit. We'll work with you to find the right level of engagement that matches your team's needs and goals. All tiers provide valuable early access benefits.",category:"tier-benefits"}]},{id:"timeline",name:"Timeline",icon:a.createElement(La,{className:"w-4 h-4"}),items:[{id:"when-access",question:"When do I get access?",answer:"Access is rolled out in phases based on your tier. PIONEER tier gets first access within 2-4 weeks. Higher tiers get priority access, with FOUNDING PARTNERS potentially receiving access within 1 week of joining.",category:"timeline"},{id:"program-duration",question:"How long does the program last?",answer:"The Early Adopter Program runs through our beta phase and public launch. Founding members retain their special status and benefits permanently, including continued access to exclusive features and community channels.",category:"timeline"},{id:"commitment",question:"What's the time commitment required?",answer:"Time commitment varies by tier and can be as minimal as using the product and providing feedback. Higher tiers may involve consultation calls or collaboration sessions. We value whatever level of engagement you can provide.",category:"timeline"}]},{id:"regional",name:"Regional",icon:a.createElement(La,{className:"w-4 h-4"}),items:[{id:"mena-benefits",question:"Are there specific benefits for MENA regions?",answer:"Yes! We offer localized support for GCC countries, Arabic language preference, regional timezone considerations, and dedicated MENA community channels. We also understand local business practices and can provide region-s
910pecific onboarding.",category:"regional"},{id:"global-access",question:"Is the program available globally?",answer:"Absolutely! While we have special support for MENA regions, the Early Adopter Program is open to teams and organizations worldwide. We provide multi-timezone support and have community members from across the globe.",category:"regional"}]},{id:"technical",name:"Technical",icon:a.createElement(La,{className:"w-4 h-4"}),items:[{id:"integration-requirements",question:"What are the integration requirements?",answer:"Zenith AI integrates with Slack, Microsoft Teams, Email, and WhatsApp. Basic setup requires admin access to your preferred platform(s). We provide comprehensive onboarding guides and technical support throughout the process.",category:"technical"},{id:"data-security",question:"How is my data secured?",answer:"We use enterprise-grade encryption, comply with GDPR and other data protection regulations, and never share your data with third parties. Your conversations and workspace data remain private and secure.",category:"technical"},{id:"customization",question:"Can the system be customized?",answer:"Yes! We work with Early Adopters to understand their specific needs and can provide custom workflows, specialized AI training for your industry, and integration with your existing tools and systems.",category:"technical"}]},{id:"support",name:"Support",icon:a.createElement(La,{className:"w-4 h-4"}),items:[{id:"contact-support",question:"How do I get support?",answer:"Early Adopters receive priority support through multiple channels: dedicated Discord channel, direct email support, scheduled consultation calls (for higher tiers), and comprehensive documentation and video tutorials.",category:"support"},{id:"feedback-process",question:"How does the feedback process work?",answer:"We have structured feedback channels including regular surveys, one-on-one check-ins, feature voting, and direct communication with our product team. Your feedback directly influences our development roadmap and feature prioritization.",category:"support"}]},{id:"pricing",name:"Pricing",icon:a.createElement(La,{className:"w-4 h-4"}),items:[{id:"early-adopter-pricing",question:"What's the pricing for Early Adopters?",answer:"Early Adopters receive special founding member pricing with significant discounts. The program is free to join during the beta phase, and founding members receive lifetime discounts of up to 50% after launch.",category:"pricing"},{id:"payment-options",question:"What payment options are available?",answer:"We offer flexible payment options including monthly, quarterly, and annual billing. Enterprise customers can request custom pricing and payment terms. We also accept various payment methods including credit cards, bank transfers, and cryptocurrency.",category:"pricing"}]}],wR={"what-is-program":{question:"Ù
ا ÙÙ Ø¨Ø±ÙØ§Ù
ج اÙÙ
تبÙÙÙ Ø§ÙØ£ÙØ§Ø¦ÙØ",answer:"Ø¨Ø±ÙØ§Ù
ج اÙÙ
تبÙÙÙ Ø§ÙØ£Ùائ٠ÙÙ ÙØ±ØµØ© ØØµØ±ÙØ© ÙÙÙØ±Ù ÙØ§ÙÙ
ؤسسات ÙØªÙÙÙ ÙÙ Ø·ÙÙØ¹Ø© Ø§Ø¨ØªÙØ§Ø± Ù
Ø³Ø§ØØ© Ø§ÙØ¹Ù
Ù Ø§ÙØ°ÙÙØ©. ÙØ¹Ø¶Ù Ù
ؤسس شرÙÙ ÙÙ Ø§ÙØ¥ÙØ´Ø§Ø¡Ø Ø³ØªØØµÙ عÙÙ ÙØµÙÙ Ù
Ø¨ÙØ± Ø¥ÙÙ Zenith AIØ ÙØªØ£Ø«Ùر Ù
باشر عÙ٠خارطة طرÙ٠اÙÙ
ÙØªØ¬Ø ÙØªÙØ¯ÙØ± خاص ÙØ´Ø±Ù٠رائد Ù٠تØÙÙÙ ÙÙÙÙØ© تعاÙ٠اÙÙØ±Ù."},"mena-benefits":{question:"ÙÙ ÙÙØ§Ù Ù
Ø²Ø§ÙØ§ خاصة ÙÙ
ÙØ·ÙØ© Ø§ÙØ´Ø±Ù Ø§ÙØ£Ùسط ÙØ´Ù
Ø§Ù Ø¥ÙØ±ÙÙÙØ§Ø",answer:"ÙØ¹Ù
! ÙÙØ¯Ù
دعÙ
ا٠Ù
ÙØ¶Ø¹Ø§Ù ÙØ¨Ùدا٠Ù
Ø¬ÙØ³ Ø§ÙØªØ¹Ø§ÙÙ Ø§ÙØ®ÙÙØ¬ÙØ ÙØªÙضÙ٠اÙÙØºØ© Ø§ÙØ¹Ø±Ø¨ÙØ©Ø ÙÙ
راعاة اÙÙ
ÙØ§Ø·Ù Ø§ÙØ²Ù
ÙÙØ© Ø§ÙØ¥ÙÙÙÙ
ÙØ©Ø ÙÙÙÙØ§Øª Ù
جتÙ
ع Ù
خصصة ÙÙ
ÙØ·ÙØ© Ø§ÙØ´Ø±Ù Ø§ÙØ£Ùسط ÙØ´Ù
Ø§Ù Ø¥ÙØ±ÙÙÙØ§. ÙÙÙÙ
Ø£ÙØ¶Ø§Ù Ù
Ù
ارسات Ø§ÙØ¹Ù
٠اÙÙ
ØÙÙØ© ÙÙÙ
ÙÙÙØ§ تÙÙÙØ± إعداد عÙ٠اÙÙØ¸Ø§Ù
Ø§ÙØ¥ÙÙÙÙ
Ù."}};function kR({className:t}){const{trackEvent:e}=Fp(),[r,n]=x.useState("program-overview"),[s,o]=x.useState(new Set),[c,d]=x.useState(!1),m=pn(),h=Gu(String(m.code)),p=x.useCallback(E=>{const N=r;n(E),e("faq_category_change",{from_category:N,to_category:E,location:"early_adopter_faq",region:String(m.code),is_mena:h})},[r,e,m.code,h]),g=x.useCallback((E,N)=>{const k=s.has(E),w=new Set(s);if(k?w.delete(E):w.add(E),o(w),!k){const C=Jc.find(_=>_.items.some(T=>T.id===E))?.id||"unknown";e("faq_expand",{question:N,category:C,location:"early_adopter_faq",region:String(m.code)})}},[s,e,m.code]),v=Jc.find(E=>E.id===r)||Jc[0];return a.createElement("section",{id:"faq","data-testid":"faq-section",className:Oe("py-24 bg-slate-900/50",t),"aria-labelledby":"faq-heading"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"text-center mb-16"},a.createElement(rs,{variant:"secondary",className:"mb-4 bg-primary/10 text-primary border-primary/20"},"Got Questions?"),a.createElement("h2",{id:"faq-heading",className:"text-3xl md:text-4xl font-bold text-white mb-4"},"Frequently Asked Questions"),a.createElement("p",{className:"text-xl text-slate-300 max-w-3xl mx-auto"},"Everything you need to know about the Early Adopter Program")),a.createElement("div",{className:"max-w-4xl mx-auto"},a.createElement("div",{"data-testid":"faq-category-tabs",className:"flex flex-wrap justify-center gap-2 mb-8 md:flex-row md:gap-4",role:"tablist"},Jc.map(E=>a.createElement("button",{key:E.id,role:"tab","aria-selected":r===E.id,"aria-controls":`category-${E.id}`,onClick:()=>
910p(E.id),className:Oe("flex items-center gap-2 px-4 py-2 rounded-lg transition-all duration-200","hover:bg-slate-800 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-inset",r===E.id?"bg-primary text-white shadow-lg":"bg-slate-800/50 text-slate-300 hover:text-white")},E.icon,a.createElement("span",{className:"font-medium"},E.name),a.createElement(rs,{variant:"secondary",className:Oe("ml-1",r===E.id?"bg-white/20 text-white":"bg-slate-700/50 text-slate-400")},E.items.length)))),h&&a.createElement("div",{className:"text-center mb-6"},a.createElement("button",{onClick:()=>d(!c),className:"text-sm text-primary hover:text-primary-light underline"},c?"Show in English":"عرض باÙÙØºØ© Ø§ÙØ¹Ø±Ø¨ÙØ©")),a.createElement("div",{id:`category-${r}`,className:"space-y-4",role:"tabpanel","aria-labelledby":`category-${r}-tab`},v.items.map(E=>{const N=s.has(E.id),k=c&&wR[E.id];return a.createElement(Ce,{key:E.id,className:"bg-slate-800/50 border-slate-700 hover:border-slate-600 transition-all duration-200"},a.createElement(Ve,{className:"p-0"},a.createElement("button",{"aria-expanded":N,"aria-controls":`faq-answer-${E.id}`,onClick:()=>g(E.id,E.question),className:"w-full px-6 py-4 text-left flex items-center justify-between hover:bg-slate-700/50 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-inset"},a.createElement("div",{className:"flex-1 pr-4"},a.createElement("h3",{className:"text-lg font-medium text-white mb-1"},k?k.question:E.question)),a.createElement(dw,{className:Oe("w-5 h-5 text-slate-400 transition-transform duration-200",N&&"rotate-180")})),N&&a.createElement("div",{id:`faq-answer-${E.id}`,className:"px-6 pb-4",role:"region","aria-labelledby":`faq-question-${E.id}`},a.createElement("p",{className:"text-slate-300 leading-relaxed"},k?k.answer:E.answer))))})),a.createElement("div",{className:"mt-16 text-center bg-slate-800/30 rounded-2xl p-8 border border-slate-700"},a.createElement("h3",{className:"text-2xl font-bold text-white mb-2"},"Still have questions?"),a.createElement("p",{className:"text-slate-300 mb-6"},"Can't find the answer you're looking for? Our team is here to help."),a.createElement("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-4"},a.createElement("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-2 text-primary hover:text-primary-light"},a.createElement(al,{className:"w-4 h-4"}),"[email protected]"),a.createElement("span",{className:"text-slate-600"},"â¢"),a.createElement("a",{href:"https://discord.gg/zenith",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary hover:text-primary-light"},a.createElement(wI,{className:"w-4 h-4"}),"Join our Discord"))))))}function NR({className:t}){const{trackEvent:e,trackCTAClick:r}=Fp(),[n,s]=x.useState(!1),[o,c]=x.useState("7d 0h"),[d]=x.useState(75),[m,h]=x.useState(pn()),[p]=x.useState(()=>{const _=new Date;return _.setDate(_.getDate()+7),new ck(_,{region:m.code,language:m.language,onTick:T=>c(T)})}),[g]=x.useState(()=>new uk(25,100,{language:m.language})),[v]=x.useState(()=>new dk(25,100,{showCount:!0,animated:!0}));x.useEffect(()=>(p.start(),e("final_cta_section_view",{location:"early_adopter_program",urgency_level:g.isHighUrgency?"high":"normal",spots_remaining:d,region:m.code,is_mena:m.isMENA}),()=>{p.destroy()}),[]);const E=()=>{r("Apply Now - Free to Join","early_adopter_final_cta",void 0,{cta_type:"primary",conversion_intent:"high",urgency_level:g.isHighUrgency?"high":"normal",spots_remaining:d}),s(!0)},N=()=>{r("Learn More About Benefits","early_adopter_final_cta",void 0,{cta_type:"secondary",conversion_intent:"medium"})},k=(_,T)=>{r(_,"early_adopter_final_cta",void 0,{cta_type:"alternative",conversion_intent:T,cta_action:_.toLowerCase().replace(/\s+/g,"_")})},w=m.isMENA,C=w?"AED":"USD";return a.createElement(a.Fragment,null,a.createElement("section",{className:Oe("relative py-24 bg-gradient-to-br from-slate-900 via-primary/5 to-slate-900",t),"aria-labelledby":"final-cta-heading"},a.createElement("div",{className:"absolute inset-0 opacity-20"},a.createElement("div",{className:"absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0zNiAxOGMzLjMxIDAgNiAyLjY5IDYgNnMtMi42OSA2LTYgNi02LTIuNjktNi02IDIuNjktNiA2LTZ6IiBzdHJva2U9IiM2MzY2RjExQSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2Utb3BhY2l0eT0iMC4zIi8+PHBhdGggZD0iTTI0IDM2YzMuMzEgMCA2IDIuNjkgNiA2cy0yLjY5IDYtNiA2LTYtMi42OS02LTYgMi42OS02IDYtNnoiIHN0cm9rZT0iIzg2MzlEMiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2Utb3BhY2l0eT0iMC4yIi8+PC9nPjwvc3ZnPg==')]"})),a.createElement("div",{className:"container relative mx-auto px-4"},a.createElement("div",{"data-testid":"final-cta-container",className:"flex flex-col lg:flex-row items-center gap-8 lg:gap-12 max-w-6xl mx-auto"},a.createElement("div",{className:"flex-1 text-center lg:text-left"},a.createElement("h2",{id:"final-cta-heading",className:"text-3xl md:text-4xl lg:text-5xl font-bold mb-6"},a.createElement("span",{className:"block mb-2"},"Ready to Shape the"),a.createElement("span",{className:"bg-gradient-to-r from-primary via-primary-light to-secondary bg-clip-text text-transparent"},"Future of AI Workspaces?")),a.createElement("p",{className:"text-xl text-slate-300 mb-8 leading-relaxed"},"Join our exclusive Early Adopter Program and co-create the future of intelligent workspace automation"),a.createElement("div",{className:"mb-8 space-y-4"},a.createElement("div",{"data-testid":"urgency-timer",className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-amber-500/10 border border-amber-500/30"},a.createElement(Dr,{className:"w-4 h-4 text-amber-400"}),a.createElement("span",{className:"text-sm font-medium text-amber-300"},"Application window closes in: ",o)),a.createElement("div",{className:"flex items-center gap-4 text-slate-400"},a.createElement(or,{className:"w-5 h-5 text-primary"}),a.createElement("span",null,"Join 25+ professionals already in the program"),a.createElement("span",{className:"px-3 py-1 rounded-full bg-primary/10 text-primary text-sm font-medium"},d," spots left"))),a.createElement("div",{className:"flex flex-col sm:flex-row items-center gap-4 mb-8"},a.createElement(ce,{size:"lg",onClick:E,className:"w-full sm:w-auto px-8 py-4 text-lg font-semibold bg-gradient-to-r from-primary to-primary-light hover:from-primary-light hover:to-primary shadow-xl hover:shadow-2xl transform hover:scale-105 transition-all duration-300"},"Apply Now - Free to Join",a.createElement(Rr,{className:"ml-2 w-5 h-5"})),a.createElement(ce,{variant:"outline",size:"lg",onClick:()=>{N(),document.getElementById("benefits-heading")?.scrollIntoView({behavior:"smooth"})},className:"w-full sm:w-auto px-8 py-4 text-lg font-semibold border-2 border-primary/30 hover:border-primary hover:bg-primary/10 text-primary hover:text-primary"},"Learn More About Benefits")),a.createElement("div",{className:"flex flex-wrap items-center gap-6 text-sm text-slate-400 mb-8"},a.createElement("div",{className:"flex items-center gap-2"},a.createElement(Mr,{className:"w-4 h-4 text-green-400"}),a.createElement("span",null,"No credit card required")),a.createElement("div",{className:"flex items-center gap-2"},a.createElement(qr,{className:"w-4 h-4 text-green-400"}),a.createElement("span",null,"Cancel anytime")),a.createElement("div",{className:"flex items-center gap-2"},a.createElement(Xa,{className:"w-4 h-4 text-yellow-400"}),a.createElement("span",null,"Free during early access"))),w&&a.createElement("div",{className:"p-4 rounded-lg bg-primary/5 border border-primary/20 mb-8"},a.createElement("p",{className:"text-primary font-medium mb-1"},"Special founding member pricing for GCC region"),a.createElement("p",{className:"text-2xl font-bold text-white"}
910,"Starting from ",C," 0/month during early access"))),a.createElement("div",{className:"flex-1 max-w-md mx-auto lg:max-w-none"},a.createElement(Ce,{"data-testid":"social-proof-counter",className:"mb-6 bg-gradient-to-br from-primary/10 to-primary/5 border-primary/20"},a.createElement(Ve,{className:"p-6"},a.createElement("div",{className:"text-center"},a.createElement("div",{className:"text-4xl font-bold text-white mb-2"},"25+"),a.createElement("p",{className:"text-slate-300"},"Early Adopters Joined"),a.createElement("div",{className:"flex items-center justify-center gap-1 mt-2"},[1,2,3,4,5].map(_=>a.createElement(Xa,{key:_,className:Oe("w-4 h-4",_<=4?"text-yellow-400 fill-current":"text-slate-600")})),a.createElement("span",{className:"text-slate-300 ml-2"},"4/5 stars")),a.createElement("p",{className:"text-sm text-slate-400 mt-2"},"Limited to 100 founding members")))),a.createElement(Ce,{"data-testid":"testimonial-preview",className:"bg-slate-800/50 border-slate-700"},a.createElement(Ve,{className:"p-6"},a.createElement("h3",{className:"text-lg font-semibold text-white mb-4"},"What Early Adopters Are Saying"),a.createElement("blockquote",{className:"text-slate-300 italic mb-4"},'"This has transformed how our team collaborates. The AI insights are incredibly valuable."'),a.createElement("div",null,a.createElement("p",{className:"font-medium text-white"},"Sarah Ahmed"),a.createElement("p",{className:"text-sm text-slate-400"},"CTO, TechStart UAE")))),a.createElement("div",{className:"mt-6 grid grid-cols-1 sm:grid-cols-3 gap-3"},a.createElement(ce,{variant:"ghost",size:"sm",onClick:()=>k("Schedule a 15-min consultation","medium"),className:"text-slate-300 hover:text-white hover:bg-slate-800"},a.createElement(uI,{className:"w-4 h-4 mr-2"}),"Consultation"),a.createElement(ce,{variant:"ghost",size:"sm",onClick:()=>k("Download our program guide","low"),className:"text-slate-300 hover:text-white hover:bg-slate-800"},a.createElement(pI,{className:"w-4 h-4 mr-2"}),"Guide"),a.createElement(ce,{variant:"ghost",size:"sm",onClick:()=>k("Join Discord community","low"),className:"text-slate-300 hover:text-white hover:bg-slate-800"},a.createElement(mw,{className:"w-4 h-4 mr-2"}),"Discord")))))),a.createElement(Ju,{isOpen:n,onClose:()=>s(!1)}))}function SR(){x.useEffect(()=>{document.title="Early Adopter Program - Zenith AI Assistant"},[]);const t=e=>{console.log("Selected tier:",e)};return a.createElement("div",{className:"min-h-screen bg-slate-900"},a.createElement(vR,null),a.createElement(bR,{onTierSelect:t,className:"mt-0"}),a.createElement(xR,null),a.createElement(kR,null),a.createElement(NR,null))}function ou(t,e){if(!!!t)throw new Error(e)}function _R(t){return typeof t=="object"&&t!==null}function CR(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const TR=/\r\n|[\n\r]/g;function Hh(t,e){let r=0,n=1;for(const s of t.body.matchAll(TR)){if(typeof s.index=="number"||CR(!1),s.index>=e)break;r=s.index+s[0].length,n+=1}return{line:n,column:e+1-r}}function AR(t){return vk(t.source,Hh(t.source,t.start))}function vk(t,e){const r=t.locationOffset.column-1,n="".padStart(r)+t.body,s=e.line-1,o=t.locationOffset.line-1,c=e.line+o,d=e.line===1?r:0,m=e.column+d,h=`${t.name}:${c}:${m} 911`,p=n.split(/\r\n|[\n\r]/g),g=p[s];if(g.length>120){const v=Math.floor(m/80),E=m%80,N=[];for(let k=0;k<g.length;k+=80)N.push(g.slice(k,k+80));return h+jb([[`${c} |`,N[0]],...N.slice(1,v+1).map(k=>["|",k]),["|","^".padStart(E)],["|",N[v+1]]])}return h+jb([[`${c-1} |`,p[s-1]],[`${c} |`,g],["|","^".padStart(m)],[`${c+1} |`,p[s+1]]])}function jb(t){const e=t.filter(([n,s])=>s!==void 0),r=Math.max(...e.map(([n])=>n.length));return e.map(([n,s])=>n.padStart(r)+(s?" "+s:"")).join(` 912`)}function IR(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}class Bp extends Error{constructor(e,...r){var n,s,o;const{nodes:c,source:d,positions:m,path:h,originalError:p,extensions:g}=IR(r);super(e),this.name="GraphQLError",this.path=h??void 0,this.originalError=p??void 0,this.nodes=Ub(Array.isArray(c)?c:c?[c]:void 0);const v=Ub((n=this.nodes)===null||n===void 0?void 0:n.map(N=>N.loc).filter(N=>N!=null));this.source=d??(v==null||(s=v[0])===null||s===void 0?void 0:s.source),this.positions=m??v?.map(N=>N.start),this.locations=m&&d?m.map(N=>Hh(d,N)):v?.map(N=>Hh(N.source,N.start));const E=_R(p?.extensions)?p?.extensions:void 0;this.extensions=(o=g??E)!==null&&o!==void 0?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),p!=null&&p.stack?Object.defineProperty(this,"stack",{value:p.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Bp):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+=` 913 914`+AR(r.loc));else if(this.source&&this.locations)for(const r of this.locations)e+=` 915 916`+vk(this.source,r);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function Ub(t){return t===void 0||t.length===0?void 0:t}function bt(t,e,r){return new Bp(`Syntax Error: ${r}`,{source:t,positions:[e]})}class PR{constructor(e,r,n){this.start=e.start,this.end=r.end,this.startToken=e,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class bk{constructor(e,r,n,s,o,c){this.kind=e,this.start=r,this.end=n,this.line=s,this.column=o,this.value=c,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Ek={Name:[],Document:["definitions"],OperationDefinition:["description","name","variableDefinitions","directives","selectionSet"],VariableDefinition:["description","variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["description","name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],Float
vendor: 4,803 bytes, line 916
916Value:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"],TypeCoordinate:["name"],MemberCoordinate:["name","memberName"],ArgumentCoordinate:["name","fieldName","argumentName"],DirectiveCoordinate:["name"],DirectiveArgumentCoordinate:["name","argumentName"]},OR=new Set(Object.keys(Ek));function zb(t){const e=t?.kind;return typeof e=="string"&&OR.has(e)}var Or;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Or||(Or={}));var Gh;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Gh||(Gh={}));var X;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension",t.TYPE_COORDINATE="TypeCoordinate",t.MEMBER_COORDINATE="MemberCoordinate",t.ARGUMENT_COORDINATE="ArgumentCoordinate",t.DIRECTIVE_COORDINATE="DirectiveCoordinate",t.DIRECTIVE_ARGUMENT_COORDINATE="DirectiveArgumentCoordinate"})(X||(X={}));function Yh(t){return t===9||t===32}function ll(t){return t>=48&&t<=57}function xk(t){return t>=97&&t<=122||t>=65&&t<=90}function wk(t){return xk(t)||t===95}function RR(t){return xk(t)||ll(t)||t===95}function DR(t){var e;let r=Number.MAX_SAFE_INTEGER,n=null,s=-1;for(let c=0;c<t.length;++c){var o;const d=t[c],m=MR(d);m!==d.length&&(n=(o=n)!==null&&o!==void 0?o:c,s=c,c!==0&&m<r&&(r=m))}return t.map((c,d)=>d===0?c:c.slice(r)).slice((e=n)!==null&&e!==void 0?e:0,s+1)}function MR(t){let e=0;for(;e<t.length&&Yh(t.charCodeAt(e));)++e;return e}function LR(t,e){const r=t.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),s=n.length===1,o=n.length>1&&n.slice(1).every(E=>
vendor: 23,784 bytes, lines 916-931
916E.length===0||Yh(E.charCodeAt(0))),c=r.endsWith('\\"""'),d=t.endsWith('"')&&!c,m=t.endsWith("\\"),h=d||m,p=!s||t.length>70||h||o||c;let g="";const v=s&&Yh(t.charCodeAt(0));return(p&&!v||o)&&(g+=` 917`),g+=r,(p||h)&&(g+=` 918`),'"""'+g+'"""'}var q;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.DOT=".",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(q||(q={}));class FR{constructor(e){const r=new bk(q.SOF,0,0,0,0);this.source=e,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==q.EOF)do if(e.next)e=e.next;else{const r=UR(this,e.end);e.next=r,r.prev=e,e=r}while(e.kind===q.COMMENT);return e}}function jR(t){return t===q.BANG||t===q.DOLLAR||t===q.AMP||t===q.PAREN_L||t===q.PAREN_R||t===q.DOT||t===q.SPREAD||t===q.COLON||t===q.EQUALS||t===q.AT||t===q.BRACKET_L||t===q.BRACKET_R||t===q.BRACE_L||t===q.PIPE||t===q.BRACE_R}function Ri(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function Ku(t,e){return kk(t.charCodeAt(e))&&Nk(t.charCodeAt(e+1))}function kk(t){return t>=55296&&t<=56319}function Nk(t){return t>=56320&&t<=57343}function ns(t,e){const r=t.source.body.codePointAt(e);if(r===void 0)return q.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function ft(t,e,r,n,s){const o=t.line,c=1+r-t.lineStart;return new bk(e,r,n,o,c,s)}function UR(t,e){const r=t.source.body,n=r.length;let s=e;for(;s<n;){const o=r.charCodeAt(s);switch(o){case 65279:case 9:case 32:case 44:++s;continue;case 10:++s,++t.line,t.lineStart=s;continue;case 13:r.charCodeAt(s+1)===10?s+=2:++s,++t.line,t.lineStart=s;continue;case 35:return zR(t,s);case 33:return ft(t,q.BANG,s,s+1);case 36:return ft(t,q.DOLLAR,s,s+1);case 38:return ft(t,q.AMP,s,s+1);case 40:return ft(t,q.PAREN_L,s,s+1);case 41:return ft(t,q.PAREN_R,s,s+1);case 46:if(r.charCodeAt(s+1)===46&&r.charCodeAt(s+2)===46)return ft(t,q.SPREAD,s,s+3);break;case 58:return ft(t,q.COLON,s,s+1);case 61:return ft(t,q.EQUALS,s,s+1);case 64:return ft(t,q.AT,s,s+1);case 91:return ft(t,q.BRACKET_L,s,s+1);case 93:return ft(t,q.BRACKET_R,s,s+1);case 123:return ft(t,q.BRACE_L,s,s+1);case 124:return ft(t,q.PIPE,s,s+1);case 125:return ft(t,q.BRACE_R,s,s+1);case 34:return r.charCodeAt(s+1)===34&&r.charCodeAt(s+2)===34?HR(t,s):BR(t,s)}if(ll(o)||o===45)return $R(t,s,o);if(wk(o))return GR(t,s);throw bt(t.source,s,o===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:Ri(o)||Ku(r,s)?`Unexpected character: ${ns(t,s)}.`:`Invalid character: ${ns(t,s)}.`)}return ft(t,q.EOF,n,n)}function zR(t,e){const r=t.source.body,n=r.length;let s=e+1;for(;s<n;){const o=r.charCodeAt(s);if(o===10||o===13)break;if(Ri(o))++s;else if(Ku(r,s))s+=2;else break}return ft(t,q.COMMENT,e,s,r.slice(e+1,s))}function $R(t,e,r){const n=t.source.body;let s=e,o=r,c=!1;if(o===45&&(o=n.charCodeAt(++s)),o===48){if(o=n.charCodeAt(++s),ll(o))throw bt(t.source,s,`Invalid number, unexpected digit after 0: ${ns(t,s)}.`)}else s=$f(t,s,o),o=n.charCodeAt(s);if(o===46&&(c=!0,o=n.charCodeAt(++s),s=$f(t,s,o),o=n.charCodeAt(s)),(o===69||o===101)&&(c=!0,o=n.charCodeAt(++s),(o===43||o===45)&&(o=n.charCodeAt(++s)),s=$f(t,s,o),o=n.charCodeAt(s)),o===46||wk(o))throw bt(t.source,s,`Invalid number, expected digit but got: ${ns(t,s)}.`);return ft(t,c?q.FLOAT:q.INT,e,s,n.slice(e,s))}function $f(t,e,r){if(!ll(r))throw bt(t.source,e,`Invalid number, expected digit but got: ${ns(t,e)}.`);const n=t.source.body;let s=e+1;for(;ll(n.charCodeAt(s));)++s;return s}function BR(t,e){const r=t.source.body,n=r.length;let s=e+1,o=s,c="";for(;s<n;){const d=r.charCodeAt(s);if(d===34)return c+=r.slice(o,s),ft(t,q.STRING,e,s+1,c);if(d===92){c+=r.slice(o,s);const m=r.charCodeAt(s+1)===117?r.charCodeAt(s+2)===123?WR(t,s):VR(t,s):qR(t,s);c+=m.value,s+=m.size,o=s;continue}if(d===10||d===13)break;if(Ri(d))++s;else if(Ku(r,s))s+=2;else throw bt(t.source,s,`Invalid character within String: ${ns(t,s)}.`)}throw bt(t.source,s,"Unterminated string.")}function WR(t,e){const r=t.source.body;let n=0,s=3;for(;s<12;){const o=r.charCodeAt(e+s++);if(o===125){if(s<5||!Ri(n))break;return{value:String.fromCodePoint(n),size:s}}if(n=n<<4|Bo(o),n<0)break}throw bt(t.source,e,`Invalid Unicode escape sequence: "${r.slice(e,e+s)}".`)}function VR(t,e){const r=t.source.body,n=$b(r,e+2);if(Ri(n))return{value:String.fromCodePoint(n),size:6};if(kk(n)&&r.charCodeAt(e+6)===92&&r.charCodeAt(e+7)===117){const s=$b(r,e+8);if(Nk(s))return{value:String.fromCodePoint(n,s),size:12}}throw bt(t.source,e,`Invalid Unicode escape sequence: "${r.slice(e,e+6)}".`)}function $b(t,e){return Bo(t.charCodeAt(e))<<12|Bo(t.charCodeAt(e+1))<<8|Bo(t.charCodeAt(e+2))<<4|Bo(t.charCodeAt(e+3))}function Bo(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function qR(t,e){const r=t.source.body;switch(r.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` 919`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw bt(t.source,e,`Invalid character escape sequence: "${r.slice(e,e+2)}".`)}function HR(t,e){const r=t.source.body,n=r.length;let s=t.lineStart,o=e+3,c=o,d="";const m=[];for(;o<n;){const h=r.charCodeAt(o);if(h===34&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34){d+=r.slice(c,o),m.push(d);const p=ft(t,q.BLOCK_STRING,e,o+3,DR(m).join(` 920`));return t.line+=m.length-1,t.lineStart=s,p}if(h===92&&r.charCodeAt(o+1)===34&&r.charCodeAt(o+2)===34&&r.charCodeAt(o+3)===34){d+=r.slice(c,o),c=o+1,o+=4;continue}if(h===10||h===13){d+=r.slice(c,o),m.push(d),h===13&&r.charCodeAt(o+1)===10?o+=2:++o,d="",c=o,s=o;continue}if(Ri(h))++o;else if(Ku(r,o))o+=2;else throw bt(t.source,o,`Invalid character within String: ${ns(t,o)}.`)}throw bt(t.source,o,"Unterminated string.")}function GR(t,e){const r=t.source.body,n=r.length;let s=e+1;for(;s<n;){const o=r.charCodeAt(s);if(RR(o))++s;else break}return ft(t,q.NAME,e,s,r.slice(e,s))}const YR=10,Sk=2;function Wp(t){return Qu(t,[])}function Qu(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return JR(t,e);default:return String(t)}}function JR(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const r=[...e,t];if(KR(t)){const n=t.toJSON();if(n!==t)return typeof n=="string"?n:Qu(n,r)}else if(Array.isArray(t))return ZR(t,r);return QR(t,r)}function KR(t){return typeof t.toJSON=="function"}function QR(t,e){const r=Object.entries(t);return r.length===0?"{}":e.length>Sk?"["+XR(t)+"]":"{ "+r.map(([s,o])=>s+": "+Qu(o,e)).join(", ")+" }"}function ZR(t,e){if(t.length===0)return"[]";if(e.length>Sk)return"[Array]";const r=Math.min(YR,t.length),n=t.length-r,s=[];for(let o=0;o<r;++o)s.push(Qu(t[o],e));return n===1?s.push("... 1 more item"):n>1&&s.push(`... ${n} more items`),"["+s.join(", ")+"]"}function XR(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){const r=t.constructor.name;if(typeof r=="string"&&r!=="")return r}return e}const e5=globalThis.process&&!0,t5=e5?function(e,r){return e instanceof r}:function(e,r){if(e instanceof r)return!0;if(typeof e=="object"&&e!==null){var n;const s=r.prototype[Symbol.toStringTag],o=Symbol.toStringTag in e?e[Symbol.toStringTag]:(n=e.constructor)===null||n===void 0?void 0:n.name;if(s===o){const c=Wp(e);throw new Error(`Cannot use ${s} "${c}" from another module or realm. 921 922Ensure that there is only one instance of "graphql" in the node_modules 923directory. If different versions of "graphql" are the dependencies of other 924relied on modules, use "resolutions" to ensure only one version is installed. 925 926https://yarnpkg.com/en/docs/selective-version-resolutions 927 928Duplicate "graphql" modules cannot be used at the same time since different 929versions may have different capabilities and behavior. The data from one 930version used in the function from another could produce confusing and 931spurious results.`)}}return!1};class _k{constructor(e,r="GraphQL request",n={line:1,column:1}){typeof e=="string"||ou(!1,`Body must be a string. Received: ${Wp(e)}.`),this.body=e,this.name=r,this.locationOffset=n,this.locationOffset.line>0||ou(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ou(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function r5(t){return t5(t,_k)}function n5(t,e){const r=new a5(t,e),n=r.parseDocument();return Object.defineProperty(n,"tokenCount",{enumerable:!1,value:r.tokenCount}),n}class a5{constructor(e,r={}){const{lexer:n,...s}=r;if(n)this._lexer=n;else{const o=r5(e)?e:new _k(e);this._lexer=new FR(o)}this._options=s,this._tokenCounter=0}get tokenCount(){return this._tokenCounter}parseName(){const e=this.expectToken(q.NAME);return this.node(e,{kind:X.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:X.DOCUMENT,definitions:this.many(q.SOF,this.parseDefinition,q.EOF)})}parseDefinition(){if(this.peek(q.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),r=e?this._lexer.lookahead():this._lexer.token;if(e&&r.kind===q.BRACE_L)throw bt(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are not supported on shorthand queries.");if(r.kind===q.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition()}if(e)throw bt(this._lexer.source,this._lexer.token.start,"Unexpected description, only GraphQL definitions support descriptions.");switch(r.value){case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(q.BRACE_L))return this.node(e,{kind:X.OPERATION_DEFINITION,operation:Or.QUERY,description:void 0,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseDescription(),n=this.parseOperationType();let s;return this.peek(q.NAME)&&(s=this.parseName()),this.node(e,{kind:X.OPERATION_DEFINITION,operation:n,description:r,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(q.NAME);switch(e.value){case"query":return Or.QUERY;case"mutation":return Or.MUTATION;case"subscription":return Or.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(q.PAREN_L,this.parseVariableDefinition,q.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:X.VARIABLE_DEFINITION,description:this.parseDescription(),variable:this.parseVariable(),type:(this.expectToken(q.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(q.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(q.DOLLAR),this.node(e,{kind:X.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:X.SELECTION_SET,selections:this.many(q.BRACE_L,this.parseSelection,q.BRACE_R)})}parseSelection(){return this.peek(q.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,r=this.parseName();let n,s;return this.expectOptionalToken(q.COLON)?(n=r,s=this.parseName()):s=r,this.node(e,{kind:X.FIELD,alias:n,name:s,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(q.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const r=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(q.PAREN_L,r,q.PAREN_R)}parseArgument(e=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(q.COLON),this.node(r,{kind:X.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(q.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(q.NAME)?this.node(e,{kind:X.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:X.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token,r=this.parseDescription();return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:X.FRAGMENT_DEFINITION,description:r,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:X.FRAGMENT_DEFINITION,description:r,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const r=this._lexer.token;switch(r.kind){case q.BRACKET_L:return this.parseList(e);case q.BRACE_L:return this.parseObject(e);case q.INT:return this.advanceLexer(),this.node(r,{kind:X.INT,value:r.value});case q.FLOAT:return this.advanceLexer(),this.node(r,{kind:X.FLOAT,value:r.value});case q.STRING:case q.BLOCK_STRING:return this.parseStringLiteral();case q.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:X.BOOLEAN,value:!0});case"false":return this.node(r,{kind:X.BOOLEAN,value:!1});case"null":return this.node(r,{kind:X.NULL});default:return this.node(r,{kind:X.ENUM,value:r.value})}case q.DOLLAR:if(e)if(this.expectToken(q.DOLLAR),this._lexer.token.kind===q.NAME){const n=this._lexer.token.value;throw bt(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:X.STRING,value:e.value,block:e.kind===q.BLOCK_STRING})}parseList(e){const r=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:X.LIST,values:this.any(q.BRACKET_L,r,q.BRACKET_R)})}parseObject(e){const r=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:X.OBJECT,fields:this.any(q.BRACE_L,r,q.BRACE_R)})}parseObjectField(e){const r=this._lexer.token,n=this.parseName();return this.expectToken(q.COLON),this.node(r,{kind:X.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}parseDirectives(e){const r=[];for(;this.peek(q.AT);)r.push(this.parseDirective(e));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const r=this._lexer.token;return this.expectToken(q.AT),this.node(r,{kind:X.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let r;if(this.expectOptionalToken(q.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(q.BRACKET_R),r=this.node(e,{kind:X.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(q.BANG)?this.node(e,{kind:X.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:X.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(q.STRING)||this.peek(q.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),s=this.many(q.BRACE_L,this.parseOperationTypeDefinition,q.BRACE_R);return this.node(e,{kind:X.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:s})}parseOperationTypeDefinition(){const e=this._lexer.token,r=this.parseOperationType();this.expectToken(q.COLON);const n=this.parseNamedType();return this.node(e,{kind:X.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),s=this.parseConstDirectives();return this.node(e,{kind:X.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:s})}parseObjectTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(e,{kind:X.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:s,directives:o,fields:c})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(q.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(q.BRACE_L,this.parseFieldDefinition,q.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,r=this.parseDescription(),n=this.parseName(),s=this.parseArgumentDefs();this.expectToken(q.COLON);const o=this.parseTypeReference(),c=this.parseConstDirectives();return this.node(e,{kind:X.FIELD_DEFINITION,description:r,name:n,arguments:s,type:o,directives:c})}parseArgumentDefs(){return this.optionalMany(q.PAREN_L,this.parseInputValueDef,q.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(q.COLON);const s=this.parseTypeReference();let o;this.expectOptionalToken(q.EQUALS)&&(o=this.parseConstValueLiteral());const c=this.parseConstDirectives();return this.node(e,{kind:X.INPUT_VALUE_DEFINITION,description:r,name:n,type:s,defaultValue:o,directives:c})}parseInterfaceTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),c=this.parseFieldsDefinition();return this.node(e,{kind:X.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:s,directives:o,fields:c})}parseUnionTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),s=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:X.UNION_TYPE_DEFINITION,description:r,name:n,directives:s,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(q.EQUALS)?this.delimitedMany(q.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),s=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:X.ENUM_TYPE_DEFINITION,description:r,name:n,directives:s,values:o})}parseEnumValuesDefinition(){return this.optionalMany(q.BRACE_L,this.parseEnumValueDefinition,q.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),s=this.parseConstDirectives();return this.node(e,{kind:X.ENUM_VALUE_DEFINITION,description:r,name:n,directives:s})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw bt(this._lexer.source,this._lexer.token.start,`${Kc(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),s=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:X.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:s,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(q.BRACE_L,this.parseInputValueDef,q.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===q.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(q.BRACE_L,this.parseOperationTypeDefinition,q.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(e,{kind:X.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(e,{kind:X.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&s.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:X.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:s,fields:o})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(n.length===0&&s.length===0&&o.length===0)throw this.unexpected();return this.node(e,{kind:X.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:s,fields:o})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),s=this.parseUnionMemberTypes();if(n.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:X.UNION_TYPE_EXTENSION,name:r,directives:n,types:s})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();if(n.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:X.ENUM_TYPE_EXTENSION,name:r,directives:n,values:s})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();if(n.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:X.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:s})}parseDirectiveDefinition(){const e=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(q.AT);const n=this.parseName(),s=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const c=this.parseDirectiveLocations(
vendor: 4,796 bytes, line 931
931);return this.node(e,{kind:X.DIRECTIVE_DEFINITION,description:r,name:n,arguments:s,repeatable:o,locations:c})}parseDirectiveLocations(){return this.delimitedMany(q.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(Gh,r.value))return r;throw this.unexpected(e)}parseSchemaCoordinate(){const e=this._lexer.token,r=this.expectOptionalToken(q.AT),n=this.parseName();let s;!r&&this.expectOptionalToken(q.DOT)&&(s=this.parseName());let o;return(r||s)&&this.expectOptionalToken(q.PAREN_L)&&(o=this.parseName(),this.expectToken(q.COLON),this.expectToken(q.PAREN_R)),r?o?this.node(e,{kind:X.DIRECTIVE_ARGUMENT_COORDINATE,name:n,argumentName:o}):this.node(e,{kind:X.DIRECTIVE_COORDINATE,name:n}):s?o?this.node(e,{kind:X.ARGUMENT_COORDINATE,name:n,fieldName:s,argumentName:o}):this.node(e,{kind:X.MEMBER_COORDINATE,name:n,memberName:s}):this.node(e,{kind:X.TYPE_COORDINATE,name:n})}node(e,r){return this._options.noLocation!==!0&&(r.loc=new PR(e,this._lexer.lastToken,this._lexer.source)),r}peek(e){return this._lexer.token.kind===e}expectToken(e){const r=this._lexer.token;if(r.kind===e)return this.advanceLexer(),r;throw bt(this._lexer.source,r.start,`Expected ${Ck(e)}, found ${Kc(r)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const r=this._lexer.token;if(r.kind===q.NAME&&r.value===e)this.advanceLexer();else throw bt(this._lexer.source,r.start,`Expected "${e}", found ${Kc(r)}.`)}expectOptionalKeyword(e){const r=this._lexer.token;return r.kind===q.NAME&&r.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const r=e??this._lexer.token;return bt(this._lexer.source,r.start,`Unexpected ${Kc(r)}.`)}any(e,r,n){this.expectToken(e);const s=[];for(;!this.expectOptionalToken(n);)s.push(r.call(this));return s}optionalMany(e,r,n){if(this.expectOptionalToken(e)){const s=[];do s.push(r.call(this));while(!this.expectOptionalToken(n));return s}return[]}many(e,r,n){this.expectToken(e);const s=[];do s.push(r.call(this));while(!this.expectOptionalToken(n));return s}delimitedMany(e,r){this.expectOptionalToken(e);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(e));return n}advanceLexer(){const{maxTokens:e}=this._options,r=this._lexer.advance();if(r.kind!==q.EOF&&(++this._tokenCounter,e!==void 0&&this._tokenCounter>e))throw bt(this._lexer.source,r.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function Kc(t){const e=t.value;return Ck(t.kind)+(e!=null?` "${e}"`:"")}function Ck(t){return jR(t)?`"${t}"`:t}function s5(t){return`"${t.replace(i5,o5)}"`}const i5=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function o5(t){return l5[t.charCodeAt(0)]}const l5=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],Vp=Object.freeze({});function Jr(t,e,r=Ek){const n=new Map;for(const C of Object.values(X))n.set(C,c5(e,C));let s,o=Array.isArray(t),c=[t],d=-1,m=[],h=t,p,g;const v=[],E=[];do{d++;const C=d===c.length,_=C&&m.length!==0;if(C){if(p=E.length===0?void 0:v[v.length-1],h=g,g=E.pop(),_)if(o){h=h.slice();let A=0;for(const[I,M]of m){const D=I-A;M===null?(h.splice(D,1),A++):h[D]=M}}else{h={...h};for(const[A,I]of m)h[A]=I}d=s.index,c=s.keys,m=s.edits,o=s.inArray,s=s.prev}else if(g){if(p=o?d:c[d],h=g[p],h==null)continue;v.push(p)}let T;if(!Array.isArray(h)){var N,k;zb(h)||ou(!1,`Invalid AST Node: ${Wp(h)}.`);const A=C?(N=n.get(h.kind))===null||N===void 0?void 0:N.leave:(k=n.get(h.kind))===null||k===void 0?void 0:k.enter;if(T=A?.call(e,h,p,g,v,E),T===Vp)break;if(T===!1){if(!C){v.pop();continue}}else if(T!==void 0&&(m.push([p,T]),!C))if(zb(T))h=T;else{v.pop();continue}}if(T===void 0&&_&&m.push([p,h]),C)v.pop();else{var w;s={inArray:o,index:d,keys:c,edits:m,prev:s},o=Array.isArray(h),c=o?h:(w=r[h.kind])!==null&&w!==void 0?w:[],d=-1,m=[],g&&E.push(g),g=h}}while(s!==void 0);return m.length!==0?m[m.length-1][1]:t}function c5(t,e){const r=t[e];
931return typeof r=="object"?r:typeof r=="function"?{enter:r,leave:void 0}:{enter:t.enter,leave:t.leave}}function u5(t){return Jr(t,m5)}const d5=80,m5={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>oe(t.definitions,` 932 933`)},OperationDefinition:{leave(t){const e=Bf(t.variableDefinitions)?Te(`( 934`,oe(t.variableDefinitions,` 935`),` 936)`):Te("(",oe(t.variableDefinitions,", "),")"),r=Te("",t.description,` 937`)+oe([t.operation,oe([t.name,e]),oe(t.directives," ")]," ");return(r==="query"?"":r+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:r,directives:n,description:s})=>Te("",s,` 938`)+t+": "+e+Te(" = ",r)+Te(" ",oe(n," "))},SelectionSet:{leave:({selections:t})=>Cr(t)},Field:{leave({alias:t,name:e,arguments:r,directives:n,selectionSet:s}){const o=Te("",t,": ")+e;let c=o+Te("(",oe(r,", "),")");return c.length>d5&&(c=o+Te(`( 939`,lu(oe(r,` 940`)),` 941)`)),oe([c,oe(n," "),s]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+Te(" ",oe(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:r})=>oe(["...",Te("on ",t),oe(e," "),r]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:r,directives:n,selectionSet:s,description:o})=>Te("",o,` 942`)+`fragment ${t}${Te("(",oe(r,", "),")")} on ${e} ${Te("",oe(n," ")," ")}`+s},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?LR(t):s5(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+oe(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+oe(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+Te("(",oe(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:r})=>Te("",t,` 943`)+oe(["schema",oe(e," "),Cr(r)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:r})=>Te("",t,` 944`)+oe(["scalar",e,oe(r," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:r,directives:n,fields:s})=>Te("",t,` 945`)+oe(["type",e,Te("implements ",oe(r," & ")),oe(n," "),Cr(s)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:r,type:n,directives:s})=>Te("",t,` 946`)+e+(Bf(r)?Te(`( 947`,lu(oe(r,` 948`)),` 949)`):Te("(",oe(r,", "),")"))+": "+n+Te(" ",oe(s," "))},InputValueDefinition:{leave:({description:t,name:e,type:r,defaultValue:n,directives:s})=>Te("",t,` 950`)+oe([e+": "+r,Te("= ",n),oe(s," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:r,directives:n,fields:s})=>Te("",t,` 951`)+oe(["interface",e,Te("implements ",oe(r," & ")),oe(n," "),Cr(s)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:r,types:n})=>Te("",t,` 952`)+oe(["union",e,oe(r," "),Te("= ",oe(n," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:r,values:n})=>Te("",t,` 953`)+oe(["enum",e,oe(r," "),Cr(n)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:r})=>Te("",t,` 954`)+oe([e,oe(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:r,fields:n})=>Te("",t,` 955`)+oe(["input",e,oe(r," "),Cr(n)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:r,repeatable:n,locations:s})=>Te("",t,` 956`)+"directive @"+e+(Bf(r)?Te(`( 957`,lu(oe(r,` 958`)),` 959)`):Te("(",oe(r,", "),")"))+(n?" repeatable":"")+" on "+oe(s," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>oe(["extend schema",oe(t," "),Cr(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>oe(["extend scalar",t,oe(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:r,fields:n})=>oe(["extend type",t,Te("implements ",oe(e," & ")),oe(r," "),Cr(n)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:r,fields:n})=>oe(["extend interface",t,Te("implements ",oe(e," & ")),oe(r," "),Cr(n)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:r})=>oe(["extend union",t,oe(e," "),Te("= ",oe(r," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:r})=>oe(["extend enum",t,oe(e," "),Cr(r)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:r})=>oe(["extend input",t,oe(e," "),Cr(r)]," ")},TypeCoordinate:{leave:({name:t})=>t},MemberCoordinate:{leave:({name:t,memberName:e})=>oe([t,Te(".",e)])},ArgumentCoordinate:{leave:({name:t,fieldName:e,argumentName:r})=>oe([t,Te(".",e),Te("(",r,":)")])},DirectiveCoordinate:{leave:({name:t})=>oe(["@",t])},DirectiveArgumentCoordinate:{leave:({name:t,argumentName:e})=>oe(["@",t,Te("(",e,":)")])}};function oe(t,e=""){var r;return(r=t?.filter(n=>n).join(e))!==null&&r!==void 0?r:""}function Cr(t){return Te(`{ 960`,lu(oe(t,` 961`)),` 962}`)}function Te(t,e,r=""){return e!=null&&e!==""?t+e+r:""}function lu(t){return Te(" ",t.replace(/\n/g,` 963 `))}function Bf(t){var e;return(e=t?.some(r=>r.includes(` 964`)))!==null&&e!==void 0?e:!1}function it(t){return typeof t=="function"}function qp(t){var e=function(n){Error.call(n),n.stack=new Error().stack},r=t(e);return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Wf=qp(function(t){return function(r){t(this),this.message=r?r.length+` errors occurred during unsubscription: 965`+r.map(function(n,s){return s+1+") "+n.toString()}).join(` 966 `):"",this.name="UnsubscriptionError",this.errors=r}});function Jh(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}var Zu=function(){function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){var e,r,n,s,o;if(!this.closed){this.closed=!0;var c=this._parentage;if(c)if(this._parentage=null,Array.isArray(c))try{for(var d=yi(c),m=d.next();!m.done;m=d.next()){var h=m.value;h.remove(this)}}catch(k){e={error:k}}finally{try{m&&!m.done&&(r=d.return)&&r.call(d)}finally{if(e)throw e.error}}else c.remove(this);var p=this.initialTeardown;
vendor: 5,049 bytes, line 966
966if(it(p))try{p()}catch(k){o=k instanceof Wf?k.errors:[k]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var v=yi(g),E=v.next();!E.done;E=v.next()){var N=E.value;try{Bb(N)}catch(k){o=o??[],k instanceof Wf?o=nl(nl([],bu(o)),bu(k.errors)):o.push(k)}}}catch(k){n={error:k}}finally{try{E&&!E.done&&(s=v.return)&&s.call(v)}finally{if(n)throw n.error}}}if(o)throw new Wf(o)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)Bb(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}},t.prototype._hasParent=function(e){var r=this._parentage;return r===e||Array.isArray(r)&&r.includes(e)},t.prototype._addParent=function(e){var r=this._parentage;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e},t.prototype._removeParent=function(e){var r=this._parentage;r===e?this._parentage=null:Array.isArray(r)&&Jh(r,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&Jh(r,e),e instanceof t&&e._removeParent(this)},t.EMPTY=function(){var e=new t;return e.closed=!0,e}(),t}(),Tk=Zu.EMPTY;function Ak(t){return t instanceof Zu||t&&"closed"in t&&it(t.remove)&&it(t.add)&&it(t.unsubscribe)}function Bb(t){it(t)?t():t.unsubscribe()}var f5={Promise:void 0},h5={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,nl([t,e],bu(r)))},clearTimeout:function(t){return clearTimeout(t)},delegate:void 0};function Ik(t){h5.setTimeout(function(){throw t})}function Wb(){}function cu(t){t()}var Hp=function(t){ss(e,t);function e(r){var n=t.call(this)||this;return n.isStopped=!1,r?(n.destination=r,Ak(r)&&r.add(n)):n.destination=y5,n}return e.create=function(r,n,s){return new cl(r,n,s)},e.prototype.next=function(r){this.isStopped||this._next(r)},e.prototype.error=function(r){this.isStopped||(this.isStopped=!0,this._error(r))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(r){this.destination.next(r)},e.prototype._error=function(r){try{this.destination.error(r)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Zu),p5=function(){function t(e){this.partialObserver=e}return t.prototype.next=function(e){var r=this.partialObserver;if(r.next)try{r.next(e)}catch(n){Qc(n)}},t.prototype.error=function(e){var r=this.partialObserver;if(r.error)try{r.error(e)}catch(n){Qc(n)}else Qc(e)},t.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(r){Qc(r)}},t}(),cl=function(t){ss(e,t);function e(r,n,s){var o=t.call(this)||this,c;return it(r)||!r?c={next:r??void 0,error:n??void 0,complete:s??void 0}:c=r,o.destination=new p5(c),o}return e}(Hp);function Qc(t){Ik(t)}function g5(t){throw t}var y5={closed:!0,next:Wb,error:g5,complete:Wb},Gp=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function Yp(t){return t}function v5(t){return t.length===0?Yp:t.length===1?t[0]:function(r){return t.reduce(function(n,s){return s(n)},r)}}var xt=function(){function t(e){e&&(this._subscribe=e)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(e,r,n){var s=this,o=E5(e)?e:new cl(e,r,n);return cu(function(){var c=s,d=c.operator,m=c.source;o.add(d?d.call(o,m):m?s._subscribe(o):s._trySubscribe(o))}),o},t.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(r){e.error(r)}},t.prototype.forEach=function(e,r){var n=this;return r=Vb(r),new r(function(s,o){var c=new cl({next:function(d){try{e(d)}catch(m){o(m),c.unsubscribe()}},error:o,complete:s});n.subscribe(c)})},t.prototype._subscribe=function(e){var r;return(r=this.source)===null||r===void 0?void 0:r.subscribe(e)},t.prototype[Gp]=function(){return this},t.prototype.pipe=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return v5(e)(this)},t.prototype.toPromise=function(e){var r=this;return e=Vb(e),new e(function(n,s){var o;r.subscribe(function(c){return o=c},function(c){return s(c)},function(){return n(o)})})},t.create=function(e){return new t(e)},t}();function Vb(t){var e;return(e=t??f5.Promise)!==null&&e!==void 0?e:Promise}function b5(t){return t&&it(t.next)&&it(t.error)&&it(t.complete)}function E5(t){return t&&t instanceof Hp||b5(t)&&Ak(t)}function x5(t){return it(t?.lift)}function Kr(t){return function(e){if(x5(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function ha(t,e,r,n,s){return new w5(t,e,r,n,s)}var w5=function(t){ss(e,t);function e(r,n,s,o,c,d){var m=t.call(this,r)||this;return m.onFinalize=c,m.shouldUnsubscribe=d,m._next=n?function(h){try{n(h)}catch(p){r.error(p)}}:t.prototype._next,m._error=o?function(h){try{o(h)}catch(p){r.error(p)}finally{this.unsubscribe()}}
vendor: 5,227 bytes, line 966
966:t.prototype._error,m._complete=s?function(){try{s()}catch(h){r.error(h)}finally{this.unsubscribe()}}:t.prototype._complete,m}return e.prototype.unsubscribe=function(){var r;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&((r=this.onFinalize)===null||r===void 0||r.call(this))}},e}(Hp),k5=qp(function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),Di=function(t){ss(e,t);function e(){var r=t.call(this)||this;return r.closed=!1,r.currentObservers=null,r.observers=[],r.isStopped=!1,r.hasError=!1,r.thrownError=null,r}return e.prototype.lift=function(r){var n=new qb(this,this);return n.operator=r,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new k5},e.prototype.next=function(r){var n=this;cu(function(){var s,o;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var c=yi(n.currentObservers),d=c.next();!d.done;d=c.next()){var m=d.value;m.next(r)}}catch(h){s={error:h}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(s)throw s.error}}}})},e.prototype.error=function(r){var n=this;cu(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=r;for(var s=n.observers;s.length;)s.shift().error(r)}})},e.prototype.complete=function(){var r=this;cu(function(){if(r._throwIfClosed(),!r.isStopped){r.isStopped=!0;for(var n=r.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(r){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,r)},e.prototype._subscribe=function(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)},e.prototype._innerSubscribe=function(r){var n=this,s=this,o=s.hasError,c=s.isStopped,d=s.observers;return o||c?Tk:(this.currentObservers=null,d.push(r),new Zu(function(){n.currentObservers=null,Jh(d,r)}))},e.prototype._checkFinalizedStatuses=function(r){var n=this,s=n.hasError,o=n.thrownError,c=n.isStopped;s?r.error(o):c&&r.complete()},e.prototype.asObservable=function(){var r=new xt;return r.source=this,r},e.create=function(r,n){return new qb(r,n)},e}(xt),qb=function(t){ss(e,t);function e(r,n){var s=t.call(this)||this;return s.destination=r,s.source=n,s}return e.prototype.next=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.next)===null||s===void 0||s.call(n,r)},e.prototype.error=function(r){var n,s;(s=(n=this.destination)===null||n===void 0?void 0:n.error)===null||s===void 0||s.call(n,r)},e.prototype.complete=function(){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.complete)===null||n===void 0||n.call(r)},e.prototype._subscribe=function(r){var n,s;return(s=(n=this.source)===null||n===void 0?void 0:n.subscribe(r))!==null&&s!==void 0?s:Tk},e}(Di),N5=function(t){ss(e,t);function e(r){var n=t.call(this)||this;return n._value=r,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(r){var n=t.prototype._subscribe.call(this,r);return!n.closed&&r.next(this._value),n},e.prototype.getValue=function(){var r=this,n=r.hasError,s=r.thrownError,o=r._value;if(n)throw s;return this._throwIfClosed(),o},e.prototype.next=function(r){t.prototype.next.call(this,this._value=r)},e}(Di),Pk={now:function(){return(Pk.delegate||Date).now()},delegate:void 0},S5=function(t){ss(e,t);function e(r,n,s){r===void 0&&(r=1/0),n===void 0&&(n=1/0),s===void 0&&(s=Pk);var o=t.call(this)||this;return o._bufferSize=r,o._windowTime=n,o._timestampProvider=s,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,r),o._windowTime=Math.max(1,n),o}return e.prototype.next=function(r){var n=this,s=n.isStopped,o=n._buffer,c=n._infiniteTimeWindow,d=n._timestampProvider,m=n._windowTime;s||(o.push(r),!c&&o.push(d.now()+m)),this._trimBuffer(),t.prototype.next.call(this,r)},e.prototype._subscribe=function(r){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(r),s=this,o=s._infiniteTimeWindow,c=s._buffer,d=c.slice(),m=0;m<d.length&&!r.closed;m+=o?1:2)r.next(d[m]);return this._checkFinalizedStatuses(r),n},e.prototype._trimBuffer=function(){var r=this,n=r._bufferSize,s=r._timestampProvider,o=r._buffer,c=r._infiniteTimeWindow,d=(c?1:2)*n;if(n<1/0&&d<o.length&&o.splice(0,o.length-d),!c){for(var m=s.now(),h=0,p=1;p<o.length&&o[p]<=m;p+=2)h=p;h&&o.splice(0,h+1)}},e}(Di),Cu=new xt(function(t){return t.complete()});function _5(t){return t&&it(t.schedule)}function C5(t){return t[t.length-1]}function Ok(t){return _5(C5(t))?t.pop():void 0}var Rk=function(t){return t&&typeof t.length=="number"&&typeof t!="function"};function Dk(t){return it(t?.then)}function Mk(t){return it(t[Gp])}function Lk(t){return Symbol.asyncIterator&&it(t?.[Symbol.asyncIterator])}function Fk(t){return new TypeError("You provided "+(t!==null&&typeof t=="object"?"an invali
966d object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function T5(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var jk=T5();function Uk(t){return it(t?.[jk])}function zk(t){return cA(this,arguments,function(){var r,n,s,o;return Dx(this,function(c){switch(c.label){case 0:r=t.getReader(),c.label=1;case 1:c.trys.push([1,,9,10]),c.label=2;case 2:return[4,ci(r.read())];case 3:return n=c.sent(),s=n.value,o=n.done,o?[4,ci(void 0)]:[3,5];case 4:return[2,c.sent()];case 5:return[4,ci(s)];case 6:return[4,c.sent()];case 7:return c.sent(),[3,2];case 8:return[3,10];case 9:return r.releaseLock(),[7];case 10:return[2]}})})}function $k(t){return it(t?.getReader)}function xa(t){if(t instanceof xt)return t;if(t!=null){if(Mk(t))return A5(t);if(Rk(t))return I5(t);if(Dk(t))return P5(t);if(Lk(t))return Bk(t);if(Uk(t))return O5(t);if($k(t))return R5(t)}throw Fk(t)}function A5(t){return new xt(function(e){var r=t[Gp]();if(it(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function I5(t){return new xt(function(e){for(var r=0;r<t.length&&!e.closed;r++)e.next(t[r]);e.complete()})}function P5(t){return new xt(function(e){t.then(function(r){e.closed||(e.next(r),e.complete())},function(r){return e.error(r)}).then(null,Ik)})}function O5(t){return new xt(function(e){var r,n;try{for(var s=yi(t),o=s.next();!o.done;o=s.next()){var c=o.value;if(e.next(c),e.closed)return}}catch(d){r={error:d}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}e.complete()})}function Bk(t){return new xt(function(e){D5(t,e).catch(function(r){return e.error(r)})})}function R5(t){return Bk(zk(t))}function D5(t,e){var r,n,s,o;return lA(this,void 0,void 0,function(){var c,d;return Dx(this,function(m){switch(m.label){case 0:m.trys.push([0,5,6,11]),r=uA(t),m.label=1;case 1:return[4,r.next()];case 2:if(n=m.sent(),!!n.done)return[3,4];if(c=n.value,e.next(c),e.closed)return[2];m.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return d=m.sent(),s={error:d},[3,11];case 6:return m.trys.push([6,,9,10]),n&&!n.done&&(o=r.return)?[4,o.call(r)]:[3,8];case 7:m.sent(),m.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Ja(t,e,r,n,s){n===void 0&&(n=0),s===void 0&&(s=!1);var o=e.schedule(function(){r(),s?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(o),!s)return o}function Wk(t,e){return e===void 0&&(e=0),Kr(function(r,n){r.subscribe(ha(n,function(s){return Ja(n,t,function(){return n.next(s)},e)},function(){return Ja(n,t,function(){return n.complete()},e)},function(s){return Ja(n,t,function(){return n.error(s)},e)}))})}function Vk(t,e){return e===void 0&&(e=0),Kr(function(r,n){n.add(t.schedule(function(){return r.subscribe(n)},e))})}function M5(t,e){return xa(t).pipe(Vk(e),Wk(e))}function L5(t,e){return xa(t).pipe(Vk(e),Wk(e))}function F5(t,e){return new xt(function(r){var n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function j5(t,e){return new xt(function(r){var n;return Ja(r,e,function(){n=t[jk](),Ja(r,e,function(){var s,o,c;try{s=n.next(),o=s.value,c=s.done}catch(d){r.error(d);return}c?r.complete():r.next(o)},0,!0)}),function(){return it(n?.return)&&n.return()}})}function qk(t,e){if(!t)throw new Error("Iterable cannot be null");return new xt(function(r){Ja(r,e,function(){var n=t[Symbol.asyncIterator]();Ja(r,e,function(){n.next().then(function(s){s.done?r.complete():r.next(s.value)})},0,!0)})})}function U5(t,e){return qk(zk(t),e)}function z5(t,e){if(t!=null){if(Mk(t))return M5(t,e);if(Rk(t))return F5(t,e);if(Dk(t))return L5(t,e);if(Lk(t))return qk(t,e);if(Uk(t))return j5(t,e);if($k(t))return U5(t,e)}throw Fk(t)}function qa(t,e){return e?z5(t,e):xa(t)}function Ba(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Ok(t);return qa(t,r)}function Hk(t,e){var r=it(t)?t:function(){return t}
966,n=function(s){return s.error(r())};return new xt(n)}var Hb;(function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"})(Hb||(Hb={}));var Vf=function(){function t(e,r,n){this.kind=e,this.value=r,this.error=n,this.hasValue=e==="N"}return t.prototype.observe=function(e){return $5(this,e)},t.prototype.do=function(e,r,n){var s=this,o=s.kind,c=s.value,d=s.error;return o==="N"?e?.(c):o==="E"?r?.(d):n?.()},t.prototype.accept=function(e,r,n){var s;return it((s=e)===null||s===void 0?void 0:s.next)?this.observe(e):this.do(e,r,n)},t.prototype.toObservable=function(){var e=this,r=e.kind,n=e.value,s=e.error,o=r==="N"?Ba(n):r==="E"?Hk(function(){return s}):r==="C"?Cu:0;if(!o)throw new TypeError("Unexpected notification kind "+r);return o},t.createNext=function(e){return new t("N",e)},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t}();function $5(t,e){var r,n,s,o=t,c=o.kind,d=o.value,m=o.error;if(typeof c!="string")throw new TypeError('Invalid notification, missing "kind"');c==="N"?(r=e.next)===null||r===void 0||r.call(e,d):c==="E"?(n=e.error)===null||n===void 0||n.call(e,m):(s=e.complete)===null||s===void 0||s.call(e)}var B5=qp(function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}});function W5(t,e){var r=typeof e=="object";return new Promise(function(n,s){var o=!1,c;t.subscribe({next:function(d){c=d,o=!0},error:s,complete:function(){o?n(c):r?n(e.defaultValue):s(new B5)}})})}function Ga(t,e){return Kr(function(r,n){var s=0;r.subscribe(ha(n,function(o){n.next(t.call(e,o,s++))}))})}function V5(t,e,r,n,s,o,c,d){var m=[],h=0,p=0,g=!1,v=function(){g&&!m.length&&!h&&e.complete()},E=function(k){return h<n?N(k):m.push(k)},N=function(k){h++;var w=!1;xa(r(k,p++)).subscribe(ha(e,function(C){e.next(C)},function(){w=!0},void 0,function(){if(w)try{h--;for(var C=function(){var _=m.shift();c||N(_)};m.length&&h<n;)C();v()}catch(_){e.error(_)}}))};return t.subscribe(ha(e,E,function(){g=!0,v()})),function(){}}function ai(t,e,r){return r===void 0&&(r=1/0),it(e)?ai(function(n,s){return Ga(function(o,c){return e(n,o,s,c)})(xa(t(n,s)))},r):(typeof e=="number"&&(r=e),Kr(function(n,s){return V5(n,s,t,r)}))}function q5(t){return ai(Yp,t)}function H5(){return q5(1)}function qf(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return H5()(qa(t,Ok(t)))}function G5(t,e){return Kr(function(r,n){var s=0;r.subscribe(ha(n,function(o){return t.call(e,o,s++)&&n.next(o)}))})}function uu(t){return Kr(function(e,r){var n=null,s=!1,o;n=e.subscribe(ha(r,void 0,void 0,function(c){o=xa(t(c,uu(t)(e))),n?(n.unsubscribe(),n=null,o.subscribe(r)):s=!0})),s&&(n.unsubscribe(),n=null,o.subscribe(r))})}function Y5(t){return Kr(function(e,r){try{e.subscribe(r)}finally{r.add(t)}})}function J5(){return Kr(function(t,e){t.subscribe(ha(e,function(r){e.next(Vf.createNext(r))},function(){e.next(Vf.createComplete()),e.complete()},function(r){e.next(Vf.createError(r)),e.complete()}))})}function Tu(t){t===void 0&&(t={});var e=t.connector,r=e===void 0?function(){return new Di}:e,n=t.resetOnError,s=n===void 0?!0:n,o=t.resetOnComplete,c=o===void 0?!0:o,d=t.resetOnRefCountZero,m=d===void 0?!0:d;return function(h){var p,g,v,E=0,N=!1,k=!1,w=function(){g?.unsubscribe(),g=void 0},C=function(){w(),p=v=void 0,N=k=!1},_=function(){var T=p;C(),T?.unsubscribe()};return Kr(function(T,A){E++,!k&&!N&&w();var I=v=v??r();A.add(function(){E--,E===0&&!k&&!N&&(g=Hf(_,m))}),I.subscribe(A),!p&&E>0&&(p=new cl({next:function(M){return I.next(M)},error:function(M){k=!0,w(),g=Hf(C,s,M),I.error(M)},complete:function(){N=!0,w(),g=Hf(C,c),I.complete()}}),xa(T).subscribe(p))})(h)}}function Hf(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(e===!0){t();return}if(e!==!1){var s=new cl({next:function(){s.unsubscribe(),t()}});return xa(e.apply(void 0,nl([],bu(r)))).subscribe(s)}}function K5(t,e,r){var n,s,o,c,d=!1;return t&&typeof t=="object"?(n=t.bufferSize,c=n===void 0?1/0:n,s=t.windowTime,e=s===void 0?1/0:s,o=t.refCount,d=o===void 0?!1:o,r=t.scheduler):c=t??1/0,Tu({connector:function(){return new S5(c,e,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:d})}function Au(t,e,r){var n=it(t)||e||r?{next:t,error:e,complete:r}:t;return n?Kr(function(s,o){var c;
966(c=n.subscribe)===null||c===void 0||c.call(n);var d=!0;s.subscribe(ha(o,function(m){var h;(h=n.next)===null||h===void 0||h.call(n,m),o.next(m)},function(){var m;d=!1,(m=n.complete)===null||m===void 0||m.call(n),o.complete()},function(m){var h;d=!1,(h=n.error)===null||h===void 0||h.call(n,m),o.error(m)},function(){var m,h;d&&((m=n.unsubscribe)===null||m===void 0||m.call(n)),(h=n.finalize)===null||h===void 0||h.call(n)}))}):Yp}const Gk=!1;function ta(t){try{return t()}catch{}}const Kh=ta(()=>globalThis)||ta(()=>window)||ta(()=>self)||ta(()=>global)||ta(function(){return ta.constructor("return this")()}),Jp="4.0.11",Gb=new Map;function Yk(t){const e=Gb.get(t)||1;return Gb.set(t,e+1),`${t}:${e}:${Math.random().toString(36).slice(2)}`}function Q5(t,e=0){const r=Yk("stringifyForDisplay");return JSON.stringify(t,(n,s)=>s===void 0?r:s,e).split(JSON.stringify(r)).join("<undefined>")}const Yb="Invariant Violation";class Kp extends Error{constructor(e=Yb){super(e),this.name=Yb,Object.setPrototypeOf(this,Kp.prototype)}}const Jk=["debug","log","warn","error","silent"];let Z5=Jk.indexOf("silent");function je(t,...e){if(!t)throw br(...e)}function Xu(t){return function(e,...r){if(Jk.indexOf(t)>=Z5){const n=console[t]||console.log;if(typeof e=="number"){const s=e;e=Kk(s),e||(e=Qk(s,r),r=[])}n(e,...r)}}}je.debug=Xu("debug");je.log=Xu("log");je.warn=Xu("warn");je.error=Xu("error");function br(t,...e){return new Kp(Kk(t,e)||Qk(t,e))}const Jb=Symbol.for("ApolloErrorMessageHandler_"+Jp);function Qh(t){if(typeof t=="string")return t;try{return Q5(t,2).slice(0,1e3)}catch{return"<non-serializable>"}}function Kk(t,e=[]){if(t)return Kh[Jb]&&Kh[Jb](t,e.map(Qh))}function Qk(t,e=[]){if(t)return typeof t=="string"?e.reduce((r,n)=>r.replace(/%[sdfo]/,Qh(n)),t):`An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#${encodeURIComponent(JSON.stringify({version:Jp,message:t,args:e.map(Qh)}))}`}function xi(t,e,r,n){if(r.kind===X.INT||r.kind===X.FLOAT)t[e.value]=Number(r.value);else if(r.kind===X.BOOLEAN||r.kind===X.STRING)t[e.value]=r.value;else if(r.kind===X.OBJECT){const s={};r.fields.map(o=>xi(s,o.name,o.value,n)),t[e.value]=s}else if(r.kind===X.VARIABLE){const s=(n||{})[r.name.value];t[e.value]=s}else if(r.kind===X.LIST)t[e.value]=r.values.map(s=>{const o={};return xi(o,e,s,n),o[e.value]});else if(r.kind===X.ENUM)t[e.value]=r.value;else if(r.kind===X.NULL)t[e.value]=null;else throw br(19,e.value,r.kind)}function Qp(t,e){if(t.arguments&&t.arguments.length){const r={};return t.arguments.forEach(({name:n,value:s})=>xi(r,n,s,e)),r}return null}const X5=Symbol.for("apollo.cacheSize"),bn={...Kh[X5]};function wi(t,e){return t.definitions.find(r=>r.kind==="OperationDefinition"&&!!r.name)?.name.value??e}const e6=()=>Object.create(null),{forEach:t6,slice:Kb}=Array.prototype,{hasOwnProperty:r6}=Object.prototype;class Cn{constructor(e=!0,r=e6){this.weakness=e,this.makeData=r}lookup(){return this.lookupArray(arguments)}lookupArray(e){let r=this;return t6.call(e,n=>r=r.getChildTrie(n)),r6.call(r,"data")?r.data:r.data=this.makeData(Kb.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let r=this;for(let n=0,s=e.length;r&&n<s;++n){const o=r.mapFor(e[n],!1);r=o&&o.get(e[n])}return r&&r.data}remove(){return this.removeArray(arguments)}removeArray(e){let r;if(e.length){const n=e[0],s=this.mapFor(n,!1),o=s&&s.get(n);o&&(r=o.removeArray(Kb.call(e,1)),!o.data&&!o.weak&&!(o.strong&&o.strong.size)&&s.delete(n))}else r=this.data,delete this.data;return r}getChildTrie(e){const r=this.mapFor(e,!0);let n=r.get(e);return n||r.set(e,n=new Cn(this.weakness,this.makeData)),n}mapFor(e,r){return this.weakness&&n6(e)?this.weak||(r?this.weak=new WeakMap:void 0):this.strong||(r?this.strong=new Map:void 0)}}function n6(t){switch(typeof t){case"object":if(t===null)break;case"function":return!0}return!1}function a6(){}class Zh{constructor(e=1/0,r=a6){this.max=e,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const r=this.getNode(e);return r&&r.value}get size(){return this.map.size}getNode(e){const r=this.map.get(e);if(r&&r!==this.newest){const{older:n,newer:s}=r;s&&(s.older=n),n&&(n.newer=s),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=s)}return r}set(e,r){let n=this.getNode(e);
966return n?n.value=r:(n={key:e,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const r=this.map.get(e);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(e),this.dispose(r.value,e),!0):!1}}function Xh(){}const s6=Xh,i6=typeof WeakRef<"u"?WeakRef:function(t){return{deref:()=>t}},o6=typeof WeakMap<"u"?WeakMap:Map,l6=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:Xh,unregister:Xh}},c6=10024;class Iu{constructor(e=1/0,r=s6){this.max=e,this.dispose=r,this.map=new o6,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const n=this.unfinalizedNodes.values();for(let s=0;s<c6;s++){const o=n.next().value;if(!o)break;this.unfinalizedNodes.delete(o);const c=o.key;delete o.key,o.keyRef=new i6(c),this.registry.register(c,o,o)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new l6(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const r=this.getNode(e);return r&&r.value}getNode(e){const r=this.map.get(e);if(r&&r!==this.newest){const{older:n,newer:s}=r;s&&(s.older=n),n&&(n.newer=s),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=s)}return r}set(e,r){let n=this.getNode(e);return n?n.value=r:(n={key:e,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const r=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,r),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),r&&this.map.delete(r)}delete(e){const r=this.map.get(e);return r?(this.deleteNode(r),!0):!1}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}const Gf=new WeakSet;function Zk(t){t.size<=(t.max||-1)||Gf.has(t)||(Gf.add(t),setTimeout(()=>{t.clean(),Gf.delete(t)},100))}const Zp=function(t,e){const r=new Iu(t,e);return r.set=function(n,s){const o=Iu.prototype.set.call(this,n,s);return Zk(this),o},r},u6=function(t,e){const r=new Zh(t,e);return r.set=function(n,s){const o=Zh.prototype.set.call(this,n,s);return Zk(this),o},r};function d6(t,{max:e}){const r=new Cn(!0),n=new Zp(e);return(...s)=>{const o=r.lookupArray(s),c=n.get(o);if(c){if(c.error)throw c.error;return c.result}const d=n.set(o,{});try{return d.result=t(...s)}catch(m){throw d.error=m,m}}}const ca=d6((t,e)=>{je(t&&t.kind==="Document",1);const r=t.definitions.filter(n=>n.kind==="OperationDefinition");e&&je(r.length==1&&r[0].operation===e,4,e,e,r[0].operation),Jr(t,{Field(n,s,o,c){if(n.alias&&(n.alias.value==="__typename"||n.alias.value.startsWith("__ac_"))&&n.alias.value!==n.name.value){let d=t,m=[];for(const h of c)d=d[h],d.kind===X.FIELD&&m.push(d.alias?.value||d.name.value);throw m.splice(-1,1,n.name.value),br(5,n.alias.value,m.join("."),r[0].operation,wi(t,"(anonymous)"))}}})},{max:bn.checkDocument||2e3});function yr(...t){const e={};return t.forEach(r=>{r&&Object.keys(r).forEach(n=>{const s=r[n];s!==void 0&&(e[n]=s)})}),e}function yl(t=[]){const e={};return t.forEach(r=>{e[r.name.value]=r}),e}function Xt(t){return t!==null&&typeof t=="object"}const{hasOwnProperty:m6}=Object.prototype,f6=function(t,e,r){return this.merge(t[r],e[r])};class ki{reconciler;constructor(e=f6){this.reconciler=e}merge(e,r,...n){return Xt(r)&&Xt(e)?(Object.keys(r).forEach(s=>{if(m6.call(e,s)){const o=e[s];if(r[s]!==o){const c=this.reconciler(e,r,s,...n);c!==o&&(e=this.shallowCopyForMerge(e),e[s]=c)}}else e=this.shallowCopyForMerge(e),e[s]=r[s]}),e):r}isObject=Xt;pastCopies=new Set;shallowCopyForMerge(e){return Xt(e)&&(this.pastCopies.has(e)||(Array.isArray(e)?e=e.slice(0):e={__proto__:Object.getPrototypeOf(e),...e},this.pastCopies.add(e))),e}}function Xp(t){const e={},r=t&&t.variableDefinitions;return r&&r.length&&r.forEach(n=>
966{n.defaultValue&&xi(e,n.variable.name,n.defaultValue)}),e}function ed(t,e){switch(t.kind){case"InlineFragment":return t;case"FragmentSpread":{const r=t.name.value;if(typeof e=="function")return e(r);const n=e&&e[r];return je(n,9,r),n||null}default:return null}}function h6(t,e){let r=e;const n=[];return t.definitions.forEach(o=>{if(o.kind==="OperationDefinition")throw br(10,o.operation,o.name?` named '${o.name.value}'`:"");o.kind==="FragmentDefinition"&&n.push(o)}),typeof r>"u"&&(je(n.length===1,11,n.length),r=n[0].name.value),{...t,definitions:[{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}},...t.definitions]}}function p6(t){je(t.kind==="Document",6),je(t.definitions.length<=1,7);const e=t.definitions[0];return je(e.kind==="FragmentDefinition",8),e}function vl(t){return t.definitions.filter(e=>e.kind==="FragmentDefinition")}function Xk(t){ca(t);let e;for(let r of t.definitions){if(r.kind==="OperationDefinition")return r;r.kind==="FragmentDefinition"&&!e&&(e=r)}if(e)return e;throw br(12)}function En(t){return ca(t),t.definitions.filter(e=>e.kind==="OperationDefinition")[0]}function g6(t){const e=En(t);return je(e&&e.operation==="query",13),e}const ua=Object.assign(function(e){return JSON.stringify(e,y6)},{reset(){Wo=new u6(bn.canonicalStringify||1e3)}});let Wo;ua.reset();function y6(t,e){if(e&&typeof e=="object"){const r=Object.getPrototypeOf(e);if(r===Object.prototype||r===null){const n=Object.keys(e);if(n.every(v6))return e;const s=JSON.stringify(n);let o=Wo.get(s);if(!o){n.sort();const d=JSON.stringify(n);o=Wo.get(d)||n,Wo.set(s,o),Wo.set(d,o)}const c=Object.create(r);return o.forEach(d=>{c[d]=e[d]}),c}}return e}function v6(t,e,r){return e===0||r[e-1]<=t}const b6=["connection","include","skip","client","rest","export","nonreactive"];let Lo=ua;const e1=Object.assign(function(t,e,r){if(e&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){const s=r.connection.filter?r.connection.filter:[];s.sort();const o={};s.forEach(d=>{o[d]=e[d]});const c=Lo(o);if(c!=="{}")return`${r.connection.key}(${c})`}return r.connection.key}let n=t;if(e){const s=Lo(e);s!=="{}"&&(n+=`(${s})`)}return r&&Object.keys(r).forEach(s=>{b6.indexOf(s)===-1&&(r[s]&&Object.keys(r[s]).length?n+=`@${s}(${Lo(r[s])})`:n+=`@${s}`)}),n},{setStringify(t){const e=Lo;return Lo=t,e}});function si(t){return!!t.errors?.length}function Vo(t,e,r){const n=new Set(t),s=n.size;return Jr(e,{Directive(o){if(n.delete(o.name.value)&&(!r||!n.size))return Vp}}),r?!n.size:n.size<s}function E6(t){let e=!1;return Jr(t,{Directive:{enter(r){if(r.name.value==="client"&&r.arguments&&(e=r.arguments.some(n=>n.name.value==="always"&&n.value.kind==="BooleanValue"&&n.value.value===!0),e))return Vp}}}),e}const Et=Array.isArray;function x6(t){return Xt(t)&&t.kind==="Document"&&Array.isArray(t.definitions)}function bl(t){return t.kind==="Field"}function eg(t){return Array.isArray(t)&&t.length>0}function hi(t){return{__ref:String(t)}}function w6(t){let e=t[0]||{};const r=t.length;if(r>1){const n=new ki;for(let s=1;s<r;++s)e=n.merge(e,t[s])}return e}function Yf(t,e){return yr(t,e,e.variables&&{variables:yr({...t&&t.variables,...e.variables})})}function k6(t){return t.catch(()=>{}),t}function N6(t,e){ca(e);const r=Qb(""),n=Qb(""),s=w=>{for(let C=0,_;C<w.length&&(_=w[C]);++C)if(!Et(_)){if(_.kind===X.OPERATION_DEFINITION)return r(_.name&&_.name.value);if(_.kind===X.FRAGMENT_DEFINITION)return n(_.name.value)}return je.error(14),null};let o=0;for(let w=e.definitions.length-1;w>=0;--w)e.definitions[w].kind===X.OPERATION_DEFINITION&&++o;const c=S6(t),d=w=>eg(w)&&w.map(c).some(C=>C&&C.remove),m=new Map;let h=!1;const p={enter(w){if(d(w.directives))return h=!0,null}},g=Jr(e,{Field:p,InlineFragment:p,VariableDefinition:{enter(){return!1}},Variable:{enter(w,C,_,T,A){const I=s(A);I&&I.variables.add(w.name.value)}},FragmentSpread:{enter(w,C,_,T,A){if(d(w.directives))return h=!0,null;const I=s(A);I&&I.fragmentSpreads.add(w.name.value)}},FragmentDefinition:{enter(w,C,_,T){m.set(JSON.stringify(T),w)},leave(w,C,_,T){const A=m.get(JSON.stringify(T));if(w===A)return w;if(o>0&&w.selectionSet.selections.every(I=>I.kind===X.FIELD&&I.name.value==="__typename"))return n(w.name.value).removed=!0,h=!0,null}},Directive:{leave(w){if(c(w))return h=!0,null}}});if(!h)return e;const v=w=>(w.transitiveVars||(w.transitiveVars=new Set(w.variables),w.removed||w.fragmentSpreads.forEach(C=>
966{v(n(C)).transitiveVars.forEach(_=>{w.transitiveVars.add(_)})})),w),E=new Set;g.definitions.forEach(w=>{w.kind===X.OPERATION_DEFINITION?v(r(w.name&&w.name.value)).fragmentSpreads.forEach(C=>{E.add(C)}):w.kind===X.FRAGMENT_DEFINITION&&o===0&&!n(w.name.value).removed&&E.add(w.name.value)}),E.forEach(w=>{v(n(w)).fragmentSpreads.forEach(C=>{E.add(C)})});const N=w=>!!(!E.has(w)||n(w).removed),k={enter(w){if(N(w.name.value))return null}};return _6(Jr(g,{FragmentSpread:k,FragmentDefinition:k,OperationDefinition:{leave(w){if(w.variableDefinitions){const C=v(r(w.name&&w.name.value)).transitiveVars;if(C.size<w.variableDefinitions.length)return{...w,variableDefinitions:w.variableDefinitions.filter(_=>C.has(_.variable.name.value))}}}}}))}function Qb(t){const e=new Map;return function(n=t){let s=e.get(n);return s||e.set(n,s={variables:new Set,fragmentSpreads:new Set}),s}}function S6(t){const e=new Map,r=new Map;return t.forEach(n=>{n&&(n.name?e.set(n.name,n):n.test&&r.set(n.test,n))}),n=>{let s=e.get(n.name.value);return!s&&r.size&&r.forEach((o,c)=>{c(n)&&(s=o)}),s}}function t1(t,e){return!t||t.selectionSet.selections.every(r=>r.kind===X.FRAGMENT_SPREAD&&t1(e[r.name.value],e))}function _6(t){return t1(En(t)||p6(t),yl(vl(t)))?null:t}function C6(t){return Jr(t,{FragmentSpread(e){if(!e.directives?.some(({name:r})=>r.value==="unmask"))return null}})}function Mi(t){return t.alias?t.alias.value:t.name.value}function td({directives:t},e){return!t||!t.length?!0:A6(t).every(({directive:r,ifArgument:n})=>{let s=!1;return n.value.kind==="Variable"?(s=e&&e[n.value.name.value],je(s!==void 0,15,r.name.value)):s=n.value.value,r.name.value==="skip"?!s:s})}function T6({name:{value:t}}){return t==="skip"||t==="include"}function A6(t){const e=[];return t&&t.length&&t.forEach(r=>{if(!T6(r))return;const n=r.arguments,s=r.name.value;je(n&&n.length===1,16,s);const o=n[0];je(o.name&&o.name.value==="if",17,s);const c=o.value;je(c&&(c.kind==="Variable"||c.kind==="BooleanValue"),18,s),e.push({directive:r,ifArgument:o})}),e}function I6(t,e){let r=null;t.directives&&(r={},t.directives.forEach(s=>{r[s.name.value]={},s.arguments&&s.arguments.forEach(({name:o,value:c})=>xi(r[s.name.value],o,c,e))}));let n=null;return t.arguments&&t.arguments.length&&(n={},t.arguments.forEach(({name:s,value:o})=>xi(n,s,o,e))),e1(t.name.value,n,r)}function du(t){const e={data:t.data};return t.error&&(e.error=t.error),e}function ep(t,e=()=>{}){return r=>new xt(n=>{let s=e();return r.subscribe({next(o){let c;try{c=t(o,s)}catch(d){n.error(d)}c!==void 0&&n.next(c)},error(o){n.error(o)},complete(){n.complete()}})})}const{toString:Zb,hasOwnProperty:P6}=Object.prototype,Xb=Function.prototype.toString,tp=new Map;function ht(t,e){try{return rp(t,e)}finally{tp.clear()}}function rp(t,e){if(t===e)return!0;const r=Zb.call(t),n=Zb.call(e);if(r!==n)return!1;switch(r){case"[object Array]":if(t.length!==e.length)return!1;case"[object Object]":{if(tE(t,e))return!0;const s=eE(t),o=eE(e),c=s.length;if(c!==o.length)return!1;for(let d=0;d<c;++d)if(!P6.call(e,s[d]))return!1;for(let d=0;d<c;++d){const m=s[d];if(!rp(t[m],e[m]))return!1}return!0}case"[object Error]":return t.name===e.name&&t.message===e.message;case"[object Number]":if(t!==t)return e!==e;case"[object Boolean]":case"[object Date]":return+t==+e;case"[object RegExp]":case"[object String]":return t==`${e}`;case"[object Map]":case"[object Set]":{if(t.size!==e.size)return!1;if(tE(t,e))return!0;const s=t.entries(),o=r==="[object Map]";for(;;){const c=s.next();if(c.done)break;const[d,m]=c.value;if(!e.has(d)||o&&!rp(m,e.get(d)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":t=new Uint8Array(t),e=new Uint8Array(e);case"[object DataView]":{let s=t.byteLength;if(s===e.byteLength)for(;s--&&t[s]===e[s];);return s===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const s=Xb.call(t);return s!==Xb.call(e)?!1:!D6(s,R6)}}return!1}function eE(t){return Object.keys(t).filter(O6,t)}function O6(t){return this[t]!==void 0}const R6="{ [native code] }";function D6(t,e){const r=t.length-e.length;return r>=0&&t.indexOf(e,r)===r}function tE(t,e){let r=tp.get(t);if(r){if(r.has(e))return!0}else tp.set(t,r=new Set);return r.add(e),!1}function r1(t,{data:e,...r},{data:n,...s},o){return ht(r,s)&&mu(Xk(t).selectionSet,e,n,{fragmentMap:yl(vl(t)),variables:o})}function mu(t,e,r,n){if(e===r)return!0;const s=new Set;return t.selections.every(o=>
966{if(s.has(o)||(s.add(o),!td(o,n.variables))||rE(o))return!0;if(bl(o)){const c=Mi(o),d=e&&e[c],m=r&&r[c],h=o.selectionSet;if(!h)return ht(d,m);const p=Array.isArray(d),g=Array.isArray(m);if(p!==g)return!1;if(p&&g){const v=d.length;if(m.length!==v)return!1;for(let E=0;E<v;++E)if(!mu(h,d[E],m[E],n))return!1;return!0}return mu(h,d,m,n)}else{const c=ed(o,n.fragmentMap);if(c)return rE(c)?!0:mu(c.selectionSet,e,r,n)}})}function rE(t){return!!t.directives&&t.directives.some(M6)}function M6(t){return t.name.value==="nonreactive"}const L6=Symbol.for("apollo.observableQuery.variablesUnknown");class F6{isIncrementalResult(e){return!1}prepareRequest(e){return je(!Vo(["defer"],e.query),64),e}extractErrors(){}startRequest=void 0}function j6(t,{client:e}){const r={query:t.query,variables:t.variables||{},extensions:t.extensions||{},operationName:wi(t.query),operationType:En(t.query).operation};let n={...t.context};const s=c=>{typeof c=="function"?n={...n,...c(o())}:n={...n,...c}},o=()=>Object.freeze({...n});return Object.defineProperty(r,"setContext",{enumerable:!1,value:s}),Object.defineProperty(r,"getContext",{enumerable:!1,value:o}),Object.defineProperty(r,"client",{enumerable:!1,value:e}),r}function U6(t,e){const r={...t},n=new Set(Object.keys(t));return Jr(e,{Variable(s,o,c){c&&c.kind!=="VariableDefinition"&&n.delete(s.name.value)}}),n.forEach(s=>{delete r[s]}),r}class sr{static empty(){return new sr(()=>Cu)}static from(e){if(e.length===0)return sr.empty();const[r,...n]=e;return r.concat(...n)}static split(e,r,n=new sr((s,o)=>o(s))){const s=new sr((o,c)=>e(o)?r.request(o,c):n.request(o,c));return Object.assign(s,{left:r,right:n})}static execute(e,r,n){return e.request(j6(r,n),()=>Cu)}static concat(...e){return sr.from(e)}constructor(e){e&&(this.request=e)}split(e,r,n){return this.concat(sr.split(e,r,n))}concat(...e){return e.length===0?this:e.reduce(this.combine.bind(this),this)}combine(e,r){const n=new sr((s,o)=>e.request(s,c=>r.request(c,o)));return Object.assign(n,{left:e,right:r})}request(e,r){throw br(63)}left;right}const np=sr.execute;let Ot=null;const nE={};let z6=1;const $6=()=>class{constructor(){this.id=["slot",z6++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=Ot;e;e=e.parent)if(this.id in e.slots){const r=e.slots[this.id];if(r===nE)break;return e!==Ot&&(Ot.slots[this.id]=r),!0}return Ot&&(Ot.slots[this.id]=nE),!1}getValue(){if(this.hasValue())return Ot.slots[this.id]}withValue(e,r,n,s){const o={__proto__:null,[this.id]:e},c=Ot;Ot={parent:c,slots:o};try{return r.apply(s,n)}finally{Ot=c}}static bind(e){const r=Ot;return function(){const n=Ot;try{return Ot=r,e.apply(this,arguments)}finally{Ot=n}}}static noContext(e,r,n){if(Ot){const s=Ot;try{return Ot=null,e.apply(n,r)}finally{Ot=s}}else return e.apply(n,r)}};function aE(t){try{return t()}catch{}}const Jf="@wry/context:Slot",B6=aE(()=>globalThis)||aE(()=>global)||Object.create(null),sE=B6,rd=sE[Jf]||Array[Jf]||function(t){try{Object.defineProperty(sE,Jf,{value:t,enumerable:!1,writable:!1,configurable:!0})}finally{return t}}($6()),{bind:OM,noContext:RM}=rd,nd=new rd,{hasOwnProperty:W6}=Object.prototype,tg=Array.from||function(t){const e=[];return t.forEach(r=>e.push(r)),e};function rg(t){const{unsubscribe:e}=t;typeof e=="function"&&(t.unsubscribe=void 0,e())}const ul=[],V6=100;function Ni(t,e){if(!t)throw new Error(e||"assertion failure")}function n1(t,e){const r=t.length;return r>0&&r===e.length&&t[r-1]===e[r-1]}function a1(t){switch(t.length){case 0:throw new Error("unknown value");case 1:return t[0];case 2:throw t[1]}}function s1(t){return t.slice(0)}class ad{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++ad.count}peek(){if(this.value.length===1&&!pa(this))return iE(this),this.value[0]}recompute(e){return Ni(!this.recomputing,"already recomputing"),iE(this),pa(this)?q6(this,e):a1(this.value)}setDirty(){this.dirty||(this.dirty=!0,i1(this),rg(this))}dispose(){this.setDirty(),d1(this),ng(this,(e,r)=>{e.setDirty(),m1(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=ul.pop()||new Set),this.deps.add(e)}
966forgetDeps(){this.deps&&(tg(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),ul.push(this.deps),this.deps=null)}}ad.count=0;function iE(t){const e=nd.getValue();if(e)return t.parents.add(e),e.childValues.has(t)||e.childValues.set(t,[]),pa(t)?l1(e,t):c1(e,t),e}function q6(t,e){return d1(t),nd.withValue(t,H6,[t,e]),Y6(t,e)&&G6(t),a1(t.value)}function H6(t,e){t.recomputing=!0;const{normalizeResult:r}=t;let n;r&&t.value.length===1&&(n=s1(t.value)),t.value.length=0;try{if(t.value[0]=t.fn.apply(null,e),r&&n&&!n1(n,t.value))try{t.value[0]=r(t.value[0],n[0])}catch{}}catch(s){t.value[1]=s}t.recomputing=!1}function pa(t){return t.dirty||!!(t.dirtyChildren&&t.dirtyChildren.size)}function G6(t){t.dirty=!1,!pa(t)&&o1(t)}function i1(t){ng(t,l1)}function o1(t){ng(t,c1)}function ng(t,e){const r=t.parents.size;if(r){const n=tg(t.parents);for(let s=0;s<r;++s)e(n[s],t)}}function l1(t,e){Ni(t.childValues.has(e)),Ni(pa(e));const r=!pa(t);if(!t.dirtyChildren)t.dirtyChildren=ul.pop()||new Set;else if(t.dirtyChildren.has(e))return;t.dirtyChildren.add(e),r&&i1(t)}function c1(t,e){Ni(t.childValues.has(e)),Ni(!pa(e));const r=t.childValues.get(e);r.length===0?t.childValues.set(e,s1(e.value)):n1(r,e.value)||t.setDirty(),u1(t,e),!pa(t)&&o1(t)}function u1(t,e){const r=t.dirtyChildren;r&&(r.delete(e),r.size===0&&(ul.length<V6&&ul.push(r),t.dirtyChildren=null))}function d1(t){t.childValues.size>0&&t.childValues.forEach((e,r)=>{m1(t,r)}),t.forgetDeps(),Ni(t.dirtyChildren===null)}function m1(t,e){e.parents.delete(t),t.childValues.delete(e),u1(t,e)}function Y6(t,e){if(typeof t.subscribe=="function")try{rg(t),t.unsubscribe=t.subscribe.apply(null,e)}catch{return t.setDirty(),!1}return!0}const J6={setDirty:!0,dispose:!0,forget:!0};function f1(t){const e=new Map;function r(n){const s=nd.getValue();if(s){let o=e.get(n);o||e.set(n,o=new Set),s.dependOn(o)}}return r.dirty=function(s,o){const c=e.get(s);if(c){const d=o&&W6.call(J6,o)?o:"setDirty";tg(c).forEach(m=>m[d]()),e.delete(s),rg(c)}},r}let oE;function K6(...t){return(oE||(oE=new Cn(typeof WeakMap=="function"))).lookupArray(t)}const Kf=new Set;function dl(t,{max:e=Math.pow(2,16),keyArgs:r,makeCacheKey:n=K6,normalizeResult:s,subscribe:o,cache:c=Zh}=Object.create(null)){const d=typeof c=="function"?new c(e,v=>v.dispose()):c,m=function(){const v=n.apply(null,r?r.apply(null,arguments):arguments);if(v===void 0)return t.apply(null,arguments);let E=d.get(v);E||(d.set(v,E=new ad(t)),E.normalizeResult=s,E.subscribe=o,E.forget=()=>d.delete(v));const N=E.recompute(Array.prototype.slice.call(arguments));return d.set(v,E),Kf.add(d),nd.hasValue()||(Kf.forEach(k=>k.clean()),Kf.clear()),N};Object.defineProperty(m,"size",{get:()=>d.size,configurable:!1,enumerable:!1}),Object.freeze(m.options={max:e,keyArgs:r,makeCacheKey:n,normalizeResult:s,subscribe:o,cache:d});function h(v){const E=v&&d.get(v);E&&E.setDirty()}m.dirtyKey=h,m.dirty=function(){h(n.apply(null,arguments))};function p(v){const E=v&&d.get(v);if(E)return E.peek()}m.peekKey=p,m.peek=function(){return p(n.apply(null,arguments))};function g(v){return v?d.delete(v):!1}return m.forgetKey=g,m.forget=function(){return g(n.apply(null,arguments))},m.makeCacheKey=n,m.getKey=r?function(){return n.apply(null,r.apply(null,arguments))}:n,Object.freeze(m)}function Q6(t){return t}class fn{transform;cached;resultCache=new WeakSet;getCacheKey(e){return[e]}static identity(){return new fn(Q6,{cache:!1})}static split(e,r,n=fn.identity()){return Object.assign(new fn(s=>(e(s)?r:n).transformDocument(s),{cache:!1}),{left:r,right:n})}constructor(e,r={}){this.transform=e,r.getCacheKey&&(this.getCacheKey=r.getCacheKey),this.cached=r.cache!==!1,this.resetCache()}resetCache(){if(this.cached){const e=new Cn;this.performWork=dl(fn.prototype.performWork.bind(this),{makeCacheKey:r=>{const n=this.getCacheKey(r);if(n)return je(Array.isArray(n),20),e.lookupArray(n)},max:bn["documentTransform.cache"],cache:Iu})}}performWork(e){return ca(e),this.transform(e)}transformDocument(e){if(this.resultCache.has(e))return e;const r=this.performWork(e);return this.resultCache.add(r),r}concat(e){return Object.assign(new fn(r=>e.transformDocument(this.transformDocument(r)),{cache:!1}),{left:this,right:e})}left;
966right}let Qf;const pi=Object.assign(t=>{let e=Qf.get(t);return e||(e=u5(t),Qf.set(t,e)),e},{reset(){Qf=new Zp(bn.print||2e3)}});pi.reset();function Xe(t){return!!(t&&typeof t=="object"&&typeof t.__ref=="string")}const lE={kind:X.FIELD,name:{kind:X.NAME,value:"__typename"}},h1=Object.assign(function(t){return Jr(t,{SelectionSet:{enter(e,r,n){if(n&&n.kind===X.OPERATION_DEFINITION)return;const{selections:s}=e;if(!s||s.some(d=>d.kind===X.FIELD&&(d.name.value==="__typename"||d.name.value.lastIndexOf("__",0)===0)))return;const c=n;if(!(c.kind===X.FIELD&&c.directives&&c.directives.some(d=>d.name.value==="export")))return{...e,selections:[...s,lE]}}}})},{added(t){return t===lE}});function p1(t,e){return En(t)?.operation===e}function Z6(t){return p1(t,"mutation")}function X6(t){return p1(t,"subscription")}function eD(t){return t===7||t===8}function ap(t){return!eD(t)}class tD{assumeImmutableResults=!1;lookupFragment(e){return null}batch(e){const r=typeof e.optimistic=="string"?e.optimistic:e.optimistic===!1?null:void 0;let n;return this.performTransaction(()=>n=e.update(this),r),n}recordOptimisticTransaction(e,r){this.performTransaction(e,r)}transformDocument(e){return e}transformForLink(e){return e}identify(e){}gc(){return[]}modify(e){return!1}readQuery(e,r=!!e.optimistic){return this.read({...e,rootId:e.id||"ROOT_QUERY",optimistic:r})}watchFragment(e){const{fragment:r,fragmentName:n,from:s,optimistic:o=!0,...c}=e,d=this.getFragmentDoc(r,n),m=typeof s>"u"||typeof s=="string"?s:this.identify(s),h={...c,returnPartialData:!0,id:m,query:d,optimistic:o};let p;return new xt(g=>this.watch({...h,immediate:!0,callback:v=>{let E=v.result;if(E===null&&(E={}),p&&r1(d,{data:p.result},{data:E},e.variables))return;const N={data:E,dataState:v.complete?"complete":"partial",complete:!!v.complete};v.missing&&(N.missing=v.missing.missing),p={...v,result:E},g.next(N)}}))}getFragmentDoc=dl(h6,{max:bn["cache.fragmentQueryDocuments"]||1e3,cache:Iu});readFragment(e,r=!!e.optimistic){return this.read({...e,query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:r})}writeQuery({id:e,data:r,...n}){return this.write(Object.assign(n,{dataId:e||"ROOT_QUERY",result:r}))}writeFragment({id:e,data:r,fragment:n,fragmentName:s,...o}){return this.write(Object.assign(o,{query:this.getFragmentDoc(n,s),dataId:e,result:r}))}updateQuery(e,r){return this.batch({update(n){const s=n.readQuery(e),o=r(s);return o==null?s:(n.writeQuery({...e,data:o}),o)}})}updateFragment(e,r){return this.batch({update(n){const s=n.readFragment(e),o=r(s);return o==null?s:(n.writeFragment({...e,data:o}),o)}})}}class ag extends Error{message;path;query;variables;constructor(e,r,n,s){if(super(e),this.message=e,this.path=r,this.query=n,this.variables=s,this.name="MissingFieldError",Array.isArray(this.path)){this.missing=this.message;for(let o=this.path.length-1;o>=0;--o)this.missing={[this.path[o]]:this.missing}}else this.missing=this.path;this.__proto__=ag.prototype}missing}const{hasOwnProperty:Ct}=Object.prototype;function g1({__typename:t,id:e,_id:r},n){if(typeof t=="string"&&(n&&(n.keyObject=e!=null?{id:e}:r!=null?{_id:r}:void 0),e==null&&r!=null&&(e=r),e!=null))return`${t}:${typeof e=="number"||typeof e=="string"?e:JSON.stringify(e)}`}const rD={dataIdFromObject:g1,resultCaching:!0};function nD(t){return yr(rD,t)}const y1=/^[_a-z][_0-9a-z]*/i;function Si(t){const e=t.match(y1);return e?e[0]:t}function sp(t,e,r){return Xt(e)?Et(e)?e.every(n=>sp(t,n,r)):t.selections.every(n=>{if(bl(n)&&td(n,r)){const s=Mi(n);return Ct.call(e,s)&&(!n.selectionSet||sp(n.selectionSet,e[s],r))}return!0}):!1}function ii(t){return Xt(t)&&!Xe(t)&&!Et(t)}function aD(){return new ki}function v1(t,e){const r=yl(vl(t));return{fragmentMap:r,lookupFragment(n){let s=r[n];return!s&&e&&(s=e.lookup(n)),s||null}}}const fu={},Zf=()=>fu,cE={};class sd{policies;group;data={};constructor(e,r){this.policies=e,this.group=r}toObject(){return{...this.data}}has(e){return this.lookup(e,!0)!==void 0}get(e,r){if(this.group.depend(e,r),Ct.call(this.data,e)){const n=this.data[e];if(n&&Ct.call(n,r))return n[r]}if(r==="__typename"&&Ct.call(this.policies.rootTypenamesById,e))return this.policies.rootTypenamesById[e];if(this instanceof Wr)return this.parent.get(e,r)}lookup(e,r){if(r&&this.group.depend(e,"__exists"),Ct.call(this.data,e))return this.data[e];if(this instanceof Wr)return this.parent.lookup(e,r);if(this.policies.rootTypenamesById[e])return{}}merge(e,r){let n;Xe(e)&&(e=e.__ref),Xe(r)&&(r=r.__ref);const s=typeof e=="string"?this.lookup(n=e):e,o=typeof r=="string"?this.lookup(n=r):r;if(!o)return;je(typeof n=="string",96);const c=new ki(oD).merge(s,o);if(this.data[n]=c,c!==s&&(delete this.refs[n],this.group.caching)){const d={};
966s||(d.__exists=1),Object.keys(o).forEach(m=>{if(!s||s[m]!==c[m]){d[m]=1;const h=Si(m);h!==m&&!this.policies.hasKeyArgs(c.__typename,h)&&(d[h]=1),c[m]===void 0&&!(this instanceof Wr)&&delete c[m]}}),d.__typename&&!(s&&s.__typename)&&this.policies.rootTypenamesById[n]===c.__typename&&delete d.__typename,Object.keys(d).forEach(m=>this.group.dirty(n,m))}}modify(e,r,n){const s=this.lookup(e);if(s){const o={};let c=!1,d=!0;const m={DELETE:fu,INVALIDATE:cE,isReference:Xe,toReference:this.toReference,canRead:this.canRead,readField:(h,p)=>this.policies.readField(typeof h=="string"?{fieldName:h,from:p||hi(e)}:h,{store:this})};if(Object.keys(s).forEach(h=>{const p=Si(h);let g=s[h];if(g===void 0)return;const v=typeof r=="function"?r:r[h]||(n?void 0:r[p]);if(v){let E=v===Zf?fu:v(g,{...m,fieldName:p,storeFieldName:h,storage:this.getStorage(e,h)});E===cE?this.group.dirty(e,h):(E===fu&&(E=void 0),E!==g&&(o[h]=E,c=!0,g=E))}g!==void 0&&(d=!1)}),c)return this.merge(e,o),d&&(this instanceof Wr?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1}delete(e,r,n){const s=this.lookup(e);if(s){const o=this.getFieldValue(s,"__typename"),c=r&&n?this.policies.getStoreFieldName({typename:o,fieldName:r,args:n}):r;return this.modify(e,c?{[c]:Zf}:Zf,!!n)}return!1}evict(e,r){let n=!1;return e.id&&(Ct.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Wr&&this!==r&&(n=this.parent.evict(e,r)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n}clear(){this.replace(null)}extract(){const e=this.toObject(),r=[];return this.getRootIdSet().forEach(n=>{Ct.call(this.policies.rootTypenamesById,n)||r.push(n)}),r.length&&(e.__META={extraRootIds:r.sort()}),e}replace(e){if(Object.keys(this.data).forEach(r=>{e&&Ct.call(e,r)||this.delete(r)}),e){const{__META:r,...n}=e;Object.keys(n).forEach(s=>{this.merge(s,n[s])}),r&&r.extraRootIds.forEach(this.retain,this)}}rootIds={};retain(e){return this.rootIds[e]=(this.rootIds[e]||0)+1}release(e){if(this.rootIds[e]>0){const r=--this.rootIds[e];return r||delete this.rootIds[e],r}return 0}getRootIdSet(e=new Set){return Object.keys(this.rootIds).forEach(e.add,e),this instanceof Wr?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e}gc(){const e=this.getRootIdSet(),r=this.toObject();e.forEach(s=>{Ct.call(r,s)&&(Object.keys(this.findChildRefIds(s)).forEach(e.add,e),delete r[s])});const n=Object.keys(r);if(n.length){let s=this;for(;s instanceof Wr;)s=s.parent;n.forEach(o=>s.delete(o))}return n}refs={};findChildRefIds(e){if(!Ct.call(this.refs,e)){const r=this.refs[e]={},n=this.data[e];if(!n)return r;const s=new Set([n]);s.forEach(o=>{Xe(o)&&(r[o.__ref]=!0),Xt(o)&&Object.keys(o).forEach(c=>{const d=o[c];Xt(d)&&s.add(d)})})}return this.refs[e]}makeCacheKey(){return this.group.keyMaker.lookupArray(arguments)}getFieldValue=(e,r)=>Xe(e)?this.get(e.__ref,r):e&&e[r];canRead=e=>Xe(e)?this.has(e.__ref):typeof e=="object";toReference=(e,r)=>{if(typeof e=="string")return hi(e);if(Xe(e))return e;const[n]=this.policies.identify(e);if(n){const s=hi(n);return r&&this.merge(n,e),s}};get supportsResultCaching(){return this.group.caching}}class b1{caching;parent;d=null;keyMaker;constructor(e,r=null){this.caching=e,this.parent=r,this.resetCaching()}resetCaching(){this.d=this.caching?f1():null,this.keyMaker=new Cn}depend(e,r){if(this.d){this.d(Xf(e,r));const n=Si(r);n!==r&&this.d(Xf(e,n)),this.parent&&this.parent.depend(e,r)}}dirty(e,r){this.d&&this.d.dirty(Xf(e,r),r==="__exists"?"forget":"setDirty")}}function Xf(t,e){return e+"#"+t}function uE(t,e){Qo(t)&&t.group.depend(e,"__exists")}class sD extends sd{constructor({policies:e,resultCaching:r=!0,seed:n}){super(e,new b1(r)),n&&this.replace(n)}stump=new iD(this);addLayer(e,r){return this.stump.addLayer(e,r)}removeLayer(){return this}storageTrie=new Cn;getStorage(){return this.storageTrie.lookupArray(arguments)}}sd.Root=sD;class Wr extends sd{id;parent;replay;group;constructor(e,r,n,s){super(r.policies,s),this.id=e,this.parent=r,this.replay=n,this.group=s,n(this)}addLayer(e,r){return new Wr(e,this,r,this.group)}removeLayer(e){const r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEac
966h(n=>{const s=this.data[n],o=r.lookup(n);o?s?s!==o&&Object.keys(s).forEach(c=>{ht(s[c],o[c])||this.group.dirty(n,c)}):(this.group.dirty(n,"__exists"),Object.keys(o).forEach(c=>{this.group.dirty(n,c)})):this.delete(n)}),r):r===this.parent?this:r.addLayer(this.id,this.replay)}toObject(){return{...this.parent.toObject(),...this.data}}findChildRefIds(e){const r=this.parent.findChildRefIds(e);return Ct.call(this.data,e)?{...r,...super.findChildRefIds(e)}:r}getStorage(...e){let r=this.parent;for(;r.parent;)r=r.parent;return r.getStorage(...e)}}class iD extends Wr{constructor(e){super("EntityStore.Stump",e,()=>{},new b1(e.group.caching,e.group))}removeLayer(){return this}merge(e,r){return this.parent.merge(e,r)}}function oD(t,e,r){const n=t[r],s=e[r];return ht(n,s)?n:s}function Qo(t){return!!(t&&t.supportsResultCaching)}const E1=new rd;function lD(t){const e=t.directives?.find(({name:n})=>n.value==="unmask");if(!e)return"mask";const r=e.arguments?.find(({name:n})=>n.value==="mode");return r&&"value"in r.value&&r.value.value==="migrate"?"migrate":"unmask"}function x1(t,e,r){return E1.withValue(!0,()=>qo(t,e,r,!1))}function cD(t,e){if(e.has(t))return e.get(t);const r=Array.isArray(t)?[]:{};return e.set(t,r),r}function qo(t,e,r,n,s){const{knownChanged:o}=r,c=cD(t,r.mutableTargets);if(Array.isArray(t)){for(const[d,m]of Array.from(t.entries())){if(m===null){c[d]=null;continue}const h=qo(m,e,r,n);o.has(h)&&o.add(c),c[d]=h}return o.has(c)?c:t}for(const d of e.selections){let m;if(n&&o.add(c),d.kind===X.FIELD){const h=Mi(d),p=d.selectionSet;if(m=c[h]||t[h],m===void 0)continue;if(p&&m!==null){const g=qo(t[h],p,r,n);o.has(g)&&(m=g)}c[h]=m}if(d.kind===X.INLINE_FRAGMENT&&(!d.typeCondition||r.cache.fragmentMatches(d,t.__typename))&&(m=qo(t,d.selectionSet,r,n)),d.kind===X.FRAGMENT_SPREAD){const h=d.name.value,p=r.fragmentMap[h]||(r.fragmentMap[h]=r.cache.lookupFragment(h));je(p,39,h);const g=lD(d);g!=="mask"&&(m=qo(t,p.selectionSet,r,g==="migrate"))}o.has(m)&&o.add(c)}return"__typename"in t&&!("__typename"in c)&&(c.__typename=t.__typename),Object.keys(c).length!==Object.keys(t).length&&o.add(c),o.has(c)?c:t}function uD(t,e,r,n){const s=e.definitions.filter(c=>c.kind===X.FRAGMENT_DEFINITION);typeof n>"u"&&(je(s.length===1,41,s.length),n=s[0].name.value);const o=s.find(c=>c.name.value===n);return je(!!o,42,n),t==null||ht(t,{})?t:x1(t,o.selectionSet,{operationName:o.name.value,fragmentMap:yl(vl(e)),cache:r,mutableTargets:new WeakMap,knownChanged:new WeakSet})}function dD(t,e,r){const n=En(e);return je(n,43),t==null?t:x1(t,n.selectionSet,{operationType:n.operation,operationName:n.name?.value,fragmentMap:yl(vl(e)),cache:r,mutableTargets:new WeakMap,knownChanged:new WeakSet})}const dE={};function sg(t){const e=JSON.stringify(t);return dE[e]||(dE[e]={})}function mE(t){const e=sg(t);return e.keyFieldsFn||(e.keyFieldsFn=(r,n)=>{const s=(c,d)=>n.readField(d,c),o=n.keyObject=ig(t,c=>{let d=gi(n.storeObject,c,s);return d===void 0&&r!==n.storeObject&&Ct.call(r,c[0])&&(d=gi(r,c,k1)),je(d!==void 0,99,c.join("."),r),d});return`${n.typename}:${JSON.stringify(o)}`})}function fE(t){const e=sg(t);return e.keyArgsFn||(e.keyArgsFn=(r,{field:n,variables:s,fieldName:o})=>{const c=ig(t,m=>{const h=m[0],p=h.charAt(0);if(p==="@"){if(n&&eg(n.directives)){const g=h.slice(1),v=n.directives.find(N=>N.name.value===g),E=v&&Qp(v,s);return E&&gi(E,m.slice(1))}return}if(p==="$"){const g=h.slice(1);if(s&&Ct.call(s,g)){const v=m.slice(0);return v[0]=g,gi(s,v)}return}if(r)return gi(r,m)}),d=JSON.stringify(c);return(r||d!=="{}")&&(o+=":"+d),o})}function ig(t,e){const r=new ki;return w1(t).reduce((n,s)=>{let o=e(s);if(o!==void 0){for(let c=s.length-1;c>=0;--c)o={[s[c]]:o};n=r.merge(n,o)}return n},{})}function w1(t){const e=sg(t);if(!e.paths){const r=e.paths=[],n=[];t.forEach((s,o)=>{Et(s)?(w1(s).forEach(c=>r.push(n.concat(c))),n.length=0):(n.push(s),Et(t[o+1])||(r.push(n.slice(0)),n.length=0))})}return e.paths}function k1(t,e){return t[e]}function gi(t,e,r){return r=r||k1,N1(e.reduce(function n(s,o){return Et(s)?s.map(c=>n(c,o)):s&&r(s,o)},t))}function N1(t){return Xt(t)?Et(t)?t.map(N1):ig(Object.keys(t).sort(),e=>gi(t,e)):t}const S1=new rd,hE=new WeakMap;function Zo(t){let e=hE.get(t);return e||hE.set(t,e={vars:new Set,dep:f1()}),e}
966function pE(t){Zo(t).vars.forEach(e=>e.forgetCache(t))}function mD(t){Zo(t).vars.forEach(e=>e.attachCache(t))}function fD(t){const e=new Set,r=new Set,n=function(o){if(arguments.length>0){if(t!==o){t=o,e.forEach(d=>{Zo(d).dep.dirty(n),hD(d)});const c=Array.from(r);r.clear(),c.forEach(d=>d(t))}}else{const c=S1.getValue();c&&(s(c),Zo(c).dep(n))}return t};n.onNextChange=o=>(r.add(o),()=>{r.delete(o)});const s=n.attachCache=o=>(e.add(o),Zo(o).vars.add(n),n);return n.forgetCache=o=>e.delete(o),n}function hD(t){t.broadcastWatches&&t.broadcastWatches()}function ip(t){return t.args!==void 0?t.args:t.field?Qp(t.field,t.variables):null}const pD=()=>{},gE=(t,e)=>e.fieldName,yE=(t,e,{mergeObjects:r})=>r(t,e),vE=(t,e)=>e;class gD{config;typePolicies={};toBeAdded={};supertypeMap=new Map;fuzzySubtypes=new Map;cache;rootIdsByTypename={};rootTypenamesById={};usingPossibleTypes=!1;constructor(e){this.config=e,this.config={dataIdFromObject:g1,...e},this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}identify(e,r){const n=this,s=r&&(r.typename||r.storeObject?.__typename)||e.__typename;if(s===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];const o=r&&r.storeObject||e,c={...r,typename:s,storeObject:o,readField:r&&r.readField||((...p)=>{const g=og(p,o);return n.readField(g,{store:n.cache.data,variables:g.variables})})};let d;const m=s&&this.getTypePolicy(s);let h=m&&m.keyFn||this.config.dataIdFromObject;return E1.withValue(!0,()=>{for(;h;){const p=h({...e,...o},c);if(Et(p))h=mE(p);else{d=p;break}}}),d=d?String(d):void 0,c.keyObject?[d,c.keyObject]:[d]}addTypePolicies(e){Object.keys(e).forEach(r=>{const{queryType:n,mutationType:s,subscriptionType:o,...c}=e[r];n&&this.setRootTypename("Query",r),s&&this.setRootTypename("Mutation",r),o&&this.setRootTypename("Subscription",r),Ct.call(this.toBeAdded,r)?this.toBeAdded[r].push(c):this.toBeAdded[r]=[c]})}updateTypePolicy(e,r,n){const s=this.getTypePolicy(e),{keyFields:o,fields:c}=r;function d(m,h){m.merge=typeof h=="function"?h:h===!0?yE:h===!1?vE:m.merge}d(s,r.merge),s.keyFn=o===!1?pD:Et(o)?mE(o):typeof o=="function"?o:s.keyFn,c&&Object.keys(c).forEach(m=>{let h=n[m];(!h||h?.typename!==e)&&(h=n[m]={typename:e});const p=c[m];if(typeof p=="function")h.read=p;else{const{keyArgs:g,read:v,merge:E}=p;h.keyFn=g===!1?gE:Et(g)?fE(g):typeof g=="function"?g:h.keyFn,typeof v=="function"&&(h.read=v),d(h,E)}h.read&&h.merge&&(h.keyFn=h.keyFn||gE)})}setRootTypename(e,r=e){const n="ROOT_"+e.toUpperCase(),s=this.rootTypenamesById[n];r!==s&&(je(!s||s===e,100,e),s&&delete this.rootIdsByTypename[s],this.rootIdsByTypename[r]=n,this.rootTypenamesById[n]=r)}addPossibleTypes(e){this.usingPossibleTypes=!0,Object.keys(e).forEach(r=>{this.getSupertypeSet(r,!0),e[r].forEach(n=>{this.getSupertypeSet(n,!0).add(r);const s=n.match(y1);(!s||s[0]!==n)&&this.fuzzySubtypes.set(n,new RegExp(n))})})}getTypePolicy(e){if(!Ct.call(this.typePolicies,e)){const n=this.typePolicies[e]={};n.fields={};let s=this.supertypeMap.get(e);!s&&this.fuzzySubtypes.size&&(s=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach((o,c)=>{if(o.test(e)){const d=this.supertypeMap.get(c);d&&d.forEach(m=>s.add(m))}})),s&&s.size&&s.forEach(o=>{const{fields:c,...d}=this.getTypePolicy(o);Object.assign(n,d),Object.assign(n.fields,c)})}const r=this.toBeAdded[e];return r&&r.length&&r.splice(0).forEach(n=>{this.updateTypePolicy(e,n,this.typePolicies[e].fields)}),this.typePolicies[e]}getFieldPolicy(e,r){if(e)return this.getTypePolicy(e).fields[r]}getSupertypeSet(e,r){let n=this.supertypeMap.get(e);return!n&&r&&this.supertypeMap.set(e,n=new Set),n}fragmentMatches(e,r,n,s){if(!e.typeCondition)return!0;if(!r)return!1;const o=e.typeCondition.name.value;if(r===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o)){const c=this.getSupertypeSet(r,!0),d=[c],m=p=>{const g=this.getSupertypeSet(p,!1);g&&g.size&&d.indexOf(g)<0&&d.push(g)};let h=!!(n&&this.fuzzySubtypes.size);for(let p=0;p<d.length;++p){const g=d[p];if(g.has(o))return c.has(o)||c.add(o),!0;g.forEach(m),h&&p===d.length-1&&sp(e.selectionSet,n,s)&&(h=!1,this.fuzzySubtypes.forEac
966h((v,E)=>{const N=r.match(v);N&&N[0]===r&&m(E)}))}}return!1}hasKeyArgs(e,r){const n=this.getFieldPolicy(e,r);return!!(n&&n.keyFn)}getStoreFieldName(e){const{typename:r,fieldName:n}=e,s=this.getFieldPolicy(r,n);let o,c=s&&s.keyFn;if(c&&r){const d={typename:r,fieldName:n,field:e.field||null,variables:e.variables},m=ip(e);for(;c;){const h=c(m,d);if(Et(h))c=fE(h);else{o=h||n;break}}}return o===void 0&&(o=e.field?I6(e.field,e.variables):e1(n,ip(e))),o===!1?n:n===Si(o)?o:n+":"+o}readField(e,r){const n=e.from;if(!n||!(e.field||e.fieldName))return;if(e.typename===void 0){const p=r.store.getFieldValue(n,"__typename");p&&(e.typename=p)}const o=this.getStoreFieldName(e),c=Si(o),d=r.store.getFieldValue(n,o),m=this.getFieldPolicy(e.typename,c),h=m&&m.read;if(h){const p=bE(this,n,e,r,r.store.getStorage(Xe(n)?n.__ref:n,o));return S1.withValue(this.cache,h,[d,p])}return d}getReadFunction(e,r){const n=this.getFieldPolicy(e,r);return n&&n.read}getMergeFunction(e,r,n){let s=this.getFieldPolicy(e,r),o=s&&s.merge;return!o&&n&&(s=this.getTypePolicy(n),o=s&&s.merge),o}runMergeFunction(e,r,{field:n,typename:s,merge:o},c,d){return o===yE?_1(c.store)(e,r):o===vE?r:(c.overwrite&&(e=void 0),o(e,r,bE(this,void 0,{typename:s,fieldName:n.name.value,field:n,variables:c.variables},c,d||{})))}}function bE(t,e,r,n,s){const o=t.getStoreFieldName(r),c=Si(o),d=r.variables||n.variables,{toReference:m,canRead:h}=n.store;return{args:ip(r),field:r.field||null,fieldName:c,storeFieldName:o,variables:d,isReference:Xe,toReference:m,storage:s,cache:t.cache,canRead:h,readField(...p){return t.readField(og(p,e,d),n)},mergeObjects:_1(n.store)}}function og(t,e,r){const{0:n,1:s,length:o}=t;let c;return typeof n=="string"?c={fieldName:n,from:o>1?s:e}:(c={...n},Ct.call(c,"from")||(c.from=e)),c.variables===void 0&&(c.variables=r),c}function _1(t){return function(r,n){if(Et(r)||Et(n))throw br(103);if(Xt(r)&&Xt(n)){const s=t.getFieldValue(r,"__typename"),o=t.getFieldValue(n,"__typename");if(s&&o&&s!==o)return n;if(Xe(r)&&ii(n))return t.merge(r.__ref,n),r;if(ii(r)&&Xe(n))return t.merge(r,n.__ref),n;if(ii(r)&&ii(n))return{...r,...n}}return n}}function EE(t){return[t.selectionSet,t.objectOrReference,t.context]}class yD{executeSelectionSet;executeSubSelectedArray;config;knownResults=new WeakMap;constructor(e){this.config=e,this.executeSelectionSet=dl(r=>{const n=EE(r),s=this.executeSelectionSet.peek(...n);return s||(uE(r.context.store,r.enclosingRef.__ref),this.execSelectionSetImpl(r))},{max:bn["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:EE,makeCacheKey(r,n,s){if(Qo(s.store))return s.store.makeCacheKey(r,Xe(n)?n.__ref:n,s.varString)}}),this.executeSubSelectedArray=dl(r=>(uE(r.context.store,r.enclosingRef.__ref),this.execSubSelectedArrayImpl(r)),{max:bn["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey({field:r,array:n,context:s}){if(Qo(s.store))return s.store.makeCacheKey(r,n,s.varString)}})}diffQueryAgainstStore({store:e,query:r,rootId:n="ROOT_QUERY",variables:s,returnPartialData:o=!0}){const c=this.config.cache.policies;s={...Xp(g6(r)),...s};const d=hi(n),m=this.executeSelectionSet({selectionSet:Xk(r).selectionSet,objectOrReference:d,enclosingRef:d,context:{store:e,query:r,policies:c,variables:s,varString:ua(s),...v1(r,this.config.fragments)}});let h;m.missing&&(h=new ag(vD(m.missing),m.missing,r,s));const p=!h,{result:g}=m;return{result:p||o?Object.keys(g).length===0?null:g:null,complete:p,missing:h}}isFresh(e,r,n,s){if(Qo(s.store)&&this.knownResults.get(e)===n){const o=this.executeSelectionSet.peek(n,r,s);if(o&&e===o.result)return!0}return!1}execSelectionSetImpl({selectionSet:e,objectOrReference:r,enclosingRef:n,context:s}){if(Xe(r)&&!s.policies.rootTypenamesById[r.__ref]&&!s.store.has(r.__ref))return{result:{},missing:`Dangling reference to missing ${r.__ref} object`};const{variables:o,policies:c,store:d}=s,m=d.getFieldValue(r,"__typename"),h=[];let p;const g=new ki;typeof m=="string"&&!c.rootIdsByTypename[m]&&h.push({__typename:m});function v(C,_){return C.missing&&(p=g.merge(p,{[_]:C.missing})),C.result}const E=new Set(e.selections);E.forEach(C=>{if(td(C,o))if(bl(C)){let _=c.readField({fieldName:C.name.value,field:C,variables:s.variables,from:r},s);const T=Mi(C);_===void 0?h1.added(C)||(p=g.merge(p,{[T]:`Can't find field '${C.name.value}' on ${Xe(r)?r.__ref+" object":"object "+JSON.stringify(r,null,2)}`})):Et(_)?_.length>0&&(_=v(this.executeSubSelectedArray({field:C,array:_,enclosingRef:n,context:s}),T)):C.selectionSet&&_!=null&&(_=v(this.executeSelectionSet({selectionSet:C.selectionSet,objectOrReference:_,enclosingRef:Xe(_)?_:n,context:s}),T)),_!==void 0&&h.push({[T]:_})}else{const _=ed(C,s.lookupFragment);if(!_&&C.kind===X.FRAGMENT_SPREAD)throw br(104,C.name.value);_&&c.fragmentMatches(_,m)&&_.selectionSet.selections.forEach(E.add,E)}});const k={result:w6(h),missing:p},w=k;return w.result&&this.knownResults.set(w.result,e),w}execSubSelectedArrayImpl({field:e,array:r,enclosingRef:n,context:s}){let o,c=new ki;function d(m,h){return m.missing&&(o=c.merge(o,{[h]:m.missing})),m.result}return e.selectionSet&&(r=r.filter(s.store.canRead)),r=r.map((m,h)=>m===null?null:Et(m)?d(this.executeSubSelectedArray({field:e,array:m,enclosingRef:n,context:s}),h):e.selectionSet?d(this.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:m,enclosingRef:Xe(m)?m:n,context:s}),h):m),{result:r,missing:o}}}function vD(t){try{JSON.stringify(t,(e,r)=>{if(typeof r=="string")throw r;return r})}catch(e){return e}}function eh(t,e,r){const n=`${e}${r}`;let s=t.flavors.get(n);return s||t.flavors.set(n,s=t.clientOnly===e&&t.deferred===r?t:{...t,clientOnly:e,deferred:r}),s}class bD{cache;reader;fragments;constructor(e,r,n){this.cache=e,this.reader=r,this.fragments=n}writeToStore(e,{query:r,result:n,dataId:s,variables:o,overwrite:c}){const d=En(r),m=aD();o={...Xp(d),...o};const h={store:e,written:{}
966,merge(g,v){return m.merge(g,v)},variables:o,varString:ua(o),...v1(r,this.fragments),overwrite:!!c,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map},p=this.processSelectionSet({result:n||{},dataId:s,selectionSet:d.selectionSet,mergeTree:{map:new Map},context:h});if(!Xe(p))throw br(106,n);return h.incomingById.forEach(({storeObject:g,mergeTree:v,fieldNodeSet:E},N)=>{const k=hi(N);if(v&&v.map.size){const w=this.applyMerges(v,k,g,h);if(Xe(w))return;g=w}e.merge(N,g)}),e.retain(p.__ref),p}processSelectionSet({dataId:e,result:r,selectionSet:n,context:s,mergeTree:o}){const{policies:c}=this.cache;let d={};const m=e&&c.rootTypenamesById[e]||lp(r,n,s.fragmentMap)||e&&s.store.get(e,"__typename");typeof m=="string"&&(d.__typename=m);const h=(...g)=>{const v=og(g,d,s.variables);if(Xe(v.from)){const E=s.incomingById.get(v.from.__ref);if(E){const N=c.readField({...v,from:E.storeObject},s);if(N!==void 0)return N}}return c.readField(v,s)},p=new Set;this.flattenFields(n,r,s,m).forEach((g,v)=>{const E=Mi(v),N=r[E];if(p.add(v),N!==void 0){const k=c.getStoreFieldName({typename:m,fieldName:v.name.value,field:v,variables:g.variables}),w=xE(o,k);let C=this.processFieldValue(N,v,v.selectionSet?eh(g,!1,!1):g,w),_;v.selectionSet&&(Xe(C)||ii(C))&&(_=h("__typename",C));const T=c.getMergeFunction(m,v.name.value,_);T?w.info={field:v,typename:m,merge:T}:wE(o,k),d=g.merge(d,{[k]:C})}});try{const[g,v]=c.identify(r,{typename:m,selectionSet:n,fragmentMap:s.fragmentMap,storeObject:d,readField:h});e=e||g,v&&(d=s.merge(d,v))}catch(g){if(!e)throw g}if(typeof e=="string"){const g=hi(e),v=s.written[e]||(s.written[e]=[]);if(v.indexOf(n)>=0||(v.push(n),this.reader&&this.reader.isFresh(r,g,n,s)))return g;const E=s.incomingById.get(e);return E?(E.storeObject=s.merge(E.storeObject,d),E.mergeTree=op(E.mergeTree,o),p.forEach(N=>E.fieldNodeSet.add(N))):s.incomingById.set(e,{storeObject:d,mergeTree:Pu(o)?void 0:o,fieldNodeSet:p}),g}return d}processFieldValue(e,r,n,s){return!r.selectionSet||e===null?e:Et(e)?e.map((o,c)=>{const d=this.processFieldValue(o,r,n,xE(s,c));return wE(s,c),d}):this.processSelectionSet({result:e,selectionSet:r.selectionSet,context:n,mergeTree:s})}flattenFields(e,r,n,s=lp(r,e,n.fragmentMap)){const o=new Map,{policies:c}=this.cache,d=new Cn(!1);return function m(h,p){const g=d.lookup(h,p.clientOnly,p.deferred);g.visited||(g.visited=!0,h.selections.forEach(v=>{if(!td(v,n.variables))return;let{clientOnly:E,deferred:N}=p;if(!(E&&N)&&eg(v.directives)&&v.directives.forEach(k=>{const w=k.name.value;if(w==="client"&&(E=!0),w==="defer"){const C=Qp(k,n.variables);(!C||C.if!==!1)&&(N=!0)}}),bl(v)){const k=o.get(v);k&&(E=E&&k.clientOnly,N=N&&k.deferred),o.set(v,eh(n,E,N))}else{const k=ed(v,n.lookupFragment);if(!k&&v.kind===X.FRAGMENT_SPREAD)throw br(108,v.name.value);k&&c.fragmentMatches(k,s,r,n.variables)&&m(k.selectionSet,eh(n,E,N))}}))}(e,n),o}applyMerges(e,r,n,s,o){if(e.map.size&&!Xe(n)){const c=!Et(n)&&(Xe(r)||ii(r))?r:void 0,d=n;c&&!o&&(o=[Xe(c)?c.__ref:c]);let m;const h=(p,g)=>Et(p)?typeof g=="number"?p[g]:void 0:s.store.getFieldValue(p,String(g));e.map.forEach((p,g)=>{const v=h(c,g),E=h(d,g);if(E===void 0)return;o&&o.push(g);const N=this.applyMerges(p,v,E,s,o);N!==E&&(m=m||new Map,m.set(g,N)),o&&je(o.pop()===g)}),m&&(n=Et(d)?d.slice(0):{...d},m.forEach((p,g)=>{n[g]=p}))}return e.info?this.cache.policies.runMergeFunction(r,n,e.info,s,o&&s.store.getStorage(...o)):n}}const C1=[];function xE({map:t},e){return t.has(e)||t.set(e,C1.pop()||{map:new Map}),t.get(e)}function op(t,e){if(t===e||!e||Pu(e))return t;if(!t||Pu(t))return e;const r=t.info&&e.info?{...t.info,...e.info}:t.info||e.info,n=t.map.size&&e.map.size,s=n?new Map:t.map.size?t.map:e.map,o={info:r,map:s};if(n){const c=new Set(e.map.keys());t.map.forEach((d,m)=>{o.map.set(m,op(d,e.map.get(m))),c.delete(m)}),c.forEach(d=>{o.map.set(d,op(e.map.get(d),t.map.get(d)))})}return o}function Pu(t){return!t||!(t.info||t.map.size)}function wE({map:t},e){const r=t.get(e);r&&Pu(r)&&(C1.push(r),t.delete(e))}function lp(t,e,r){let n;for(const s of e.selections)if(bl(s)){if(s.name.value==="__typename")return t[Mi(s)]}else n?n.push(s):n=[s];if(typeof t.__typename=="string")return t.__typename;if(n)for(const s of n){const o=lp(t,ed(s,r).selectionSet,r);
966if(typeof o=="string")return o}}class ED extends tD{data;optimisticData;config;watches=new Set;storeReader;storeWriter;addTypenameTransform=new fn(h1);maybeBroadcastWatch;assumeImmutableResults=!0;policies;makeVar=fD;constructor(e={}){super(),this.config=nD(e),this.policies=new gD({cache:this,dataIdFromObject:this.config.dataIdFromObject,possibleTypes:this.config.possibleTypes,typePolicies:this.config.typePolicies}),this.init()}init(){const e=this.data=new sd.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()}resetResultCache(){const{fragments:e}=this.config;this.addTypenameTransform.resetCache(),e?.resetCaches(),this.storeWriter=new bD(this,this.storeReader=new yD({cache:this,fragments:e}),e),this.maybeBroadcastWatch=dl((r,n)=>this.broadcastWatch(r,n),{max:bn["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:r=>{const n=r.optimistic?this.optimisticData:this.data;if(Qo(n)){const{optimistic:s,id:o,variables:c}=r;return n.makeCacheKey(r.query,r.callback,ua({optimistic:s,id:o,variables:c}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(r=>r.resetCaching())}restore(e){return this.init(),e&&this.data.replace(e),this}extract(e=!1){return(e?this.optimisticData:this.data).extract()}read(e){const{returnPartialData:r=!1}=e;return this.storeReader.diffQueryAgainstStore({...e,store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r}).result}write(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{!--this.txCount&&e.broadcast!==!1&&this.broadcastWatches()}}modify(e){if(Ct.call(e,"id")&&!e.id)return!1;const r=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,r.modify(e.id||"ROOT_QUERY",e.fields,!1)}finally{!--this.txCount&&e.broadcast!==!1&&this.broadcastWatches()}}diff(e){return this.storeReader.diffQueryAgainstStore({...e,store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config})}watch(e){return this.watches.size||mD(this),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),()=>{this.watches.delete(e)&&!this.watches.size&&pE(this),this.maybeBroadcastWatch.forget(e)}}gc(e){ua.reset(),pi.reset();const r=this.optimisticData.gc();return e&&!this.txCount&&e.resetResultCache&&this.resetResultCache(),r}retain(e,r){return(r?this.optimisticData:this.data).retain(e)}release(e,r){return(r?this.optimisticData:this.data).release(e)}identify(e){if(Xe(e))return e.__ref;try{return this.policies.identify(e)[0]}catch{}}evict(e){if(!e.id){if(Ct.call(e,"id"))return!1;e={...e,id:"ROOT_QUERY"}}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{!--this.txCount&&e.broadcast!==!1&&this.broadcastWatches()}}reset(e){return this.init(),ua.reset(),e&&e.discardWatches?(this.watches.forEach(r=>this.maybeBroadcastWatch.forget(r)),this.watches.clear(),pE(this)):this.broadcastWatches(),Promise.resolve()}removeOptimistic(e){const r=this.optimisticData.removeLayer(e);r!==this.optimisticData&&(this.optimisticData=r,this.broadcastWatches())}txCount=0;batch(e){const{update:r,optimistic:n=!0,removeOptimistic:s,onWatchUpdated:o}=e;let c;const d=h=>{const{data:p,optimisticData:g}=this;++this.txCount,h&&(this.data=this.optimisticData=h);try{return c=r(this)}finally{--this.txCount,this.data=p,this.optimisticData=g}},m=new Set;return o&&!this.txCount&&this.broadcastWatches({...e,onWatchUpdated(h){return m.add(h),!1}}),typeof n=="string"?this.optimisticData=this.optimisticData.addLayer(n,d):n===!1?d(this.data):d(),typeof s=="string"&&(this.optimisticData=this.optimisticData.removeLayer(s)),o&&m.size?(this.broadcastWatches({...e,onWatchUpdated(h,p){const g=o.call(this,h,p);return g!==!1&&m.delete(h),g}}),m.size&&m.forEach(h=>this.maybeBroadcastWatch.dirty(h))):this.broadcastWatches(e),c}performTransaction(e,r){return this.batch({update:e,optimistic:r||r!==null})}transformDocument(e){return this.addTypenameTransform.transformDocument(this.addFragmentsToDocument(e))}fragmentMatches(e,r){return this.policies.fragmentMatches(e,r)}lookupFragment(e){return this.config.fragments?.lookup(e)||null}
966broadcastWatches(e){this.txCount||this.watches.forEach(r=>this.maybeBroadcastWatch(r,e))}addFragmentsToDocument(e){const{fragments:r}=this.config;return r?r.transform(e):e}broadcastWatch(e,r){const{lastDiff:n}=e,s=this.diff(e);r&&(e.optimistic&&typeof r.optimistic=="string"&&(s.fromOptimisticTransaction=!0),r.onWatchUpdated&&r.onWatchUpdated.call(this,e,s,n)===!1)||(!n||!ht(n.result,s.result))&&e.callback(e.lastDiff=s,n)}}function El(t,e){return typeof t=="object"&&t!==null&&t[Symbol.for("apollo.error")]===e}function xl(t){Object.defineProperty(t,Symbol.for("apollo.error"),{value:t.name,enumerable:!1,writable:!1,configurable:!1})}function kE(t){return t.map(e=>e.message||"Error message not found.").join(` 967`)}class ml extends Error{static is(e){return El(e,"CombinedProtocolErrors")}static formatMessage=kE;errors;constructor(e){super(ml.formatMessage(e,{defaultFormatMessage:kE})),this.name="CombinedProtocolErrors",this.errors=e,xl(this),Object.setPrototypeOf(this,ml.prototype)}}function xD(t){return t!==null&&typeof t=="object"&&typeof t.message=="string"&&typeof t.name=="string"&&(typeof t.stack=="string"||typeof t.stack>"u")}class lg extends Error{static is(e){return El(e,"UnconventionalError")}constructor(e){super("An error of unexpected shape occurred.",{cause:e}
967),this.name="UnconventionalError",xl(this),Object.setPrototypeOf(this,lg.prototype)}}function NE(t){return t.filter(e=>e).map(e=>e.message||"Error message not found.").join(` 968`)}class na extends Error{static is(e){return El(e,"CombinedGraphQLErrors")}static formatMessage=NE;errors;data;extensions;constructor(e,r=e.errors||[]){super(na.formatMessage(r,{result:e,defaultFormatMessage:NE})),this.errors=r,this.data=e.data,this.extensions=e.extensions,this.name="CombinedGraphQLErrors",xl(this),Object.setPrototypeOf(this,na.prototype)}}const wD=new WeakSet;function kD(t){wD.add(t)}class id extends Error{static is(e){return El(e,"ServerError")}response;statusCode;bodyText;constructor(e,r){super(e),this.name="ServerError",this.response=r.response,this.statusCode=r.response.status,this.bodyText=r.bodyText,xl(this),Object.setPrototypeOf(this,id.prototype)}}class od extends Error{static is(e){return El(e,"ServerParseError")}response;statusCode;bodyText;constructor(e,r){super(e instanceof Error?e.message:"Could not parse server response",{cause:e}),this.name="ServerParseError",this.response=r.response,this.statusCode=r.response.status,this.bodyText=r.bodyText,xl(this),Ob
968ject.setPrototypeOf(this,od.prototype)}}const Ou=Symbol();function ND(t){return"extensions"in t?ml.is(t.extensions[Ou]):!1}function SD(t){return xD(t)?t:typeof t=="string"?new Error(t,{cause:t}):new lg(t)}var Ae;(function(t){t[t.loading=1]="loading",t[t.setVariables=2]="setVariables",t[t.fetchMore=3]="fetchMore",t[t.refetch=4]="refetch",t[t.poll=6]="poll",t[t.ready=7]="ready",t[t.error=8]="error",t[t.streaming=9]="streaming"})(Ae||(Ae={}));const{assign:SE}=Object,Qs={loading:!0,networkStatus:Ae.loading,data:void 0,dataState:"empty",partial:!0},th={loading:!1,networkStatus:Ae.ready,data:void 0,dataState:"empty",partial:!0};class rh{options;queryName;variablesUnknown=!1;_lastWrite;get query(){return this.lastQuery}get variables(){return this.options.variables}unsubscribeFromCache;input;subject;isTornDown;queryManager;subscriptions=new Set;waitForNetworkResult;lastQuery;linkSubscription;pollingInfo;get networkStatus(){return this.subject.getValue().result.networkStatus}constructor({queryManager:e,options:r,transformedQuery:n=e.transform(r.query)}){this.queryManager=e,this.waitForNetworkResult=r.fetchPolicy==="network-only",this.isTornDown=!1,this.subscribeToMore=this.subscribeToMore.bind(this),this.maskResult=this.maskResult.bind(this);const{watchQuery:{fetchPolicy:s="cache-first"}={}}=e.defaultOptions,{fetchPolicy:o=s,initialFetchPolicy:c=o==="standby"?s:o}=r;r[L6]&&(je(o==="standby",77),this.variablesUnknown=!0),this.lastQuery=n,this.options={...r,initialFetchPolicy:c,fetchPolicy:o,variables:this.getVariablesWithDefaults(r.variables)},this.initializeObservablesQueue(),this["@@observable"]=()=>this,Symbol.observable&&(this[Symbol.observable]=()=>this);const d=En(this.query);this.queryName=d&&d.name&&d.name.value}initializeObservablesQueue(){this.subject=new N5({query:this.query,variables:this.variables,result:Qs,meta:{}});const e=this.subject.pipe(Au({subscribe:()=>{this.subject.observed||(this.reobserve(),setTimeout(()=>this.updatePolling()))},unsubscribe:()=>{this.subject.observed||this.tearDownQuery()}}),ep(({query:r,variables:n,result:s,meta:o},c)=>{const{shouldEmit:d}=o;if(s===Qs&&(c.previous=void 0,c.previousVariables=void 0),this.options.fetchPolicy==="standby"||d===2)return;if(d===1)return p();const{previous:m,previousVariables:h}=c;if(m){const g=this.queryManager.getDocumentInfo(r),v=this.queryManager.dataMasking,E=v?g.nonReactiveQuery:r;if((v||g.hasNonreactiveDirective?r1(E,m,s,n):ht(m,s))&&ht(h,n))return}if(d===3&&(!this.options.notifyOnNetworkStatusChange||ht(m,s)))return;return p();function p(){return c.previous=s,c.previousVariables=n,s}},()=>({})));this.pipe=e.pipe.bind(e),this.subscribe=e.subscribe.bind(e),this.input=new Di,this.input.complete=()=>{},this.input.pipe(this.operator).subscribe(this.subject)}subscribe;pipe;[Symbol.observable];"@@observable";getCacheDiff({optimistic:e=!0}={}){return this.queryManager.cache.diff({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:e})}getInitialResult(e){const r=this.queryManager.prioritizeCacheValues?"cache-first":e||this.options.fetchPolicy,n=()=>{const s=this.getCacheDiff(),o=this.options.returnPartialData||s.complete?s.result??void 0:void 0;return this.maskResult({data:o,dataState:s.complete?"complete":o===void 0?"empty":"partial",loading:!s.complete,networkStatus:s.complete?Ae.ready:Ae.loading,partial:!s.complete})};switch(r){case"cache-only":return{...n(),loading:!1,networkStatus:Ae.ready};case"cache-first":return n();case"cache-and-network":return{...n(),loading:!0,networkStatus:Ae.loading};case"standby":return th;default:return Qs}}resubscribeCache(){const{variables:e,fetchPolicy:r}=this.options,n=this.query,s=r==="standby"||r==="no-cache"||this.waitForNetworkResult,o=!Fo({query:n,variables:e},this.unsubscribeFromCache)&&!this.waitForNetworkResult;if((s||o)&&this.unsubscribeFromCache?.(),s||!o)return;const c={query:n,variables:e,optimistic:!0,watcher:this,callback:m=>{const h=this.queryManager.getDocumentInfo(n);if((h.hasClientExports||h.hasForcedResolvers)&&(c.lastDiff=void 0),c.lastOwnDiff===m)return;const{result:p}=this.subject.getValue();!m.complete&&(p.error||p===Qs||p===th)||ht(p.data,m.result)||this.scheduleNotify()}},d=this.queryManager.cache.watch(c);this.unsubscribeFromCache=Object.assign(()=>{this.unsubscribeFromCache=void 0,d()},{query:n,variables:e})}stableLastResult;getCurrentResult(){const{result:e}=this.subject.getValue();let r=e.networkStatus===Ae.error||this.hasObservers()||this.options.fetchPolicy==="no-cache"?e:this.getInitialResult();return r===Qs&&(r=this.getInitialResult()),ht(this.stableLastResult,r)||(this.stableLastResult=r),this.stableLastResult}refetch(e){const{fetchPolicy:r}=this.options,n={pollInterval:0};return r==="no-cache"?n.fetchPolicy="no-cache":n.fetchPolicy="network-only",e&&!ht(this.variables,e)&&(n.variables=this.options.variables=this.getVariablesWithDefaults({...this.variables,...e})),this._lastWrite=void 0,this._reobserve(n,{newNetworkStatus:Ae.refetch})}fetchMore({query:e,variables:r,context:n,errorPolicy:s,updateQuery:o}){je(this.options.fetchPolicy!=="cache-only",79,wi(this.query,"(anonymous)"));const c={...yr(this.options,{errorPolicy:"none"},{query:e,context:n,errorPolicy:s}),variables:e?r:{...this.variables,...r},fetchPolicy:"no-cache",notifyOnNetworkStatusChange:this.options.notifyOnNetworkStatusChange};c.query=this.transformDocument(c.query),this.lastQuery=e?this.transformDocument(this.options.query):c.query;let d=!1;const m=this.options.fetchPolicy!=="no-cache";m||je(o,80);const{finalize:h,pushNotification:p}=this.pushOperation(Ae.fetchMore);return p({source:"newNetworkStatus",kind:"N",value:{}},{shouldEmit:3}),this.queryManager.fetchQuery(c,Ae.fetchMore).then(g=>{if(h(),m){const v=this.getCacheDiff();this.queryManager.cache.batch({update:E=>{o?E.updateQuery({query:this.query,variables:this.variables,returnPartialData:!0,optimistic:!1},N=>o(N,{fetchMoreResult:g.data,variables:c.variables})):E.writeQuery({query:c.query,variables:c.variables,data:g.data})},onWatchUpdated:(E,N)=>{E.watcher===this&&!ht(N.result,v.result)&&(d=!0)}})}else{const v=this.getCurrentResult(),E=o(v.data,{fetchMoreResult:g.data,variables:c.variables});p({kind:"N",value:{...v,networkStatus:Ae.ready,loading:!1,data:E,dataState:v.dataState==="streaming"?"streaming":"complete"},source:"network"})}return this.maskResult(g)}).finally(()=>{h(),m&&!d&&p({kind:"N",source:"newNetworkStatus",value:{}},{shouldEmit:1})})}subscribeToMore(e){const r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:n=>{const{updateQuery:s,onError:o}=e,{error:c}=n;if(c){o?o(c):je.error(81,c);return}s&&this.updateQuery((d,m)=>s(d,{subscriptionData:n,...m}))}});return this.subscriptions.add(r),()=>{this.subscriptions.delete(r)&&r.unsubscribe()}}applyOptions(e){const r=yr(this.options,e||{});SE(this.options,r),this.updatePolling()}async setVariables(e){return e=this.getVariablesWithDefaults(e),ht(this.variables,e)?du(this.getCurrentResult()):(this.options.variables=e,this.hasObservers()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},{newNetworkStatus:Ae.setVariables}):du(this.getCurrentResult()))}updateQuery(e){const{queryManager:r}=this,{result:n,complete:s}=this.getCacheDiff({optimistic:!1}),o=e(n,{variables:this.variables,complete:!!s,previousData:n});o&&(r.cache.writeQuery({query:this.options.query,data:o,variables:this.variables}),r.broadcastQueries())}startPolling(e){this.options.pollInterval=e,this.updatePolling()}stopPolling(){this.options.pollInterval=0,this.updatePolling()}applyNextFetchPolicy(e,r){if(r.nextFetchPolicy){const{fetchPolicy:n="cache-first",initialFetchPolicy:s=n}=r;n==="standby"||(typeof r.nextFetchPolicy=="function"?r.fetchPolicy=r.nextFetchPolicy.call(r,n,{reason:e,options:r,observable:this,initialFetchPolicy:s}):e==="variables-changed"?r.fetchPolicy=s:r.fetchPolicy=r.nextFetchPolicy)}return r.fetchPolicy}fetch(e,r,n,s){const o=this.options.fetchPolicy;e.context??={};let c=!1;const d=()=>{c=!0},m=w=>new xt(C=>{try{return w.subscribe({next(_){c=!0,C.next(_)},error:_=>C.error(_),complete:()=>C.complete()})}finally{c||(E.override=r,this.input.next({kind:"N",source:"newNetworkStatus",value:{resetError:!0},query:g,variables:v,meta:{shouldEmit:3,fetchPolicy:o}}))}});let{observable:h,fromLink:p}=this.queryManager.fetchObservableWithInfo(e,{networkStatus:r,query:n,onCacheHit:d,fetchQueryOperator:m,observableQuery:this});const{query:g,variables:v}=this,E={abort:()=>{k.unsubscribe()},query:g,variables:v};this.activeOperations.add(E);let N=r==Ae.refetch||r==Ae.setVariables;h=h.pipe(s,Tu());const k=h.pipe(Au({next:w=>{w.source==="newNetworkStatus"||w.kind==="N"&&w.value.loading?E.override=r:delete E.override},finalize:()=>this.activeOperations.delete(E)})).subscribe({next:w=>{const C={};N&&w.kind==="N"&&"loading"in w.value&&!w.value.loading&&(N=!1,C.shouldEmit=1),this.input.next({...w,query:g,variables:v,meta:C})}});return{fromLink:p,subscription:k,observable:h}}didWarnCacheOnlyPolling=!1;updatePolling(){if(this.queryManager.ssrMode)return;const{pollingInfo:e,options:{fetchPolicy:r,pollInterval:n}}=this;if(!n||!this.hasObservers()||r==="cache-only"){this.cancelPolling();return}if(e?.interval===n)return;const s=e||(this.pollingInfo={});s.interval=n;const o=()=>{this.pollingInfo&&(!ap(this.networkStatus)&&!this.options.skipPollAttempt?.()?this._reobserve({fetchPolicy:this.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},{newNetworkStatus:Ae.poll}).then(c,c):c())},c=()=>{const d=this.pollingInfo;d&&(clearTimeout(d.timeout),d.timeout=setTimeout(o,d.interval))};c()}cancelPolling(){this.pollingInfo&&(clearTimeout(this.pollingInfo.timeout),delete this.pollingInfo)}reobserve(e){return this._reobserve(e)}_reobserve(e,r){this.isTornDown=!1;let{newNetworkStatus:n}=r||{};this.queryManager.obsQueries.add(this);const s=n===Ae.refetch||n===Ae.poll,o=this.variables,c=this.options.fetchPolicy,d=yr(this.options,e||{});this.variablesUnknown&&=d.fetchPolicy==="standby";const m=s?d:SE(this.options,d),h=this.transformDocument(m.query);this.lastQuery=h,e&&"variables"in e&&(m.variables=this.getVariablesWithDefaults(e.variables)),s||(this.updatePolling(),e&&e.variables&&!ht(e.variables,o)&&m.fetchPolicy!=="standby"&&(m.fetchPolicy===c||typeof m.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",m),n===void 0&&(n=Ae.setVariables)));const p=this.networkStatus;n||(n=Ae.loading,p!==Ae.loading&&e?.variables&&!ht(e.variables,o)&&(n=Ae.setVariables),m.fetchPolicy==="standby"&&(n=Ae.ready)),m.fetchPolicy==="standby"&&this.cancelPolling(),this.resubscribeCache();const{promise:g,operator:v}=_D(C=>{switch(C.kind){case"E":throw C.error;case"N":if(C.source!=="newNetworkStatus"&&!C.value.loading)return C.value}},m.fetchPolicy==="standby"?{data:void 0}:void 0),{subscription:E,observable:N,fromLink:k}=this.fetch(m,n,h,v);!s&&(k||!this.linkSubscription)&&(this.linkSubscription&&this.linkSubscription.unsubscribe(),this.linkSubscription=E);const w=Object.assign(k6(g.then(C=>du(this.maskResult(C))).finally(()=>{!this.hasObservers()&&this.activeOperations.size===0&&this.tearDownQuery()})),{retain:()=>{const C=N.subscribe({}),_=()=>C.unsubscribe();return g.then(_,_),w}});return w}hasObservers(){return this.subject.observed}stop(){this.subject.complete(),this.initializeObservablesQueue(),this.tearDownQuery()}tearDownQuery(){this.isTornDown||(this.resetNotifications(),this.unsubscribeFromCache?.(),this.linkSubscription&&(this.linkSubscription.unsubscribe(),delete this.linkSubscription),this.stopPolling(),this.subscriptions.forEach(e
968=>e.unsubscribe()),this.subscriptions.clear(),this.queryManager.obsQueries.delete(this),this.isTornDown=!0,this.abortActiveOperations(),this._lastWrite=void 0)}transformDocument(e){return this.queryManager.transform(e)}maskResult(e){const r=this.queryManager.maskOperation({document:this.query,data:e.data,fetchPolicy:this.options.fetchPolicy,cause:this});return r===e.data?e:{...e,data:r}}dirty=!1;notifyTimeout;resetNotifications(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0),this.dirty=!1}scheduleNotify(){this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(()=>this.notify(!0),0)))}notify(e=!1){if(!e){const n=this.queryManager.getDocumentInfo(this.query);if(n.hasClientExports||n.hasForcedResolvers)return}const{dirty:r}=this;if(this.resetNotifications(),r&&(this.options.fetchPolicy=="cache-only"||this.options.fetchPolicy=="cache-and-network"||!this.activeOperations.size)){const n=this.getCacheDiff();ht(n.result,this.getCacheDiff({optimistic:!1}).result)?this.reobserveCacheFirst():this.input.next({kind:"N",value:{data:n.result,dataState:n.complete?"complete":n.result?"partial":"empty",networkStatus:Ae.ready,loading:!1,error:void 0,partial:!n.complete},source:"cache",query:this.query,variables:this.variables,meta:{}})}}activeOperations=new Set;pushOperation(e){let r=!1;const{query:n,variables:s}=this,o=()=>{this.activeOperations.delete(c)},c={override:e,abort:()=>{r=!0,o()},query:n,variables:s};return this.activeOperations.add(c),{finalize:o,pushNotification:(d,m)=>{r||this.input.next({...d,query:n,variables:s,meta:{...m}})}}}calculateNetworkStatus(e){return e===Ae.streaming?e:Array.from(this.activeOperations.values()).reverse().find(n=>Fo(n,this)&&n.override!==void 0)?.override??e}abortActiveOperations(){this.activeOperations.forEach(e=>e.abort())}reset(){const e=this.options.fetchPolicy==="cache-only";this.setResult(e?th:Qs,{shouldEmit:e?1:2}),this.abortActiveOperations()}setResult(e,r){this.input.next({source:"setResult",kind:"N",value:e,query:this.query,variables:this.variables,meta:{...r}})}operator=ep(e=>{const{query:r,variables:n,meta:s}=e;if(e.source==="setResult")return{query:r,variables:n,result:e.value,meta:s};if(e.kind==="C"||!Fo(e,this))return;let o;const c=this.subject.getValue();if(e.source==="cache"){if(o=e.value,o.networkStatus===Ae.ready&&o.partial&&(!this.options.returnPartialData||c.result.networkStatus===Ae.error)&&this.options.fetchPolicy!=="cache-only")return}else if(e.source==="network")this.waitForNetworkResult&&(this.waitForNetworkResult=!1,this.resubscribeCache()),o=e.kind==="E"?{...Fo(c,e)?c.result:{data:void 0,dataState:"empty",partial:!0},error:e.error,networkStatus:Ae.error,loading:!1}:e.value,e.kind==="E"&&o.dataState==="streaming"&&(o.dataState="complete"),o.error&&(s.shouldEmit=1);else if(e.source==="newNetworkStatus"){const d=Fo(c,e)?c.result:this.getInitialResult(s.fetchPolicy),{resetError:m}=e.value,h=m?void 0:d.error,p=h?Ae.error:Ae.ready;o={...d,error:h,networkStatus:p}}return je(o),o.error||delete o.error,o.networkStatus=this.calculateNetworkStatus(o.networkStatus),o.loading=ap(o.networkStatus),o=this.maskResult(o),{query:r,variables:n,result:o,meta:s}});reobserveCacheFirst(){const{fetchPolicy:e,nextFetchPolicy:r}=this.options;e==="cache-and-network"||e==="network-only"?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy(n,s){return this.nextFetchPolicy=r,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(n,s):e}}):this.reobserve()}getVariablesWithDefaults(e){return this.queryManager.getVariables(this.query,e)}}function Fo(t,e){return!!(t&&e&&t.query===e.query&&ht(t.variables,e.variables))}function _D(t,e){let r=e,n,s;const o=new Promise((d,m)=>{n=d,s=m}),c=Au({next(d){try{const m=t(d);m!==void 0&&(r=m)}catch(m){s(m)}},finalize:()=>{if(r)n(r);else{const d="The operation was aborted.",m="AbortError";s(typeof DOMException<"u"?new DOMException(d,m):Object.assign(new Error(d),{name:m}))}}});return{promise:o,operator:c}}const _E={},oi=new WeakMap;function nh(t,e){const r=t[e];typeof r=="function"&&(t[e]=function(){return oi.set(t,(oi.get(t)+1)%1e15),r.apply(this,arguments)})}const CE=new WeakMap;class ah{lastRequestId=1;cache;queryManager;id;observableQuery;incremental;constructor(e,r){const n=this.cache=e.cache,s=(CE.get(e)||0)+1;CE.set(e,s),this.id=s+"",this.observableQuery=r,this.queryManager=e,oi.has(n)||(oi.set(n,0),nh(n,"evict"),nh(n,"modify"),nh(n,"reset"))}_lastWrite;get lastWrite(){return(this.observableQuery||this)._lastWrite}set lastWrite(e){(this.observableQuery||this)._lastWrite=e}resetLastWrite(){this.lastWrite=void 0}shouldWrite(e,r){const{lastWrite:n}=this;return!(n&&n.dmCount===oi.get(this.cache)&&ht(r,n.variables)&&ht(e.data,n.result.data))}get hasNext(){return this.incremental?this.incremental.hasNext:!1}maybeHandleIncrementalResult(e,r,n){const{incrementalHandler:s}
968=this.queryManager;return s.isIncrementalResult(r)?(this.incremental||=s.startRequest({query:n}),this.incremental.handle(e,r)):r}markQueryResult(e,{document:r,variables:n,errorPolicy:s,cacheWriteBehavior:o}){const c={query:r,variables:n,returnPartialData:!0,optimistic:!0};this.observableQuery?.resetNotifications();const d=o===0,m=d?void 0:this.cache.diff(c);let h=this.maybeHandleIncrementalResult(m?.result,e,r);return d||(sh(h,s)?this.cache.batch({onWatchUpdated:(p,g)=>{p.watcher===this.observableQuery&&(p.lastOwnDiff=g)},update:p=>{if(this.shouldWrite(h,n))p.writeQuery({query:r,data:h.data,variables:n,overwrite:o===1}),this.lastWrite={result:h,variables:n,dmCount:oi.get(this.cache)};else if(m&&m.complete){h={...h,data:m.result};return}const g=p.diff(c);g.complete&&(h={...h,data:g.result})}}):this.lastWrite=void 0),h}markMutationResult(e,r,n=this.cache){const s=[],o=r.cacheWriteBehavior===0;let c=this.maybeHandleIncrementalResult(o?void 0:n.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(r.document).asQuery,variables:r.variables,optimistic:!1,returnPartialData:!0}).result,e,r.document);if(r.errorPolicy==="ignore"&&(c={...c,errors:[]}),si(c)&&r.errorPolicy==="none")return Promise.resolve(c);const d=()=>({...c,dataState:this.hasNext?"streaming":"complete"});if(!o&&sh(c,r.errorPolicy)){s.push({result:c.data,dataId:"ROOT_MUTATION",query:r.document,variables:r.variables});const{updateQueries:h}=r;h&&this.queryManager.getObservableQueries("all").forEach(p=>{const g=p&&p.queryName;if(!g||!Object.hasOwnProperty.call(h,g))return;const v=h[g],{query:E,variables:N}=p,{result:k,complete:w}=p.getCacheDiff({optimistic:!1});if(w&&k){const C=v(k,{mutationResult:d(),queryName:E&&wi(E)||void 0,queryVariables:N});C&&s.push({result:C,dataId:"ROOT_QUERY",query:E,variables:N})}})}let m=r.refetchQueries;if(typeof m=="function"&&(m=m(d())),s.length>0||(m||"").length>0||r.update||r.onQueryUpdated||r.removeOptimistic){const h=[];if(this.queryManager.refetchQueries({updateCache:p=>{o||s.forEach(v=>p.write(v));const{update:g}=r;if(g){if(!o){const v=p.diff({id:"ROOT_MUTATION",query:this.queryManager.getDocumentInfo(r.document).asQuery,variables:r.variables,optimistic:!1,returnPartialData:!0});v.complete&&(c={...c,data:v.result})}this.hasNext||g(p,c,{context:r.context,variables:r.variables})}!o&&!r.keepRootFields&&!this.hasNext&&p.modify({id:"ROOT_MUTATION",fields(v,{fieldName:E,DELETE:N}){return E==="__typename"?v:N}})},include:m,optimistic:!1,removeOptimistic:r.removeOptimistic,onQueryUpdated:r.onQueryUpdated||null}).forEach(p=>h.push(p)),r.awaitRefetchQueries||r.onQueryUpdated)return Promise.all(h).then(()=>c)}return Promise.resolve(c)}markMutationOptimistic(e,r){const n=typeof e=="function"?e(r.variables,{IGNORE:_E}):e;return n===_E?!1:(this.cache.recordOptimisticTransaction(s=>{try{this.markMutationResult({data:n},r,s)}catch(o){je.error(o)}},this.id),!0)}markSubscriptionResult(e,{document:r,variables:n,errorPolicy:s,cacheWriteBehavior:o}){o!==0&&(sh(e,s)&&this.cache.write({query:r,result:e.data,dataId:"ROOT_SUBSCRIPTION",variables:n}),this.queryManager.broadcastQueries())}}function sh(t,e="none"){const r=e==="ignore"||e==="all";let n=!si(t);return!n&&r&&t.data&&(n=!0),n}class CD{defaultOptions;client;clientOptions;assumeImmutableResults;documentTransform;ssrMode;defaultContext;dataMasking;incrementalHandler;localState;queryDeduplication;prioritizeCacheValues=!1;onBroadcast;mutationStore;obsQueries=new Set;fetchCancelFns=new Map;constructor(e){const r=new fn(s=>this.cache.transformDocument(s),{cache:!1});this.client=e.client,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientOptions=e.clientOptions,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking,this.localState=e.localState,this.incrementalHandler=e.incrementalHandler;const n=e.documentTransform;this.documentTransform=n?r.concat(n).concat(r):r,this.defaultContext=e.defaultContext||{},(this.onBroadcast=e.onBroadcast)&&(this.mutationStore={})}get link(){return this.client.link}get cache(){return this.client.cache}
968stop(){this.obsQueries.forEach(e=>e.stop()),this.cancelPendingFetches(br(84))}cancelPendingFetches(e){this.fetchCancelFns.forEach(r=>r(e)),this.fetchCancelFns.clear()}async mutate({mutation:e,variables:r,optimisticResponse:n,updateQueries:s,refetchQueries:o=[],awaitRefetchQueries:c=!1,update:d,onQueryUpdated:m,fetchPolicy:h,errorPolicy:p,keepRootFields:g,context:v}){const E=new ah(this);e=this.cache.transformForLink(this.transform(e));const{hasClientExports:N}=this.getDocumentInfo(e);r=this.getVariables(e,r),N&&(r=await this.localState.getExportedVariables({client:this.client,document:e,variables:r,context:v}));const k=this.mutationStore&&(this.mutationStore[E.id]={mutation:e,variables:r,loading:!0,error:null}),w=n&&E.markMutationOptimistic(n,{document:e,variables:r,cacheWriteBehavior:h==="no-cache"?0:2,errorPolicy:p,context:v,updateQueries:s,update:d,keepRootFields:g});return this.broadcastQueries(),new Promise((C,_)=>{const T={};return this.getObservableFromLink(e,{...v,optimisticResponse:w?n:void 0},r,{},!1).observable.pipe(TE(),ai(A=>{const I={...A};return qa(E.markMutationResult(I,{document:e,variables:r,cacheWriteBehavior:h==="no-cache"?0:2,errorPolicy:p,context:v,update:d,updateQueries:s,awaitRefetchQueries:c,refetchQueries:o,removeOptimistic:w?E.id:void 0,onQueryUpdated:m,keepRootFields:g}))})).pipe(Ga(A=>{if(si(A)&&p==="none")throw new na(A);return k&&(k.loading=!1,k.error=null),A})).subscribe({next:A=>{if(this.broadcastQueries(),!E.hasNext){const I={data:this.maskOperation({document:e,data:A.data,fetchPolicy:h,cause:T})};si(A)&&(I.error=new na(A)),Object.keys(A.extensions||{}).length&&(I.extensions=A.extensions),C(I)}},error:A=>{if(k&&(k.loading=!1,k.error=A),w&&this.cache.removeOptimistic(E.id),this.broadcastQueries(),p==="ignore")return C({data:void 0});if(p==="all")return C({data:void 0,error:A});_(A)}})})}fetchQuery(e,r){return ca(e.query,Or.QUERY),(async()=>W5(this.fetchObservableWithInfo(e,{networkStatus:r}).observable.pipe(ep(n=>{switch(n.kind){case"E":throw n.error;case"N":if(n.source!=="newNetworkStatus")return du(n.value)}})),{defaultValue:{data:void 0}}))()}transform(e){return this.documentTransform.transformDocument(e)}transformCache=new Zp(bn["queryManager.getDocumentInfo"]||2e3);getDocumentInfo(e){const{transformCache:r}=this;if(!r.has(e)){const s=En(e),o={hasClientExports:Vo(["client","export"],e,!0),hasForcedResolvers:E6(e),hasNonreactiveDirective:Vo(["nonreactive"],e),hasIncrementalDirective:Vo(["defer"],e),nonReactiveQuery:TD(e),clientQuery:Vo(["client"],e)?e:null,serverQuery:N6([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),operationType:s?.operation,defaultVars:Xp(s),asQuery:{...e,definitions:e.definitions.map(c=>c.kind==="OperationDefinition"&&c.operation!=="query"?{...c,operation:"query"}:c)}};r.set(e,o)}const n=r.get(e);if(n.violation)throw n.violation;return n}getVariables(e,r){const n=this.getDocumentInfo(e).defaultVars,s=Object.entries(r??{}).map(([o,c])=>[o,c===void 0?n[o]:c]);return{...n,...Object.fromEntries(s)}}watchQuery(e){ca(e.query,Or.QUERY);const r=this.transform(e.query);return e={...e,variables:this.getVariables(r,e.variables)},typeof e.notifyOnNetworkStatusChange>"u"&&(e.notifyOnNetworkStatusChange=!0),new rh({queryManager:this,options:e,transformedQuery:r})}query(e){const r=this.transform(e.query);return this.fetchQuery({...e,query:r}).then(n=>({...n,data:this.maskOperation({document:r,data:n?.data,fetchPolicy:e.fetchPolicy})}))}requestIdCounter=1;generateRequestId(){return this.requestIdCounter++}clearStore(e={discardWatches:!0}){return this.cancelPendingFetches(br(86)),this.obsQueries.forEach(r=>{r.reset()}),this.mutationStore&&(this.mutationStore={}),this.cache.reset(e)}getObservableQueries(e="active"){const r=new Set,n=new Map,s=new Map,o=new Set;return Array.isArray(e)&&e.forEach(c=>{if(typeof c=="string")n.set(c,c),s.set(c,!1);else if(x6(c)){const d=pi(this.transform(c));n.set(d,wi(c)),s.set(d,!1)}else Xt(c)&&c.query&&o.add(c)}),this.obsQueries.forEach(c=>{const d=pi(this.transform(c.options.query));if(e==="all"){r.add(c);return}const{queryName:m,options:{fetchPolicy:h}}=c;e==="active"&&h==="standby"||(e==="active"||m&&s.has(m)||d&&s.has(d))&&(r.add(c),m&&s.set(m,!0),d&&s.set(d,!0))}),o.size&&o.forEach(c=>{const d=new rh({queryManager:this,options:{...c,fetchPolicy:"network-only"}});r.add(d)}),r}refetchObservableQueries(e=!1){const r=[];return this.getObservableQueries(e?"all":"active").forEach(n=>{const{fetchPolicy:s}=n.options;(e||s!=="standby")&&s!=="cache-only"&&r.push(n.refetch())}),this.broadcastQueries(),Promise.all(r)}startGraphQLSubscription(e){let{query:r,variables:n}=e;const{fetchPolicy:s,errorPolicy:o="none",context:c={},extensions:d={}}=e;ca(r,Or.SUBSCRIPTION),r=this.transform(r),n=this.getVariables(r,n);let m;
968const h=(this.getDocumentInfo(r).hasClientExports?qa(this.localState.getExportedVariables({client:this.client,document:r,variables:n,context:c})):Ba(n)).pipe(ai(p=>{const{observable:g,restart:v}=this.getObservableFromLink(r,c,p,d),E=new ah(this);return m=v,g.pipe(Ga(N=>{E.markSubscriptionResult(N,{document:r,variables:p,errorPolicy:o,cacheWriteBehavior:s==="no-cache"?0:2});const k={data:N.data??void 0};return si(N)?k.error=new na(N):ND(N)&&(k.error=N.extensions[Ou],delete N.extensions[Ou]),N.extensions&&Object.keys(N.extensions).length&&(k.extensions=N.extensions),k.error&&o==="none"&&(k.data=void 0),o==="ignore"&&delete k.error,k}),uu(N=>Ba(o==="ignore"?{data:void 0}:{data:void 0,error:N})),G5(N=>!!(N.data||N.error)))}));return Object.assign(h,{restart:()=>m?.()})}broadcastQueries(){this.onBroadcast&&this.onBroadcast(),this.obsQueries.forEach(e=>e.notify())}inFlightLinkObservables=new Cn(!1);getObservableFromLink(e,r,n,s,o=r?.queryDeduplication??this.queryDeduplication){let c={};const{serverQuery:d,clientQuery:m,operationType:h,hasIncrementalDirective:p}=this.getDocumentInfo(e),g=wi(e),v={client:this.client};if(d){const{inFlightLinkObservables:N,link:k}=this;try{let C=function(_){return new xt(T=>{function A(){return _.subscribe({next:T.next.bind(T),complete:T.complete.bind(T),error:T.error.bind(T)})}let I=A();return c.restart||=()=>{I.unsubscribe(),I=A()},()=>{I.unsubscribe(),c.restart=void 0}})};var E=C;const w=this.incrementalHandler.prepareRequest({query:d,variables:n,context:{...this.defaultContext,...r,queryDeduplication:o},extensions:s});if(r=w.context,o){const _=pi(d),T=ua(n);c=N.lookup(_,T),c.observable||(c.observable=np(k,w,v).pipe(C,Y5(()=>{N.peek(_,T)===c&&N.remove(_,T)}),h===Or.SUBSCRIPTION?Tu():K5({refCount:!0})))}else c.observable=np(k,w,v).pipe(C)}catch(w){c.observable=Hk(()=>w)}}else c.observable=Ba({data:{}});if(m){const{operation:N}=En(e);je(!p,91,N[0].toUpperCase()+N.slice(1),g??"(anonymous)"),c.observable=c.observable.pipe(ai(k=>qa(this.localState.execute({client:this.client,document:m,remoteResult:k,context:r,variables:n}))))}return{restart:()=>c.restart?.(),observable:c.observable.pipe(uu(N=>{throw N=SD(N),kD(N),N}))}}getResultsFromLink(e,{queryInfo:r,cacheWriteBehavior:n,observableQuery:s}){const o=r.lastRequestId=this.generateRequestId(),{errorPolicy:c}=e,d=this.cache.transformForLink(e.query);return this.getObservableFromLink(d,e.context,e.variables).observable.pipe(Ga(m=>{const h=r.markQueryResult(m,{...e,document:d,cacheWriteBehavior:n}),p=si(h);if(p&&c==="none")throw r.resetLastWrite(),s?.resetNotifications(),new na(h);const g={data:h.data,...r.hasNext?{loading:!0,networkStatus:Ae.streaming,dataState:"streaming",partial:!0}:{dataState:h.data?"complete":"empty",loading:!1,networkStatus:Ae.ready,partial:!h.data}};return p&&(c==="none"&&(g.data=void 0,g.dataState="empty"),c!=="ignore"&&(g.error=new na(h),g.dataState!=="streaming"&&(g.networkStatus=Ae.error))),g}),uu(m=>{if(o>=r.lastRequestId&&c==="none")throw r.resetLastWrite(),s?.resetNotifications(),m;const h={data:void 0,dataState:"empty",loading:!1,networkStatus:Ae.ready,partial:!0};return c!=="ignore"&&(h.error=m,h.networkStatus=Ae.error),Ba(h)}))}fetchObservableWithInfo(e,{networkStatus:r=Ae.loading,query:n=e.query,fetchQueryOperator:s=d=>d,onCacheHit:o=()=>{},observableQuery:c}){const d=this.getVariables(n,e.variables),m=this.defaultOptions.watchQuery;let{fetchPolicy:h=m&&m.fetchPolicy||"cache-first",errorPolicy:p=m&&m.errorPolicy||"none",returnPartialData:g=!1,notifyOnNetworkStatusChange:v=!0,context:E={}}=e;this.prioritizeCacheValues&&(h==="network-only"||h==="cache-and-network")&&(h="cache-first");const N=Object.assign({},e,{query:n,variables:d,fetchPolicy:h,errorPolicy:p,returnPartialData:g,notifyOnNetworkStatusChange:v,context:E}),k=new ah(this,c),w=I=>{N.variables=I;const M=h==="no-cache"?0:r===Ae.refetch&&N.refetchWritePolicy!=="merge"?1:2,D=this.fetchQueryByPolicy(N,{queryInfo:k,cacheWriteBehavior:M,onCacheHit:o,observableQuery:c});return D.observable=D.observable.pipe(s),N.fetchPolicy!=="standby"&&c?.applyNextFetchPolicy("after-fetch",e),D},C=()=>{this.fetchCancelFns.delete(k.id)};this.fetchCancelFns.set(k.id,I=>{_.next({kind:"E",error:I,source:"network"})});const _=new Di;let T,A;if(this.getDocumentInfo(N.query).hasClientExports)T=qa(this.localState.getExportedVariables({client:this.client,document:N.query,variables:N.variables,context:N.context})).pipe(ai(I=>w(I).observable)),A=!0;else{const I=w(N.variables);A=I.fromLink,T=I.observable}return{observable:new xt(I=>{I.add(C),T.subscribe(I),_.subscribe(I)}).pipe(Tu()),fromLink:A}}refetchQueries({updateCache:e,include:r,optimistic:n=!1,removeOptimistic:s=n?Yk("refetchQueries"):void 0,onQueryUpdated:o}){const c=new Map;r&&this.getObservableQueries(r).forEach(m=>{if(m.options.fetchPolicy==="cache-only"||m.variablesUnknown)return;const h=m.getCurrentResult();c.set(m,{oq:m,lastDiff:{result:h?.data,complete:!h?.partial}})});const d=new Map;if(e){const m=new Set;this.cache.batch({update:e,optimistic:n&&s||!1,removeOptimistic:s,onWatchUpdated(h,p,g){const v=h.watcher;if(v instanceof rh&&!m.has(v)){if(m.add(v),o){c.delete(v);let E=o(v,p,g);return E===!0&&(E=v.refetch().retain()),E!==!1&&d.set(v,E),E}o!==null&&v.options.fetchPolicy!=="cache-only"&&c.set(v,{oq:v,lastDiff:g,diff:p})}}})}
968return c.size&&c.forEach(({oq:m,lastDiff:h,diff:p})=>{let g;o&&(p||(p=m.getCacheDiff()),g=o(m,p,h)),(!o||g===!0)&&(g=m.refetch().retain()),g!==!1&&d.set(m,g)}),s&&this.cache.removeOptimistic(s),d}noCacheWarningsByCause=new WeakSet;maskOperation(e){const{document:r,data:n}=e;return this.dataMasking?dD(n,r,this.cache):n}maskFragment(e){const{data:r,fragment:n,fragmentName:s}=e;return this.dataMasking?uD(r,n,this.cache,s):r}fetchQueryByPolicy({query:e,variables:r,fetchPolicy:n,errorPolicy:s,returnPartialData:o,context:c},{cacheWriteBehavior:d,onCacheHit:m,queryInfo:h,observableQuery:p}){const g=()=>this.cache.diff({query:e,variables:r,returnPartialData:!0,optimistic:!0}),v=(N,k)=>{const w=N.result,C=T=>(!N.complete&&!o&&(T=void 0),{data:T,dataState:N.complete?"complete":T?"partial":"empty",loading:ap(k),networkStatus:k,partial:!N.complete}),_=T=>Ba({kind:"N",value:C(T),source:"cache"});return(N.complete||o)&&this.getDocumentInfo(e).hasForcedResolvers?(m(),qa(this.localState.execute({client:this.client,document:e,remoteResult:w?{data:w}:void 0,context:c,variables:r,onlyRunForcedResolvers:!0,returnPartialData:!0}).then(T=>({kind:"N",value:C(T.data||void 0),source:"cache"})))):s==="none"&&k===Ae.refetch&&N.missing?_(void 0):_(w||void 0)},E=()=>this.getResultsFromLink({query:e,variables:r,context:c,fetchPolicy:n,errorPolicy:s},{cacheWriteBehavior:d,queryInfo:h,observableQuery:p}).pipe(TE(),J5(),Ga(N=>({...N,source:"network"})));switch(n){default:case"cache-first":{const N=g();return N.complete?{fromLink:!1,observable:v(N,Ae.ready)}:o?{fromLink:!0,observable:qf(v(N,Ae.loading),E())}:{fromLink:!0,observable:E()}}case"cache-and-network":{const N=g();return N.complete||o?{fromLink:!0,observable:qf(v(N,Ae.loading),E())}:{fromLink:!0,observable:E()}}case"cache-only":return{fromLink:!1,observable:qf(v(g(),Ae.ready))};case"network-only":return{fromLink:!0,observable:E()};case"no-cache":return{fromLink:!0,observable:E()};case"standby":return{fromLink:!1,observable:Cu}}}}function TE(){let t=!1;return Au({next(){t=!0},complete(){je(t,95)}})}function TD(t){return Jr(t,{FragmentSpread:e=>{if(!e.directives?.some(r=>r.name.value==="unmask"))return{...e,directives:[...e.directives||[],{kind:X.DIRECTIVE,name:{kind:X.NAME,value:"nonreactive"}}
968]}}})}class AD{link;cache;disableNetworkFetches;set prioritizeCacheValues(e){this.queryManager.prioritizeCacheValues=e}get prioritizeCacheValues(){return this.queryManager.prioritizeCacheValues}version;queryDeduplication;defaultOptions;devtoolsConfig;queryManager;devToolsHookCb;resetStoreCallbacks=[];clearStoreCallbacks=[];constructor(e){const{cache:r,documentTransform:n,ssrMode:s=!1,ssrForceFetchDelay:o=0,queryDeduplication:c=!0,defaultOptions:d,defaultContext:m,assumeImmutableResults:h=r.assumeImmutableResults,localState:p,devtools:g,dataMasking:v,link:E,incrementalHandler:N=new F6}=e;this.link=E,this.cache=r,this.queryDeduplication=c,this.defaultOptions=d||{},this.devtoolsConfig={...g,enabled:g?.enabled??Gk},this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.refetchObservableQueries=this.refetchObservableQueries.bind(this),this.version=Jp,this.queryManager=new CD({client:this,defaultOptions:this.defaultOptions,defaultContext:m,documentTransform:n,queryDeduplication:c,ssrMode:s,dataMasking:!!v,clientOptions:e,incrementalHandler:N,assumeImmutableResults:h,onBroadcast:this.devtoolsConfig.enabled?()=>{this.devToolsHookCb&&this.devToolsHookCb()}:void 0,localState:p}),this.prioritizeCacheValues=s||o>0,o&&setTimeout(()=>{this.prioritizeCacheValues=!1},o),this.devtoolsConfig.enabled&&this.connectToDevTools()}connectToDevTools(){if(typeof window>"u")return;const e=window,r=Symbol.for("apollo.devtools");(e[r]=e[r]||[]).push(this),e.__APOLLO_CLIENT__=this}get documentTransform(){return this.queryManager.documentTransform}get localState(){return this.queryManager.localState}set localState(e){this.queryManager.localState=e}stop(){this.queryManager.stop()}watchQuery(e){return this.defaultOptions.watchQuery&&(e=Yf(this.defaultOptions.watchQuery,e)),this.queryManager.watchQuery(e)}query(e){return this.defaultOptions.query&&(e=Yf(this.defaultOptions.query,e)),this.queryManager.query(e)}mutate(e){const r=Yf(yr({fetchPolicy:"network-only",errorPolicy:"none"},this.defaultOptions.mutate),e);return ca(r.mutation,Or.MUTATION),this.queryManager.mutate(r)}subscribe(e){const r={}
968,n=this.queryManager.startGraphQLSubscription(e),s=n.pipe(Ga(o=>({...o,data:this.queryManager.maskOperation({document:e.query,data:o.data,fetchPolicy:e.fetchPolicy,cause:r})})));return Object.assign(s,{restart:n.restart})}readQuery(e,r=!1){return this.cache.readQuery({...e,query:this.transform(e.query)},r)}watchFragment(e){const r=this.queryManager.dataMasking;return this.cache.watchFragment({...e,fragment:this.transform(e.fragment,r)}).pipe(Ga(n=>n))}readFragment(e,r=!1){return this.cache.readFragment({...e,fragment:this.transform(e.fragment)},r)}writeQuery(e){const r=this.cache.writeQuery(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),r}writeFragment(e){const r=this.cache.writeFragment(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),r}__actionHookForDevTools(e){this.devToolsHookCb=e}__requestRaw(e){return np(this.link,e,{client:this})}resetStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!1})).then(()=>Promise.all(this.resetStoreCallbacks.map(e=>e()))).then(()=>this.refetchObservableQueries())}clearStore(){return Promise.resolve().then(()=>this.queryManager.clearStore({discardWatches:!0})).then(()=>Promise.all(this.clearStoreCallbacks.map(e=>e())))}onResetStore(e){return this.resetStoreCallbacks.push(e),()=>{this.resetStoreCallbacks=this.resetStoreCallbacks.filter(r=>r!==e)}}onClearStore(e){return this.clearStoreCallbacks.push(e),()=>{this.clearStoreCallbacks=this.clearStoreCallbacks.filter(r=>r!==e)}}reFetchObservableQueries;refetchObservableQueries(e){return this.queryManager.refetchObservableQueries(e)}refetchQueries(e){const r=this.queryManager.refetchQueries(e),n=[],s=[];r.forEach((c,d)=>{n.push(d),s.push(c)});const o=Promise.all(s);return o.queries=n,o.results=s,o.catch(c=>{}),o}getObservableQueries(e="active"){return this.queryManager.getObservableQueries(e)}extract(e){return this.cache.extract(e)}restore(e){return this.cache.restore(e)}setLink(e){this.link=e}get defaultContext(){return this.queryManager.defaultContext}maskedFragmentTransform=new fn(C6);transform(e,r=!1){const n=this.queryManager.transform(e);return r?this.maskedFragmentTransform.transformDocument(n):n}}const{hasOwnProperty:AE}=Object.prototype;function ID(t){return Xt(t)&&"payload"in t}async function*PD(t){const e=new TextDecoder("utf-8"),n=t.headers?.get("content-type")?.match(/;\s*boundary=(?:'([^']+)'|"([^"]+)"|([^"'].+?))\s*(?:;|$)/i),s=`\r 969--`+(n?n[1]??n[2]??n[3]??"-":"-");let o="";je(t.body&&typeof t.body.getReader=="function",60);const d=t.body.getReader();let m=!1,h=!1,p;const g=()=>h&&o[0]=="-"&&o[1]=="-";try{for(;!m;){({value:p,done:m}=await d.read());const v=typeof p=="string"?p:e.decode(p),E=o.length-s.length+1;o+=v;let N=o.indexOf(s,E);for(;N>-1&&!g();){h=!0;let k;[k,o]=[o.slice(0,N),o.slice(N+s.length)];const w=k.indexOf(`\r 970\r 971`),_=RD(k.slice(0,w))["content-type"];if(_&&_.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");const T=k.slice(w);T&&(yield T),N=o.indexOf(s)}if(g())return}throw new Error("premature end of multipart body")}finally{d.cancel()}}async function OD(t,e){for await(const r of PD(t)){const n=T1(t,r);if(Object.keys(n).length!=0)if(ID(n)){if(Object.keys(n).length===1&&n.payload===null)return;let s={...n.payload};"errors"in n&&(s.extensions={...s.extensions,[Ou]:new ml(n.errors??[])}),e(s)}else e(n)}}function RD(t){const e={};return t.split(` 972`).forEach(r=>{const n=r.indexOf(":");if(n>-1){const s=r.slice(0,n).trim().toLowerCase(),o=r.slice(n+1).trim();e[s]=o}}),e}function T1(t,e){if(t.status>=300)throw new id(`Response not successful: Received status code ${t.status}`,{response:t,bodyText:e});try{return JSON.parse(e)}catch(r){throw new od(r,{response:t,bodyText:e})}}function DD(t,e){try{return JSON.parse(e)}catch(r){throw new od(r,{response:t,bodyText:e})}}function MD(t,e){return t.headers.get("content-type")?.includes("application/graphql-response+json")?DD(t,e):T1(t,e)}function LD(t){return e=>e.text().then(r=>{const n=MD(e,r);if(!Array.isArray(n)&&!AE.call(n,"data")&&!AE.call(n,"errors"))throw new id(`Server response was malformed for query '${Array.isArray(t)?t.map(s=>s.operationName):t.operationName}'.`,{response:e,bodyText:r});return n})}const FD={includeQuery:!0,includeExtensions:!0,preserveHeaderCase:!1},jD={accept:"application/graphql-response+json,application/json;q=0.9","content-type":"application/json"},UD={method:"POST"},zD={http:FD,headers:jD,options:UD},$D=(t,e)=>e(t);function BD(t,e,...r){let n={},s={};r.forEach(p=>{n={...n,...p.options,headers:{...n.headers,...p.headers}},p.credentials&&(n.credentials=p.credentials),n.headers.accept=(p.http?.accept||[]).concat(n.headers.accept).join(","),s={...s,...p.http}}),n.headers=WD(n.headers,s.preserveHeaderCase);const{operationName:o,extensions:c,variables:d,query:m}=t,h={operationName:o,variables:d};return s.includeExtensions&&Object.keys(c||{}).length&&(h.extensions=c),s.includeQuery&&(h.query=e(m,pi)),{options:n,body:h}}function WD(t,e){if(!e){const s={};
972return Object.keys(Object(t)).forEach(o=>{s[o.toLowerCase()]=t[o]}),s}const r={};Object.keys(Object(t)).forEach(s=>{r[s.toLowerCase()]={originalName:s,value:t[s]}});const n={};return Object.keys(r).forEach(s=>{n[r[s].originalName]=r[s].value}),n}const VD=(t,e)=>{const n=t.getContext().uri;return n||(typeof e=="function"?e(t):e||"/graphql")};function qD(t,e){const r=[],n=(h,p)=>{r.push(`${h}=${encodeURIComponent(p)}`)};if("query"in e&&n("query",e.query),e.operationName&&n("operationName",e.operationName),e.variables){let h;try{h=JSON.stringify(e.variables)}catch(p){return{parseError:p}}n("variables",h)}if(e.extensions){let h;try{h=JSON.stringify(e.extensions)}catch(p){return{parseError:p}}n("extensions",h)}let s="",o=t;const c=t.indexOf("#");c!==-1&&(s=t.substr(c),o=t.substr(0,c));const d=o.indexOf("?")===-1?"?":"&";return{newURI:o+d+r.join("&")+s}}const HD=ta(()=>fetch);function GD(){}class YD extends sr{constructor(e={}){let{uri:r="/graphql",fetch:n,print:s=$D,includeExtensions:o,preserveHeaderCase:c,useGETForQueries:d,includeUnusedVariables:m=!1,...h}=e;const p={http:yr({includeExtensions:o,preserveHeaderCase:c}),options:h.fetchOptions,credentials:h.credentials,headers:h.headers};super(g=>{let v=VD(g,r);const E=g.getContext(),N={...E.http};X6(g.query)&&(N.accept=["multipart/mixed;boundary=graphql;subscriptionSpec=1.0",...N.accept||[]]);const k={http:N,options:E.fetchOptions,credentials:E.credentials,headers:E.headers},{options:w,body:C}=BD(g,s,zD,p,k);C.variables&&!m&&(C.variables=U6(C.variables,g.query));let _=new AbortController,T=()=>{_=void 0};if(w.signal){const A=w.signal,I=()=>{_?.abort(A.reason)};A.addEventListener("abort",I,{once:!0}),T=()=>{_?.signal.removeEventListener("abort",T),_=void 0,A.removeEventListener("abort",I),T=GD},_.signal.addEventListener("abort",T,{once:!0})}return w.signal=_.signal,d&&!Z6(g.query)&&(w.method="GET"),new xt(A=>{if(w.method==="GET"){const{newURI:D,parseError:$}=qD(v,C);if($)throw $;v=D}else w.body=JSON.stringify(C);const I=n||ta(()=>fetch)||HD,M=A.next.bind(A);return I(v,w).then(D=>{g.setContext({response:D});const $=D.headers?.get("content-type");return $!==null&&/^multipart\/mixed/i.test($)?OD(D,M):LD(g)(D).then(M)}).then(()=>{T(),A.complete()}).catch(D=>{T(),A.error(D)}),()=>{_&&_.abort()}})})}}class JD extends sr{constructor(e={}){super((r,n)=>{const s=r.client,o=s.queryManager.clientOptions,c=r.getContext();{const{name:d,version:m,transport:h="headers"}=yr({},o.clientAwareness,e.clientAwareness,c.clientAwareness);h==="headers"&&r.setContext(({headers:p,extensions:g})=>({headers:yr({"apollographql-client-name":d,"apollographql-client-version":m},p)}))}{const{transport:d="extensions"}=yr({},o.enhancedClientAwareness,e.enhancedClientAwareness);d==="extensions"&&(r.extensions=yr({clientLibrary:{name:"@apollo/client",version:s.version}},r.extensions))}return n(r)})}}class KD extends sr{constructor(e={}){const{left:r,right:n,request:s}=sr.from([new JD(e),new YD(e)]);super(s),Object.assign(this,{left:r,right:n})}}const QD=(t={})=>new KD(t);var hu=new Map,cp=new Map,A1=!0,Ru=!1;function I1(t){return t.replace(/[\s,]+/g," ").trim()}function ZD(t){return I1(t.source.body.substring(t.start,t.end))}function XD(t){var e=new Set,r=[];return t.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var s=n.name.value,o=ZD(n.loc),c=cp.get(s);c&&!c.has(o)?A1&&console.warn("Warning: fragment with name "+s+` already exists. 973graphql-tag enforces all fragment names across your application to be unique; read more about 974this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):c||cp.set(s,c=new Set),c.add(o),e.has(o)||(e.add(o),r.push(n))}else r.push(n)}),gr(gr({},t),{definitions:r})}function eM(t){var e=new Set(t.definitions);e.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(s){var o=n[s];o&&typeof o=="object"&&e.add(o)})});var r=t.loc;return r&&(delete r.startToken,delete r.endToken),t}function tM(t){var e=I1(t);if(!hu.has(e)){var r=n5(t,{experimentalFragmentVariables:Ru,allowLegacyFragmentVariables:Ru});if(!r||r.kind!=="Document")throw new Error("Not a valid GraphQL document.");hu.set(e,eM(XD(r)))}return hu.get(e)}function ga(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];typeof t=="string"&&(t=[t]);var n=t[0];return e.forEach(function(s,o){s&&s.kind==="Document"?n+=s.loc.source.body:n+=s,n+=t[o+1]}),tM(n)}function rM(){hu.clear(),cp.clear()}function nM(){A1=!1}function aM(){Ru=!0}function sM(){Ru=!1}var jo={gql:ga,resetCaches:rM,disableFragmentWarnings:nM,enableExperimentalFragmentVariables:aM,disableExperimentalFragmentVariables:sM};(function(t){t.gql=jo.gql,t.resetCaches=jo.resetCaches,t.disableFragmentWarnings=jo.disableFragmentWarnings,t.enableExperimentalFragmentVariables=jo.enableExperimentalFragmentVariables,t.disableExperimentalFragmentVariables=jo.disableExperimentalFragmentVariables})(ga||(ga={}));ga.default=ga;const iM=ga` 975 query GetPublication($host: String!) { 976 publication(host: $host) { 977 id 978 title 979 description 980 url 981 author { 982 name 983 profilePicture 984 } 985 } 986 } 987`,oM=ga` 988 query GetPosts($host: String!, $first: Int!) { 989 publication(host: $host) { 990 title 991 posts(first: $first) { 992 edges { 993 node { 994 id 995 title 996 slug 997 brief 998 coverImage { 999 url 1000 } 1001 publishedAt 1002 author { 1003 name 1004 profilePicture 1005 } 1006 } 1007 } 1008 pageInfo { 1009 endCursor 1010 hasNextPage 1011 } 1012 } 1013 } 1014 } 1015`,lM=ga` 1016 query GetPostBySlug($host: String!, $slug: String!) { 1017 publication(host: $host) { 1018 post(slug: $slug) { 1019 id 1020 title 1021 slug 1022 content { 1023 markdown 1024 html 1025 } 1026 coverImage { 1027 url 1028 } 1029 publishedAt 1030 author { 1031 name 1032 profilePicture 1033 } 1034 seo { 1035 title 1036 description 1037 } 1038 tags { 1039 name 1040 slug 1041 } 1042 } 1043 } 1044 } 1045`;class P1{client;host;constructor(e,r){this.client=e,this.host=r||"blog.usezenith.ai"}async getPublication(){try{const{data:e}=await this.client.query({query:iM,variables:{host:this.host}});return e.publication}catch(e){return console.error("Error fetching publication:",e),null}}async getPosts(e=10){try{const{data:r}=await this.client.query({query:oM,variables:{host:this.host,first:e}});return(r.publication?.posts?.edges||[]).map(o=>({id:o.node.id,title:o.node.title,slug:o.node.slug,brief:o.node.brief||"",coverImage:o.node.coverImage?.url||"",publishedAt:o.node.publishedAt,author:o.node.author}))}catch(r){return console.error("[HashnodeService] Error fetching posts:",r),[]}}async getPostBySlug(e){try{const{data:r}=await this.client.query({query:lM,variables:{host:this.host,slug:e}}),n=r.publication.post;return n?{id:n.id,title:n.title,slug:n.slug,brief:n.brief||"",coverImage:n.coverImage?.url||"",publishedAt:n.publishedAt,author:n.author,content:n.content,seo:n.seo||void 0,tags:n.tags?.map(s=>s.name)||[]}:null}catch(r){return console.error("Error fetching post:",r),null}}}const cM=()=>"/.netlify/functions/hashnode-proxy",O1=()=>new AD({link:QD({uri:cM()}),cache:new ED});function ln(){return{title:"Blog - Zenith AI Communication Assistant",description:"Insights and updates from the Zenith team about AI-powered communication.",url:"https://usezenith.ai/blog",type:"website"}}function ar(t){const e=t.seo?.title||t.title,r=t.seo?.description||uM(t.brief,160);return{title:e,description:r,url:`https://usezenith.ai/blog/${t.slug}`,ogImage:t.coverImage||void 0,type:"article"}}function uM(t,e){return t.length<=e?t:t.substring(0,e-3)+"..."}function dM(){const[t,e]=x.useState([]),[r,n]=x.useState(!0),[s,o]=x.useState(null);return x.useEffect(()=>{(async()=>{try{const d=O1(),h=await new P1(d).getPosts(10);e(h)}catch(d){o("Failed to load blog posts"),console.error("[Blog] Error fetching posts:",d)}finally{n(!1)}})()},[]),r?a.createElement(a.Fragment,null,a.createElement($h,null,a.createElement("title",null,"Loa
1045ding..."),a.createElement("meta",{name:"description",content:"Loading blog posts..."})),a.createElement("section",{className:"py-24 bg-white dark:bg-slate-900"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"text-center"},a.createElement("p",{className:"text-slate-600 dark:text-slate-400"},"Loading..."))))):s?a.createElement("section",{className:"py-24 bg-white dark:bg-slate-900"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center"},a.createElement("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white mb-4"},"Error Loading Blog"),a.createElement("p",{className:"text-lg text-red-600 dark:text-red-400 mb-8"},s),a.createElement(Tt,{to:"/",className:"text-indigo-600 hover:text-indigo-700 dark:text-indigo-400"},"â Back to Home")))):t.length===0?a.createElement("section",{className:"py-24 bg-white dark:bg-slate-900"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center"},a.createElement("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white mb-4"},"No Posts Yet"),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-400"},"Check back soon for new content!")))):a.createElement(a.Fragment,null,a.createElement($h,null,a.createElement("title",null,ln().title),a.createElement("meta",{name:"description",content:ln().description}),a.createElement("link",{rel:"canonical",href:ln().url}),a.createElement("meta",{property:"og:type",content:ln().type}),a.createElement("meta",{property:"og:title",content:ln().title}),a.createElement("meta",{property:"og:description",content:ln().description}),a.createElement("meta",{property:"og:url",content:ln().url}),a.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),a.createElement("meta",{name:"twitter:title",content:ln().title}),a.createElement("meta",{name:"twitter:description",content:ln().description})),a.createElement("section",{id:"blog",className:"py-24 bg-white dark:bg-slate-900 scroll-mt-16"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center mb-16"},a.createElement("h1",{className:"text-4xl font-bold text-slate-900 dark:text-white mb-4"},"Blog"),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-400"},"Insights and updates from the Zenith team")),a.createElement("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8 max-w-6xl mx-auto"},t.map(c=>a.createElement(Tt,{key:c.id,to:`/blog/${c.slug}`,className:"block"},a.createElement(Ce,{className:"overflow-hidden hover:shadow-lg transition-shadow dark:bg-slate-800 dark:border-slate-700 h-full"},c.coverImage&&a.createElement("div",{className:"aspect-video w-full overflow-hidden"},a.createElement("img",{src:c.coverImage,alt:c.title,className:"w-full h-full object-cover hover:scale-105 transition-transform duration-300"})),a.createElement(ct,null,a.createElement("div",{className:"text-sm text-slate-500 dark:text-slate-400 mb-2"},new Date(c.publishedAt).toLocaleDateString()),a.createElement(pt,{className:"text-xl dark:text-white"},c.title)),a.createElement(Ve,{className:"flex flex-col flex-grow"},a.createElement("p",{className:"text-slate-600 dark:text-slate-300 line-clamp-3"},c.brief)))))))))}var ih={exports:{}},IE;function mM(){return IE||(IE=1,function(t){var e=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/** 1046 * Prism: Lightweight, robust, elegant syntax highlighting 1047 * 1048 * @license MIT <https://opensource.org/licenses/MIT> 1049 * @author Lea Verou <https://lea.verou.me> 1050 * @namespace 1051 * @public 1052 */var r=function(n){var s=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,o=0,c={},d={manual:n.Prism&&n.Prism.manual,disableWorkerMessageHandler:n.Prism&&n.Prism.disableWorkerMessageHandler,util:{encode:function _(T){return T instanceof m?new m(T.type,_(T.content),T.alias):Array.isArray(T)?T.map(_):T.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(_){return Object.prototype.toString.call(_).slice(8,-1)},objId:function(_){return _.__id||Object.defineProperty(_,"__id",{value:++o}),_.__id},clone:function _(T,A){A=A||{};var I,M;switch(d.util.type(T)){case"Object":if(M=d.util.objId(T),A[M])return A[M];I={},A[M]=I;for(var D in T)T.hasOwnProperty(D)&&(I[D]=_(T[D],A));return I;case"Array":return M=d.util.objId(T),A[M]?A[M]:(I=[],A[M]=I,T.forEach(function($,j){I[j]=_($,A)}),I);default:return T}},getLanguage:function(_){for(;_;){var T=s.exec(_.className);if(T)return T[1].toLowerCase();_=_.parentElement}return"none"},setLanguage:function(_,T){_.className=_.className.replace(RegExp(s,"gi"),""),_.classList.add("language-"+T)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(I){var _=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(I.stack)||[])[1];if(_){var T=document.getElementsByTagName("script");for(var A in T)if(T[A].src==_)return T[A]}return null}},isActive:function(_,T,A){for(var I="no-"+T;_;){var M=_.classList;if(M.contains(T))return!0;
vendor: 4,160 bytes, line 1052
1052if(M.contains(I))return!1;_=_.parentElement}return!!A}},languages:{plain:c,plaintext:c,text:c,txt:c,extend:function(_,T){var A=d.util.clone(d.languages[_]);for(var I in T)A[I]=T[I];return A},insertBefore:function(_,T,A,I){I=I||d.languages;var M=I[_],D={};for(var $ in M)if(M.hasOwnProperty($)){if($==T)for(var j in A)A.hasOwnProperty(j)&&(D[j]=A[j]);A.hasOwnProperty($)||(D[$]=M[$])}var B=I[_];return I[_]=D,d.languages.DFS(d.languages,function(ee,te){te===B&&ee!=_&&(this[ee]=D)}),D},DFS:function _(T,A,I,M){M=M||{};var D=d.util.objId;for(var $ in T)if(T.hasOwnProperty($)){A.call(T,$,T[$],I||$);var j=T[$],B=d.util.type(j);B==="Object"&&!M[D(j)]?(M[D(j)]=!0,_(j,A,null,M)):B==="Array"&&!M[D(j)]&&(M[D(j)]=!0,_(j,A,$,M))}}},plugins:{},highlightAll:function(_,T){d.highlightAllUnder(document,_,T)},highlightAllUnder:function(_,T,A){var I={callback:A,container:_,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};d.hooks.run("before-highlightall",I),I.elements=Array.prototype.slice.apply(I.container.querySelectorAll(I.selector)),d.hooks.run("before-all-elements-highlight",I);for(var M=0,D;D=I.elements[M++];)d.highlightElement(D,T===!0,I.callback)},highlightElement:function(_,T,A){var I=d.util.getLanguage(_),M=d.languages[I];d.util.setLanguage(_,I);var D=_.parentElement;D&&D.nodeName.toLowerCase()==="pre"&&d.util.setLanguage(D,I);var $=_.textContent,j={element:_,language:I,grammar:M,code:$};function B(te){j.highlightedCode=te,d.hooks.run("before-insert",j),j.element.innerHTML=j.highlightedCode,d.hooks.run("after-highlight",j),d.hooks.run("complete",j),A&&A.call(j.element)}if(d.hooks.run("before-sanity-check",j),D=j.element.parentElement,D&&D.nodeName.toLowerCase()==="pre"&&!D.hasAttribute("tabindex")&&D.setAttribute("tabindex","0"),!j.code){d.hooks.run("complete",j),A&&A.call(j.element);return}if(d.hooks.run("before-highlight",j),!j.grammar){B(d.util.encode(j.code));return}if(T&&n.Worker){var ee=new Worker(d.filename);ee.onmessage=function(te){B(te.data)},ee.postMessage(JSON.stringify({language:j.language,code:j.code,immediateClose:!0}))}else B(d.highlight(j.code,j.grammar,j.language))},highlight:function(_,T,A){var I={code:_,grammar:T,language:A};if(d.hooks.run("before-tokenize",I),!I.grammar)throw new Error('The language "'+I.language+'" has no grammar.');return I.tokens=d.tokenize(I.code,I.grammar),d.hooks.run("after-tokenize",I),m.stringify(d.util.encode(I.tokens),I.language)},tokenize:function(_,T){var A=T.rest;if(A){for(var I in A)T[I]=A[I];delete T.rest}var M=new g;return v(M,M.head,_),p(_,M,T,M.head,0),N(M)},hooks:{all:{},add:function(_,T){var A=d.hooks.all;A[_]=A[_]||[],A[_].push(T)},run:function(_,T){var A=d.hooks.all[_];if(!(!A||!A.length))for(var I=0,M;M=A[I++];)M(T)}},Token:m};n.Prism=d;function m(_,T,A,I){this.type=_,this.content=T,this.alias=A,this.length=(I||"").length|0}m.stringify=function _(T,A){if(typeof T=="string")return T;if(Array.isArray(T)){var I="";return T.forEach(function(B){I+=_(B,A)}),I}var M={type:T.type,content:_(T.content,A),tag:"span",classes:["token",T.type],attributes:{},language:A},D=T.alias;D&&(Array.isArray(D)?Array.prototype.push.apply(M.classes,D):M.classes.push(D)),d.hooks.run("wrap",M);var $="";for(var j in M.attributes)$+=" "+j+'="'+(M.attributes[j]||"").replace(/"/g,""")+'"';return"<"+M.tag+' class="'+M.classes.join(" ")+'"'+$+">"+M.content+"</"+M.tag+">"};function h(_,T,A,I){_.lastIndex=T;var M=_.exec(A);if(M&&I&&M[1]){var D=M[1].length;M.index+=D,M[0]=M[0].slice(D)}return M}function p(_,T,A,I,M,D){for(var $ in A)if(!(!A.hasOwnProperty($)||!A[$])){var j=A[$];j=Array.isArray(j)?j:[j];for(var B=0;B<j.length;++B){if(D&&D.cause==$+","+B)return;var ee=j[B],te=ee.inside,ne=!!ee.lookbehind,Z=!!ee.greedy,ae=ee.alias;if(Z&&!ee.pattern.global){var ke=ee.pattern.toString().match(/[imsuy]*$/)[0];ee.pattern=RegExp(ee.pattern.source,ke+"g")}for(var se=ee.pattern||ee,V=I.next,re=M;V!==T.tail&&!(D&&re>=D.reach);re+=V.value.length,V=V.next){var K=V.value;if(T.length>_.length)return;if(!(K instanceof m)){var R=1,W;if(Z){if(W=h(se,re,_,ne),!W||W.index>=_.length)break;var J=W.index,we=W.index+W[0].length,xe=re;
vendor: 4,476 bytes, line 1052
1052for(xe+=V.value.length;J>=xe;)V=V.next,xe+=V.value.length;if(xe-=V.value.length,re=xe,V.value instanceof m)continue;for(var _e=V;_e!==T.tail&&(xe<we||typeof _e.value=="string");_e=_e.next)R++,xe+=_e.value.length;R--,K=_.slice(re,xe),W.index-=re}else if(W=h(se,0,K,ne),!W)continue;var J=W.index,me=W[0],ye=K.slice(0,J),ve=K.slice(J+me.length),$e=re+K.length;D&&$e>D.reach&&(D.reach=$e);var Ye=V.prev;ye&&(Ye=v(T,Ye,ye),re+=ye.length),E(T,Ye,R);var Be=new m($,te?d.tokenize(me,te):me,ae,me);if(V=v(T,Ye,Be),ve&&v(T,V,ve),R>1){var Le={cause:$+","+B,reach:$e};p(_,T,A,V.prev,re,Le),D&&Le.reach>D.reach&&(D.reach=Le.reach)}}}}}}function g(){var _={value:null,prev:null,next:null},T={value:null,prev:_,next:null};_.next=T,this.head=_,this.tail=T,this.length=0}function v(_,T,A){var I=T.next,M={value:A,prev:T,next:I};return T.next=M,I.prev=M,_.length++,M}function E(_,T,A){for(var I=T.next,M=0;M<A&&I!==_.tail;M++)I=I.next;T.next=I,I.prev=T,_.length-=M}function N(_){for(var T=[],A=_.head.next;A!==_.tail;)T.push(A.value),A=A.next;return T}if(!n.document)return n.addEventListener&&(d.disableWorkerMessageHandler||n.addEventListener("message",function(_){var T=JSON.parse(_.data),A=T.language,I=T.code,M=T.immediateClose;n.postMessage(d.highlight(I,d.languages[A],A)),M&&n.close()},!1)),d;var k=d.util.currentScript();k&&(d.filename=k.src,k.hasAttribute("data-manual")&&(d.manual=!0));function w(){d.manual||d.highlightAll()}if(!d.manual){var C=document.readyState;C==="loading"||C==="interactive"&&k&&k.defer?document.addEventListener("DOMContentLoaded",w):window.requestAnimationFrame?window.requestAnimationFrame(w):window.setTimeout(w,16)}return d}(e);t.exports&&(t.exports=r),typeof pu<"u"&&(pu.Prism=r),r.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},r.languages.markup.tag.inside["attr-value"].inside.entity=r.languages.markup.entity,r.languages.markup.doctype.inside["internal-subset"].inside=r.languages.markup,r.hooks.add("wrap",function(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&/,"&"))}),Object.defineProperty(r.languages.markup.tag,"addInlined",{value:function(s,o){var c={};c["language-"+o]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:r.languages[o]},c.cdata=/^<!\[CDATA\[|\]\]>$/i;var d={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:c}};d["language-"+o]={pattern:/[\s\S]+/,inside:r.languages[o]};var m={};m[s]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return s}),"i"),lookbehind:!0,greedy:!0,inside:d},r.languages.insertBefore("markup","cdata",m)}}),Object.defineProperty(r.languages.markup.tag,"addAttribute",{value:function(n,s){r.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[s,"language-"+s],inside:r.languages[s]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),r.languages.html=r.languages.markup,r.languages.mathml=r.languages.markup,r.languages.svg=r.languages.markup,r.languages.xml=r.languages.extend("markup",{}),r.languages.ssml=r.languages.xml,r.languages.atom=r.languages.xml,r.languages.rss=r.languages.xml,function(n){var s=/(?:"
1052(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+s.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+s.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:s,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var o=n.languages.markup;o&&(o.tag.addInlined("style","css"),o.tag.addAttribute("style","css"))}(r),r.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},r.languages.javascript=r.languages.extend("clike",{"class-name":[r.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),r.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,r.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:r.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]
vendor: 4,607 bytes, lines 1052-1053
1052*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:r.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:r.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:r.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:r.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),r.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:r.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),r.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),r.languages.markup&&(r.languages.markup.tag.addInlined("script","javascript"),r.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),r.languages.js=r.languages.javascript,function(){if(typeof r>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var n="Loadingâ¦",s=function(k,w){return"â Error "+k+" while fetching file: "+w},o="â Error: File does not exist or is empty",c={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},d="data-src-status",m="loading",h="loaded",p="failed",g="pre[data-src]:not(["+d+'="'+h+'"]):not(['+d+'="'+m+'"])';function v(k,w,C){var _=new XMLHttpRequest;_.open("GET",k,!0),_.onreadystatechange=function(){_.readyState==4&&(_.status<400&&_.responseText?w(_.responseText):_.status>=400?C(s(_.status,_.statusText)):C(o))},_.send(null)}function E(k){var w=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(k||"");if(w){var C=Number(w[1]),_=w[2],T=w[3];return _?T?[C,Number(T)]:[C,void 0]:[C,C]}}r.hooks.add("before-highlightall",function(k){k.selector+=", "+g}),r.hooks.add("before-sanity-check",function(k){var w=k.element;if(w.matches(g)){k.code="",w.setAttribute(d,m);var C=w.appendChild(document.createElement("CODE"));C.textContent=n;var _=w.getAttribute("data-src"),T=k.language;if(T==="none"){var A=(/\.(\w+)$/.exec(_)||[,"none"])[1];T=c[A]||A}r.util.setLanguage(C,T),r.util.setLanguage(w,T);var I=r.plugins.autoloader;I&&I.loadLanguages(T),v(_,function(M){w.setAttribute(d,h);var D=E(w.getAttribute("data-range"));if(D){var $=M.split(/\r\n?|\n/g),j=D[0],B=D[1]==null?$.length:D[1];j<0&&(j+=$.length),j=Math.max(0,Math.min(j-1,$.length)),B<0&&(B+=$.length),B=Math.max(0,Math.min(B,$.length)),M=$.slice(j,B).join(` 1053`),w.hasAttribute("data-start")||w.setAttribute("data-start",String(j+1))}C.textContent=M,r.highlightElement(C)},function(M){w.setAttribute(d,p),C.textContent=M})}}),r.plugins.fileHighlight={highlight:function(w){for(var C=(w||document).querySelectorAll(g),_=0,T;T=C[_++];)r.highlightElement(T)}};var N=!1;r.fileHighlight=function(){N||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),N=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}()}(ih)),ih.exports}var fM=mM();const hM=ya(fM);function pM(){const{slug:t}
1053=h2(),[e,r]=x.useState(null),[n,s]=x.useState(!0),[o,c]=x.useState(null);return x.useEffect(()=>{(async()=>{if(!t){c("Post slug is required"),s(!1);return}try{const m=O1(),p=await new P1(m).getPostBySlug(t);p?r(p):c("Post not found")}catch(m){c("Failed to load blog post"),console.error(m)}finally{s(!1)}})()},[t]),x.useEffect(()=>{e&&setTimeout(()=>{hM.highlightAll()},100)},[e]),n?a.createElement("article",{className:"py-24 bg-white dark:bg-slate-900"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"text-center"},a.createElement("p",{className:"text-slate-600 dark:text-slate-400"},"Loading...")))):o||!e?a.createElement("article",{className:"py-24 bg-white dark:bg-slate-900"},a.createElement("div",{className:"container mx-auto px-4"},a.createElement("div",{className:"max-w-3xl mx-auto text-center"},a.createElement("h1",{className:"text-4xl font-bold text-slate-900 dark:text-white mb-4"},"Post Not Found"),a.createElement("p",{className:"text-lg text-slate-600 dark:text-slate-400 mb-8"},"The blog post you're looking for doesn't exist."),a.createElement(Tt,{to:"/blog",className:"text-indigo-600 hover:text-indigo-700 dark:text-indigo-400"},"â Back to Blog")))):a.createElement(a.Fragment,null,a.createElement($h,null,a.createElement("title",null,ar(e).title),a.createElement("meta",{name:"description",content:ar(e).description}),a.createElement("link",{rel:"canonical",href:ar(e).url}),a.createElement("meta",{property:"og:type",content:ar(e).type}),a.createElement("meta",{property:"og:title",content:ar(e).title}),a.createElement("meta",{property:"og:description",content:ar(e).description}),a.createElement("meta",{property:"og:url",content:ar(e).url}),ar(e).ogImage&&a.createElement("meta",{property:"og:image",content:ar(e).ogImage}),a.createElement("meta",{name:"twitter:card",content:"summary_large_image"}),a.createElement("meta",{name:"twitter:title",content:ar(e).title}),a.createElement("meta",{name:"twitter:description",content:ar(e).description}),ar(e).ogImage&&a.createElement("meta",{name:"twitter:image",content:ar(e).ogImage}),a.createElement("meta",{name:"article:published_time",content:e.publishedAt}),a.createElement("meta",{name:"article:author",content:e.author.name})),a.createElement("article",{className:"min-h-screen bg-gradient-to-b from-white to-slate-50 dark:from-slate-900 dark:to-slate-950"},a.createElement("div",{className:"container mx-auto px-4 py-16 sm:py-20 lg:py-24"},a.createElement("div",{className:"max-w-4xl mx-auto"},a.createElement(Tt,{to:"/blog",className:"inline-flex items-center gap-2 text-indigo-600 hover:text-indigo-700 dark:text-indigo-400 dark:hover:text-indigo-300 mb-8 font-medium transition-colors duration-200 group"},a.createElement("svg",{className:"w-4 h-4 transform group-hover:-translate-x-1 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 19l-7-7 7-7"})),"Back to Blog"),e.coverImage&&a.createElement("div",{className:"mb-10 rounded-2xl overflow-hidden shadow-2xl border border-slate-200 dark:border-slate-700"},a.createElement("img",{src:e.coverImage,alt:e.title,className:"w-full h-auto transform hover:scale-105 transition-transform duration-300"})),a.createElement("header",{className:"mb-12"},a.createElement("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-slate-900 dark:text-white mb-6 leading-tight tracking-tight"},e.title),a.createElement("div",{className:"flex flex-wrap items-center gap-4 text-slate-600 dark:text-slate-400"},a.createElement("div",{className:"flex items-center gap-2"},a.createElement("div",{className:"w-10 h-10 rounded-full bg-gradient-to-br from-indigo-500 to-purple-600 flex items-center justify-center text-white font-semibold"},e.author.name.charAt(0).toUpperCase()),a.createElement("div",{className:"flex flex-col"},a.createElement("span",{className:"font-semibold text-slate-900 dark:text-white"},e.author.name),a.createElement("span",{className:"text-sm"},new Date(e.publishedAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}))))),a.createElement("div",{className:"mt-6 flex flex-wrap items-center gap-3"},e.tags&&e.tags.length>0&&a.createElement("div",{className:"flex flex-wrap gap-2"},e.tags.slice(0,3).map((d,m)=>a.createElement("span",{key:m,className:"inline-flex items-center px-3 py-1 rounded-full text-xs font-medium bg-indigo-100 text-indigo-800 dark:bg-indigo-900/30 dark:text-indigo-300"},d))))),a.createElement("div",{className:"prose prose-lg prose-slate dark:prose-invert max-w-3xl /*
1053Smooth transitions for interactive elements */ prose-a:transition-all prose-a:duration-200 prose-a:ease-in-out /* Enhanced link hover effects */ hover:prose-a:translate-x-1 /* Smooth transitions for table rows */ prose-tr:transition-colors prose-tr:duration-200 prose-tr:ease-in-out /* Image hover effects */ prose-img:transition-all prose-img:duration-300 prose-img:ease-in-out hover:prose-img:scale-[1.02] hover:prose-img:shadow-2xl /* Code block hover effect */ prose-pre:transition-all prose-pre:duration-200 hover:prose-pre:shadow-2xl",dangerouslySetInnerHTML:{__html:e.content.html}}),a.createElement("div",{className:"mt-16 pt-8 border-t border-slate-200 dark:border-slate-700"},a.createElement("p",{className:"text-sm font-semibold text-slate-900 dark:text-white uppercase tracking-wide mb-4"},"Share this post"),a.createElement("div",{className:"flex flex-wrap gap-4"},a.createElement("a",{href:`https://twitter.com/intent/tweet?text=${encodeURIComponent(e.title)}&url=${encodeURIComponent(window.location.href)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-slate-100 hover:bg-slate-200 dark:bg-slate-800 dark:hover:bg-slate-700 text-slate-900 dark:text-white font-medium transition-all duration-200 hover:scale-105"},a.createElement("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})),"Twitter"),a.createElement("a",{href:`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(window.location.href)}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-slate-100 hover:bg-slate-200 dark:bg-slate-800 dark:hover:bg-slate-700 text-slate-900 dark:text-white font-medium transition-all duration-200 hover:scale-105"},a.createElement("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})),"LinkedIn"),a.createElement("a",{href:`mailto:?subject=${encodeURIComponent(e.title)}&body=${encodeURIComponent(`Check out this article: ${window.location.href}`)}`,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-slate-100 hover:bg-slate-200 dark:bg-slate-800 dark:hover:bg-slate-700 text-slate-900 dark:text-white font-medium transition-all duration-200 hover:scale-105"},a.createElement("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},a.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})),"Email")))))))}const gM="pk_test_ZGFybGluZy1zYXdmbHktNTEuY2xlcmsuYWNjb3VudHMuZGV2JA",yM="G-YBHJ3LXWXE";function vM(){return a.useEffect(()=>{},[yM]),null}function bM(){return a.createElement(yx,{publishableKey:gM,navigate:t=>{window.history.pushState({},"",t),window.dispatchEvent(new PopStateEvent("popstate"))},appearance:{variables:{colorPrimary:"#6366F1",colorText:"rgb(15 23 42)",colorTextSecondary:"rgb(71 85 105)",colorBackground:"white"}},signInUrl:"/sign-in",signUpUrl:"/sign-up",afterSignInUrl:"/",afterSignUpUrl:"/"},a.createElement(V2,null,a.createElement(ak,null,a.createElement(U2,null,a.createElement(vM,null),a.createElement("div",{className:"min-h-screen bg-slate-900 transition-colors"},a.createElement(oO,null),a.createElement("main",{className:"relative"},a.createElement(P2,null,a.createElement(st,{path:"/",element:a.createElement(F3,null)}),a.createElement(st,{path:"/sign-in/*",element:a.createElement(j3,null)}),a.createElement(st,{path:"/sign-up/*",element:a.createElement(U3,null)}),a.createElement(st,{path:"/admin/cleanup",element:a.createElement(cO,null,a.createElement(z3,null))}),a.createElement(st,{path:"/privacy",element:a.createElement($3,null)}),a.createElement(st,{path:"/terms",element:a.createElement(B3,null)}),a.createElement(st,{path:"/support",element:a.createElement(V3,null)}),a.createElement(st,{path:"/slack/install",element:a.createElement(G3,null)}),a.createElement(st,{path:"/subprocessors",element:a.createElement(Y3,null)}),a.createElement(st,{path:"/platforms",element:a.createElement(J3,null)}),a.createElement(st,{path:"/referrals",element:a.createElement(X3,null)}),a.createElement(st,{path:"/lifetime-deal",element:a.createElement(tR,null)}),a.createElement(st,{path:"/debug-form",element:a.createElement(iR,null)}),a.createElement(st,{path:"/prod-debug",element:a.createElement(oR,null)}),a.createElement(st,{path:"/supabase-debug",element:a.createElement(cR,null)}),a.createElement(st,{path:"/ab-test-demo",element:a.createElement(gR,null)}),a.createElement(st,{path:"/ab-test-debug",element:a.createElement(pR,null)}),a.createElement(st,{path:"/early-adopter-program",element:a.createElement(SR,null)}),a.createElement(st,{path:"/blog",element:a.createElement(dM,null)}),a.createElement(st,{path:"/blog/:slug",element:a.createElement(pM,null)}),a.createElement(st,{path:"*",element:a.createElement(WE,{to:"/",replace:!0})}))),a.createElement(lO,null)))),a.createElement(yR,null)))}FS.createRoot(document.getElementById("root")).render(a.createElement(a.StrictMode,null,a.createElement(bM,null)));
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.