vendor: 4,929 bytes, lines 1-9
1var qS=Object.defineProperty;var tg=e=>{throw TypeError(e)};var GS=(e,t,r)=>t in e?qS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Jr=(e,t,r)=>GS(e,typeof t!="symbol"?t+"":t,r),wd=(e,t,r)=>t.has(e)||tg("Cannot "+r);var C=(e,t,r)=>(wd(e,t,"read from private field"),r?r.call(e):t.get(e)),Q=(e,t,r)=>t.has(e)?tg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),z=(e,t,r,n)=>(wd(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),ce=(e,t,r)=>(wd(e,t,"access private method"),r);var Cl=(e,t,r,n)=>({set _(s){z(e,t,s,r)},get _(){return C(e,t,n)}});function KS(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).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)}})();function ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gx={exports:{}},Nu={},yx={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 cl=Symbol.for("react.element"),YS=Symbol.for("react.portal"),QS=Symbol.for("react.fragment"),JS=Symbol.for("react.strict_mode"),XS=Symbol.for("react.profiler"),ZS=Symbol.for("react.provider"),ej=Symbol.for("react.context"),tj=Symbol.for("react.forward_ref"),rj=Symbol.for("react.suspense"),nj=Symbol.for("react.memo"),sj=Symbol.for("react.lazy"),rg=Symbol.iterator;function oj(e){return e===null||typeof e!="object"?null:(e=rg&&e[rg]||e["@@iterator"],typeof e=="function"?e:null)}var vx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xx=Object.assign,wx={};function Ea(e,t,r){this.props=e,this.context=t,this.refs=wx,this.updater=r||vx}Ea.prototype.isReactComponent={};Ea.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ea.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function bx(){}bx.prototype=Ea.prototype;function um(e,t,r){this.props=e,this.context=t,this.refs=wx,this.updater=r||vx}var dm=um.prototype=new bx;dm.constructor=um;xx(dm,Ea.prototype);dm.isPureReactComponent=!0;var ng=Array.isArray,kx=Object.prototype.hasOwnProperty,hm={current:null},Sx={key:!0,ref:!0,__self:!0,__source:!0};function jx(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)kx.call(t,n)&&!Sx.hasOwnProperty(n)&&(s[n]=t[n]);var l=arguments.length-2;if(l===1)s.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(n in l=e.defaultProps,l)s[n]===void 0&&(s[n]=l[n]);return{$$typeof:cl,type:e,key:o,ref:i,props:s,_owner:hm.current}}function aj(e,t){return{$$typeof:cl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function fm(e){return typeof e=="object"&&e!==null&&e.$$typeof===cl}function ij(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var sg=/\/+/g;function bd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ij(""+e.key):t.toString(36)}function dc(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case cl:case YS:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+bd(i,0):n,ng(s)?(r="",e!=null&&(r=e.replace(sg,"$&/")+"/"),dc(s,t,r,"",function(u){return u})):s!=null&&(fm(s)&&(s=aj(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(sg,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",ng(e))for(var l=0;l<e.length;l++){o=e[l];var c=n+bd(o,l);i+=dc(o,t,r,c,s)}else if(c=oj(e),typeof c=="function")for(e=c.call(e),l=0;!(o=e.next()).done;
vendor: 4,159 bytes, lines 9-17
9)o=o.value,c=n+bd(o,l++),i+=dc(o,t,r,c,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Nl(e,t,r){if(e==null)return e;var n=[],s=0;return dc(e,n,"","",function(o){return t.call(r,o,s++)}),n}function lj(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var St={current:null},hc={transition:null},cj={ReactCurrentDispatcher:St,ReactCurrentBatchConfig:hc,ReactCurrentOwner:hm};function _x(){throw Error("act(...) is not supported in production builds of React.")}de.Children={map:Nl,forEach:function(e,t,r){Nl(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Nl(e,function(){t++}),t},toArray:function(e){return Nl(e,function(t){return t})||[]},only:function(e){if(!fm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};de.Component=Ea;de.Fragment=QS;de.Profiler=XS;de.PureComponent=um;de.StrictMode=JS;de.Suspense=rj;de.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cj;de.act=_x;de.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=xx({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=hm.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)kx.call(t,c)&&!Sx.hasOwnProperty(c)&&(n[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)n.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];n.children=l}return{$$typeof:cl,type:e.type,key:s,ref:o,props:n,_owner:i}};de.createContext=function(e){return e={$$typeof:ej,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:ZS,_context:e},e.Consumer=e};de.createElement=jx;de.createFactory=function(e){var t=jx.bind(null,e);return t.type=e,t};de.createRef=function(){return{current:null}};de.forwardRef=function(e){return{$$typeof:tj,render:e}};de.isValidElement=fm;de.lazy=function(e){return{$$typeof:sj,_payload:{_status:-1,_result:e},_init:lj}};de.memo=function(e,t){return{$$typeof:nj,type:e,compare:t===void 0?null:t}};de.startTransition=function(e){var t=hc.transition;hc.transition={};try{e()}finally{hc.transition=t}};de.unstable_act=_x;de.useCallback=function(e,t){return St.current.useCallback(e,t)};de.useContext=function(e){return St.current.useContext(e)};de.useDebugValue=function(){};de.useDeferredValue=function(e){return St.current.useDeferredValue(e)};de.useEffect=function(e,t){return St.current.useEffect(e,t)};de.useId=function(){return St.current.useId()};de.useImperativeHandle=function(e,t,r){return St.current.useImperativeHandle(e,t,r)};de.useInsertionEffect=function(e,t){return St.current.useInsertionEffect(e,t)};de.useLayoutEffect=function(e,t){return St.current.useLayoutEffect(e,t)};de.useMemo=function(e,t){return St.current.useMemo(e,t)};de.useReducer=function(e,t,r){return St.current.useReducer(e,t,r)};de.useRef=function(e){return St.current.useRef(e)};de.useState=function(e){return St.current.useState(e)};de.useSyncExternalStore=function(e,t,r){return St.current.useSyncExternalStore(e,t,r)};de.useTransition=function(){return St.current.useTransition()};de.version="18.3.1";yx.exports=de;var p=yx.exports;const I=ll(p),mm=KS({__proto__:null,default:I},[p]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var uj=p,dj=Symbol.for("react.element"),hj=Symbol.for("react.fragment"),fj=Object.prototype.hasOwnProperty,mj=uj.__SECRET_INT
vendor: 15,235 bytes, lines 17-37
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pj={key:!0,ref:!0,__self:!0,__source:!0};function Cx(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)fj.call(t,n)&&!pj.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:dj,type:e,key:o,ref:i,props:s,_owner:mj.current}}Nu.Fragment=hj;Nu.jsx=Cx;Nu.jsxs=Cx;gx.exports=Nu;var a=gx.exports,Nx={exports:{}},Gt={},Ex={exports:{}},Tx={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */(function(e){function t(T,A){var $=T.length;T.push(A);e:for(;0<$;){var J=$-1>>>1,V=T[J];if(0<s(V,A))T[J]=A,T[$]=V,$=J;else break e}}function r(T){return T.length===0?null:T[0]}function n(T){if(T.length===0)return null;var A=T[0],$=T.pop();if($!==A){T[0]=$;e:for(var J=0,V=T.length,L=V>>>1;J<L;){var B=2*(J+1)-1,se=T[B],fe=B+1,ie=T[fe];if(0>s(se,$))fe<V&&0>s(ie,se)?(T[J]=ie,T[fe]=$,J=fe):(T[J]=se,T[B]=$,J=B);else if(fe<V&&0>s(ie,$))T[J]=ie,T[fe]=$,J=fe;else break e}}return A}function s(T,A){var $=T.sortIndex-A.sortIndex;return $!==0?$:T.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],u=[],d=1,h=null,m=3,f=!1,w=!1,y=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(T){for(var A=r(u);A!==null;){if(A.callback===null)n(u);else if(A.startTime<=T)n(u),A.sortIndex=A.expirationTime,t(c,A);else break;A=r(u)}}function k(T){if(y=!1,x(T),!w)if(r(c)!==null)w=!0,q(S);else{var A=r(u);A!==null&&te(k,A.startTime-T)}}function S(T,A){w=!1,y&&(y=!1,v(E),E=-1),f=!0;var $=m;try{for(x(A),h=r(c);h!==null&&(!(h.expirationTime>A)||T&&!M());){var J=h.callback;if(typeof J=="function"){h.callback=null,m=h.priorityLevel;var V=J(h.expirationTime<=A);A=e.unstable_now(),typeof V=="function"?h.callback=V:h===r(c)&&n(c),x(A)}else n(c);h=r(c)}if(h!==null)var L=!0;else{var B=r(u);B!==null&&te(k,B.startTime-A),L=!1}return L}finally{h=null,m=$,f=!1}}var j=!1,N=null,E=-1,_=5,P=-1;function M(){return!(e.unstable_now()-P<_)}function O(){if(N!==null){var T=e.unstable_now();P=T;var A=!0;try{A=N(!0,T)}finally{A?R():(j=!1,N=null)}}else j=!1}var R;if(typeof g=="function")R=function(){g(O)};else if(typeof MessageChannel<"u"){var D=new MessageChannel,U=D.port2;D.port1.onmessage=O,R=function(){U.postMessage(null)}}else R=function(){b(O,0)};function q(T){N=T,j||(j=!0,R())}function te(T,A){E=b(function(){T(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(T){T.callback=null},e.unstable_continueExecution=function(){w||f||(w=!0,q(S))},e.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<T?Math.floor(1e3/T):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(T){switch(m){case 1:case 2:case 3:var A=3;break;default:A=m}var $=m;m=A;try{return T()}finally{m=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(T,A){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var $=m;m=T;try{return A()}finally{m=$}},e.unstable_scheduleCallback=function(T,A,$){var J=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?J+$:J):$=J,T){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=$+V,T={id:d++,callback:A,priorityLevel:T,startTime:$,expirationTime:V,sortIndex:-1},$>J?(T.sortIndex=$,t(u,T),r(c)===null&&T===r(u)&&(y?(v(E),E=-1):y=!0,te(k,$-J))):(T.sortIndex=V,t(c,T),w||f||(w=!0,q(S))),T},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(T){var A=m;return function(){var $=m;m=A;try{return T.apply(this,arguments)}finally{m=$}}}})(Tx);Ex.exports=Tx;var gj=Ex.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var yj=p,qt=gj;function F(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Px=new Set,Ni={};function io(e,t){ma(e,t),ma(e+"Capture",t)}function ma(e,t){for(Ni[e]=t,e=0;e<t.length;e++)Px.add(t[e])}var hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kh=Object.prototype.hasOwnProperty,vj=/^[: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]*$/,og={},ag={};function xj(e){return kh.call(ag,e)?!0:kh.call(og,e)?!1:vj.test(e)?ag[e]=!0:(og[e]=!0,!1)}function wj(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function bj(e,t,r,n){if(t===null||typeof t>"u"||wj(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jt(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var at={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){at[e]=new jt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];at[t]=new jt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){at[e]=new jt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){at[e]=new jt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){at[e]=new jt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){at[e]=new jt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){at[e]=new jt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){at[e]=new jt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){at[e]=new jt(e,5,!1,e.toLowerCase(),null,!1,!1)});var pm=/[\-:]([a-z])/g;function gm(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(pm,gm);at[t]=new jt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(pm,gm);at[t]=new jt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(pm,gm);at[t]=new jt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){at[e]=new jt(e,1,!1,e.toLowerCase(),null,!1,!1)});at.xlinkHref=new jt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){at[e]=new jt(e,1,!1,e.toLowerCase(),null,!0,!0)});function ym(e,t,r,n){var s=at.hasOwnProperty(t)?at[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(bj(t,r,s,n)&&(r=null),n||s===null?xj(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var xn=yj.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,El=Symbol.for("react.element"),Po=Symbol.for("react.portal"),Ao=Symbol.for("react.fragment"),vm=Symbol.for("react.strict_mode"),Sh=Symbol.for("react.profiler"),Ax=Symbol.for("react.provider"),Rx=Symbol.for("react.context"),xm=Symbol.for("react.forward_ref"),jh=Symbol.for("react.suspense"),_h=Symbol.for("react.suspense_list"),wm=Symbol.for("react.memo"),In=Symbol.for("react.lazy"),Ox=Symbol.for("react.offscreen"),ig=Symbol.iterator;function za(e){return e===null||typeof e!="object"?null:(e=ig&&e[ig]||e["@@iterator"],typeof e=="function"?e:null)}var Le=Object.assign,kd;function ai(e){if(kd===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);kd=t&&t[1]||""}return` 34`+kd+e}var Sd=!1;function jd(e,t){if(!e||Sd)return"";Sd=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(` 35`),o=n.stack.split(` 36`),i=s.length-1,l=o.length-1;1<=i&&0<=l&&s[i]!==o[l];)l--;for(;1<=i&&0<=l;i--,l--)if(s[i]!==o[l]){if(i!==1||l!==1)do if(i--,l--,0>l||s[i]!==o[l]){var c=` 37`+s[i].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=i&&0<=l);break}}}finally{Sd=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ai(e):""}function kj(e){switch(e.tag){case 5:return ai(e.type);case 16:return ai("Lazy");case 13:return ai("Suspense");case 19:return ai("SuspenseList");case 0:case 2:case 15:return e=jd(e.type,!1),e;case 11:return e=jd(e.type.render,!1),e;case 1:return e=jd(e.type,!0),e;default:return""}}function Ch(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ao:return"Fragment";case Po:return"Portal";case Sh:return"Profiler";case vm:return"StrictMode";case jh:return"Suspense";case _h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Rx:return(e.displayName||"Context")+".Consumer";case Ax:return(e._context.displayName||"Context")+".Provider";case xm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case wm:return t=e.displayName||null,t!==null?t:Ch(e.type)||"Memo";case In:t=e._payload,e=e._init;try{return Ch(e(t))}catch{}}return null}function Sj(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ch(t);case 8:return t===vm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ds(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ix(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jj(e){var t=Ix(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tl(e){e._valueTracker||(e._valueTracker=jj(e))}function Lx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Ix(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Lc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Nh(e,t){var r=t.checked;return Le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function lg(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ds(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}
vendor: 4,651 bytes, line 37
37function Dx(e,t){t=t.checked,t!=null&&ym(e,"checked",t,!1)}function Eh(e,t){Dx(e,t);var r=ds(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Th(e,t.type,r):t.hasOwnProperty("defaultValue")&&Th(e,t.type,ds(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cg(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Th(e,t,r){(t!=="number"||Lc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ii=Array.isArray;function zo(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+ds(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ph(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(F(91));return Le({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ug(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(F(92));if(ii(r)){if(1<r.length)throw Error(F(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ds(r)}}function Mx(e,t){var r=ds(t.value),n=ds(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function dg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Fx(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ah(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Fx(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Pl,$x=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Pl=Pl||document.createElement("div"),Pl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Pl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ei(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var hi={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},_j=["Webkit","ms","Moz","O"];Object.keys(hi).forEach(function(e){_j.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),hi[t]=hi[e]})});function Ux(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||hi.hasOwnProperty(e)&&hi[e]?(""+t).trim():t+"px"}function Bx(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=Ux(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var Cj=Le({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 Rh(e,t){if(t){if(Cj[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(F(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(F(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(F(61))}if(t.style!=null&&typeof t.style!="object")throw Error(F(62))}}function Oh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="str
37ing";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ih=null;function bm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lh=null,Ho=null,Vo=null;function hg(e){if(e=hl(e)){if(typeof Lh!="function")throw Error(F(280));var t=e.stateNode;t&&(t=Ru(t),Lh(e.stateNode,e.type,t))}}function Wx(e){Ho?Vo?Vo.push(e):Vo=[e]:Ho=e}function zx(){if(Ho){var e=Ho,t=Vo;if(Vo=Ho=null,hg(e),t)for(e=0;e<t.length;e++)hg(t[e])}}function Hx(e,t){return e(t)}function Vx(){}var _d=!1;function qx(e,t,r){if(_d)return e(t,r);_d=!0;try{return Hx(e,t,r)}finally{_d=!1,(Ho!==null||Vo!==null)&&(Vx(),zx())}}function Ti(e,t){var r=e.stateNode;if(r===null)return null;var n=Ru(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(F(231,t,typeof r));return r}var Dh=!1;if(hn)try{var Ha={};Object.defineProperty(Ha,"passive",{get:function(){Dh=!0}}),window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch{Dh=!1}function Nj(e,t,r,n,s,o,i,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var fi=!1,Dc=null,Mc=!1,Mh=null,Ej={onError:function(e){fi=!0,Dc=e}};function Tj(e,t,r,n,s,o,i,l,c){fi=!1,Dc=null,Nj.apply(Ej,arguments)}function Pj(e,t,r,n,s,o,i,l,c){if(Tj.apply(this,arguments),fi){if(fi){var u=Dc;fi=!1,Dc=null}else throw Error(F(198));Mc||(Mc=!0,Mh=u)}}function lo(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Gx(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function fg(e){if(lo(e)!==e)throw Error(F(188))}function Aj(e){var t=e.alternate;if(!t){if(t=lo(e),t===null)throw Error(F(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return fg(s),e;if(o===n)return fg(s),t;o=o.sibling}throw Error(F(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,l=s.child;l;){if(l===r){i=!0,r=s,n=o;break}if(l===n){i=!0,n=s,r=o;break}l=l.sibling}if(!i){for(l=o.child;l;){if(l===r){i=!0,r=o,n=s;break}if(l===n){i=!0,n=o,r=s;break}l=l.sibling}if(!i)throw Error(F(189))}}if(r.alternate!==n)throw Error(F(190))}if(r.tag!==3)throw Error(F(188));return r.stateNode.current===r?e:t}function Kx(e){return e=Aj(e),e!==null?Yx(e):null}function Yx(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Yx(e);if(t!==null)return t;e=e.sibling}return null}var Qx=qt.unstable_scheduleCallback,mg=qt.unstable_cancelCallback,Rj=qt.unstable_shouldYield,Oj=qt.unstable_requestPaint,Ue=qt.unstable_now,Ij=qt.unstable_getCurrentPriorityLevel,km=qt.unstable_ImmediatePriority,Jx=qt.unstable_UserBlockingPriority,Fc=qt.unstable_NormalPriority,Lj=qt.unstable_LowPriority,Xx=qt.unstable_IdlePriority,Eu=null,Ur=null;function Dj(e){if(Ur&&typeof Ur.onCommitFiberRoot=="function")try{Ur.onCommitFiberRoot(Eu,e,void 0,(e.current.flags&128)===128)}catch{}}var br=Math.clz32?Math.clz32:$j,Mj=Math.log,Fj=Math.LN2;function $j(e){return e>>>=0,e===0?32:31-(Mj(e)/Fj|0)|0}var Al=64,Rl=4194304;function li(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function $c(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var l=i&~s;l!==0?n=li(l):(o&=i,o!==0&&(n=li(o)))}else i=r&~s,i!==0?n=li(i):o!==0&&(n=li(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-br(t),s=1<<r,n|=e[r],t&=~s;return n}function Uj(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Bj(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-br(o),l=1<<i,c=s[i];c===-1?(!(l&r)||l&n)&&(s[i]=Uj(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}}function Fh(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Zx(){var e=Al;return Al<<=1,!(Al&4194240)&&(Al=64),e}function Cd(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 37
37function ul(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-br(t),e[t]=r}function Wj(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-br(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function Sm(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-br(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ve=0;function ew(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var tw,jm,rw,nw,sw,$h=!1,Ol=[],es=null,ts=null,rs=null,Pi=new Map,Ai=new Map,Mn=[],zj="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 pg(e,t){switch(e){case"focusin":case"focusout":es=null;break;case"dragenter":case"dragleave":ts=null;break;case"mouseover":case"mouseout":rs=null;break;case"pointerover":case"pointerout":Pi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ai.delete(t.pointerId)}}function Va(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=hl(t),t!==null&&jm(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Hj(e,t,r,n,s){switch(t){case"focusin":return es=Va(es,e,t,r,n,s),!0;case"dragenter":return ts=Va(ts,e,t,r,n,s),!0;case"mouseover":return rs=Va(rs,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return Pi.set(o,Va(Pi.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Ai.set(o,Va(Ai.get(o)||null,e,t,r,n,s)),!0}return!1}function ow(e){var t=Os(e.target);if(t!==null){var r=lo(t);if(r!==null){if(t=r.tag,t===13){if(t=Gx(r),t!==null){e.blockedOn=t,sw(e.priority,function(){rw(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function fc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Uh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Ih=n,r.target.dispatchEvent(n),Ih=null}else return t=hl(r),t!==null&&jm(t),e.blockedOn=r,!1;t.shift()}return!0}function gg(e,t,r){fc(e)&&r.delete(t)}function Vj(){$h=!1,es!==null&&fc(es)&&(es=null),ts!==null&&fc(ts)&&(ts=null),rs!==null&&fc(rs)&&(rs=null),Pi.forEach(gg),Ai.forEach(gg)}function qa(e,t){e.blockedOn===t&&(e.blockedOn=null,$h||($h=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,Vj)))}function Ri(e){function t(s){return qa(s,e)}if(0<Ol.length){qa(Ol[0],e);for(var r=1;r<Ol.length;r++){var n=Ol[r];n.blockedOn===e&&(n.blockedOn=null)}}for(es!==null&&qa(es,e),ts!==null&&qa(ts,e),rs!==null&&qa(rs,e),Pi.forEach(t),Ai.forEach(t),r=0;r<Mn.length;r++)n=Mn[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Mn.length&&(r=Mn[0],r.blockedOn===null);)ow(r),r.blockedOn===null&&Mn.shift()}var qo=xn.ReactCurrentBatchConfig,Uc=!0;function qj(e,t,r,n){var s=ve,o=qo.transition;qo.transition=null;try{ve=1,_m(e,t,r,n)}finally{ve=s,qo.transition=o}}function Gj(e,t,r,n){var s=ve,o=qo.transition;qo.transition=null;try{ve=4,_m(e,t,r,n)}finally{ve=s,qo.transition=o}}function _m(e,t,r,n){if(Uc){var s=Uh(e,t,r,n);if(s===null)Dd(e,t,n,Bc,r),pg(e,n);else if(Hj(s,e,t,r,n))n.stopPropagation();else if(pg(e,n),t&4&&-1<zj.indexOf(e)){for(;s!==null;){var o=hl(s);if(o!==null&&tw(o),o=Uh(e,t,r,n),o===null&&Dd(e,t,n,Bc,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else Dd(e,t,n,null,r)}}var Bc=null;function Uh(e,t,r,n){if(Bc=null,e=bm(n),e=Os(e),e!==null)if(t=lo(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Gx(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Bc=e,null}
vendor: 10,401 bytes, line 37
37function aw(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ij()){case km:return 1;case Jx:return 4;case Fc:case Lj:return 16;case Xx:return 536870912;default:return 16}default:return 16}}var Qn=null,Cm=null,mc=null;function iw(){if(mc)return mc;var e,t=Cm,r=t.length,n,s="value"in Qn?Qn.value:Qn.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return mc=s.slice(e,1<n?1-n:void 0)}function pc(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Il(){return!0}function yg(){return!1}function Kt(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(r=e[l],this[l]=r?r(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Il:yg,this.isPropagationStopped=yg,this}return Le(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Il)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Il)},persist:function(){},isPersistent:Il}),t}var Ta={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nm=Kt(Ta),dl=Le({},Ta,{view:0,detail:0}),Kj=Kt(dl),Nd,Ed,Ga,Tu=Le({},dl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Em,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ga&&(Ga&&e.type==="mousemove"?(Nd=e.screenX-Ga.screenX,Ed=e.screenY-Ga.screenY):Ed=Nd=0,Ga=e),Nd)},movementY:function(e){return"movementY"in e?e.movementY:Ed}}),vg=Kt(Tu),Yj=Le({},Tu,{dataTransfer:0}),Qj=Kt(Yj),Jj=Le({},dl,{relatedTarget:0}),Td=Kt(Jj),Xj=Le({},Ta,{animationName:0,elapsedTime:0,pseudoElement:0}),Zj=Kt(Xj),e_=Le({},Ta,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),t_=Kt(e_),r_=Le({},Ta,{data:0}),xg=Kt(r_),n_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s_={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"},o_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function a_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=o_[e])?!!t[e]:!1}function Em(){return a_}var i_=Le({},dl,{key:function(e){if(e.key){var t=n_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=pc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?s_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Em,charCode:function(e){return e.type==="keypress"?pc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),l_=Kt(i_),c_=Le({},Tu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),wg=Kt(c_),u_=Le({},dl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Em}),d_=Kt(u_),h_=Le({},Ta,{propertyName:0,elapsedTime:0,pseudoElement:0}),f_=Kt(h_),m_=Le({},Tu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),p_=Kt(m_),g_=[9,13,27,32],Tm=hn&&"CompositionEvent"in window,mi=null;hn&&"documentMode"in document&&(mi=document.documentMode);var y_=hn&&"TextEvent"in window&&!mi,lw=hn&&(!Tm||mi&&8<mi&&11>=mi),bg=" ",kg=!1;function cw(e,t){switch(e){case"keyup":return g_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uw(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ro=!1;function v_(e,t){switch(e){case"compositionend":return uw(t);case"keypress":return t.which!==32?null:(kg=!0,bg);case"textInput":return e=t.data,e===bg&&kg?null:e;default:return null}}function x_(e,t){if(Ro)return e==="compositionend"||!Tm&&cw(e,t)?(e=iw(),mc=Cm=Qn=null,Ro=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return lw&&t.locale!=="ko"?null:t.data;default:return null}}var w_={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 Sg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!w_[e.type]:t==="textarea"}function dw(e,t,r,n){Wx(n),t=Wc(t,"onChange"),0<t.length&&(r=new Nm("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var pi=null,Oi=null;function b_(e){kw(e,0)}function Pu(e){var t=Lo(e);if(Lx(t))return e}function k_(e,t){if(e==="change")return t}var hw=!1;if(hn){var Pd;if(hn){var Ad="oninput"in document;if(!Ad){var jg=document.createElement("div");jg.setAttribute("oninput","return;"),Ad=typeof jg.oninput=="function"}Pd=Ad}else Pd=!1;hw=Pd&&(!document.documentMode||9<document.documentMode)}function _g(){pi&&(pi.detachEvent("onpropertychange",fw),Oi=pi=null)}function fw(e){if(e.propertyName==="value"&&Pu(Oi)){var t=[];dw(t,Oi,e,bm(e)),qx(b_,t)}}function S_(e,t,r){e==="focusin"?(_g(),pi=t,Oi=r,pi.attachEvent("onpropertychange",fw)):e==="focusout"&&_g()}function j_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pu(Oi)}function __(e,t){if(e==="click")return Pu(t)}function C_(e,t){if(e==="input"||e==="change")return Pu(t)}function N_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sr=typeof Object.is=="function"?Object.is:N_;function Ii(e,t){if(Sr(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!kh.call(t,s)||!Sr(e[s],t[s]))return!1}return!0}function Cg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ng(e,t){var r=Cg(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Cg(r)}}function mw(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mw(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pw(){for(var e=window,t=Lc();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Lc(e.document)}return t}function Pm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function E_(e){var t=pw(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&mw(r.ownerDocument.documentElement,r)){if(n!==null&&Pm(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=Ng(r,o);var i=Ng(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var T_=hn&&"documentMode"in document&&11>=document.documentMode,Oo=null,Bh=null,gi=null,Wh=!1;function Eg(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Wh||Oo==null||Oo!==Lc(n)||(n=Oo,"selectionStart"in n&&Pm(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),gi&&Ii(gi,n)||(gi=n,n=Wc(Bh,"onSelect"),0<n.length&&(t=new Nm("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Oo)))}function Ll(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Io={animationend:Ll("Animation","AnimationEnd"),animationiteration:Ll("Animation","AnimationIteration"),animationstart:Ll("Animation","AnimationStart"),transitionend:Ll("Transition","TransitionEnd")},Rd={},gw={};hn&&(gw=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Au(e){if(Rd[e])return Rd[e];if(!Io[e])return e;var t=Io[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in gw)return Rd[e]=t[r];return e}var yw=Au("animationend"),vw=Au("animationiteration"),xw=Au("animationstart"),ww=Au("transitionend"),bw=new Map,Tg="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 ps(e,t){bw.set(e,t),io(t,[e])}for(var Od=0;Od<Tg.length;Od++){var Id=Tg[Od],P_=Id.toLowerCase(),A_=Id[0].toUpperCase()+Id.slice(1);ps(P_,"on"+A_)}ps(yw,"onAnimationEnd");ps(vw,"onAnimationIteration");ps(xw,"onAnimationStart");ps("dblclick","onDoubleClick");ps("focusin","onFocus");ps("focusout","onBlur");ps(ww,"onTransitionEnd");ma("onMouseEnter",["mouseout","mouseover"]);ma("onMouseLeave",["mouseout","mouseover"]);ma("onPointerEnter",["pointerout","pointerover"]);ma("onPointerLeave",["pointerout","pointerover"]);io("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));io("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));io("onBeforeInput",["compositionend","keypress","textInput","paste"]);io("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));io("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));io("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ci="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(" "),R_=new Set("cancel close invalid load scroll toggle".split(" ").concat(ci));function Pg(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,Pj(n,t,void 0,e),e.currentTarget=null}function kw(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var l=n[i],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&s.isPropagationStopped())break e;Pg(s,l,u),o=c}else for(i=0;i<n.length;i++){if(l=n[i],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&s.isPropagationStopped())break e;Pg(s,l,u),o=c}}}if(Mc)throw e=Mh,Mc=!1,Mh=null,e}function Te(e,t){var r=t[Gh];r===void 0&&(r=t[Gh]=new Set);var n=e+"__bubble";r.has(n)||(Sw(t,e,2,!1),r.add(n))}function Ld(e,t,r){var n=0;t&&(n|=4),Sw(r,e,n,t)}var Dl="_reactListening"+Math.random().toString(36).slice(2);function Li(e){if(!e[Dl]){e[Dl]=!0,Px.forEach(function(r){r!=="selectionchange"&&(R_.has(r)||Ld(r,!1,e),Ld(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Dl]||(t[Dl]=!0,Ld("selectionchange",!1,t))}}function Sw(e,t,r,n){switch(aw(t)){case 1:var s=qj;break;case 4:s=Gj;break;default:s=_m}r=s.bind(null,t,r,e),s=void 0,!Dh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function Dd(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var l=n.stateNode.containerInfo;
vendor: 21,713 bytes, lines 37-38
37if(l===s||l.nodeType===8&&l.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var c=i.tag;if((c===3||c===4)&&(c=i.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;i=i.return}for(;l!==null;){if(i=Os(l),i===null)return;if(c=i.tag,c===5||c===6){n=o=i;continue e}l=l.parentNode}}n=n.return}qx(function(){var u=o,d=bm(r),h=[];e:{var m=bw.get(e);if(m!==void 0){var f=Nm,w=e;switch(e){case"keypress":if(pc(r)===0)break e;case"keydown":case"keyup":f=l_;break;case"focusin":w="focus",f=Td;break;case"focusout":w="blur",f=Td;break;case"beforeblur":case"afterblur":f=Td;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=vg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Qj;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=d_;break;case yw:case vw:case xw:f=Zj;break;case ww:f=f_;break;case"scroll":f=Kj;break;case"wheel":f=p_;break;case"copy":case"cut":case"paste":f=t_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=wg}var y=(t&4)!==0,b=!y&&e==="scroll",v=y?m!==null?m+"Capture":null:m;y=[];for(var g=u,x;g!==null;){x=g;var k=x.stateNode;if(x.tag===5&&k!==null&&(x=k,v!==null&&(k=Ti(g,v),k!=null&&y.push(Di(g,k,x)))),b)break;g=g.return}0<y.length&&(m=new f(m,w,null,r,d),h.push({event:m,listeners:y}))}}if(!(t&7)){e:{if(m=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",m&&r!==Ih&&(w=r.relatedTarget||r.fromElement)&&(Os(w)||w[fn]))break e;if((f||m)&&(m=d.window===d?d:(m=d.ownerDocument)?m.defaultView||m.parentWindow:window,f?(w=r.relatedTarget||r.toElement,f=u,w=w?Os(w):null,w!==null&&(b=lo(w),w!==b||w.tag!==5&&w.tag!==6)&&(w=null)):(f=null,w=u),f!==w)){if(y=vg,k="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=wg,k="onPointerLeave",v="onPointerEnter",g="pointer"),b=f==null?m:Lo(f),x=w==null?m:Lo(w),m=new y(k,g+"leave",f,r,d),m.target=b,m.relatedTarget=x,k=null,Os(d)===u&&(y=new y(v,g+"enter",w,r,d),y.target=x,y.relatedTarget=b,k=y),b=k,f&&w)t:{for(y=f,v=w,g=0,x=y;x;x=fo(x))g++;for(x=0,k=v;k;k=fo(k))x++;for(;0<g-x;)y=fo(y),g--;for(;0<x-g;)v=fo(v),x--;for(;g--;){if(y===v||v!==null&&y===v.alternate)break t;y=fo(y),v=fo(v)}y=null}else y=null;f!==null&&Ag(h,m,f,y,!1),w!==null&&b!==null&&Ag(h,b,w,y,!0)}}e:{if(m=u?Lo(u):window,f=m.nodeName&&m.nodeName.toLowerCase(),f==="select"||f==="input"&&m.type==="file")var S=k_;else if(Sg(m))if(hw)S=C_;else{S=j_;var j=S_}else(f=m.nodeName)&&f.toLowerCase()==="input"&&(m.type==="checkbox"||m.type==="radio")&&(S=__);if(S&&(S=S(e,u))){dw(h,S,r,d);break e}j&&j(e,m,u),e==="focusout"&&(j=m._wrapperState)&&j.controlled&&m.type==="number"&&Th(m,"number",m.value)}switch(j=u?Lo(u):window,e){case"focusin":(Sg(j)||j.contentEditable==="true")&&(Oo=j,Bh=u,gi=null);break;case"focusout":gi=Bh=Oo=null;break;case"mousedown":Wh=!0;break;case"contextmenu":case"mouseup":case"dragend":Wh=!1,Eg(h,r,d);break;case"selectionchange":if(T_)break;case"keydown":case"keyup":Eg(h,r,d)}var N;if(Tm)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Ro?cw(e,r)&&(E="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(E="onCompositionStart");E&&(lw&&r.locale!=="ko"&&(Ro||E!=="onCompositionStart"?E==="onCompositionEnd"&&Ro&&(N=iw()):(Qn=d,Cm="value"in Qn?Qn.value:Qn.textContent,Ro=!0)),j=Wc(u,E),0<j.length&&(E=new xg(E,e,null,r,d),h.push({event:E,listeners:j}),N?E.data=N:(N=uw(r),N!==null&&(E.data=N)))),(N=y_?v_(e,r):x_(e,r))&&(u=Wc(u,"onBeforeInput"),0<u.length&&(d=new xg("onBeforeInput","beforeinput",null,r,d),h.push({event:d,listeners:u}),d.data=N))}kw(h,t)})}function Di(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Wc(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Ti(e,r),o!=null&&n.unshift(Di(e,o,s)),o=Ti(e,t),o!=null&&n.push(Di(e,o,s))),e=e.return}return n}function fo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ag(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var l=r,c=l.alternate,u=l.stateNode;if(c!==null&&c===n)break;l.tag===5&&u!==null&&(l=u,s?(c=Ti(r,o),c!=null&&i.unshift(Di(r,c,l))):s||(c=Ti(r,o),c!=null&&i.push(Di(r,c,l)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var O_=/\r\n?/g,I_=/\u0000|\uFFFD/g;function Rg(e){return(typeof e=="string"?e:""+e).replace(O_,` 38`).replace(I_,"")}function Ml(e,t,r){if(t=Rg(t),Rg(e)!==t&&r)throw Error(F(425))}function zc(){}var zh=null,Hh=null;function Vh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qh=typeof setTimeout=="function"?setTimeout:void 0,L_=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,D_=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(M_)}:qh;function M_(e){setTimeout(function(){throw e})}function Md(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Ri(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Ri(t)}function ns(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ig(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Pa=Math.random().toString(36).slice(2),Mr="__reactFiber$"+Pa,Mi="__reactProps$"+Pa,fn="__reactContainer$"+Pa,Gh="__reactEvents$"+Pa,F_="__reactListeners$"+Pa,$_="__reactHandles$"+Pa;function Os(e){var t=e[Mr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[fn]||r[Mr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Ig(e);e!==null;){if(r=e[Mr])return r;e=Ig(e)}return t}e=r,r=e.parentNode}return null}function hl(e){return e=e[Mr]||e[fn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Lo(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(F(33))}function Ru(e){return e[Mi]||null}var Kh=[],Do=-1;function gs(e){return{current:e}}function Pe(e){0>Do||(e.current=Kh[Do],Kh[Do]=null,Do--)}function Ce(e,t){Do++,Kh[Do]=e.current,e.current=t}var hs={},pt=gs(hs),It=gs(!1),Qs=hs;function pa(e,t){var r=e.type.contextTypes;if(!r)return hs;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Lt(e){return e=e.childContextTypes,e!=null}function Hc(){Pe(It),Pe(pt)}function Lg(e,t,r){if(pt.current!==hs)throw Error(F(168));Ce(pt,t),Ce(It,r)}function jw(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(F(108,Sj(e)||"Unknown",s));return Le({},r,n)}function Vc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hs,Qs=pt.current,Ce(pt,e),Ce(It,It.current),!0}function Dg(e,t,r){var n=e.stateNode;if(!n)throw Error(F(169));r?(e=jw(e,t,Qs),n.__reactInternalMemoizedMergedChildContext=e,Pe(It),Pe(pt),Ce(pt,e)):Pe(It),Ce(It,r)}var nn=null,Ou=!1,Fd=!1;function _w(e){nn===null?nn=[e]:nn.push(e)}function U_(e){Ou=!0,_w(e)}function ys(){if(!Fd&&nn!==null){Fd=!0;var e=0,t=ve;try{var r=nn;for(ve=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}nn=null,Ou=!1}catch(s){throw nn!==null&&(nn=nn.slice(e+1)),Qx(km,ys),s}finally{ve=t,Fd=!1}}return null}var Mo=[],Fo=0,qc=null,Gc=0,Zt=[],er=0,Js=null,ln=1,cn="";function js(e,t){Mo[Fo++]=Gc,Mo[Fo++]=qc,qc=e,Gc=t}function Cw(e,t,r){Zt[er++]=ln,Zt[er++]=cn,Zt[er++]=Js,Js=e;var n=ln;e=cn;var s=32-br(n)-1;n&=~(1<<s),r+=1;var o=32-br(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,ln=1<<32-br(t)+s|r<<s|n,cn=o+e}else ln=1<<o|r<<s|n,cn=e}function Am(e){e.return!==null&&(js(e,1),Cw(e,1,0))}function Rm(e){for(;e===qc;)qc=Mo[--Fo],Mo[Fo]=null,Gc=Mo[--Fo],Mo[Fo]=null;for(;e===Js;)Js=Zt[--er],Zt[er]=null,cn=Zt[--er],Zt[er]=null,ln=Zt[--er],Zt[er]=null}var Ht=null,zt=null,Re=!1,xr=null;function Nw(e,t){var r=tr(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Mg(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ht=e,zt=ns(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ht=e,zt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Js!==null?{id:ln,overflow:cn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=tr(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ht=e,zt=null,!0):!1;default:return!1}}function Yh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Qh(e){if(Re){var t=zt;if(t){var r=t;if(!Mg(e,t)){if(Yh(e))throw Error(F(418));t=ns(r.nextSibling);var n=Ht;t&&Mg(e,t)?Nw(n,r):(e.flags=e.flags&-4097|2,Re=!1,Ht=e)}}else{if(Yh(e))throw Error(F(418));e.flags=e.flags&-4097|2,Re=!1,Ht=e}}}function Fg(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ht=e}function Fl(e){if(e!==Ht)return!1;if(!Re)return Fg(e),Re=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Vh(e.type,e.memoizedProps)),t&&(t=zt)){if(Yh(e))throw Ew(),Error(F(418));for(;t;)Nw(e,t),t=ns(t.nextSibling)}if(Fg(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(F(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){zt=ns(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}zt=null}}else zt=Ht?ns(e.stateNode.nextSibling):null;return!0}function Ew(){for(var e=zt;e;)e=ns(e.nextSibling)}function ga(){zt=Ht=null,Re=!1}function Om(e){xr===null?xr=[e]:xr.push(e)}var B_=xn.ReactCurrentBatchConfig;function Ka(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(F(309));var n=r.stateNode}if(!n)throw Error(F(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var l=s.refs;i===null?delete l[o]:l[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(F(284));if(!r._owner)throw Error(F(290,e))}return e}function $l(e,t){throw e=Object.prototype.toString.call(t),Error(F(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $g(e){var t=e._init;return t(e._payload)}function Tw(e){function t(v,g){if(e){var x=v.deletions;x===null?(v.deletions=[g],v.flags|=16):x.push(g)}}function r(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function n(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=is(v,g),v.index=0,v.sibling=null,v}function o(v,g,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<g?(v.flags|=2,g):x):(v.flags|=2,g)):(v.flags|=1048576,g)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function l(v,g,x,k){return g===null||g.tag!==6?(g=Vd(x,v.mode,k),g.return=v,g):(g=s(g,x),g.return=v,g)}function c(v,g,x,k){var S=x.type;return S===Ao?d(v,g,x.props.children,k,x.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===In&&$g(S)===g.type)?(k=s(g,x.props),k.ref=Ka(v,g,x),k.return=v,k):(k=kc(x.type,x.key,x.props,null,v.mode,k),k.ref=Ka(v,g,x),k.return=v,k)}function u(v,g,x,k){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=qd(x,v.mode,k),g.return=v,g):(g=s(g,x.children||[]),g.return=v,g)}function d(v,g,x,k,S){return g===null||g.tag!==7?(g=Ks(x,v.mode,k,S),g.return=v,g):(g=s(g,x),g.return=v,g)}function h(v,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Vd(""+g,v.mode,x),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case El:return x=kc(g.type,g.key,g.props,null,v.mode,x),x.ref=Ka(v,null,g),x.return=v,x;case Po:return g=qd(g,v.mode,x),g.return=v,g;case In:var k=g._init;return h(v,k(g._payload),x)}if(ii(g)||za(g))return g=Ks(g,v.mode,x,null),g.return=v,g;$l(v,g)}return null}function m(v,g,x,k){var S=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:l(v,g,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case El:return x.key===S?c(v,g,x,k):null;case Po:return x.key===S?u(v,g,x,k):null;case In:return S=x._init,m(v,g,S(x._payload),k)}if(ii(x)||za(x))return S!==null?null:d(v,g,x,k,null);$l(v,x)}return null}function f(v,g,x,k,S){if(typeof k=="string"&&k!==""||typeof k=="number")return v=v.get(x)||null,l(g,v,""+k,S);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case El:return v=v.get(k.key===null?x:k.key)||null,c(g,v,k,S);case Po:return v=v.get(k.key===null?x:k.key)||null,u(g,v,k,S);case In:var j=k._init;return f(v,g,x,j(k._payload),S)}if(ii(k)||za(k))return v=v.get(x)||null,d(g,v,k,S,null);$l(g,k)}return null}function w(v,g,x,k){for(var S=null,j=null,N=g,E=g=0,_=null;N!==null&&E<x.length;E++){N.index>E?(_=N,N=null):_=N.sibling;var P=m(v,N,x[E],k);if(P===null){N===null&&(N=_);break}e&&N&&P.alternate===null&&t(v,N),g=o(P,g,E),j===null?S=P:j.sibling=P,j=P,N=_}if(E===x.length)return r(v,N),Re&&js(v,E),S;if(N===null){for(;E<x.length;E++)N=h(v,x[E],k),N!==null&&(g=o(N,g,E),j===null?S=N:j.sibling=N,j=N);return Re&&js(v,E),S}for(N=n(v,N);E<x.length;E++)_=f(N,v,E,x[E],k),_!==null&&(e&&_.alternate!==null&&N.delete(_.key===null?E:_.key),g=o(_,g,E),j===null?S=_:j.sibling=_,j=_);return e&&N.forEach(function(M){return t(v,M)}),Re&&js(v,E),S}function y(v,g,x,k){var S=za(x);if(typeof S!="function")throw Error(F(150));if(x=S.call(x),x==null)throw Error(F(151));for(var j=S=null,N=g,E=g=0,_=null,P=x.next();N!==null&&!P.done;E++,P=x.next()){N.index>E?(_=N,N=null):_=N.sibling;var M=m(v,N,P.value,k);if(M===null){N===null&&(N=_);break}e&&N&&M.alternate===null&&t(v,N),g=o(M,g,E),j===null?S=M:j.sibling=M,j=M,N=_}if(P.done)return r(v,N),Re&&js(v,E),S;if(N===null){for(;!P.done;E++,P=x.next())P=h(v,P.value,k),P!==null&&(g=o(P,g,E),j===null?S=P:j.sibling=P,j=P);return Re&&js(v,E),S}for(N=n(v,N);!P.done;E++,P=x.next())P=f(N,v,E,P.value,k),P!==null&&(e&&P.alternate!==null&&N.delete(P.key===null?E:P.key),g=o(P,g,E),j===null?S=P:j.sibling=P,j=P);return e&&N.forEach(function(O){return t(v,O)}),Re&&js(v,E),S}function b(v,g,x,k){if(typeof x=="object"&&x!==null&&x.type===Ao&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case El:e:{for(var S=x.key,j=g;j!==null;){if(j.key===S){if(S=x.type,S===Ao){if(j.tag===7){r(v,j.sibling),g=s(j,x.props.children),g.return=v,v=g;break e}}else if(j.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===In&&$g(S)===j.type){r(v,j.sibling),g=s(j,x.props),g.ref=Ka(v,j,x),g.return=v,v=g;break e}r(v,j);break}else t(v,j);j=j.sibling}x.type===Ao?(g=Ks(x.props.children,v.mode,k,x.key),g.return=v,v=g):(k=kc(x.type,x.key,x.props,null,v.mode,k),k.ref=Ka(v,g,x),k.return=v,v=k)}return i(v);case Po:e:{for(j=x.key;g!==null;){if(g.key===j)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){r(v,g.sibling),g=s(g,x.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else t(v,g);g=g.sibling}g=qd(x,v.mode,k),g.return=v,v=g}return i(v);case In:return j=x._init,b(v,g,j(x._payload),k)}if(ii(x))return w(v,g,x,k);if(za(x))return y(v,g,x,k);$l(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(r(v,g.sibling),g=s(g,x),g.return=v,v=g):(r(v,g),g=Vd(x,v.mode,k),g.return=v,v=g),i(v)):r(v,g)}return b}var ya=Tw(!0),Pw=Tw(!1),Kc=gs(null),Yc=null,$o=null,Im=null;function Lm(){Im=$o=Yc=null}function Dm(e){var t=Kc.current;Pe(Kc),e._currentValue=t}function Jh(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Go(e,t){Yc=e,Im=$o=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ot=!0),e.firstContext=null)}function nr(e){var t=e._currentValue;if(Im!==e)if(e={context:e,memoizedValue:t,next:null},$o===null){if(Yc===null)throw Error(F(308));$o=e,Yc.dependencies={lanes:0,firstContext:e}}else $o=$o.next=e;return t}var Is=null;function Mm(e){Is===null?Is=[e]:Is.push(e)}function Aw(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,Mm(t)):(r.next=s.next,s.next=r),t.interleaved=r,mn(e,n)}function mn(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Ln=!1;function Fm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Rw(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function un(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ss(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,me&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,mn(e,r)}return s=n.interleaved,s===null?(t.next=t,Mm(n)):(t.next=s.next,s.next=t),n.interleaved=t,mn(e,r)}function gc(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Sm(e,r)}}function Ug(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Qc(e,t,r,n){var s=e.updateQueue;Ln=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,i===null?o=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==i&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var h=s.baseState;i=0,d=u=c=null,l=o;do{var m=l.lane,f=l.eventTime;if((n&m)===m){d!==null&&(d=d.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var w=e,y=l;switch(m=t,f=r,y.tag){case 1:if(w=y.payload,typeof w=="function"){h=w.call(f,h,m);break e}h=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=y.payload,m=typeof w=="function"?w.call(f,h,m):w,m==null)break e;h=Le({},h,m);break e;case 2:Ln=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,m=s.effects,m===null?s.effects=[l]:m.push(l))}else f={eventTime:f,lane:m,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=f,c=h):d=d.next=f,i|=m;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;m=l,l=m.next,m.next=null,s.lastBaseUpdate=m,s.shared.pending=null}}while(!0);if(d===null&&(c=h),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);Zs|=i,e.lanes=i,e.memoizedState=h}}function Bg(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(F(191,s));s.call(n)}}}var fl={},Br=gs(fl),Fi=gs(fl),$i=gs(fl);function Ls(e){if(e===fl)throw Error(F(174));return e}function $m(e,t){switch(Ce($i,t),Ce(Fi,e),Ce(Br,fl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ah(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ah(t,e)}Pe(Br),Ce(Br,t)}function va(){Pe(Br),Pe(Fi),Pe($i)}function Ow(e){Ls($i.current);var t=Ls(Br.current),r=Ah(t,e.type);t!==r&&(Ce(Fi,e),Ce(Br,r))}function Um(e){Fi.current===e&&(Pe(Br),Pe(Fi))}var Oe=gs(0);function Jc(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $d=[];function Bm(){for(var e=0;e<$d.length;e++)$d[e]._workInProgressVersionPrimary=null;$d.length=0}var yc=xn.ReactCurrentDispatcher,Ud=xn.ReactCurrentBatchConfig,Xs=0,Ie=null,Ke=null,Ze=null,Xc=!1,yi=!1,Ui=0,W_=0;function dt(){throw Error(F(321))}function Wm(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Sr(e[r],t[r]))return!1;return!0}function zm(e,t,r,n,s,o){if(Xs=o,Ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,yc.current=e===null||e.memoizedState===null?q_:G_,e=r(n,s),yi){o=0;
vendor: 6,136 bytes, line 38
38do{if(yi=!1,Ui=0,25<=o)throw Error(F(301));o+=1,Ze=Ke=null,t.updateQueue=null,yc.current=K_,e=r(n,s)}while(yi)}if(yc.current=Zc,t=Ke!==null&&Ke.next!==null,Xs=0,Ze=Ke=Ie=null,Xc=!1,t)throw Error(F(300));return e}function Hm(){var e=Ui!==0;return Ui=0,e}function Or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?Ie.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function sr(){if(Ke===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=Ze===null?Ie.memoizedState:Ze.next;if(t!==null)Ze=t,Ke=e;else{if(e===null)throw Error(F(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},Ze===null?Ie.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function Bi(e,t){return typeof t=="function"?t(e):t}function Bd(e){var t=sr(),r=t.queue;if(r===null)throw Error(F(311));r.lastRenderedReducer=e;var n=Ke,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var l=i=null,c=null,u=o;do{var d=u.lane;if((Xs&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,i=n):c=c.next=h,Ie.lanes|=d,Zs|=d}u=u.next}while(u!==null&&u!==o);c===null?i=n:c.next=l,Sr(n,t.memoizedState)||(Ot=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=c,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,Ie.lanes|=o,Zs|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Wd(e){var t=sr(),r=t.queue;if(r===null)throw Error(F(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Sr(o,t.memoizedState)||(Ot=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function Iw(){}function Lw(e,t){var r=Ie,n=sr(),s=t(),o=!Sr(n.memoizedState,s);if(o&&(n.memoizedState=s,Ot=!0),n=n.queue,Vm(Fw.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Ze!==null&&Ze.memoizedState.tag&1){if(r.flags|=2048,Wi(9,Mw.bind(null,r,n,s,t),void 0,null),et===null)throw Error(F(349));Xs&30||Dw(r,t,s)}return s}function Dw(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Mw(e,t,r,n){t.value=r,t.getSnapshot=n,$w(t)&&Uw(e)}function Fw(e,t,r){return r(function(){$w(t)&&Uw(e)})}function $w(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Sr(e,r)}catch{return!0}}function Uw(e){var t=mn(e,1);t!==null&&kr(t,e,1,-1)}function Wg(e){var t=Or();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bi,lastRenderedState:e},t.queue=e,e=e.dispatch=V_.bind(null,Ie,e),[t.memoizedState,e]}function Wi(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Bw(){return sr().memoizedState}function vc(e,t,r,n){var s=Or();Ie.flags|=e,s.memoizedState=Wi(1|t,r,void 0,n===void 0?null:n)}function Iu(e,t,r,n){var s=sr();n=n===void 0?null:n;var o=void 0;if(Ke!==null){var i=Ke.memoizedState;if(o=i.destroy,n!==null&&Wm(n,i.deps)){s.memoizedState=Wi(t,r,o,n);return}}Ie.flags|=e,s.memoizedState=Wi(1|t,r,o,n)}function zg(e,t){return vc(8390656,8,e,t)}function Vm(e,t){return Iu(2048,8,e,t)}function Ww(e,t){return Iu(4,2,e,t)}function zw(e,t){return Iu(4,4,e,t)}function Hw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vw(e,t,r){return r=r!=null?r.concat([e]):null,Iu(4,4,Hw.bind(null,t,e),r)}function qm(){}function qw(e,t){var r=sr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Wm(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Gw(e,t){var r=sr();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&Wm(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Kw(e,t,r){return Xs&21?(Sr(r,t)||(r=Zx(),Ie.lanes|=r,Zs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ot=!0),e.memoizedState=r)}function z_(e,t){var r=ve;ve=r!==0&&4>r?r:4,e(!0);var n=Ud.transition;Ud.transition={};try{e(!1),t()}finally{ve=r,Ud.transition=n}}function Yw(){return sr().memoizedState}function H_(e,t,r){var n=as(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},Qw(e))Jw(t,r);else if(r=Aw(e,t,r,n),r!==null){var s=kt();kr(r,e,n,s),Xw(r,t,n)}}function V_(e,t,r){var n=as(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(Qw(e))Jw(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,l=o(i,r);if(s.hasEagerState=!0,s.eagerState=l,Sr(l,i)){var c=t.interleaved;c===null?(s.next=s,Mm(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}r=Aw(e,t,s,n),r!==null&&(s=kt(),kr(r,e,n,s),Xw(r,t,n))}}function Qw(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function Jw(e,t){yi=Xc=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Xw(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Sm(e,r)}}var Zc={readContext:nr,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useInsertionEffect:dt,useLayoutEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useMutableSource:dt,useSyncExternalStore:dt,useId:dt,unstable_isNewReconciler:!1},q_={readContext:nr,useCallback:function(e,t){return Or().memoizedState=[e,t===void 0?null:t],e},useContext:nr,useEffect:zg,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,vc(4194308,4,Hw.bind(null,t,e),r)}
vendor: 6,378 bytes, lines 38-40
38,useLayoutEffect:function(e,t){return vc(4194308,4,e,t)},useInsertionEffect:function(e,t){return vc(4,2,e,t)},useMemo:function(e,t){var r=Or();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Or();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=H_.bind(null,Ie,e),[n.memoizedState,e]},useRef:function(e){var t=Or();return e={current:e},t.memoizedState=e},useState:Wg,useDebugValue:qm,useDeferredValue:function(e){return Or().memoizedState=e},useTransition:function(){var e=Wg(!1),t=e[0];return e=z_.bind(null,e[1]),Or().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Ie,s=Or();if(Re){if(r===void 0)throw Error(F(407));r=r()}else{if(r=t(),et===null)throw Error(F(349));Xs&30||Dw(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,zg(Fw.bind(null,n,o,e),[e]),n.flags|=2048,Wi(9,Mw.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=Or(),t=et.identifierPrefix;if(Re){var r=cn,n=ln;r=(n&~(1<<32-br(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ui++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=W_++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},G_={readContext:nr,useCallback:qw,useContext:nr,useEffect:Vm,useImperativeHandle:Vw,useInsertionEffect:Ww,useLayoutEffect:zw,useMemo:Gw,useReducer:Bd,useRef:Bw,useState:function(){return Bd(Bi)},useDebugValue:qm,useDeferredValue:function(e){var t=sr();return Kw(t,Ke.memoizedState,e)},useTransition:function(){var e=Bd(Bi)[0],t=sr().memoizedState;return[e,t]},useMutableSource:Iw,useSyncExternalStore:Lw,useId:Yw,unstable_isNewReconciler:!1},K_={readContext:nr,useCallback:qw,useContext:nr,useEffect:Vm,useImperativeHandle:Vw,useInsertionEffect:Ww,useLayoutEffect:zw,useMemo:Gw,useReducer:Wd,useRef:Bw,useState:function(){return Wd(Bi)},useDebugValue:qm,useDeferredValue:function(e){var t=sr();return Ke===null?t.memoizedState=e:Kw(t,Ke.memoizedState,e)},useTransition:function(){var e=Wd(Bi)[0],t=sr().memoizedState;return[e,t]},useMutableSource:Iw,useSyncExternalStore:Lw,useId:Yw,unstable_isNewReconciler:!1};function fr(e,t){if(e&&e.defaultProps){t=Le({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Xh(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Le({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Lu={isMounted:function(e){return(e=e._reactInternals)?lo(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=kt(),s=as(e),o=un(n,s);o.payload=t,r!=null&&(o.callback=r),t=ss(e,o,s),t!==null&&(kr(t,e,s,n),gc(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=kt(),s=as(e),o=un(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=ss(e,o,s),t!==null&&(kr(t,e,s,n),gc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=kt(),n=as(e),s=un(r,n);s.tag=2,t!=null&&(s.callback=t),t=ss(e,s,n),t!==null&&(kr(t,e,n,r),gc(t,e,n))}};function Hg(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!Ii(r,n)||!Ii(s,o):!0}function Zw(e,t,r){var n=!1,s=hs,o=t.contextType;return typeof o=="object"&&o!==null?o=nr(o):(s=Lt(t)?Qs:pt.current,n=t.contextTypes,o=(n=n!=null)?pa(e,s):hs),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Lu,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function Vg(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Lu.enqueueReplaceState(t,t.state,null)}function Zh(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},Fm(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=nr(o):(o=Lt(t)?Qs:pt.current,s.context=pa(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Xh(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Lu.enqueueReplaceState(s,s.state,null),Qc(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function xa(e,t){try{var r="",n=t;do r+=kj(n),n=n.return;while(n);var s=r}catch(o){s=` 39Error generating stack: `+o.message+` 40`+o.stack}return{value:e,source:t,stack:s,digest:null}}function zd(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ef(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Y_=typeof WeakMap=="function"?WeakMap:Map;function e0(e,t,r){r=un(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){tu||(tu=!0,df=n),ef(e,t)},r}function t0(e,t,r){r=un(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){ef(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){ef(e,t),typeof n!="function"&&(os===null?os=new Set([this]):os.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function qg(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Y_;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=cC.bind(null,e,t,r),t.then(e,e))}function Gg(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Kg(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=un(-1,1),t.tag=2,ss(r,t,1))),r.lanes|=1),e)}var Q_=xn.ReactCurrentOwner,Ot=!1;function wt(e,t,r,n){t.child=e===null?Pw(t,null,r,n):ya(t,e.child,r,n)}function Yg(e,t,r,n,s){r=r.render;var o=t.ref;
vendor: 6,220 bytes, line 40
40return Go(t,s),n=zm(e,t,r,n,o,s),r=Hm(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,pn(e,t,s)):(Re&&r&&Am(t),t.flags|=1,wt(e,t,n,s),t.child)}function Qg(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!ep(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,r0(e,t,o,n,s)):(e=kc(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:Ii,r(i,n)&&e.ref===t.ref)return pn(e,t,s)}return t.flags|=1,e=is(o,n),e.ref=t.ref,e.return=t,t.child=e}function r0(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(Ii(o,n)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(Ot=!0);else return t.lanes=e.lanes,pn(e,t,s)}return tf(e,t,r,n,s)}function n0(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(Bo,Ut),Ut|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ce(Bo,Ut),Ut|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,Ce(Bo,Ut),Ut|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,Ce(Bo,Ut),Ut|=n;return wt(e,t,s,r),t.child}function s0(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function tf(e,t,r,n,s){var o=Lt(r)?Qs:pt.current;return o=pa(t,o),Go(t,s),r=zm(e,t,r,n,o,s),n=Hm(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,pn(e,t,s)):(Re&&n&&Am(t),t.flags|=1,wt(e,t,r,s),t.child)}function Jg(e,t,r,n,s){if(Lt(r)){var o=!0;Vc(t)}else o=!1;if(Go(t,s),t.stateNode===null)xc(e,t),Zw(t,r,n),Zh(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,l=t.memoizedProps;i.props=l;var c=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=nr(u):(u=Lt(r)?Qs:pt.current,u=pa(t,u));var d=r.getDerivedStateFromProps,h=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==n||c!==u)&&Vg(t,i,n,u),Ln=!1;var m=t.memoizedState;i.state=m,Qc(t,n,i,s),c=t.memoizedState,l!==n||m!==c||It.current||Ln?(typeof d=="function"&&(Xh(t,r,d,n),c=t.memoizedState),(l=Ln||Hg(t,r,l,n,m,c,u))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=c),i.props=n,i.state=c,i.context=u,n=l):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,Rw(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:fr(t.type,l),i.props=u,h=t.pendingProps,m=i.context,c=r.contextType,typeof c=="object"&&c!==null?c=nr(c):(c=Lt(r)?Qs:pt.current,c=pa(t,c));var f=r.getDerivedStateFromProps;(d=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==h||m!==c)&&Vg(t,i,n,c),Ln=!1,m=t.memoizedState,i.state=m,Qc(t,n,i,s);var w=t.memoizedState;l!==h||m!==w||It.current||Ln?(typeof f=="function"&&(Xh(t,r,f,n),w=t.memoizedState),(u=Ln||Hg(t,r,u,n,m,w,c)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,w,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,w,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=w),i.props=n,i.state=w,i.context=c,n=u):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),n=!1)}return rf(e,t,r,n,o,s)}function rf(e,t,r,n,s,o){s0(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&Dg(t,r,!1),pn(e,t,o);n=t.stateNode,Q_.current=t;var l=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=ya(t,e.child,null,o),t.child=ya(t,null,l,o)):wt(e,t,l,o),t.memoizedState=n.state,s&&Dg(t,r,!0),t.child}function o0(e){var t=e.stateNode;t.pendingContext?Lg(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Lg(e,t.context,!1),$m(e,t.containerInfo)}function Xg(e,t,r,n,s){return ga(),Om(s),t.flags|=256,wt(e,t,r,n),t.child}var nf={dehydrated:null,treeContext:null,retryLane:0};function sf(e){return{baseLanes:e,cachePool:null,transitions:null}}function a0(e,t,r){var n=t.pendingProps,s=Oe.current,o=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Ce(Oe,s&1),e===null)return Qh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Fu(i,n,0,null),e=Ks(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=sf(r),t.memoizedState=nf,e):Gm(t,i));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return J_(e,t,i,n,l,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=c,t.deletions=null):(n=is(s,c),n.subtreeFlags=s.subtreeFlags&14680064),l!==null?o=is(l,o):(o=Ks(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?sf(r):{base
vendor: 4,804 bytes, line 40
40Lanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=nf,n}return o=e.child,e=o.sibling,n=is(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Gm(e,t){return t=Fu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ul(e,t,r,n){return n!==null&&Om(n),ya(t,e.child,null,r),e=Gm(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function J_(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=zd(Error(F(422))),Ul(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=Fu({mode:"visible",children:n.children},s,0,null),o=Ks(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&ya(t,e.child,null,i),t.child.memoizedState=sf(i),t.memoizedState=nf,o);if(!(t.mode&1))return Ul(e,t,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var l=n.dgst;return n=l,o=Error(F(419)),n=zd(o,n,void 0),Ul(e,t,i,n)}if(l=(i&e.childLanes)!==0,Ot||l){if(n=et,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,mn(e,s),kr(n,e,s,-1))}return Zm(),n=zd(Error(F(421))),Ul(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=uC.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,zt=ns(s.nextSibling),Ht=t,Re=!0,xr=null,e!==null&&(Zt[er++]=ln,Zt[er++]=cn,Zt[er++]=Js,ln=e.id,cn=e.overflow,Js=t),t=Gm(t,n.children),t.flags|=4096,t)}function Zg(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),Jh(e.return,t,r)}function Hd(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function i0(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(wt(e,t,n.children,r),n=Oe.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zg(e,r,t);else if(e.tag===19)Zg(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(Ce(Oe,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Jc(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),Hd(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Jc(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}Hd(t,!0,r,null,o);break;case"together":Hd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function pn(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Zs|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(F(153));if(t.child!==null){for(e=t.child,r=is(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=is(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function X_(e,t,r){switch(t.tag){case 3:o0(t),ga();break;case 5:Ow(t);break;case 1:Lt(t.type)&&Vc(t);break;case 4:$m(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;Ce(Kc,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(Ce(Oe,Oe.current&1),t.flags|=128,null):r&t.child.childLanes?a0(e,t,r):(Ce(Oe,Oe.current&1),e=pn(e,t,r),e!==null?e.sibling:null);Ce(Oe,Oe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return i0(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ce(Oe,Oe.current),n)break;return null;case 22:case 23:return t.lanes=0,n0(e,t,r)}return pn(e,t,r)}var l0,of,c0,u0;l0=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};of=function(){};c0=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Ls(Br.current);var o=null;
vendor: 4,114 bytes, line 40
40switch(r){case"input":s=Nh(e,s),n=Nh(e,n),o=[];break;case"select":s=Le({},s,{value:void 0}),n=Le({},n,{value:void 0}),o=[];break;case"textarea":s=Ph(e,s),n=Ph(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=zc)}Rh(r,n);var i;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(i in l)l.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ni.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var c=n[u];if(l=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(i in l)!l.hasOwnProperty(i)||c&&c.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in c)c.hasOwnProperty(i)&&l[i]!==c[i]&&(r||(r={}),r[i]=c[i])}else r||(o||(o=[]),o.push(u,r)),r=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(o=o||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ni.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Te("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};u0=function(e,t,r,n){r!==n&&(t.flags|=4)};function Ya(e,t){if(!Re)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Z_(e,t,r){var n=t.pendingProps;switch(Rm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return Lt(t.type)&&Hc(),ht(t),null;case 3:return n=t.stateNode,va(),Pe(It),Pe(pt),Bm(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Fl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,xr!==null&&(mf(xr),xr=null))),of(e,t),ht(t),null;case 5:Um(t);var s=Ls($i.current);if(r=t.type,e!==null&&t.stateNode!=null)c0(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(F(166));return ht(t),null}if(e=Ls(Br.current),Fl(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[Mr]=t,n[Mi]=o,e=(t.mode&1)!==0,r){case"dialog":Te("cancel",n),Te("close",n);break;case"iframe":case"object":case"embed":Te("load",n);break;case"video":case"audio":for(s=0;s<ci.length;s++)Te(ci[s],n);break;case"source":Te("error",n);break;case"img":case"image":case"link":Te("error",n),Te("load",n);break;case"details":Te("toggle",n);break;case"input":lg(n,o),Te("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},Te("invalid",n);break;case"textarea":ug(n,o),Te("invalid",n)}Rh(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="children"?typeof l=="string"?n.textContent!==l&&(o.suppressHydrationWarning!==!0&&Ml(n.textContent,l,e),s=["children",l]):typeof l=="number"&&n.textContent!==""+l&&(o.suppressHydrationWarning!==!0&&Ml(n.textContent,l,e),s=["children",""+l]):Ni.hasOwnProperty(i)&&l!=null&&i==="onScroll"&&Te("scroll",n)}switch(r){case"input":Tl(n),cg(n,o,!0);break;case"textarea":Tl(n),dg(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=zc)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Fx(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>
40",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[Mr]=t,e[Mi]=n,l0(e,t,!1,!1),t.stateNode=e;e:{switch(i=Oh(r,n),r){case"dialog":Te("cancel",e),Te("close",e),s=n;break;case"iframe":case"object":case"embed":Te("load",e),s=n;break;case"video":case"audio":for(s=0;s<ci.length;s++)Te(ci[s],e);s=n;break;case"source":Te("error",e),s=n;break;case"img":case"image":case"link":Te("error",e),Te("load",e),s=n;break;case"details":Te("toggle",e),s=n;break;case"input":lg(e,n),s=Nh(e,n),Te("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Le({},n,{value:void 0}),Te("invalid",e);break;case"textarea":ug(e,n),s=Ph(e,n),Te("invalid",e);break;default:s=n}Rh(r,s),l=s;for(o in l)if(l.hasOwnProperty(o)){var c=l[o];o==="style"?Bx(e,c):o==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&$x(e,c)):o==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&Ei(e,c):typeof c=="number"&&Ei(e,""+c):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Ni.hasOwnProperty(o)?c!=null&&o==="onScroll"&&Te("scroll",e):c!=null&&ym(e,o,c,i))}switch(r){case"input":Tl(e),cg(e,n,!1);break;case"textarea":Tl(e),dg(e);break;case"option":n.value!=null&&e.setAttribute("value",""+ds(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?zo(e,!!n.multiple,o,!1):n.defaultValue!=null&&zo(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=zc)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ht(t),null;case 6:if(e&&t.stateNode!=null)u0(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(F(166));if(r=Ls($i.current),Ls(Br.current),Fl(t)){if(n=t.stateNode,r=t.memoizedProps,n[Mr]=t,(o=n.nodeValue!==r)&&(e=Ht,e!==null))switch(e.tag){case 3:Ml(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ml(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[Mr]=t,t.stateNode=n}return ht(t),null;case 13:if(Pe(Oe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Re&&zt!==null&&t.mode&1&&!(t.flags&128))Ew(),ga(),t.flags|=98560,o=!1;else if(o=Fl(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(F(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(F(317));o[Mr]=t}else ga(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ht(t),o=!1}else xr!==null&&(mf(xr),xr=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Oe.current&1?Qe===0&&(Qe=3):Zm())),t.updateQueue!==null&&(t.flags|=4),ht(t),null);case 4:return va(),of(e,t),e===null&&Li(t.stateNode.containerInfo),ht(t),null;case 10:return Dm(t.type._context),ht(t),null;case 17:return Lt(t.type)&&Hc(),ht(t),null;case 19:if(Pe(Oe),o=t.memoizedState,o===null)return ht(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)Ya(o,!1);else{if(Qe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Jc(e),i!==null){for(t.flags|=128,Ya(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Ce(Oe,Oe.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ue()>wa&&(t.flags|=128,n=!0,Ya(o,!1),t.lanes=4194304)}else{if(!n)if(e=Jc(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Ya(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!Re)return ht(t),null}else 2*Ue()-o.renderingStartTime>wa&&r!==1073741824&&(t.flags|=128,n=!0,Ya(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ue(),t.sibling=null,r=Oe.current,Ce(Oe,n?r&1|2:r&1),t):(ht(t),null);case 22:case 23:return Xm(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Ut&1073741824&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),null;case 24:return null;case 25:return null}throw Error(F(156,t.tag))}function eC(e,t){switch(Rm(t),t.tag){case 1:return Lt(t.type)&&Hc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;
vendor: 19,723 bytes, line 40
40case 3:return va(),Pe(It),Pe(pt),Bm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Um(t),null;case 13:if(Pe(Oe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(F(340));ga()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Oe),null;case 4:return va(),null;case 10:return Dm(t.type._context),null;case 22:case 23:return Xm(),null;case 24:return null;default:return null}}var Bl=!1,mt=!1,tC=typeof WeakSet=="function"?WeakSet:Set,H=null;function Uo(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Fe(e,t,n)}else r.current=null}function af(e,t,r){try{r()}catch(n){Fe(e,t,n)}}var ey=!1;function rC(e,t){if(zh=Uc,e=pw(),Pm(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,l=-1,c=-1,u=0,d=0,h=e,m=null;t:for(;;){for(var f;h!==r||s!==0&&h.nodeType!==3||(l=i+s),h!==o||n!==0&&h.nodeType!==3||(c=i+n),h.nodeType===3&&(i+=h.nodeValue.length),(f=h.firstChild)!==null;)m=h,h=f;for(;;){if(h===e)break t;if(m===r&&++u===s&&(l=i),m===o&&++d===n&&(c=i),(f=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=f}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(Hh={focusedElem:e,selectionRange:r},Uc=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var y=w.memoizedProps,b=w.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:fr(t.type,y),b);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(F(163))}}catch(k){Fe(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return w=ey,ey=!1,w}function vi(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&af(t,r,o)}s=s.next}while(s!==n)}}function Du(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function lf(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function d0(e){var t=e.alternate;t!==null&&(e.alternate=null,d0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mr],delete t[Mi],delete t[Gh],delete t[F_],delete t[$_])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function h0(e){return e.tag===5||e.tag===3||e.tag===4}function ty(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cf(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=zc));else if(n!==4&&(e=e.child,e!==null))for(cf(e,t,r),e=e.sibling;e!==null;)cf(e,t,r),e=e.sibling}function uf(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(uf(e,t,r),e=e.sibling;e!==null;)uf(e,t,r),e=e.sibling}var st=null,yr=!1;function En(e,t,r){for(r=r.child;r!==null;)f0(e,t,r),r=r.sibling}function f0(e,t,r){if(Ur&&typeof Ur.onCommitFiberUnmount=="function")try{Ur.onCommitFiberUnmount(Eu,r)}catch{}switch(r.tag){case 5:mt||Uo(r,t);case 6:var n=st,s=yr;st=null,En(e,t,r),st=n,yr=s,st!==null&&(yr?(e=st,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):st.removeChild(r.stateNode));break;case 18:st!==null&&(yr?(e=st,r=r.stateNode,e.nodeType===8?Md(e.parentNode,r):e.nodeType===1&&Md(e,r),Ri(e)):Md(st,r.stateNode));break;case 4:n=st,s=yr,st=r.stateNode.containerInfo,yr=!0,En(e,t,r),st=n,yr=s;break;case 0:case 11:case 14:case 15:if(!mt&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&af(r,t,i),s=s.next}while(s!==n)}En(e,t,r);break;case 1:if(!mt&&(Uo(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(l){Fe(r,t,l)}En(e,t,r);break;case 21:En(e,t,r);break;case 22:r.mode&1?(mt=(n=mt)||r.memoizedState!==null,En(e,t,r),mt=n):En(e,t,r);break;default:En(e,t,r)}}function ry(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new tC),t.forEach(function(n){var s=dC.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ur(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,l=i;e:for(;l!==null;){switch(l.tag){case 5:st=l.stateNode,yr=!1;break e;case 3:st=l.stateNode.containerInfo,yr=!0;break e;case 4:st=l.stateNode.containerInfo,yr=!0;break e}l=l.return}if(st===null)throw Error(F(160));f0(o,i,s),st=null,yr=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){Fe(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)m0(t,e),t=t.sibling}function m0(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ur(t,e),Rr(e),n&4){try{vi(3,e,e.return),Du(3,e)}catch(y){Fe(e,e.return,y)}try{vi(5,e,e.return)}catch(y){Fe(e,e.return,y)}}break;case 1:ur(t,e),Rr(e),n&512&&r!==null&&Uo(r,r.return);break;case 5:if(ur(t,e),Rr(e),n&512&&r!==null&&Uo(r,r.return),e.flags&32){var s=e.stateNode;try{Ei(s,"")}catch(y){Fe(e,e.return,y)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&o.type==="radio"&&o.name!=null&&Dx(s,o),Oh(l,i);var u=Oh(l,o);for(i=0;i<c.length;i+=2){var d=c[i],h=c[i+1];d==="style"?Bx(s,h):d==="dangerouslySetInnerHTML"?$x(s,h):d==="children"?Ei(s,h):ym(s,d,h,u)}switch(l){case"input":Eh(s,o);break;case"textarea":Mx(s,o);break;case"select":var m=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var f=o.value;f!=null?zo(s,!!o.multiple,f,!1):m!==!!o.multiple&&(o.defaultValue!=null?zo(s,!!o.multiple,o.defaultValue,!0):zo(s,!!o.multiple,o.multiple?[]:"",!1))}s[Mi]=o}catch(y){Fe(e,e.return,y)}}break;case 6:if(ur(t,e),Rr(e),n&4){if(e.stateNode===null)throw Error(F(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(y){Fe(e,e.return,y)}}break;case 3:if(ur(t,e),Rr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ri(t.containerInfo)}catch(y){Fe(e,e.return,y)}break;case 4:ur(t,e),Rr(e);break;case 13:ur(t,e),Rr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Qm=Ue())),n&4&&ry(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(mt=(u=mt)||d,ur(t,e),mt=u):ur(t,e),Rr(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(H=e,d=e.child;d!==null;){for(h=H=d;H!==null;){switch(m=H,f=m.child,m.tag){case 0:case 11:case 14:case 15:vi(4,m,m.return);break;case 1:Uo(m,m.return);var w=m.stateNode;if(typeof w.componentWillUnmount=="function"){n=m,r=m.return;try{t=n,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(y){Fe(n,r,y)}}break;case 5:Uo(m,m.return);break;case 22:if(m.memoizedState!==null){sy(h);continue}}f!==null?(f.return=m,H=f):sy(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{s=h.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(l=h.stateNode,c=h.memoizedProps.style,i=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=Ux("display",i))}catch(y){Fe(e,e.return,y)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(y){Fe(e,e.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:ur(t,e),Rr(e),n&4&&ry(e);break;case 21:break;default:ur(t,e),Rr(e)}}function Rr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(h0(r)){var n=r;break e}r=r.return}throw Error(F(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Ei(s,""),n.flags&=-33);var o=ty(e);uf(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,l=ty(e);cf(e,l,i);break;default:throw Error(F(161))}}catch(c){Fe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function nC(e,t,r){H=e,p0(e)}function p0(e,t,r){for(var n=(e.mode&1)!==0;H!==null;){var s=H,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||Bl;if(!i){var l=s.alternate,c=l!==null&&l.memoizedState!==null||mt;l=Bl;var u=mt;if(Bl=i,(mt=c)&&!u)for(H=s;H!==null;)i=H,c=i.child,i.tag===22&&i.memoizedState!==null?oy(s):c!==null?(c.return=i,H=c):oy(s);for(;o!==null;)H=o,p0(o),o=o.sibling;H=s,Bl=l,mt=u}ny(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,H=o):ny(e)}}function ny(e){for(;H!==null;){var t=H;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mt||Du(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!mt)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:fr(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&Bg(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Bg(t,i,r)}break;case 5:var l=t.stateNode;if(r===null&&t.flags&4){r=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&Ri(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(F(163))}mt||t.flags&512&&lf(t)}catch(m){Fe(t,t.return,m)}}if(t===e){H=null;break}if(r=t.sibling,r!==null){r.return=t.return,H=r;break}H=t.return}}function sy(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var r=t.sibling;if(r!==null){r.return=t.return,H=r;break}H=t.return}}function oy(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Du(4,t)}catch(c){Fe(t,r,c)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(c){Fe(t,s,c)}}var o=t.return;try{lf(t)}catch(c){Fe(t,o,c)}break;case 5:var i=t.return;try{lf(t)}catch(c){Fe(t,i,c)}}}catch(c){Fe(t,t.return,c)}if(t===e){H=null;break}var l=t.sibling;if(l!==null){l.return=t.return,H=l;break}H=t.return}}var sC=Math.ceil,eu=xn.ReactCurrentDispatcher,Km=xn.ReactCurrentOwner,rr=xn.ReactCurrentBatchConfig,me=0,et=null,Ve=null,ot=0,Ut=0,Bo=gs(0),Qe=0,zi=null,Zs=0,Mu=0,Ym=0,xi=null,Rt=null,Qm=0,wa=1/0,tn=null,tu=!1,df=null,os=null,Wl=!1,Jn=null,ru=0,wi=0,hf=null,wc=-1,bc=0;function kt(){return me&6?Ue():wc!==-1?wc:wc=Ue()}function as(e){return e.mode&1?me&2&&ot!==0?ot&-ot:B_.transition!==null?(bc===0&&(bc=Zx()),bc):(e=ve,e!==0||(e=window.event,e=e===void 0?16:aw(e.type)),e):1}function kr(e,t,r,n){if(50<wi)throw wi=0,hf=null,Error(F(185));ul(e,r,n),(!(me&2)||e!==et)&&(e===et&&(!(me&2)&&(Mu|=r),Qe===4&&Fn(e,ot)),Dt(e,n),r===1&&me===0&&!(t.mode&1)&&(wa=Ue()+500,Ou&&ys()))}function Dt(e,t){var r=e.callbackNode;Bj(e,t);var n=$c(e,e===et?ot:0);if(n===0)r!==null&&mg(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&mg(r),t===1)e.tag===0?U_(ay.bind(null,e)):_w(ay.bind(null,e)),D_(function(){!(me&6)&&ys()}),r=null;else{switch(ew(n)){case 1:r=km;break;case 4:r=Jx;break;case 16:r=Fc;break;case 536870912:r=Xx;break;default:r=Fc}r=S0(r,g0.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function g0(e,t){if(wc=-1,bc=0,me&6)throw Error(F(327));var r=e.callbackNode;if(Ko()&&e.callbackNode!==r)return null;var n=$c(e,e===et?ot:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=nu(e,n);else{t=n;var s=me;me|=2;var o=v0();(et!==e||ot!==t)&&(tn=null,wa=Ue()+500,Gs(e,t));do try{iC();break}catch(l){y0(e,l)}while(!0);Lm(),eu.current=o,me=s,Ve!==null?t=0:(et=null,ot=0,t=Qe)}if(t!==0){if(t===2&&(s=Fh(e),s!==0&&(n=s,t=ff(e,s))),t===1)throw r=zi,Gs(e,0),Fn(e,n),Dt(e,Ue()),r;if(t===6)Fn(e,n);else{if(s=e.current.alternate,!(n&30)&&!oC(s)&&(t=nu(e,n),t===2&&(o=Fh(e),o!==0&&(n=o,t=ff(e,o))),t===1))throw r=zi,Gs(e,0),Fn(e,n),Dt(e,Ue()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(F(345));case 2:_s(e,Rt,tn);break;case 3:if(Fn(e,n),(n&130023424)===n&&(t=Qm+500-Ue(),10<t)){if($c(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){kt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=qh(_s.bind(null,e,Rt,tn),t);break}_s(e,Rt,tn);break;case 4:if(Fn(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-br(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=Ue()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*sC(n/1960))-n,10<n){e.timeoutHandle=qh(_s.bind(null,e,Rt,tn),n);break}_s(e,Rt,tn);break;case 5:_s(e,Rt,tn);break;default:throw Error(F(329))}}}return Dt(e,Ue()),e.callbackNode===r?g0.bind(null,e):null}function ff(e,t){var r=xi;return e.current.memoizedState.isDehydrated&&(Gs(e,t).flags|=256),e=nu(e,t),e!==2&&(t=Rt,Rt=r,t!==null&&mf(t)),e}function mf(e){Rt===null?Rt=e:Rt.push.apply(Rt,e)}function oC(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!Sr(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Fn(e,t){for(t&=~Ym,t&=~Mu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-br(t),n=1<<r;e[r]=-1,t&=~n}}function ay(e){if(me&6)throw Error(F(327));Ko();var t=$c(e,0);if(!(t&1))return Dt(e,Ue()),null;var r=nu(e,t);if(e.tag!==0&&r===2){var n=Fh(e);n!==0&&(t=n,r=ff(e,n))}if(r===1)throw r=zi,Gs(e,0),Fn(e,t),Dt(e,Ue()),r;if(r===6)throw Error(F(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,_s(e,Rt,tn),Dt(e,Ue()),null}function Jm(e,t){var r=me;me|=1;try{return e(t)}finally{me=r,me===0&&(wa=Ue()+500,Ou&&ys())}}function eo(e){Jn!==null&&Jn.tag===0&&!(me&6)&&Ko();var t=me;me|=1;var r=rr.transition,n=ve;try{if(rr.transition=null,ve=1,e)return e()}finally{ve=n,rr.transition=r,me=t,!(me&6)&&ys()}}function Xm(){Ut=Bo.current,Pe(Bo)}function Gs(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,L_(r)),Ve!==null)for(r=Ve.return;r!==null;){var n=r;switch(Rm(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Hc();break;case 3:va(),Pe(It),Pe(pt),Bm();break;case 5:Um(n);break;case 4:va();break;case 13:Pe(Oe);break;case 19:Pe(Oe);break;case 10:Dm(n.type._context);break;case 22:case 23:Xm()}r=r.return}if(et=e,Ve=e=is(e.current,null),ot=Ut=t,Qe=0,zi=null,Ym=Mu=Zs=0,Rt=xi=null,Is!==null){for(t=0;t<Is.length;t++)if(r=Is[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}Is=null}return e}function y0(e,t){do{var r=Ve;try{if(Lm(),yc.current=Zc,Xc){for(var n=Ie.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Xc=!1}if(Xs=0,Ze=Ke=Ie=null,yi=!1,Ui=0,Km.current=null,r===null||r.return===null){Qe=1,zi=t,Ve=null;break}e:{var o=e,i=r.return,l=r,c=t;if(t=ot,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var m=d.alternate;m?(d.updateQueue=m.updateQueue,d.memoizedState=m.memoizedState,d.lanes=m.lanes):(d.updateQueue=null,d.memoizedState=null)}var f=Gg(i);if(f!==null){f.flags&=-257,Kg(f,i,l,o,t),f.mode&1&&qg(o,u,t),t=f,c=u;var w=t.updateQueue;if(w===null){var y=new Set;y.add(c),t.updateQueue=y}else w.add(c);break e}else{if(!(t&1)){qg(o,u,t),Zm();break e}c=Error(F(426))}}else if(Re&&l.mode&1){var b=Gg(i);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Kg(b,i,l,o,t),Om(xa(c,l));break e}}o=c=xa(c,l),Qe!==4&&(Qe=2),xi===null?xi=[o]:xi.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=e0(o,c,t);Ug(o,v);break e;case 1:l=c;var g=o.type,x=o.stateNode;if(!(o.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(os===null||!os.has(x)))){o.flags|=65536,t&=-t,o.lanes|=t;var k=t0(o,l,t);Ug(o,k);break e}}o=o.return}while(o!==null)}w0(r)}catch(S){t=S,Ve===r&&r!==null&&(Ve=r=r.return);continue}break}while(!0)}function v0(){var e=eu.current;return eu.current=Zc,e===null?Zc:e}function Zm(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),et===null||!(Zs&268435455)&&!(Mu&268435455)||Fn(et,ot)}function nu(e,t){var r=me;me|=2;var n=v0();(et!==e||ot!==t)&&(tn=null,Gs(e,t));do try{aC();break}catch(s){y0(e,s)}while(!0);if(Lm(),me=r,eu.current=n,Ve!==null)throw Error(F(261));return et=null,ot=0,Qe}function aC(){for(;Ve!==null;)x0(Ve)}function iC(){for(;Ve!==null&&!Rj();)x0(Ve)}function x0(e){var t=k0(e.alternate,e,Ut);e.memoizedProps=e.pendingProps,t===null?w0(e):Ve=t,Km.current=null}function w0(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=eC(r,t),r!==null){r.flags&=32767,Ve=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,Ve=null;return}}else if(r=Z_(r,t,Ut),r!==null){Ve=r;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);Qe===0&&(Qe=5)}function _s(e,t,r){var n=ve,s=rr.transition;try{rr.transition=null,ve=1,lC(e,t,r,n)}finally{rr.transition=s,ve=n}return null}function lC(e,t,r,n){do Ko();while(Jn!==null);if(me&6)throw Error(F(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(F(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(Wj(e,o),e===et&&(Ve=et=null,ot=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Wl||(Wl=!0,S0(Fc,function(){return Ko(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=rr.transition,rr.transition=null;var i=ve;ve=1;var l=me;me|=4,Km.current=null,rC(e,r),m0(r,e),E_(Hh),Uc=!!zh,Hh=zh=null,e.current=r,nC(r),Oj(),me=l,ve=i,rr.transition=o}else e.current=r;if(Wl&&(Wl=!1,Jn=e,ru=s),o=e.pendingLanes,o===0&&(os=null),Dj(r.stateNode),Dt(e,Ue()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(tu)throw tu=!1,e=df,df=null,e;return ru&1&&e.tag!==0&&Ko(),o=e.pendingLanes,o&1?e===hf?wi++:(wi=0,hf=e):wi=0,ys(),null}function Ko(){if(Jn!==null){var e=ew(ru),t=rr.transition,r=ve;try{if(rr.transition=null,ve=16>e?16:e,Jn===null)var n=!1;else{if(e=Jn,Jn=null,ru=0,me&6)throw Error(F(331));var s=me;for(me|=4,H=e.current;H!==null;){var o=H,i=o.child;
vendor: 1,766 bytes, line 40
40if(H.flags&16){var l=o.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(H=u;H!==null;){var d=H;switch(d.tag){case 0:case 11:case 15:vi(8,d,o)}var h=d.child;if(h!==null)h.return=d,H=h;else for(;H!==null;){d=H;var m=d.sibling,f=d.return;if(d0(d),d===u){H=null;break}if(m!==null){m.return=f,H=m;break}H=f}}}var w=o.alternate;if(w!==null){var y=w.child;if(y!==null){w.child=null;do{var b=y.sibling;y.sibling=null,y=b}while(y!==null)}}H=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,H=i;else e:for(;H!==null;){if(o=H,o.flags&2048)switch(o.tag){case 0:case 11:case 15:vi(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,H=v;break e}H=o.return}}var g=e.current;for(H=g;H!==null;){i=H;var x=i.child;if(i.subtreeFlags&2064&&x!==null)x.return=i,H=x;else e:for(i=g;H!==null;){if(l=H,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Du(9,l)}}catch(S){Fe(l,l.return,S)}if(l===i){H=null;break e}var k=l.sibling;if(k!==null){k.return=l.return,H=k;break e}H=l.return}}if(me=s,ys(),Ur&&typeof Ur.onPostCommitFiberRoot=="function")try{Ur.onPostCommitFiberRoot(Eu,e)}catch{}n=!0}return n}finally{ve=r,rr.transition=t}}return!1}function iy(e,t,r){t=xa(r,t),t=e0(e,t,1),e=ss(e,t,1),t=kt(),e!==null&&(ul(e,1,t),Dt(e,t))}function Fe(e,t,r){if(e.tag===3)iy(e,e,r);else for(;t!==null;){if(t.tag===3){iy(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(os===null||!os.has(n))){e=xa(r,e),e=t0(t,e,1),t=ss(t,e,1),e=kt(),t!==null&&(ul(t,1,e),Dt(t,e));break}}t=t.return}}function cC(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=kt(),e.pingedLanes|=e.suspendedLanes&r,et===e&&(ot&r)===r&&(Qe===4||Qe===3&&(ot&130023424)===ot&&500>Ue()-Qm?Gs(e,0):Ym|=r),Dt(e,t)}
vendor: 4,454 bytes, line 40
40function b0(e,t){t===0&&(e.mode&1?(t=Rl,Rl<<=1,!(Rl&130023424)&&(Rl=4194304)):t=1);var r=kt();e=mn(e,t),e!==null&&(ul(e,t,r),Dt(e,r))}function uC(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),b0(e,r)}function dC(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(F(314))}n!==null&&n.delete(t),b0(e,r)}var k0;k0=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||It.current)Ot=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Ot=!1,X_(e,t,r);Ot=!!(e.flags&131072)}else Ot=!1,Re&&t.flags&1048576&&Cw(t,Gc,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;xc(e,t),e=t.pendingProps;var s=pa(t,pt.current);Go(t,r),s=zm(null,t,n,e,s,r);var o=Hm();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lt(n)?(o=!0,Vc(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Fm(t),s.updater=Lu,t.stateNode=s,s._reactInternals=t,Zh(t,n,e,r),t=rf(null,t,n,!0,o,r)):(t.tag=0,Re&&o&&Am(t),wt(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(xc(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=fC(n),e=fr(n,e),s){case 0:t=tf(null,t,n,e,r);break e;case 1:t=Jg(null,t,n,e,r);break e;case 11:t=Yg(null,t,n,e,r);break e;case 14:t=Qg(null,t,n,fr(n.type,e),r);break e}throw Error(F(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:fr(n,s),tf(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:fr(n,s),Jg(e,t,n,s,r);case 3:e:{if(o0(t),e===null)throw Error(F(387));n=t.pendingProps,o=t.memoizedState,s=o.element,Rw(e,t),Qc(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=xa(Error(F(423)),t),t=Xg(e,t,n,r,s);break e}else if(n!==s){s=xa(Error(F(424)),t),t=Xg(e,t,n,r,s);break e}else for(zt=ns(t.stateNode.containerInfo.firstChild),Ht=t,Re=!0,xr=null,r=Pw(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ga(),n===s){t=pn(e,t,r);break e}wt(e,t,n,r)}t=t.child}return t;case 5:return Ow(t),e===null&&Qh(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,Vh(n,s)?i=null:o!==null&&Vh(n,o)&&(t.flags|=32),s0(e,t),wt(e,t,i,r),t.child;case 6:return e===null&&Qh(t),null;case 13:return a0(e,t,r);case 4:return $m(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ya(t,null,n,r):wt(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:fr(n,s),Yg(e,t,n,s,r);case 7:return wt(e,t,t.pendingProps,r),t.child;case 8:return wt(e,t,t.pendingProps.children,r),t.child;case 12:return wt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,Ce(Kc,n._currentValue),n._currentValue=i,o!==null)if(Sr(o.value,i)){if(o.children===s.children&&!It.current){t=pn(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var l=o.dependencies;if(l!==null){i=o.child;for(var c=l.firstContext;c!==null;){if(c.context===n){if(o.tag===1){c=un(-1,r&-r),c.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=r,c=o.alternate,c!==null&&(c.lanes|=r),Jh(o.return,r,t),l.lanes|=r;break}c=c.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(F(341));i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Jh(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}wt(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Go(t,r),s=nr(s),n=n(s),t.flags|=1,wt(e,t,n,r),t.child;case 14:return n=t.type,s=fr(n,t.pendingProps),s=fr(n.type,s),Qg(e,t,n,s,r);case 15:return r0(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:fr(n,s),xc(e,t),t.tag=1,Lt(n)?(e=!0,Vc(t)):e=!1,Go(t,r),Zw(t,n,s),Zh(t,n,s,r),rf(null,t,n,!0,e,r);case 19:return i0(e,t,r);case 22:return n0(e,t,r)}throw Error(F(156,t.tag))};function S0(e,t){return Qx(e,t)}function hC(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 7,566 bytes, line 40
40ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tr(e,t,r,n){return new hC(e,t,r,n)}function ep(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fC(e){if(typeof e=="function")return ep(e)?1:0;if(e!=null){if(e=e.$$typeof,e===xm)return 11;if(e===wm)return 14}return 2}function is(e,t){var r=e.alternate;return r===null?(r=tr(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function kc(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")ep(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ao:return Ks(r.children,s,o,t);case vm:i=8,s|=8;break;case Sh:return e=tr(12,r,t,s|2),e.elementType=Sh,e.lanes=o,e;case jh:return e=tr(13,r,t,s),e.elementType=jh,e.lanes=o,e;case _h:return e=tr(19,r,t,s),e.elementType=_h,e.lanes=o,e;case Ox:return Fu(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ax:i=10;break e;case Rx:i=9;break e;case xm:i=11;break e;case wm:i=14;break e;case In:i=16,n=null;break e}throw Error(F(130,e==null?e:typeof e,""))}return t=tr(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function Ks(e,t,r,n){return e=tr(7,e,n,t),e.lanes=r,e}function Fu(e,t,r,n){return e=tr(22,e,n,t),e.elementType=Ox,e.lanes=r,e.stateNode={isHidden:!1},e}function Vd(e,t,r){return e=tr(6,e,null,t),e.lanes=r,e}function qd(e,t,r){return t=tr(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mC(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cd(0),this.expirationTimes=Cd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cd(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function tp(e,t,r,n,s,o,i,l,c){return e=new mC(e,t,r,l,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=tr(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fm(o),e}function pC(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Po,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function j0(e){if(!e)return hs;e=e._reactInternals;e:{if(lo(e)!==e||e.tag!==1)throw Error(F(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(F(171))}if(e.tag===1){var r=e.type;if(Lt(r))return jw(e,r,t)}return t}function _0(e,t,r,n,s,o,i,l,c){return e=tp(r,n,!0,e,s,o,i,l,c),e.context=j0(null),r=e.current,n=kt(),s=as(r),o=un(n,s),o.callback=t??null,ss(r,o,s),e.current.lanes=s,ul(e,s,n),Dt(e,n),e}function $u(e,t,r,n){var s=t.current,o=kt(),i=as(s);return r=j0(r),t.context===null?t.context=r:t.pendingContext=r,t=un(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ss(s,t,i),e!==null&&(kr(e,s,i,o),gc(e,s,i)),i}function su(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ly(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function rp(e,t){ly(e,t),(e=e.alternate)&&ly(e,t)}function gC(){return null}var C0=typeof reportError=="function"?reportError:function(e){console.error(e)};function np(e){this._internalRoot=e}Uu.prototype.render=np.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(F(409));$u(e,t,null,null)};Uu.prototype.unmount=np.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;eo(function(){$u(null,e,null,null)}),t[fn]=null}};function Uu(e){this._internalRoot=e}Uu.prototype.unstable_scheduleHydration=function(e){if(e){var t=nw();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Mn.length&&t!==0&&t<Mn[r].priority;r++);Mn.splice(r,0,e),r===0&&ow(e)}};function sp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Bu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function cy(){}function yC(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=su(i);o.call(u)}}var i=_0(t,n,e,0,null,!1,!1,"",cy);return e._reactRootContainer=i,e[fn]=i.current,Li(e.nodeType===8?e.parentNode:e),eo(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var l=n;n=function(){var u=su(c);l.call(u)}}var c=tp(e,0,!1,null,null,!1,!1,"",cy);return e._reactRootContainer=c,e[fn]=c.current,Li(e.nodeType===8?e.parentNode:e),eo(function(){$u(t,c,r,n)}),c}function Wu(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var l=s;s=function(){var c=su(i);l.call(c)}}$u(t,i,e,s)}else i=yC(r,t,e,s,n);return su(i)}tw=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=li(t.pendingLanes);r!==0&&(Sm(t,r|1),Dt(t,Ue()),!(me&6)&&(wa=Ue()+500,ys()))}break;case 13:eo(function(){var n=mn(e,1);if(n!==null){var s=kt();kr(n,e,1,s)}}),rp(e,1)}};jm=function(e){if(e.tag===13){var t=mn(e,134217728);if(t!==null){var r=kt();kr(t,e,134217728,r)}rp(e,134217728)}};rw=function(e){if(e.tag===13){var t=as(e),r=mn(e,t);if(r!==null){var n=kt();kr(r,e,t,n)}rp(e,t)}};nw=function(){return ve};sw=function(e,t){var r=ve;try{return ve=e,t()}finally{ve=r}};Lh=function(e,t,r){switch(t){case"input":if(Eh(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=Ru(n);if(!s)throw Error(F(90));Lx(n),Eh(n,s)}}}break;case"textarea":Mx(e,r);break;case"select":t=r.value,t!=null&&zo(e,!!r.multiple,t,!1)}};Hx=Jm;Vx=eo;var vC={usingClientEntryPoint:!1,Events:[hl,Lo,Ru,Wx,zx,Jm]},Qa={findFiberByHostInstance:Os,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xC={bundleType:Qa.bundleType,version:Qa.version,rendererPackageName:Qa.rendererPackageName,rendererConfig:Qa.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Kx(e),e===null?null:e.stateNode},findFiberByHostInstance:Qa.findFiberByHostInstance||gC,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zl.isDisabled&&zl.supportsFiber)try{Eu=zl.inject(xC),Ur=zl}catch{}}Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vC;Gt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sp(t))throw Error(F(200));return pC(e,t,null,r)};Gt.createRoot=function(e,t){if(!sp(e))throw Error(F(299));var r=!1,n="",s=C0;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=tp(e,1,!1,null,null,r,!1,n,s),e[fn]=t.current,Li(e.nodeType===8?e.parentNode:e),new np(t)};Gt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(F(188)):(e=Object.keys(e).join(","),Error(F(268,e)));return e=Kx(t),e=e===null?null:e.stateNode,e};Gt.flushSync=function(e){return eo(e)};Gt.hydrate=function(e,t,r){if(!Bu(t))throw Error(F(200));return Wu(null,e,t,!0,r)};Gt.hydrateRoot=function(e,t,r){if(!sp(e))throw Error(F(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=C0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=_0(t,null,e,1,r??null,s,!1,o,i),e[fn]=t.current,Li(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new Uu(t)};Gt.render=function(e,t,r){if(!Bu(t))throw Error(F(200));return Wu(null,e,t,!1,r)};Gt.unmountComponentAtNode=function(e){if(!Bu(e))throw Error(F(40));return e._reactRootContainer?(eo(function(){Wu(null,null,e,!1,function(){e._reactRootContainer=null,e[fn]=null})}),!0):!1};Gt.unstable_batchedUpdates=Jm;Gt.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Bu(r))throw Error(F(200));if(e==null||e._reactInternals===void 0)throw Error(F(38));return Wu(e,t,r,!1,n)};Gt.version="18.3.1-next-f1338f8080-20240426";function N0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(N0)}catch(e){console.error(e)}}N0(),Nx.exports=Gt;var ml=Nx.exports;const E0=ll(ml);var T0,uy=ml;T0=uy.createRoot,uy.hydrateRoot;var wC=typeof Element<"u",bC=typeof Map=="function",kC=typeof Set=="function",SC=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Sc(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,s;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Sc(e[n],t[n]))return!1;return!0}var o;if(bC&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;for(o=e.entries();!(n=o.next()).done;)if(!Sc(n.value[1],t.get(n.value[0])))return!1;return!0}if(kC&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(n=o.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(SC&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;if(wC&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((s[n]==="_owner"||s[n]==="__v"||s[n]==="__o")&&e.$$typeof)&&!Sc(e[s[n]],t[s[n]]))return!1;return!0}return e!==e&&t!==t}var jC=function(t,r){try{return Sc(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const _C=ll(jC);var CC=function(e,t,r,n,s,o,i,l){if(!e){var c;if(t===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[r,n,s,o,i,l],d=0;c=new Error(t.replace(/%s/g,function(){return u[d++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},NC=CC;const dy=ll(NC);var EC=function(t,r,n,s){var o=n?n.call(s,t,r):void 0;if(o!==void 0)return!!o;if(t===r)return!0;
40if(typeof t!="object"||!t||typeof r!="object"||!r)return!1;var i=Object.keys(t),l=Object.keys(r);if(i.length!==l.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),u=0;u<i.length;u++){var d=i[u];if(!c(d))return!1;var h=t[d],m=r[d];if(o=n?n.call(s,h,m,d):void 0,o===!1||o===void 0&&h!==m)return!1}return!0};const TC=ll(EC);var P0=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(P0||{}),Gd={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"]}},hy=Object.values(P0),zu={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},A0=Object.entries(zu).reduce((e,[t,r])=>(e[r]=t,e),{}),wr="data-rh",Yo={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Qo=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},PC=e=>{let t=Qo(e,"title");const r=Qo(e,Yo.TITLE_TEMPLATE);if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);const n=Qo(e,Yo.DEFAULT_TITLE);return t||n||void 0},AC=e=>Qo(e,Yo.ON_CHANGE_CLIENT_STATE)||(()=>{}),Kd=(e,t)=>t.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),RC=(e,t)=>t.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 l=s[o].toLowerCase();if(e.indexOf(l)!==-1&&n[l])return r.concat(n)}}return r},[]),OC=e=>console&&typeof console.warn=="function"&&console.warn(e),Ja=(e,t,r)=>{const n={};return r.filter(s=>Array.isArray(s[e])?!0:(typeof s[e]<"u"&&OC(`Helmet: ${e} should be of type "Array". Instead found type "${typeof s[e]}"`),!1)).map(s=>s[e]).reverse().reduce((s,o)=>{const i={};o.filter(c=>{let u;const d=Object.keys(c);for(let m=0;m<d.length;m+=1){const f=d[m],w=f.toLowerCase();t.indexOf(w)!==-1&&!(u==="rel"&&c[u].toLowerCase()==="canonical")&&!(w==="rel"&&c[w].toLowerCase()==="stylesheet")&&(u=w),t.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(u=f)}if(!u||!c[u])return!1;const h=c[u].toLowerCase();return n[u]||(n[u]={}),i[u]||(i[u]={}),n[u][h]?!1:(i[u][h]=!0,!0)}).reverse().forEach(c=>s.push(c));const l=Object.keys(i);for(let c=0;c<l.length;c+=1){const u=l[c],d={...n[u],...i[u]};n[u]=d}return s},[]).reverse()},IC=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},LC=e=>({baseTag:RC(["href"],e),bodyAttributes:Kd("bodyAttributes",e),defer:Qo(e,Yo.DEFER),encode:Qo(e,Yo.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Kd("htmlAttributes",e),linkTags:Ja("link",["rel","href"],e),metaTags:Ja("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Ja("noscript",["innerHTML"],e),onChangeClientState:AC(e),scriptTags:Ja("script",["src","innerHTML"],e),styleTags:Ja("style",["cssText"],e),title:PC(e),titleAttributes:Kd("titleAttributes",e),prioritizeSeoTags:IC(e,Yo.PRIORITIZE_SEO_TAGS)}),R0=e=>Array.isArray(e)?e.join(""):e,DC=(e,t)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},Yd=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(DC(n,t)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},fy=(e,t)=>({...e,[t]:void 0}),MC=["noscript","script","style"],pf=(e,t=!0)=>t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),O0=e=>Object.keys(e).reduce((t,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),FC=(e,t,r,n)=>{const s=O0(r),o=R0(t);return s?`<${e} ${wr}="true" ${s}>${pf(o,n)}</${e}>`:`<${e} ${wr}="true">${pf(o,n)}</${e}>`},$C=(e,t,r=!0)=>t.reduce((n,s)=>{const o=s,i=Object.keys(o).filter(u=>!(u==="innerHTML"||u==="cssText")).reduce((u,d)=>{const h=typeof o[d]>"u"?d:`${d}="${pf(o[d],r)}"`;return u?`${u} ${h}`:h},""),l=o.innerHTML||o.cssText||"",c=MC.indexOf(e)===-1;return`${n}<${e} ${wr}="true" ${i}${c?"/>":`>${l}</${e}>`}`},""),I0=(e,t={})=>Object.keys(e).reduce((r,n)=>{const s=zu[n];return r[s||n]=e[n],r},t),UC=(e,t,r)=>{const n={key:t,[wr]:!0},s=I0(r,n);return[I.createElement("title",s,t)]},jc=(e,t)=>t.map((r,n)=>{const s={key:n,[wr]:!0};return Object.keys(r).forEach(o=>{const l=zu[o]||o;if(l==="innerHTML"||l==="cssText"){const c=r.innerHTML||r.cssText;s.dangerouslySetInnerHTML={__html:c}}else s[l]=r[o]}),I.createElement(e,s)}),Qt=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>UC(e,t.title,t.titleAttributes),toString:()=>FC(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>I0(t),toString:()=>O0(t)};default:return{toComponent:()=>jc(e,t),toString:()=>$C(e,t,r)}}},BC=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{const s=Yd(e,Gd.meta),o=Yd(t,Gd.link),i=Yd(r,Gd.script);return{priorityMethods:{toComponent:()=>[...jc("meta",s.priority),...jc("link",o.priority),...jc("script",i.priority)],toString:()=>`${Qt("meta",s.priority,n)} ${Qt("link",o.priority,n)} ${Qt("script",i.priority,n)}`},metaTags:s.default,linkTags:o.default,scriptTags:i.default}},WC=e=>{const{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:s,noscriptTags:o,styleTags:i,title:l="",titleAttributes:c,prioritizeSeoTags:u}=e;let{linkTags:d,metaTags:h,scriptTags:m}=e,f={toComponent:()=>[],toString:()=>""};return u&&({priorityMethods:f,linkTags:d,metaTags:h,scriptTags:m}=BC(e)),{priority:f,base:Qt("base",t,n),bodyAttributes:Qt("bodyAttributes",r,n),htmlAttributes:Qt("htmlAttributes",s,n),link:Qt("link",d,n),meta:Qt("meta",h,n),noscript:Qt("noscript",o,n),script:Qt("script",m,n),style:Qt("style",i,n),title:Qt("title",{title:l,titleAttributes:c},n)}},gf=WC,Hl=[],op=!!(typeof window<"u"&&window.document&&window.document.createElement),yf=class{constructor(e,t){Jr(this,"instances",[]);Jr(this,"canUseDOM",op);Jr(this,"context");Jr(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Hl:this.instances,add:e=>{(this.canUseDOM?Hl:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Hl:this.instances).indexOf(e);(this.canUseDOM?Hl:this.instances).splice(t,1)}}});this.context=e,this.canUseDOM=t||!1,t||(e.helmet=gf({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},zC=parseInt(I.version.split(".")[0],10),vf=zC>=19,HC={},L0=I.createContext(HC),Ms,D0=(Ms=class extends p.Component{constructor(r){super(r);Jr(this,"helmetData");vf?this.helmetData=null:this.helmetData=new yf(this.props.context||{},Ms.canUseDOM)}render(){return vf?I.createElement(I.Fragment,null,this.props.children):I.createElement(L0.Provider,{value:this.helmetData.value},this.props.children)}},Jr(Ms,"canUseDOM",op),Ms),mo=(e,t)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${wr}]`),s=[].slice.call(n),o=[];let i;return t&&t.length&&t.forEach(l=>{const c=document.createElement(e);for(const u in l)if(Object.prototype.hasOwnProperty.call(l,u))if(u==="innerHTML")c.innerHTML=l.innerHTML;else if(u==="cssText"){const d=l.cssText;
40c.appendChild(document.createTextNode(d))}else{const d=u,h=typeof l[d]>"u"?"":l[d];c.setAttribute(u,h)}c.setAttribute(wr,"true"),s.some((u,d)=>(i=d,c.isEqualNode(u)))?s.splice(i,1):o.push(c)}),s.forEach(l=>{var c;return(c=l.parentNode)==null?void 0:c.removeChild(l)}),o.forEach(l=>r.appendChild(l)),{oldTags:s,newTags:o}},xf=(e,t)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(wr),s=n?n.split(","):[],o=[...s],i=Object.keys(t);for(const l of i){const c=t[l]||"";r.getAttribute(l)!==c&&r.setAttribute(l,c),s.indexOf(l)===-1&&s.push(l);const u=o.indexOf(l);u!==-1&&o.splice(u,1)}for(let l=o.length-1;l>=0;l-=1)r.removeAttribute(o[l]);s.length===o.length?r.removeAttribute(wr):r.getAttribute(wr)!==i.join(",")&&r.setAttribute(wr,i.join(","))},VC=(e,t)=>{typeof e<"u"&&document.title!==e&&(document.title=R0(e)),xf("title",t)},my=(e,t)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:s,linkTags:o,metaTags:i,noscriptTags:l,onChangeClientState:c,scriptTags:u,styleTags:d,title:h,titleAttributes:m}=e;xf("body",n),xf("html",s),VC(h,m);const f={baseTag:mo("base",r),linkTags:mo("link",o),metaTags:mo("meta",i),noscriptTags:mo("noscript",l),scriptTags:mo("script",u),styleTags:mo("style",d)},w={},y={};Object.keys(f).forEach(b=>{const{newTags:v,oldTags:g}=f[b];v.length&&(w[b]=v),g.length&&(y[b]=f[b].oldTags)}),t&&t(),c(e,w,y)},Xa=null,qC=e=>{Xa&&cancelAnimationFrame(Xa),e.defer?Xa=requestAnimationFrame(()=>{my(e,()=>{Xa=null})}):(my(e),Xa=null)},GC=qC,py=class extends p.Component{constructor(){super(...arguments);Jr(this,"rendered",!1)}shouldComponentUpdate(t){return!TC(t,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:t}=this.props.context;t.remove(this),this.emitChange()}emitChange(){const{helmetInstances:t,setHelmet:r}=this.props.context;let n=null;const s=LC(t.get().map(o=>{const{context:i,...l}=o.props;return l}));D0.canUseDOM?GC(s):gf&&(n=gf(s)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:t}=this.props.context;t.add(this),this.emitChange()}render(){return this.init(),null}},_c=[],gy=e=>{const t={};for(const r of Object.keys(e))t[A0[r]||r]=e[r];return t},bs=e=>{const t={};for(const r of Object.keys(e)){const n=zu[r];t[n||r]=e[r]}return t},yy=(e,t)=>{if(!op)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",s=r.getAttribute(n),o=s?s.split(","):[],i=Object.keys(t);for(const l of o)i.includes(l)||r.removeAttribute(l);for(const l of i){const c=t[l];c==null||c===!1?r.removeAttribute(l):c===!0?r.setAttribute(l,""):r.setAttribute(l,String(c))}i.length>0?r.setAttribute(n,i.join(",")):r.removeAttribute(n)},Qd=()=>{const e={},t={};for(const r of _c){const{htmlAttributes:n,bodyAttributes:s}=r.props;n&&Object.assign(e,gy(n)),s&&Object.assign(t,gy(s))}yy("html",e),yy("body",t)},KC=class extends p.Component{componentDidMount(){_c.push(this),Qd()}componentDidUpdate(){Qd()}componentWillUnmount(){const e=_c.indexOf(this);e!==-1&&_c.splice(e,1),Qd()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:r}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const t=this.props.titleAttributes||{};return I.createElement("title",bs(t),e)}renderBase(){const{base:e}=this.props;return e?I.createElement("base",bs(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>I.createElement("meta",{key:r,...bs(t)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>I.createElement("link",{key:r,...bs(t)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...s}=t,o=bs(s);return n&&(o.dangerouslySetInnerHTML={__html:n}),I.createElement("script",{key:r,...o})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{cssText:n,...s}=t,o=bs(s);return n&&(o.dangerouslySetInnerHTML={__html:n}),I.createElement("style",{key:r,...o})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((t,r)=>{const{innerHTML:n,...s}=t,o=bs(s);return n&&(o.dangerouslySetInnerHTML={__html:n}),I.createElement("noscript",{key:r,...o}
40)})}render(){return I.createElement(I.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},bh,YC=(bh=class extends p.Component{shouldComponentUpdate(e){return!_C(fy(this.props,"helmetData"),fy(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,r,n){return{...t,[e.type]:[...t[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,t,r,n){switch(e.type){case"title":return{...t,[e.type]:n,titleAttributes:{...r}};case"body":return{...t,bodyAttributes:{...r}};case"html":return{...t,htmlAttributes:{...r}};default:return{...t,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,t){let r={...t};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,t){return dy(hy.some(r=>e.type===r),typeof e.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 ${hy.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),dy(!t||typeof t=="string"||Array.isArray(t)&&!t.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let r={};return I.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:s,...o}=n.props,i=Object.keys(o).reduce((c,u)=>(c[A0[u]||u]=o[u],c),{});let{type:l}=n;
40switch(typeof l=="symbol"?l=l.toString():this.warnOnInvalidChildren(n,s),l){case"Symbol(react.fragment)":t=this.mapChildrenToProps(s,t);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,i,s);break;default:t=this.mapObjectTypeChildren(n,t,i,s);break}}),this.mapArrayTypeChildrenToProps(r,t)}render(){const{children:e,...t}=this.props;let r={...t},{helmetData:n}=t;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof yf)){const s=n;n=new yf(s.context,!0),delete r.helmetData}return vf?I.createElement(KC,{...r}):n?I.createElement(py,{...r,context:n.value}):I.createElement(L0.Consumer,null,s=>I.createElement(py,{...r,context:s}))}},Jr(bh,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),bh);const QC=1,JC=1e6;let Jd=0;function XC(){return Jd=(Jd+1)%Number.MAX_SAFE_INTEGER,Jd.toString()}const Xd=new Map,vy=e=>{if(Xd.has(e))return;const t=setTimeout(()=>{Xd.delete(e),bi({type:"REMOVE_TOAST",toastId:e})},JC);Xd.set(e,t)},ZC=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,QC)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?vy(r):e.toasts.forEach(n=>{vy(n.id)}),{...e,toasts:e.toasts.map(n=>
vendor: 10,660 bytes, line 40
40n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Cc=[];let Nc={toasts:[]};function bi(e){Nc=ZC(Nc,e),Cc.forEach(t=>{t(Nc)})}function pl({...e}){const t=XC(),r=s=>bi({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>bi({type:"DISMISS_TOAST",toastId:t});return bi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function _t(){const[e,t]=p.useState(Nc);return p.useEffect(()=>(Cc.push(t),()=>{const r=Cc.indexOf(t);r>-1&&Cc.splice(r,1)}),[e]),{...e,toast:pl,dismiss:r=>bi({type:"DISMISS_TOAST",toastId:r})}}function we(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function xy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function M0(...e){return t=>{let r=!1;const n=e.map(s=>{const o=xy(s,t);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():xy(e[s],null)}}}}function We(...e){return p.useCallback(M0(...e),e)}function eN(e,t){const r=p.createContext(t),n=o=>{const{children:i,...l}=o,c=p.useMemo(()=>l,Object.values(l));return a.jsx(r.Provider,{value:c,children:i})};n.displayName=e+"Provider";function s(o){const i=p.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function wn(e,t=[]){let r=[];function n(o,i){const l=p.createContext(i),c=r.length;r=[...r,i];const u=h=>{var v;const{scope:m,children:f,...w}=h,y=((v=m==null?void 0:m[e])==null?void 0:v[c])||l,b=p.useMemo(()=>w,Object.values(w));return a.jsx(y.Provider,{value:b,children:f})};u.displayName=o+"Provider";function d(h,m){var y;const f=((y=m==null?void 0:m[e])==null?void 0:y[c])||l,w=p.useContext(f);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,d]}const s=()=>{const o=r.map(i=>p.createContext(i));return function(l){const c=(l==null?void 0:l[e])||o;return p.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return s.scopeName=e,[n,tN(s,...t)]}function tN(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((l,{useScope:c,scopeName:u})=>{const h=c(o)[`__scope${u}`];return{...l,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Hi(e){const t=nN(e),r=p.forwardRef((n,s)=>{const{children:o,...i}=n,l=p.Children.toArray(o),c=l.find(sN);if(c){const u=c.props.children,d=l.map(h=>h===c?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:h);return a.jsx(t,{...i,ref:s,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return a.jsx(t,{...i,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var rN=Hi("Slot");function nN(e){const t=p.forwardRef((r,n)=>{const{children:s,...o}=r;if(p.isValidElement(s)){const i=aN(s),l=oN(o,s.props);return s.type!==p.Fragment&&(l.ref=n?M0(n,i):i),p.cloneElement(s,l)}return p.Children.count(s)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var F0=Symbol("radix.slottable");function $0(e){const t=({children:r})=>a.jsx(a.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=F0,t}function sN(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===F0}function oN(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...l)=>{const c=o(...l);return s(...l),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...e,...r}}function aN(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function iN(e){const t=e+"CollectionProvider",[r,n]=wn(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:b,children:v}=y,g=I.useRef(null),x=I.useRef(new Map).current;return a.jsx(s,{scope:b,itemMap:x,collectionRef:g,children:v})};i.displayName=t;const l=e+"CollectionSlot",c=Hi(l),u=I.forwardRef((y,b)=>{const{scope:v,children:g}=y,x=o(l,v),k=We(b,x.collectionRef);return a.jsx(c,{ref:k,children:g})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=Hi(d),f=I.forwardRef((y,b)=>{const{scope:v,children:g,...x}=y,k=I.useRef(null),S=We(b,k),j=o(d,v);return I.useEffect(()=>(j.itemMap.set(k,{ref:k,...x}),()=>void j.itemMap.delete(k))),a.jsx(m,{[h]:"",ref:S,children:g})});f.displayName=d;function w(y){const b=o(e+"CollectionConsumer",y);return I.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const x=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(b.itemMap.values()).sort((j,N)=>x.indexOf(j.ref.current)-x.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:u,ItemSlot:f},w,n]}var lN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=lN.reduce((e,t)=>{const r=Hi(`Primitive.${t}`),n=p.forwardRef((s,o)=>{const{asChild:i,...l}=s,c=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(c,{...l,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function U0(e,t){e&&ml.flushSync(()=>e.dispatchEvent(t))}function Vr(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function cN(e,t=globalThis==null?void 0:globalThis.document){const r=Vr(e);p.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var uN="DismissableLayer",wf="dismissableLayer.update",dN="dismissableLayer.pointerDownOutside",hN="dismissableLayer.focusOutside",wy,B0=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Hu=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:l,...c}=e,u=p.useContext(B0),[d,h]=p.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,f]=p.useState({}),w=We(t,N=>h(N)),y=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=y.indexOf(b),g=d?y.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,k=g>=v,S=mN(N=>{const E=N.target,_=[...u.branches].some(P=>P.contains(E));!k||_||(s==null||s(N),i==null||i(N),N.defaultPrevented||l==null||l())},m),j=pN(N=>{const E=N.target;[...u.branches].some(P=>P.contains(E))||(o==null||o(N),i==null||i(N),N.defaultPrevented||l==null||l())},m);return cN(N=>{g===u.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},m),p.useEffect(()=>{if(d)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(wy=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),by(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=wy)}},[d,m,r,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),by())},[d,u]),p.useEffect(()=>{const N=()=>f({});return document.addEventListener(wf,N),()=>document.removeEventListener(wf,N)},[]),a.jsx(ke.div,{...c,ref:w,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:we(e.onFocusCapture,j.onFocusCapture),onBlurCapture:we(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:we(e.onPointerDownCapture,S.onPointerDownCapture)})});Hu.displayName=uN;var fN="DismissableLayerBranch",W0=p.forwardRef((e,t)=>{const r=p.useContext(B0),n=p.useRef(null),s=We(t,n);return p.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),a.jsx(ke.div,{...e,ref:s})});W0.displayName=fN;function mN(e,t=globalThis==null?void 0:globalThis.document){const r=Vr(e),n=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const o=l=>{if(l.target&&!n.current){let c=function(){z0(dN,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=c,t.addEventListener("click",s.current,{once:!0})):c()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function pN(e,t=globalThis==null?void 0:globalThis.document){const r=Vr(e),n=p.useRef(!1);return p.useEffect(()=>{const s=o=>{o.target&&!n.current&&z0(hN,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function by(){const e=new CustomEvent(wf);document.dispatchEvent(e)}function z0(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?U0(s,o):s.dispatchEvent(o)}var gN=Hu,yN=W0,gn=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},vN="Portal",ap=p.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[s,o]=p.useState(!1);gn(()=>o(!0),[]);const i=r||s&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?E0.createPortal(a.jsx(ke.div,{...n,ref:t}),i):null});ap.displayName=vN;function xN(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var co=e=>{const{present:t,children:r}=e,n=wN(t),s=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),o=We(n.ref,bN(s));return typeof r=="function"||n.isPresent?p.cloneElement(s,{ref:o}):null};co.displayName="Presence";function wN(e){const[t,r]=p.useState(),n=p.useRef(null),s=p.useRef(e),o=p.useRef("none"),i=e?"mounted":"unmounted",[l,c]=xN(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Vl(n.current);o.current=l==="mounted"?u:"none"},[l]),gn(()=>{const u=n.current,d=s.current;if(d!==e){const m=o.current,f=Vl(u);e?c("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&m!==f?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,c]),gn(()=>
40{if(t){let u;const d=t.ownerDocument.defaultView??window,h=f=>{const y=Vl(n.current).includes(f.animationName);if(f.target===t&&y&&(c("ANIMATION_END"),!s.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},m=f=>{f.target===t&&(o.current=Vl(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Vl(e){return(e==null?void 0:e.animationName)||"none"}function bN(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var kN=mm[" useInsertionEffect ".trim().toString()]||gn;function Vu({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,i]=SN({defaultProp:t,onChange:r}),l=e!==void 0,c=l?e:s;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${n} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,n])}const u=p.useCallback(d=>{var h;if(l){const m=jN(d)?d(e):d;m!==e&&((h=i.current)==null||h.call(i,m))}else o(d)},[l,e,o,i]);return[c,u]}function SN({defaultProp:e,onChange:t}){const[r,n]=p.useState(e),s=p.useRef(r),o=p.useRef(t);return kN(()=>{o.current=t},[t]),p.useEffect(()=>{var i;s.current!==r&&((i=o.current)==null||i.call(o,r),s.current=r)},[r,s]),[r,n,o]}function jN(e){return typeof e=="function"}var _N=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),CN="VisuallyHidden",qu=p.forwardRef((e,t)=>a.jsx(ke.span,{...e,ref:t,style:{..._N,...e.style}}));qu.displayName=CN;var NN=qu,ip="ToastProvider",[lp,EN,TN]=iN("Toast"),[H0,_M]=wn("Toast",[TN]),[PN,Gu]=H0(ip),V0=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[l,c]=p.useState(null),[u,d]=p.useState(0),h=p.useRef(!1),m=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${ip}\`. Expected non-empty \`string\`.`),a.jsx(lp.Provider,{scope:t,children:a.jsx(PN,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:p.useCallback(()=>d(f=>f+1),[]),onToastRemove:p.useCallback(()=>d(f=>f-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:m,children:i})})};V0.displayName=ip;var q0="ToastViewport",AN=["F8"],bf="toast.viewportPause",kf="toast.viewportResume",G0=p.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=AN,label:s="Notifications ({hotkey})",...o}=e,i=Gu(q0,r),l=EN(r),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),h=p.useRef(null),m=We(t,h,i.onViewportChange),f=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=i.toastCount>0;p.useEffect(()=>{const b=v=>{var x;n.length!==0&&n.every(k=>v[k]||v.code===k)&&((x=h.current)==null||x.focus())};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]),p.useEffect(()=>{const b=c.current,v=h.current;if(w&&b&&v){const g=()=>{if(!i.isClosePausedRef.current){const j=new CustomEvent(bf);v.dispatchEvent(j),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){const j=new CustomEvent(kf);v.dispatchEvent(j),i.isClosePausedRef.current=!1}},k=j=>{!b.contains(j.relatedTarget)&&x()},S=()=>{b.contains(document.activeElement)||x()};return b.addEventListener("focusin",g),b.addEventListener("focusout",k),b.addEventListener("pointermove",g),b.addEventListener("pointerleave",S),window.addEventListener("blur",g),window.addEventListener("focus",x),()=>{b.removeEventListener("focusin",g),b.removeEventListener("focusout",k),b.removeEventListener("pointermove",g),b.removeEventListener("pointerleave",S),window.removeEventListener("blur",g),window.removeEventListener("focus",x)}}},[w,i.isClosePausedRef]);const y=p.useCallback(({tabbingDirection:b})=>{const g=l().map(x=>{const k=x.ref.current,S=[k,...HN(k)];return b==="forwards"?S:S.reverse()});return(b==="forwards"?g.reverse():g).flat()},[l]);return p.useEffect(()=>{const b=h.current;if(b){const v=g=>{var S,j,N;const x=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!x){const E=document.activeElement,_=g.shiftKey;if(g.target===b&&_){(S=u.current)==null||S.focus();return}const O=y({tabbingDirection:_?"backwards":"forwards"}),R=O.findIndex(D=>D===E);Zd(O.slice(R+1))?g.preventDefault():_?(j=u.current)==null||j.focus():(N=d.current)==null||N.focus()}};return b.addEventListener("keydown",v),()=>b.removeEventListener("keydown",v)}},[l,y]),a.jsxs(yN,{ref:c,role:"region","aria-label":s.replace("{hotkey}",f),tabIndex:-1,style:{pointerEvents:w?void 0:"none"},children:[w&&a.jsx(Sf,{ref:u,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"forwards"});Zd(b)}}),a.jsx(lp.Slot,{scope:r,children:a.jsx(ke.ol,{tabIndex:-1,...o,ref:m})}),w&&a.jsx(Sf,{ref:d,onFocusFromOutsideViewport:()=>{const b=y({tabbingDirection:"backwards"});Zd(b)}})]})});G0.displayName=q0;var K0="ToastFocusProxy",Sf=p.forwardRef((e,t)=>
40{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Gu(K0,r);return a.jsx(qu,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const l=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(l))&&n()}})});Sf.displayName=K0;var gl="Toast",RN="toast.swipeStart",ON="toast.swipeMove",IN="toast.swipeCancel",LN="toast.swipeEnd",Y0=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[l,c]=Vu({prop:n,defaultProp:s??!0,onChange:o,caller:gl});return a.jsx(co,{present:r||l,children:a.jsx(FN,{open:l,...i,ref:t,onClose:()=>c(!1),onPause:Vr(e.onPause),onResume:Vr(e.onResume),onSwipeStart:we(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:we(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:we(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:we(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});Y0.displayName=gl;var[DN,MN]=H0(gl,{onClose(){}}),FN=p.forwardRef((e,t)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:m,onSwipeEnd:f,...w}=e,y=Gu(gl,r),[b,v]=p.useState(null),g=We(t,D=>v(D)),x=p.useRef(null),k=p.useRef(null),S=s||y.duration,j=p.useRef(0),N=p.useRef(S),E=p.useRef(0),{onToastAdd:_,onToastRemove:P}=y,M=Vr(()=>{var U;(b==null?void 0:b.contains(document.activeElement))&&((U=y.viewport)==null||U.focus()),i()}),O=p.useCallback(D=>{!D||D===1/0||(window.clearTimeout(E.current),j.current=new Date().getTime(),E.current=window.setTimeout(M,D))},[M]);p.useEffect(()=>{const D=y.viewport;if(D){const U=()=>{O(N.current),u==null||u()},q=()=>{const te=new Date().getTime()-j.current;N.current=N.current-te,window.clearTimeout(E.current),c==null||c()};return D.addEventListener(bf,q),D.addEventListener(kf,U),()=>{D.removeEventListener(bf,q),D.removeEventListener(kf,U)}}},[y.viewport,S,c,u,O]),p.useEffect(()=>{o&&!y.isClosePausedRef.current&&O(S)},[o,S,y.isClosePausedRef,O]),p.useEffect(()=>(_(),()=>P()),[_,P]);const R=p.useMemo(()=>b?rb(b):null,[b]);return y.viewport?a.jsxs(a.Fragment,{children:[R&&a.jsx($N,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:R}),a.jsx(DN,{scope:r,onClose:M,children:ml.createPortal(a.jsx(lp.ItemSlot,{scope:r,children:a.jsx(gN,{asChild:!0,onEscapeKeyDown:we(l,()=>{y.isFocusedToastEscapeKeyDownRef.current||M(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:a.jsx(ke.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":y.swipeDirection,...w,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:we(e.onKeyDown,D=>{D.key==="Escape"&&(l==null||l(D.nativeEvent),D.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:we(e.onPointerDown,D=>{D.button===0&&(x.current={x:D.clientX,y:D.clientY})}),onPointerMove:we(e.onPointerMove,D=>{if(!x.current)return;const U=D.clientX-x.current.x,q=D.clientY-x.current.y,te=!!k.current,T=["left","right"].includes(y.swipeDirection),A=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,$=T?A(0,U):0,J=T?0:A(0,q),V=D.pointerType==="touch"?10:2,L={x:$,y:J},B={originalEvent:D,delta:L};te?(k.current=L,ql(ON,h,B,{discrete:!1})):ky(L,y.swipeDirection,V)?(k.current=L,ql(RN,d,B,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(U)>V||Math.abs(q)>V)&&(x.current=null)}),onPointerUp:we(e.onPointerUp,D=>{const U=k.current,q=D.target;if(q.hasPointerCapture(D.pointerId)&&q.releasePointerCapture(D.pointerId),k.current=null,x.current=null,U){const te=D.currentTarget,T={originalEvent:D,delta:U};ky(U,y.swipeDirection,y.swipeThreshold)?ql(LN,f,T,{discrete:!0}):ql(IN,m,T,{discrete:!0}),te.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),$N=e=>{const{__scopeToast:t,children:r,...n}=e,s=Gu(gl,t),[o,i]=p.useState(!1),[l,c]=p.useState(!1);return WN(()=>i(!0)),p.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:a.jsx(ap,{asChild:!0,children:a.jsx(qu,{...n,children:o&&a.jsxs(a.Fragment,{children:[s.label," ",r]})})})},UN="ToastTitle",Q0=p.forwardRef((e,t)=>
vendor: 4,741 bytes, lines 40-60
40{const{__scopeToast:r,...n}=e;return a.jsx(ke.div,{...n,ref:t})});Q0.displayName=UN;var BN="ToastDescription",J0=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return a.jsx(ke.div,{...n,ref:t})});J0.displayName=BN;var X0="ToastAction",Z0=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?a.jsx(tb,{altText:r,asChild:!0,children:a.jsx(cp,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${X0}\`. Expected non-empty \`string\`.`),null)});Z0.displayName=X0;var eb="ToastClose",cp=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=MN(eb,r);return a.jsx(tb,{asChild:!0,children:a.jsx(ke.button,{type:"button",...n,ref:t,onClick:we(e.onClick,s.onClose)})})});cp.displayName=eb;var tb=p.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return a.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function rb(e){const t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),zN(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...rb(n))}}),t}function ql(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?U0(s,o):s.dispatchEvent(o)}var ky=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function WN(e=()=>{}){const t=Vr(e);gn(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function zN(e){return e.nodeType===e.ELEMENT_NODE}function HN(e){const t=[],r=document.createTreeWalker(e,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();)t.push(r.currentNode);return t}function Zd(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var VN=V0,nb=G0,sb=Y0,ob=Q0,ab=J0,ib=Z0,lb=cp;function cb(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=cb(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function ub(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=cb(e))&&(n&&(n+=" "),n+=t);return n}const Sy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jy=ub,up=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return jy(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const d=r==null?void 0:r[u],h=o==null?void 0:o[u];if(d===null)return null;const m=Sy(d)||Sy(h);return s[u][m]}),l=r&&Object.entries(r).reduce((u,d)=>{let[h,m]=d;return m===void 0||(u[h]=m),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:h,className:m,...f}=d;return Object.entries(f).every(w=>{let[y,b]=w;return Array.isArray(b)?b.includes({...o,...l}[y]):{...o,...l}[y]===b})?[...u,h,m]:u},[]);return jy(e,i,c,r==null?void 0:r.class,r==null?void 0:r.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const qN=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),db=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var GN={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const KN=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...l},c)=>p.createElement("svg",{ref:c,...GN,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:db("lucide",s),...l},[...i.map(([u,d])=>p.createElement(u,d)),...Array.isArray(o)?o:[o]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const Y=(e,t)=>
60{const r=p.forwardRef(({className:n,...s},o)=>p.createElement(KN,{ref:o,iconNode:t,className:db(`lucide-${qN(e)}`,n),...s}));return r.displayName=`${e}`,r};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const ba=Y("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const hb=Y("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const YN=Y("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const Ku=Y("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"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const dp=Y("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const Ps=Y("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const yl=Y("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const fb=Y("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const vl=Y("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const Yu=Y("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const mb=Y("Coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const QN=Y("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree.
125 */const hp=Y("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"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const pb=Y("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const JN=Y("Dot",[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const jf=Y("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"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const gb=Y("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"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const ka=Y("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const Sa=Y("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const fp=Y("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"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const XN=Y("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const ZN=Y("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const eE=Y("Infinity",[["path",{d:"M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 0 0 0-8c-2 0-4 1.33-6 4Z",key:"1z0uae"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const yb=Y("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree.
185 */const tE=Y("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const rE=Y("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"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const ja=Y("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const vb=Y("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"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const xb=Y("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const Qu=Y("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"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const nE=Y("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"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const sE=Y("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** 221 * @license lucide-react v0.462.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 oE=Y("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** 226 * @license lucide-react v0.462.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 wb=Y("Receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);/** 231 * @license lucide-react v0.462.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 Cs=Y("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"}]]);/** 236 * @license lucide-react v0.462.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 bb=Y("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 241 * @license lucide-react v0.462.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 kb=Y("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/** 246 * @license lucide-react v0.462.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 _y=Y("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 251 * @license lucide-react v0.462.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 Ec=Y("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 256 * @license lucide-react v0.462.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 aE=Y("ShieldBan",[["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
260y:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]]);/** 261 * @license lucide-react v0.462.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 iE=Y("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 266 * @license lucide-react v0.462.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 Ju=Y("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** 271 * @license lucide-react v0.462.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 Aa=Y("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 276 * @license lucide-react v0.462.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 lE=Y("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** 281 * @license lucide-react v0.462.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 cE=Y("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 286 * @license lucide-react v0.462.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 mp=Y("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"}]]);/** 291 * @license lucide-react v0.462.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 ki=Y("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 296 * @license lucide-react v0.462.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 uE=Y("Unlink",[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]);/** 301 * @license lucide-react v0.462.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 xl=Y("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 306 * @license lucide-react v0.462.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 Sb=Y("UserX",[["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"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/** 311 * @license lucide-react v0.462.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 jb=Y("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"}]]);/** 316 * @license lucide-react v0.462.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 _f=Y("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"}]]);/** 321 * @license lucide-react v0.462.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 Xu=Y("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 12,633 bytes, lines 325-330
325],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 326 * @license lucide-react v0.462.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 to=Y("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),pp="-",dE=e=>{const t=fE(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const l=i.split(pp);return l[0]===""&&l.length!==1&&l.shift(),_b(l,t)||hE(i)},getConflictingClassGroupIds:(i,l)=>{const c=r[i]||[];return l&&n[i]?[...c,...n[i]]:c}}},_b=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?_b(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(pp);return(i=t.validators.find(({validator:l})=>l(o)))==null?void 0:i.classGroupId},Cy=/^\[(.+)\]$/,hE=e=>{if(Cy.test(e)){const t=Cy.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},fE=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return pE(Object.entries(e.classGroups),r).forEach(([o,i])=>{Cf(i,n,o,t)}),n},Cf=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Ny(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(mE(s)){Cf(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{Cf(i,Ny(t,o),r,n)})})},Ny=(e,t)=>{let r=e;return t.split(pp).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},mE=e=>e.isThemeGetter,pE=(e,t)=>t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,l])=>[t+i,l])):o);return[r,s]}):e,gE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}},Cb="!",yE=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length,i=l=>{const c=[];let u=0,d=0,h;for(let b=0;b<l.length;b++){let v=l[b];if(u===0){if(v===s&&(n||l.slice(b,b+o)===t)){c.push(l.slice(d,b)),d=b+o;continue}if(v==="/"){h=b;continue}}v==="["?u++:v==="]"&&u--}const m=c.length===0?l:l.substring(d),f=m.startsWith(Cb),w=f?m.substring(1):m,y=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:f,baseClassName:w,maybePostfixModifierPosition:y}};return r?l=>r({className:l,parseClassName:i}):i},vE=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},xE=e=>({cache:gE(e.cacheSize),parseClassName:yE(e),...dE(e)}),wE=/\s+/,bE=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(wE);let l="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:f}=r(u);let w=!!f,y=n(w?m.substring(0,f):m);if(!y){if(!w){l=u+(l.length>0?" "+l:l);continue}if(y=n(m),!y){l=u+(l.length>0?" "+l:l);continue}w=!1}const b=vE(d).join(":"),v=h?b+Cb:b,g=v+y;if(o.includes(g))continue;o.push(g);const x=s(y,w);for(let k=0;k<x.length;++k){const S=x[k];o.push(v+S)}l=u+(l.length>0?" "+l:l)}return l};function kE(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Nb(t))&&(n&&(n+=" "),n+=r);return n}const Nb=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Nb(e[n]))&&(r&&(r+=" "),r+=t);return r};function SE(e,...t){let r,n,s,o=i;function i(c){const u=t.reduce((d,h)=>h(d),e());return r=xE(u),n=r.cache.get,s=r.cache.set,o=l,l(c)}function l(c){const u=n(c);if(u)return u;const d=bE(c,r);return s(c,d),d}return function(){return o(kE.apply(null,arguments))}}const Ee=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Eb=/^\[(?:([a-z-]+):)?(.+)\]$/i,jE=/^\d+\/\d+$/,_E=new Set(["px","full","screen"]),CE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,NE=/\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$/,EE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,TE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,PE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xr=e=>Jo(e)||_E.has(e)||jE.test(e),Tn=e=>Ra(e,"length",FE),Jo=e=>!!e&&!Number.isNaN(Number(e)),eh=e=>Ra(e,"number",Jo),Za=e=>!!e&&Number.isInteger(Number(e)),AE=e=>e.endsWith("%")&&Jo(e.slice(0,-1)),le=e=>Eb.test(e),Pn=e=>CE.test(e),RE=new Set(["length","size","percentage"]),OE=e=>Ra(e,RE,Tb),IE=e=>Ra(e,"position",Tb),LE=new Set(["image","url"]),DE=e=>Ra(e,LE,UE),ME=e=>Ra(e,"",$E),ei=()=>!0,Ra=(e,t,r)=>{const n=Eb.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},FE=e=>NE.test(e)&&!EE.test(e),Tb=()=>!1,$E=e=>TE.test(e),UE=e=>PE.test(e),BE=()=>{const e=Ee("colors"),t=Ee("spacing"),r=Ee("blur"),n=Ee("brightness"),s=Ee("borderColor"),o=Ee("borderRadius"),i=Ee("borderSpacing"),l=Ee("borderWidth"),c=Ee("contrast"),u=Ee("grayscale"),d=Ee("hueRotate"),h=Ee("invert"),m=Ee("gap"),f=Ee("gradientColorStops"),w=Ee("gradientColorStopPositions"),y=Ee("inset"),b=Ee("margin"),v=Ee("opacity"),g=Ee("padding"),x=Ee("saturate"),k=Ee("scale"),S=Ee("sepia"),j=Ee("skew"),N=Ee("space"),E=Ee("translate"),_=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",le,t],O=()=>[le,t],R=()=>["",Xr,Tn],D=()=>["auto",Jo,le],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],te=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",le],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Jo,le];return{cacheSize:500,separator:":",theme:{colors:[ei],spacing:[Xr,Tn],blur:["none","",Pn,le],brightness:J(),borderColor:[e],borderRadius:["none","","full",Pn,le],borderSpacing:O(),borderWidth:R(),contrast:J(),grayscale:A(),hueRotate:J(),invert:A(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[AE,Tn],inset:M(),margin:M(),opacity:J(),padding:O(),saturate:J(),scale:J(),sepia:A(),skew:J(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[Pn]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"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:[...U(),le]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Za,le]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",Za,le]}],"grid-cols":[{"grid-cols":[ei]}],"col-start-end":[{col:["auto",{span:["full",Za,le]},le]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[ei]}],"row-start-end":[{row:["auto",{span:[Za,le]},le]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,t]}],"min-w":[{"min-w":[le,t,"min","max","fit"]}],"max-w":[{"max-w":[le,t,"none","full","min","max","fit","prose",{screen:[Pn]},Pn]}],h:[{h:[le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Pn,Tn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",eh]}],"font-family":[{font:[ei]}],"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",le]}],"line-clamp":[{"line-clamp":["none",Jo,eh]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Xr,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Xr,Tn]}],"underline-offset":[{"underline-offset":["auto",Xr,le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le]}],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",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),IE]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",OE]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},DE]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}
vendor: 4,887 bytes, line 330
330],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],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:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:q()}],"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:["",...q()]}],"outline-offset":[{"outline-offset":[Xr,le]}],"outline-w":[{outline:[Xr,Tn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Xr,Tn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Pn,ME]}],"shadow-color":[{shadow:[ei]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...te(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":te()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Pn,le]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[x]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",le]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[k]}],"scale-x":[{"scale-x":[k]}],"scale-y":[{"scale-y":[k]}],rotate:[{rotate:[Za,le]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}
vendor: 4,942 bytes, line 330
330],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Xr,Tn,eh]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},WE=SE(BE);function ue(...e){return WE(ub(e))}const zE=VN,Pb=p.forwardRef(({className:e,...t},r)=>a.jsx(nb,{ref:r,className:ue("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Pb.displayName=nb.displayName;const HE=up("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Ab=p.forwardRef(({className:e,variant:t,...r},n)=>a.jsx(sb,{ref:n,className:ue(HE({variant:t}),e),...r}));Ab.displayName=sb.displayName;const VE=p.forwardRef(({className:e,...t},r)=>a.jsx(ib,{ref:r,className:ue("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));VE.displayName=ib.displayName;const Rb=p.forwardRef(({className:e,...t},r)=>a.jsx(lb,{ref:r,className:ue("absolute right-2 top-2 rounded-md p-1 text-foreground
330/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:a.jsx(Xu,{className:"h-4 w-4"})}));Rb.displayName=lb.displayName;const Ob=p.forwardRef(({className:e,...t},r)=>a.jsx(ob,{ref:r,className:ue("text-sm font-semibold",e),...t}));Ob.displayName=ob.displayName;const Ib=p.forwardRef(({className:e,...t},r)=>a.jsx(ab,{ref:r,className:ue("text-sm opacity-90",e),...t}));Ib.displayName=ab.displayName;function qE(){const{toasts:e}=_t();return a.jsxs(zE,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return a.jsxs(Ab,{...o,children:[a.jsxs("div",{className:"grid gap-1",children:[r&&a.jsx(Ob,{children:r}),n&&a.jsx(Ib,{children:n})]}),s,a.jsx(Rb,{})]},t)}),a.jsx(Pb,{})]})}var Ey=["light","dark"],GE="(prefers-color-scheme: dark)",KE=p.createContext(void 0),YE={setTheme:e=>{},themes:[]},QE=()=>{var e;return(e=p.useContext(KE))!=null?e:YE};p.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:i,attrs:l,nonce:c})=>{let u=o==="system",d=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(w=>`'${w}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,h=s?Ey.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",m=(w,y=!1,b=!0)=>{let v=i?i[w]:w,g=y?w+"|| ''":`'${v}'`,x="";return s&&b&&!y&&Ey.includes(w)&&(x+=`d.style.colorScheme = '${w}';`),r==="class"?y||v?x+=`c.add(${g})`:x+="null":v&&(x+=`d[s](n,${g})`),x},f=e?`!function(){${d}${m(e)}}()`:n?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${GE}',m=window.matchMedia(t);if(m.media!==t||m.matches){${m("dark")}}else{${m("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${m(i?"x[e]":"e",!0)}}${u?"":"else{"+m(o,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${m(i?"x[e]":"e",!0)}}else{${m(o,!1,!1)};}${h}}catch(t){}}();`;return p.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:f}})});var JE=e=>{switch(e){case"success":return eT;case"info":return rT;case"warning":return tT;case"error":return nT;default:return null}},XE=Array(12).fill(0),ZE=({visible:e,className:t})=>I.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},I.createElement("div",{className:"sonner-spinner"},XE.map((r,n)=>I.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),eT=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),tT=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),rT=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),nT=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},I.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),sT=I.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},I.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),I.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),oT=()=>
330{let[e,t]=I.useState(document.hidden);return I.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Nf=1,aT=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Nf++,o=this.toasts.find(l=>l.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:r}),{...l,...e,id:s,dismissible:i,title:r}):l):this.addToast({title:r,...n,dismissible:i,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
330this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,o,i=n.then(async c=>{if(o=["resolve",c],I.isValidElement(c))s=!1,this.create({id:r,type:"default",message:c});else if(lT(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:r,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"success",message:u,description:d})}}).catch(async c=>{if(o=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:r,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(r),r=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>i.then(()=>o[0]==="reject"?u(o[1]):c(o[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Nf++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},At=new aT,iT=(e,t)=>{let r=(t==null?void 0:t.id)||Nf++;return At.addToast({title:e,...t,id:r}),r},lT=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",cT=iT,uT=()=>At.toasts,dT=()=>At.getActiveToasts();Object.assign(cT,{success:At.success,info:At.info,warning:At.warning,error:At.error,custom:At.custom,message:At.message,promise:At.promise,dismiss:At.dismiss,loading:At.loading},{getHistory:uT,getToasts:dT});function hT(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}hT(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
330left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
330:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);
330--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 331`);function Gl(e){return e.label!==void 0}var fT=3,mT="32px",pT="16px",Ty=4e3,gT=356,yT=14,vT=20,xT=200;function dr(...e){return e.filter(Boolean).join(" ")}function wT(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var bT=e=>{var t,r,n,s,o,i,l,c,u,d,h;let{invert:m,toast:f,unstyled:w,interacting:y,setHeights:b,visibleToasts:v,heights:g,index:x,toasts:k,expanded:S,removeToast:j,defaultRichColors:N,closeButton:E,style:_,cancelButtonStyle:P,actionButtonStyle:M,className:O="",descriptionClassName:R="",duration:D,position:U,gap:q,loadingIcon:te,expandByDefault:T,classNames:A,icons:$,closeButtonAriaLabel:J="Close toast",pauseWhenPageIsHidden:V}=e,[L,B]=I.useState(null),[se,fe]=I.useState(null),[ie,Je]=I.useState(!1),[lt,Mt]=I.useState(!1),[Ft,tt]=I.use
vendor: 4,393 bytes, line 331
331State(!1),[Yt,X]=I.useState(!1),[ne,ze]=I.useState(!1),[ct,Xe]=I.useState(0),[pe,ut]=I.useState(0),Tr=I.useRef(f.duration||D||Ty),Nt=I.useRef(null),gt=I.useRef(null),or=x===0,Pr=x+1<=v,$e=f.type,Et=f.dismissible!==!1,kl=f.className||"",Sl=f.descriptionClassName||"",uo=I.useMemo(()=>g.findIndex(ae=>ae.toastId===f.id)||0,[g,f.id]),vd=I.useMemo(()=>{var ae;return(ae=f.closeButton)!=null?ae:E},[f.closeButton,E]),jl=I.useMemo(()=>f.duration||D||Ty,[f.duration,D]),ar=I.useRef(0),Ar=I.useRef(0),_l=I.useRef(0),ho=I.useRef(null),[WS,zS]=U.split("-"),Zp=I.useMemo(()=>g.reduce((ae,xe,Ae)=>Ae>=uo?ae:ae+xe.height,0),[g,uo]),eg=oT(),HS=f.invert||m,xd=$e==="loading";Ar.current=I.useMemo(()=>uo*q+Zp,[uo,Zp]),I.useEffect(()=>{Tr.current=jl},[jl]),I.useEffect(()=>{Je(!0)},[]),I.useEffect(()=>{let ae=gt.current;if(ae){let xe=ae.getBoundingClientRect().height;return ut(xe),b(Ae=>[{toastId:f.id,height:xe,position:f.position},...Ae]),()=>b(Ae=>Ae.filter(ir=>ir.toastId!==f.id))}},[b,f.id]),I.useLayoutEffect(()=>{if(!ie)return;let ae=gt.current,xe=ae.style.height;ae.style.height="auto";let Ae=ae.getBoundingClientRect().height;ae.style.height=xe,ut(Ae),b(ir=>ir.find(lr=>lr.toastId===f.id)?ir.map(lr=>lr.toastId===f.id?{...lr,height:Ae}:lr):[{toastId:f.id,height:Ae,position:f.position},...ir])},[ie,f.title,f.description,b,f.id]);let _n=I.useCallback(()=>{Mt(!0),Xe(Ar.current),b(ae=>ae.filter(xe=>xe.toastId!==f.id)),setTimeout(()=>{j(f)},xT)},[f,j,b,Ar]);I.useEffect(()=>{if(f.promise&&$e==="loading"||f.duration===1/0||f.type==="loading")return;let ae;return S||y||V&&eg?(()=>{if(_l.current<ar.current){let xe=new Date().getTime()-ar.current;Tr.current=Tr.current-xe}_l.current=new Date().getTime()})():Tr.current!==1/0&&(ar.current=new Date().getTime(),ae=setTimeout(()=>{var xe;(xe=f.onAutoClose)==null||xe.call(f,f),_n()},Tr.current)),()=>clearTimeout(ae)},[S,y,f,$e,V,eg,_n]),I.useEffect(()=>{f.delete&&_n()},[_n,f.delete]);function VS(){var ae,xe,Ae;return $!=null&&$.loading?I.createElement("div",{className:dr(A==null?void 0:A.loader,(ae=f==null?void 0:f.classNames)==null?void 0:ae.loader,"sonner-loader"),"data-visible":$e==="loading"},$.loading):te?I.createElement("div",{className:dr(A==null?void 0:A.loader,(xe=f==null?void 0:f.classNames)==null?void 0:xe.loader,"sonner-loader"),"data-visible":$e==="loading"},te):I.createElement(ZE,{className:dr(A==null?void 0:A.loader,(Ae=f==null?void 0:f.classNames)==null?void 0:Ae.loader),visible:$e==="loading"})}return I.createElement("li",{tabIndex:0,ref:gt,className:dr(O,kl,A==null?void 0:A.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,A==null?void 0:A.default,A==null?void 0:A[$e],(r=f==null?void 0:f.classNames)==null?void 0:r[$e]),"data-sonner-toast":"","data-rich-colors":(n=f.richColors)!=null?n:N,"data-styled":!(f.jsx||f.unstyled||w),"data-mounted":ie,"data-promise":!!f.promise,"data-swiped":ne,"data-removed":lt,"data-visible":Pr,"data-y-position":WS,"data-x-position":zS,"data-index":x,"data-front":or,"data-swiping":Ft,"data-dismissible":Et,"data-type":$e,"data-invert":HS,"data-swipe-out":Yt,"data-swipe-direction":se,"data-expanded":!!(S||T&&ie),style:{"--index":x,"--toasts-before":x,"--z-index":k.length-x,"--offset":`${lt?ct:Ar.current}px`,"--initial-height":T?"auto":`${pe}px`,..._,...f.style},onDragEnd:()=>{tt(!1),B(null),ho.current=null},onPointerDown:ae=>{xd||!Et||(Nt.current=new Date,Xe(Ar.current),ae.target.setPointerCapture(ae.pointerId),ae.target.tagName!=="BUTTON"&&(tt(!0),ho.current={x:ae.clientX,y:ae.clientY}))},onPointerUp:()=>{var ae,xe,Ae,ir;if(Yt||!Et)return;ho.current=null;let lr=Number(((ae=gt.current)==null?void 0:ae.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Cn=Number(((xe=gt.current)==null?void 0:xe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ws=new Date().getTime()-((Ae=Nt.current)==null?void 0:Ae.getTime()),cr=L==="x"?lr:Cn,Nn=Math.abs(cr)/ws;if(Math.abs(cr)>=vT||Nn>.11){Xe(Ar.current),(ir=f.onDismiss)==null||ir.call(f,f),fe(L==="x"?lr>0?"right":"left":Cn>0?"down":"up"),_n(),X(!0),ze(!1);return}tt(!1),B(null)},onPointerMove:ae=>{var xe,Ae,ir,lr;if(!ho.current||!Et||((xe=window.getSelection())==null?void 0:xe.toString().length)>0)return;let Cn=ae.clientY-ho.current.y,ws=ae.clientX-ho.current.x,cr=(Ae=e.swipeDirections)!=null?Ae:wT(U);!L&&(Math.abs(ws)>1||Math.abs(Cn)>1)&&B(Math.abs(ws)>Math.abs(Cn)?"x":"y");let Nn={x:0,y:0};
331L==="y"?(cr.includes("top")||cr.includes("bottom"))&&(cr.includes("top")&&Cn<0||cr.includes("bottom")&&Cn>0)&&(Nn.y=Cn):L==="x"&&(cr.includes("left")||cr.includes("right"))&&(cr.includes("left")&&ws<0||cr.includes("right")&&ws>0)&&(Nn.x=ws),(Math.abs(Nn.x)>0||Math.abs(Nn.y)>0)&&ze(!0),(ir=gt.current)==null||ir.style.setProperty("--swipe-amount-x",`${Nn.x}px`),(lr=gt.current)==null||lr.style.setProperty("--swipe-amount-y",`${Nn.y}px`)}},vd&&!f.jsx?I.createElement("button",{"aria-label":J,"data-disabled":xd,"data-close-button":!0,onClick:xd||!Et?()=>{}:()=>{var ae;_n(),(ae=f.onDismiss)==null||ae.call(f,f)},className:dr(A==null?void 0:A.closeButton,(s=f==null?void 0:f.classNames)==null?void 0:s.closeButton)},(o=$==null?void 0:$.close)!=null?o:sT):null,f.jsx||p.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:I.createElement(I.Fragment,null,$e||f.icon||f.promise?I.createElement("div",{"data-icon":"",className:dr(A==null?void 0:A.icon,(i=f==null?void 0:f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||VS():null,f.type!=="loading"?f.icon||($==null?void 0:$[$e])||JE($e):null):null,I.createElement("div",{"data-content":"",className:dr(A==null?void 0:A.content,(l=f==null?void 0:f.classNames)==null?void 0:l.content)},I.createElement("div",{"data-title":"",className:dr(A==null?void 0:A.title,(c=f==null?void 0:f.classNames)==null?void 0:c.title)},typeof f.title=="function"?f.title():f.title),f.description?I.createElement("div",{"data-description":"",className:dr(R,Sl,A==null?void 0:A.description,(u=f==null?void 0:f.classNames)==null?void 0:u.description)},typeof f.description=="function"?f.description():f.description):null),p.isValidElement(f.cancel)?f.cancel:f.cancel&&Gl(f.cancel)?I.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||P,onClick:ae=>{var xe,Ae;Gl(f.cancel)&&Et&&((Ae=(xe=f.cancel).onClick)==null||Ae.call(xe,ae),_n())},className:dr(A==null?void 0:A.cancelButton,(d=f==null?void 0:f.classNames)==null?void 0:d.cancelButton)},f.cancel.label):null,p.isValidElement(f.action)?f.action:f.action&&Gl(f.action)?I.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||M,onClick:ae=>{var xe,Ae;Gl(f.action)&&((Ae=(xe=f.action).onClick)==null||Ae.call(xe,ae),!ae.defaultPrevented&&_n())},className:dr(A==null?void 0:A.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function Py(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function kT(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",l=o?pT:mT;function c(u){["top","right","bottom","left"].forEach(d=>{r[`${i}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?c(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${i}-${u}`]=l:r[`${i}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):c(l)}),r}var ST=p.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:m,style:f,visibleToasts:w=fT,toastOptions:y,dir:b=Py(),gap:v=yT,loadingIcon:g,icons:x,containerAriaLabel:k="Notifications",pauseWhenPageIsHidden:S}=e,[j,N]=I.useState([]),E=I.useMemo(()=>Array.from(new Set([n].concat(j.filter(V=>V.position).map(V=>V.position)))),[j,n]),[_,P]=I.useState([]),[M,O]=I.useState(!1),[R,D]=I.useState(!1),[U,q]=I.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),te=I.useRef(null),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=I.useRef(null),$=I.useRef(!1),J=I.useCallback(V=>{N(L=>{var B;return(B=L.find(se=>se.id===V.id))!=null&&B.delete||At.dismiss(V.id),L.filter(({id:se})=>se!==V.id)})},[]);return I.useEffect(()=>At.subscribe(V=>{if(V.dismiss){N(L=>L.map(B=>B.id===V.id?{...B,delete:!0}:B));return}setTimeout(()=>{E0.flushSync(()=>{N(L=>{let B=L.findIndex(se=>se.id===V.id);return B!==-1?[...L.slice(0,B),{...L[B],...V},...L.slice(B+1)]:[V,...L]})})})}),[]),I.useEffect(()=>{if(d!=="system"){q(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:L})=>{q(L?"dark":"light")})}catch{V.addListener(({matches:B})=>
vendor: 4,491 bytes, line 331
331{try{q(B?"dark":"light")}catch(se){console.error(se)}})}},[d]),I.useEffect(()=>{j.length<=1&&O(!1)},[j]),I.useEffect(()=>{let V=L=>{var B,se;s.every(fe=>L[fe]||L.code===fe)&&(O(!0),(B=te.current)==null||B.focus()),L.code==="Escape"&&(document.activeElement===te.current||(se=te.current)!=null&&se.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),I.useEffect(()=>{if(te.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,$.current=!1)}},[te.current]),I.createElement("section",{ref:t,"aria-label":`${k} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((V,L)=>{var B;let[se,fe]=V.split("-");return j.length?I.createElement("ol",{key:V,dir:b==="auto"?Py():b,tabIndex:-1,ref:te,className:l,"data-sonner-toaster":!0,"data-theme":U,"data-y-position":se,"data-lifted":M&&j.length>1&&!o,"data-x-position":fe,style:{"--front-toast-height":`${((B=_[0])==null?void 0:B.height)||0}px`,"--width":`${gT}px`,"--gap":`${v}px`,...f,...kT(c,u)},onBlur:ie=>{$.current&&!ie.currentTarget.contains(ie.relatedTarget)&&($.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||$.current||($.current=!0,A.current=ie.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{R||O(!1)},onDragEnd:()=>O(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||D(!0)},onPointerUp:()=>D(!1)},j.filter(ie=>!ie.position&&L===0||ie.position===V).map((ie,Je)=>{var lt,Mt;return I.createElement(bT,{key:ie.id,icons:x,index:Je,toast:ie,defaultRichColors:h,duration:(lt=y==null?void 0:y.duration)!=null?lt:m,className:y==null?void 0:y.className,descriptionClassName:y==null?void 0:y.descriptionClassName,invert:r,visibleToasts:w,closeButton:(Mt=y==null?void 0:y.closeButton)!=null?Mt:i,interacting:R,position:V,style:y==null?void 0:y.style,unstyled:y==null?void 0:y.unstyled,classNames:y==null?void 0:y.classNames,cancelButtonStyle:y==null?void 0:y.cancelButtonStyle,actionButtonStyle:y==null?void 0:y.actionButtonStyle,removeToast:J,toasts:j.filter(Ft=>Ft.position==ie.position),heights:_.filter(Ft=>Ft.position==ie.position),setHeights:P,expandByDefault:o,gap:v,loadingIcon:g,expanded:M,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const jT=({...e})=>{const{theme:t="system"}=QE();return a.jsx(ST,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var _T=mm[" useId ".trim().toString()]||(()=>{}),CT=0;function th(e){const[t,r]=p.useState(_T());return gn(()=>{e||r(n=>n??String(CT++))},[e]),e||(t?`radix-${t}`:"")}const NT=["top","right","bottom","left"],fs=Math.min,Bt=Math.max,ou=Math.round,Kl=Math.floor,Wr=e=>({x:e,y:e}),ET={left:"right",right:"left",bottom:"top",top:"bottom"},TT={start:"end",end:"start"};function Ef(e,t,r){return Bt(e,fs(t,r))}function yn(e,t){return typeof e=="function"?e(t):e}function vn(e){return e.split("-")[0]}function Oa(e){return e.split("-")[1]}function gp(e){return e==="x"?"y":"x"}function yp(e){return e==="y"?"height":"width"}const PT=new Set(["top","bottom"]);function $r(e){return PT.has(vn(e))?"y":"x"}function vp(e){return gp($r(e))}function AT(e,t,r){r===void 0&&(r=!1);const n=Oa(e),s=vp(e),o=yp(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=au(i)),[i,au(i)]}function RT(e){const t=au(e);return[Tf(e),t,Tf(t)]}function Tf(e){return e.replace(/start|end/g,t=>TT[t])}const Ay=["left","right"],Ry=["right","left"],OT=["top","bottom"],IT=["bottom","top"];function LT(e,t,r){switch(e){case"top":case"bottom":return r?t?Ry:Ay:t?Ay:Ry;case"left":case"right":return t?OT:IT;default:return[]}}function DT(e,t,r,n){const s=Oa(e);let o=LT(vn(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Tf)))),o}function au(e){return e.replace(/left|right|bottom|top/g,t=>ET[t])}function MT(e){return{top:0,right:0,bottom:0,left:0,...e}}
vendor: 10,701 bytes, line 331
331function Lb(e){return typeof e!="number"?MT(e):{top:e,right:e,bottom:e,left:e}}function iu(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function Oy(e,t,r){let{reference:n,floating:s}=e;const o=$r(t),i=vp(t),l=yp(i),c=vn(t),u=o==="y",d=n.x+n.width/2-s.width/2,h=n.y+n.height/2-s.height/2,m=n[l]/2-s[l]/2;let f;switch(c){case"top":f={x:d,y:n.y-s.height};break;case"bottom":f={x:d,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:h};break;case"left":f={x:n.x-s.width,y:h};break;default:f={x:n.x,y:n.y}}switch(Oa(t)){case"start":f[i]-=m*(r&&u?-1:1);break;case"end":f[i]+=m*(r&&u?-1:1);break}return f}const FT=async(e,t,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,l=o.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:h}=Oy(u,n,c),m=n,f={},w=0;for(let y=0;y<l.length;y++){const{name:b,fn:v}=l[y],{x:g,y:x,data:k,reset:S}=await v({x:d,y:h,initialPlacement:n,placement:m,strategy:s,middlewareData:f,rects:u,platform:i,elements:{reference:e,floating:t}});d=g??d,h=x??h,f={...f,[b]:{...f[b],...k}},S&&w<=50&&(w++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:d,y:h}=Oy(u,m,c)),y=-1)}return{x:d,y:h,placement:m,strategy:s,middlewareData:f}};async function Vi(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:f=0}=yn(t,e),w=Lb(f),b=l[m?h==="floating"?"reference":"floating":h],v=iu(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(b)))==null||r?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),g=h==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,x=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l.floating)),k=await(o.isElement==null?void 0:o.isElement(x))?await(o.getScale==null?void 0:o.getScale(x))||{x:1,y:1}:{x:1,y:1},S=iu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:g,offsetParent:x,strategy:c}):g);return{top:(v.top-S.top+w.top)/k.y,bottom:(S.bottom-v.bottom+w.bottom)/k.y,left:(v.left-S.left+w.left)/k.x,right:(S.right-v.right+w.right)/k.x}}const $T=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=yn(e,t)||{};if(u==null)return{};const h=Lb(d),m={x:r,y:n},f=vp(s),w=yp(f),y=await i.getDimensions(u),b=f==="y",v=b?"top":"left",g=b?"bottom":"right",x=b?"clientHeight":"clientWidth",k=o.reference[w]+o.reference[f]-m[f]-o.floating[w],S=m[f]-o.reference[f],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=j?j[x]:0;(!N||!await(i.isElement==null?void 0:i.isElement(j)))&&(N=l.floating[x]||o.floating[w]);const E=k/2-S/2,_=N/2-y[w]/2-1,P=fs(h[v],_),M=fs(h[g],_),O=P,R=N-y[w]-M,D=N/2-y[w]/2+E,U=Ef(O,D,R),q=!c.arrow&&Oa(s)!=null&&D!==U&&o.reference[w]/2-(D<O?P:M)-y[w]/2<0,te=q?D<O?D-O:D-R:0;return{[f]:m[f]+te,data:{[f]:U,centerOffset:D-U-te,...q&&{alignmentOffset:te}},reset:q}}}),UT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:y=!0,...b}=yn(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const v=vn(s),g=$r(l),x=vn(l)===l,k=await(c.isRTL==null?void 0:c.isRTL(u.floating)),S=m||(x||!y?[au(l)]:RT(l)),j=w!=="none";!m&&j&&S.push(...DT(l,y,w,k));const N=[l,...S],E=await Vi(t,b),_=[];let P=((n=o.flip)==null?void 0:n.overflows)||[];if(d&&_.push(E[v]),h){const D=AT(s,i,k);_.push(E[D[0]],E[D[1]])}if(P=[...P,{placement:s,overflows:_}],!_.every(D=>D<=0)){var M,O;const D=(((M=o.flip)==null?void 0:M.index)||0)+1,U=N[D];if(U&&(!(h==="alignment"?g!==$r(U):!1)||P.every(T=>T.overflows[0]>0&&$r(T.placement)===g)))return{data:{index:D,overflows:P},reset:{placement:U}};let q=(O=P.filter(te=>te.overflows[0]<=0).sort((te,T)=>te.overflows[1]-T.overflows[1])[0])==null?void 0:O.placement;if(!q)switch(f){case"bestFit":{var R;const te=(R=P.filter(T=>{if(j){const A=$r(T.placement);return A===g||A==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(A=>A>0).reduce((A,$)=>A+$,0)]).sort((T,A)=>T[1]-A[1])[0])==null?void 0:R[0];te&&(q=te);break}case"initialPlacement":q=l;break}if(s!==q)return{reset:{placement:q}}}return{}}}};function Iy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ly(e){return NT.some(t=>e[t]>=0)}const BT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=yn(e,t);switch(n){case"referenceHidden":{const o=await Vi(t,{...s,elementContext:"reference"}),i=Iy(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ly(i)}}}case"escaped":{const o=await Vi(t,{...s,altBoundary:!0}),i=Iy(o,r.floating);return{data:{escapedOffsets:i,escaped:Ly(i)}}}default:return{}}}}},Db=new Set(["left","top"]);async function WT(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=vn(r),l=Oa(r),c=$r(r)==="y",u=Db.has(i)?-1:1,d=o&&c?-1:1,h=yn(t,e);let{mainAxis:m,crossAxis:f,alignmentAxis:w}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof w=="number"&&(f=l==="end"?w*-1:w),c?{x:f*d,y:m*u}:{x:m*u,y:f*d}}const zT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:l}=t,c=await WT(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:o+c.y,data:{...c,placement:i}}}}},HT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:b=>{let{x:v,y:g}=b;return{x:v,y:g}}},...c}=yn(e,t),u={x:r,y:n},d=await Vi(t,c),h=$r(vn(s)),m=gp(h);let f=u[m],w=u[h];if(o){const b=m==="y"?"top":"left",v=m==="y"?"bottom":"right",g=f+d[b],x=f-d[v];f=Ef(g,f,x)}if(i){const b=h==="y"?"top":"left",v=h==="y"?"bottom":"right",g=w+d[b],x=w-d[v];w=Ef(g,w,x)}const y=l.fn({...t,[m]:f,[h]:w});return{...y,data:{x:y.x-r,y:y.y-n,enabled:{[m]:o,[h]:i}}}}}},VT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=yn(e,t),d={x:r,y:n},h=$r(s),m=gp(h);let f=d[m],w=d[h];const y=yn(l,t),b=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(c){const x=m==="y"?"height":"width",k=o.reference[m]-o.floating[x]+b.mainAxis,S=o.reference[m]+o.reference[x]-b.mainAxis;f<k?f=k:f>S&&(f=S)}if(u){var v,g;const x=m==="y"?"width":"height",k=Db.has(vn(s)),S=o.reference[h]-o.floating[x]+(k&&((v=i.offset)==null?void 0:v[h])||0)+(k?0:b.crossAxis),j=o.reference[h]+o.reference[x]+(k?0:((g=i.offset)==null?void 0:g[h])||0)-(k?b.crossAxis:0);w<S?w=S:w>j&&(w=j)}return{[m]:f,[h]:w}}}},qT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:i,elements:l}=t,{apply:c=()=>{},...u}=yn(e,t),d=await Vi(t,u),h=vn(s),m=Oa(s),f=$r(s)==="y",{width:w,height:y}=o.floating;let b,v;h==="top"||h==="bottom"?(b=h,v=m===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(v=h,b=m==="end"?"top":"bottom");const g=y-d.top-d.bottom,x=w-d.left-d.right,k=fs(y-d[b],g),S=fs(w-d[v],x),j=!t.middlewareData.shift;let N=k,E=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=g),j&&!m){const P=Bt(d.left,0),M=Bt(d.right,0),O=Bt(d.top,0),R=Bt(d.bottom,0);f?E=w-2*(P!==0||M!==0?P+M:Bt(d.left,d.right)):N=y-2*(O!==0||R!==0?O+R:Bt(d.top,d.bottom))}await c({...t,availableWidth:E,availableHeight:N});const _=await i.getDimensions(l.floating);return w!==_.width||y!==_.height?{reset:{rects:!0}}:{}}}};function Zu(){return typeof window<"u"}function Ia(e){return Mb(e)?(e.nodeName||"").toLowerCase():"#document"}function Vt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Gr(e){var t;return(t=(Mb(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mb(e){return Zu()?e instanceof Node||e instanceof Vt(e).Node:!1}function jr(e){return Zu()?e instanceof Element||e instanceof Vt(e).Element:!1}function qr(e){return Zu()?e instanceof HTMLElement||e instanceof Vt(e).HTMLElement:!1}function Dy(e){return!Zu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Vt(e).ShadowRoot}const GT=new Set(["inline","contents"]);function wl(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!GT.has(s)}const KT=new Set(["table","td","th"]);function YT(e){return KT.has(Ia(e))}const QT=[":popover-open",":modal"];function ed(e){return QT.some(t=>{try{return e.matches(t)}catch{return!1}})}const JT=["transform","translate","scale","rotate","perspective"],XT=["transform","translate","scale","rotate","perspective","filter"],ZT=["paint","layout","strict","content"];function xp(e){const t=wp(),r=jr(e)?_r(e):e;return JT.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||XT.some(n=>(r.willChange||"").includes(n))||ZT.some(n=>(r.contain||"").includes(n))}function e2(e){let t=ms(e);for(;qr(t)&&!_a(t);){if(xp(t))return t;if(ed(t))return null;t=ms(t)}return null}function wp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const t2=new Set(["html","body","#document"]);function _a(e){return t2.has(Ia(e))}function _r(e){return Vt(e).getComputedStyle(e)}function td(e){return jr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ms(e){if(Ia(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Dy(e)&&e.host||Gr(e);return Dy(t)?t.host:t}function Fb(e){const t=ms(e);return _a(t)?e.ownerDocument?e.ownerDocument.body:e.body:qr(t)&&wl(t)?t:Fb(t)}function qi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Fb(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=Vt(s);if(o){const l=Pf(i);
vendor: 4,828 bytes, line 331
331return t.concat(i,i.visualViewport||[],wl(s)?s:[],l&&r?qi(l):[])}return t.concat(s,qi(s,[],r))}function Pf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $b(e){const t=_r(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=qr(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,l=ou(r)!==o||ou(n)!==i;return l&&(r=o,n=i),{width:r,height:n,$:l}}function bp(e){return jr(e)?e:e.contextElement}function Xo(e){const t=bp(e);if(!qr(t))return Wr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=$b(t);let i=(o?ou(r.width):r.width)/n,l=(o?ou(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const r2=Wr(0);function Ub(e){const t=Vt(e);return!wp()||!t.visualViewport?r2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function n2(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Vt(e)?!1:t}function ro(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=bp(e);let i=Wr(1);t&&(n?jr(n)&&(i=Xo(n)):i=Xo(e));const l=n2(o,r,n)?Ub(o):Wr(0);let c=(s.left+l.x)/i.x,u=(s.top+l.y)/i.y,d=s.width/i.x,h=s.height/i.y;if(o){const m=Vt(o),f=n&&jr(n)?Vt(n):n;let w=m,y=Pf(w);for(;y&&n&&f!==w;){const b=Xo(y),v=y.getBoundingClientRect(),g=_r(y),x=v.left+(y.clientLeft+parseFloat(g.paddingLeft))*b.x,k=v.top+(y.clientTop+parseFloat(g.paddingTop))*b.y;c*=b.x,u*=b.y,d*=b.x,h*=b.y,c+=x,u+=k,w=Vt(y),y=Pf(w)}}return iu({width:d,height:h,x:c,y:u})}function kp(e,t){const r=td(e).scrollLeft;return t?t.left+r:ro(Gr(e)).left+r}function Bb(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:kp(e,n)),o=n.top+t.scrollTop;return{x:s,y:o}}function s2(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=Gr(n),l=t?ed(t.floating):!1;if(n===i||l&&o)return r;let c={scrollLeft:0,scrollTop:0},u=Wr(1);const d=Wr(0),h=qr(n);if((h||!h&&!o)&&((Ia(n)!=="body"||wl(i))&&(c=td(n)),qr(n))){const f=ro(n);u=Xo(n),d.x=f.x+n.clientLeft,d.y=f.y+n.clientTop}const m=i&&!h&&!o?Bb(i,c,!0):Wr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+d.x+m.x,y:r.y*u.y-c.scrollTop*u.y+d.y+m.y}}function o2(e){return Array.from(e.getClientRects())}function a2(e){const t=Gr(e),r=td(e),n=e.ownerDocument.body,s=Bt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Bt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+kp(e);const l=-r.scrollTop;return _r(n).direction==="rtl"&&(i+=Bt(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:l}}function i2(e,t){const r=Vt(e),n=Gr(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,l=0,c=0;if(s){o=s.width,i=s.height;const u=wp();(!u||u&&t==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:o,height:i,x:l,y:c}}const l2=new Set(["absolute","fixed"]);function c2(e,t){const r=ro(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=qr(e)?Xo(e):Wr(1),i=e.clientWidth*o.x,l=e.clientHeight*o.y,c=s*o.x,u=n*o.y;return{width:i,height:l,x:c,y:u}}function My(e,t,r){let n;if(t==="viewport")n=i2(e,r);else if(t==="document")n=a2(Gr(e));else if(jr(t))n=c2(t,r);else{const s=Ub(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return iu(n)}function Wb(e,t){const r=ms(e);return r===t||!jr(r)||_a(r)?!1:_r(r).position==="fixed"||Wb(r,t)}function u2(e,t){const r=t.get(e);if(r)return r;let n=qi(e,[],!1).filter(l=>jr(l)&&Ia(l)!=="body"),s=null;const o=_r(e).position==="fixed";let i=o?ms(e):e;for(;jr(i)&&!_a(i);){const l=_r(i),c=xp(i);!c&&l.position==="fixed"&&(s=null),(o?!c&&!s:!c&&l.position==="static"&&!!s&&l2.has(s.position)||wl(i)&&!c&&Wb(e,i))?n=n.filter(d=>d!==i):s=l,i=ms(i)}return t.set(e,n),n}function d2(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?ed(t)?[]:u2(t,this._c):[].concat(r),n],l=i[0],c=i.reduce((u,d)=>{const h=My(t,d,s);return u.top=Bt(h.top,u.top),u.right=fs(h.right,u.right),u.bottom=fs(h.bottom,u.bottom),u.left=Bt(h.left,u.left),u},My(t,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function h2(e){const{width:t,height:r}=$b(e);return{width:t,height:r}}function f2(e,t,r){const n=qr(t),s=Gr(t),o=r==="fixed",i=ro(e,!0,o,t);let l={scrollLeft:0,scrollTop:0};const c=Wr(0);function u(){c.x=kp(s)}if(n||!n&&!o)if((Ia(t)!=="body"||wl(s))&&(l=td(t)),n){const f=ro(t,!0,o,t);c.x=f.x+t.clientLeft,c.y=f.y+t.clientTop}else s&&u();o&&!n&&s&&u();const d=s&&!n&&!o?Bb(s,l):Wr(0),h=i.left+l.scrollLeft-c.x-d.x,m=i.top+l.scrollTop-c.y-d.y;return{x:h,y:m,width:i.width,height:i.height}}function rh(e){return _r(e).position==="static"}function Fy(e,t){if(!qr(e)||_r(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Gr(e)===r&&(r=r.ownerDocument.body),r}function zb(e,t){const r=Vt(e);if(ed(e))return r;if(!qr(e)){let s=ms(e);for(;s&&!_a(s);
vendor: 8,938 bytes, line 331
331){if(jr(s)&&!rh(s))return s;s=ms(s)}return r}let n=Fy(e,t);for(;n&&YT(n)&&rh(n);)n=Fy(n,t);return n&&_a(n)&&rh(n)&&!xp(n)?r:n||e2(e)||r}const m2=async function(e){const t=this.getOffsetParent||zb,r=this.getDimensions,n=await r(e.floating);return{reference:f2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function p2(e){return _r(e).direction==="rtl"}const g2={convertOffsetParentRelativeRectToViewportRelativeRect:s2,getDocumentElement:Gr,getClippingRect:d2,getOffsetParent:zb,getElementRects:m2,getClientRects:o2,getDimensions:h2,getScale:Xo,isElement:jr,isRTL:p2};function Hb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function y2(e,t){let r=null,n;const s=Gr(e);function o(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:d,top:h,width:m,height:f}=u;if(l||t(),!m||!f)return;const w=Kl(h),y=Kl(s.clientWidth-(d+m)),b=Kl(s.clientHeight-(h+f)),v=Kl(d),x={rootMargin:-w+"px "+-y+"px "+-b+"px "+-v+"px",threshold:Bt(0,fs(1,c))||1};let k=!0;function S(j){const N=j[0].intersectionRatio;if(N!==c){if(!k)return i();N?i(!1,N):n=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!Hb(u,e.getBoundingClientRect())&&i(),k=!1}try{r=new IntersectionObserver(S,{...x,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,x)}r.observe(e)}return i(!0),o}function v2(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=bp(e),d=s||o?[...u?qi(u):[],...qi(t)]:[];d.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),o&&v.addEventListener("resize",r)});const h=u&&l?y2(u,r):null;let m=-1,f=null;i&&(f=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&f&&(f.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=f)==null||x.observe(t)})),r()}),u&&!c&&f.observe(u),f.observe(t));let w,y=c?ro(e):null;c&&b();function b(){const v=ro(e);y&&!Hb(y,v)&&r(),y=v,w=requestAnimationFrame(b)}return r(),()=>{var v;d.forEach(g=>{s&&g.removeEventListener("scroll",r),o&&g.removeEventListener("resize",r)}),h==null||h(),(v=f)==null||v.disconnect(),f=null,c&&cancelAnimationFrame(w)}}const x2=zT,w2=HT,b2=UT,k2=qT,S2=BT,$y=$T,j2=VT,_2=(e,t,r)=>{const n=new Map,s={platform:g2,...r},o={...s.platform,_c:n};return FT(e,t,{...s,platform:o})};var C2=typeof document<"u",N2=function(){},Tc=C2?p.useLayoutEffect:N2;function lu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!lu(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!lu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Vb(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Uy(e,t){const r=Vb(e);return Math.round(t*r)/r}function nh(e){const t=p.useRef(e);return Tc(()=>{t.current=e}),t}function E2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,f]=p.useState(n);lu(m,n)||f(n);const[w,y]=p.useState(null),[b,v]=p.useState(null),g=p.useCallback(T=>{T!==j.current&&(j.current=T,y(T))},[]),x=p.useCallback(T=>{T!==N.current&&(N.current=T,v(T))},[]),k=o||w,S=i||b,j=p.useRef(null),N=p.useRef(null),E=p.useRef(d),_=c!=null,P=nh(c),M=nh(s),O=nh(u),R=p.useCallback(()=>{if(!j.current||!N.current)return;const T={placement:t,strategy:r,middleware:m};M.current&&(T.platform=M.current),_2(j.current,N.current,T).then(A=>{const $={...A,isPositioned:O.current!==!1};D.current&&!lu(E.current,$)&&(E.current=$,ml.flushSync(()=>{h($)}))})},[m,t,r,M,O]);Tc(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,h(T=>({...T,isPositioned:!1})))},[u]);const D=p.useRef(!1);Tc(()=>(D.current=!0,()=>{D.current=!1}),[]),Tc(()=>{if(k&&(j.current=k),S&&(N.current=S),k&&S){if(P.current)return P.current(k,S,R);R()}},[k,S,R,P,_]);const U=p.useMemo(()=>({reference:j,floating:N,setReference:g,setFloating:x}),[g,x]),q=p.useMemo(()=>({reference:k,floating:S}),[k,S]),te=p.useMemo(()=>{const T={position:r,left:0,top:0};if(!q.floating)return T;const A=Uy(q.floating,d.x),$=Uy(q.floating,d.y);return l?{...T,transform:"translate("+A+"px, "+$+"px)",...Vb(q.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:$}},[r,l,q.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:R,refs:U,elements:q,floatingStyles:te}),[d,R,U,q,te])}const T2=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?$y({element:n.current,padding:s}).fn(r):{}:n?$y({element:n,padding:s}).fn(r):{}}}},P2=(e,t)=>({...x2(e),options:[e,t]}),A2=(e,t)=>({...w2(e),options:[e,t]}),R2=(e,t)=>({...j2(e),options:[e,t]}),O2=(e,t)=>({...b2(e),options:[e,t]}),I2=(e,t)=>({...k2(e),options:[e,t]}),L2=(e,t)=>({...S2(e),options:[e,t]}),D2=(e,t)=>({...T2(e),options:[e,t]});var M2="Arrow",qb=p.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return a.jsx(ke.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});qb.displayName=M2;var F2=qb;function Sp(e){const[t,r]=p.useState(void 0);return gn(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,l;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Gb="Popper",[Kb,Yb]=wn(Gb),[CM,Qb]=Kb(Gb),Jb="PopperAnchor",Xb=p.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Qb(Jb,r),i=p.useRef(null),l=We(t,i);return p.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:a.jsx(ke.div,{...s,ref:l})});Xb.displayName=Jb;var jp="PopperContent",[$2,U2]=Kb(jp),Zb=p.forwardRef((e,t)=>{var ie,Je,lt,Mt,Ft,tt;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:f="optimized",onPlaced:w,...y}=e,b=Qb(jp,r),[v,g]=p.useState(null),x=We(t,Yt=>g(Yt)),[k,S]=p.useState(null),j=Sp(k),N=(j==null?void 0:j.width)??0,E=(j==null?void 0:j.height)??0,_=n+(o!=="center"?"-"+o:""),P=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},M=Array.isArray(u)?u:[u],O=M.length>0,R={padding:P,boundary:M.filter(W2),altBoundary:O},{refs:D,floatingStyles:U,placement:q,isPositioned:te,middlewareData:T}=E2({strategy:"fixed",placement:_,whileElementsMounted:(...Yt)=>v2(...Yt,{animationFrame:f==="always"}),elements:{reference:b.anchor},middleware:[P2({mainAxis:s+E,alignmentAxis:i}),c&&A2({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?R2():void 0,...R}),c&&O2({...R}),I2({...R,apply:({elements:Yt,rects:X,availableWidth:ne,availableHeight:ze})=>{const{width:ct,height:Xe}=X.reference,pe=Yt.floating.style;pe.setProperty("--radix-popper-available-width",`${ne}px`),pe.setProperty("--radix-popper-available-height",`${ze}px`),pe.setProperty("--radix-popper-anchor-width",`${ct}px`),pe.setProperty("--radix-popper-anchor-height",`${Xe}px`)}}),k&&D2({element:k,padding:l}),z2({arrowWidth:N,arrowHeight:E}),m&&L2({strategy:"referenceHidden",...R})]}),[A,$]=r1(q),J=Vr(w);gn(()=>{te&&(J==null||J())},[te,J]);const V=(ie=T.arrow)==null?void 0:ie.x,L=(Je=T.arrow)==null?void 0:Je.y,B=((lt=T.arrow)==null?void 0:lt.centerOffset)!==0,[se,fe]=p.useState();return gn(()=>{v&&fe(window.getComputedStyle(v).zIndex)},[v]),a.jsx("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:te?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Mt=T.transformOrigin)==null?void 0:Mt.x,(Ft=T.transformOrigin)==null?void 0:Ft.y].join(" "),...((tt=T.hide)==null?void 0:tt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx($2,{scope:r,placedSide:A,onArrowChange:S,arrowX:V,arrowY:L,shouldHideArrow:B,children:a.jsx(ke.div,{"data-side":A,"data-align":$,...y,ref:x,style:{...y.style,animation:te?void 0:"none"}})})})});Zb.displayName=jp;var e1="PopperArrow",B2={top:"bottom",right:"left",bottom:"top",left:"r
331ight"},t1=p.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=U2(e1,n),i=B2[o.placedSide];return a.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:a.jsx(F2,{...s,ref:r,style:{...s.style,display:"block"}})})});t1.displayName=e1;function W2(e){return e!==null}var z2=e=>({name:"transformOrigin",options:e,fn(t){var b,v,g;const{placement:r,rects:n,middlewareData:s}=t,i=((b=s.arrow)==null?void 0:b.centerOffset)!==0,l=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,d]=r1(r),h={start:"0%",center:"50%",end:"100%"}[d],m=(((v=s.arrow)==null?void 0:v.x)??0)+l/2,f=(((g=s.arrow)==null?void 0:g.y)??0)+c/2;let w="",y="";return u==="bottom"?(w=i?h:`${m}px`,y=`${-c}px`):u==="top"?(w=i?h:`${m}px`,y=`${n.floating.height+c}px`):u==="right"?(w=`${-c}px`,y=i?h:`${f}px`):u==="left"&&(w=`${n.floating.width+c}px`,y=i?h:`${f}px`),{data:{x:w,y}}}});function r1(e){const[t,r="center"]=e.split("-");return[t,r]}var H2=Xb,V2=Zb,q2=t1,[rd,NM]=wn("Tooltip",[Yb]),_p=Yb(),n1="TooltipProvider",G2=700,By="tooltip.open",[K2,s1]=rd(n1),o1=e=>{const{__scopeTooltip:t,delayDuration:r=G2,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,i=p.useRef(!0),l=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),a.jsx(K2,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(u=>{l.current=u},[]),disableHoverableContent:s,children:o})};o1.displayName=n1;var a1="Tooltip",[EM,nd]=rd(a1),Af="TooltipTrigger",Y2=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=nd(Af,r),o=s1(Af,r),i=_p(r),l=p.useRef(null),c=We(t,l,s.onTriggerChange),u=p.useRef(!1),d=p.useRef(!1),h=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),a.jsx(H2,{asChild:!0,...i,children:a.jsx(ke.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:c,onPointerMove:we(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),d.current=!0)}),onPointerLeave:we(e.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:we(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:we(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:we(e.onBlur,s.onClose),onClick:we(e.onClick,s.onClose)})})});Y2.displayName=Af;var Q2="TooltipPortal",[TM,J2]=rd(Q2,{forceMount:void 0}),Ca="TooltipContent",i1=p.forwardRef((e,t)=>{const r=J2(Ca,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=nd(Ca,e.__scopeTooltip);return a.jsx(co,{present:n||i.open,children:i.disableHoverableContent?a.jsx(l1,{side:s,...o,ref:t}):a.jsx(X2,{side:s,...o,ref:t})})}),X2=p.forwardRef((e,t)=>{const r=nd(Ca,e.__scopeTooltip),n=s1(Ca,e.__scopeTooltip),s=p.useRef(null),o=We(t,s),[i,l]=p.useState(null),{trigger:c,onClose:u}=r,d=s.current,{onPointerInTransitChange:h}=n,m=p.useCallback(()=>{l(null),h(!1)},[h]),f=p.useCallback((w,y)=>{const b=w.currentTarget,v={x:w.clientX,y:w.clientY},g=nP(v,b.getBoundingClientRect()),x=sP(v,g),k=oP(y.getBoundingClientRect()),S=iP([...x,...k]);l(S),h(!0)},[h]);return p.useEffect(()=>()=>m(),[m]),p.useEffect(()=>{if(c&&d){const w=b=>f(b,d),y=b=>f(b,c);return c.addEventListener("pointerleave",w),d.addEventListener("pointerleave",y),()=>{c.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",y)}}},[c,d,f,m]),p.useEffect(()=>{if(i){const w=y=>{const b=y.target,v={x:y.clientX,y:y.clientY},g=(c==null?void 0:c.contains(b))||(d==null?void 0:d.contains(b)),x=!aP(v,i);g?m():x&&(m(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[c,d,i,u,m]),a.jsx(l1,{...e,ref:o})}),[Z2,eP]=rd(a1,{isInside:!1}),tP=$0("TooltipContent"),l1=p.forwardRef((e,t)=>
331{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...l}=e,c=nd(Ca,r),u=_p(r),{onClose:d}=c;return p.useEffect(()=>(document.addEventListener(By,d),()=>document.removeEventListener(By,d)),[d]),p.useEffect(()=>{if(c.trigger){const h=m=>{const f=m.target;f!=null&&f.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),a.jsx(Hu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:a.jsxs(V2,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[a.jsx(tP,{children:n}),a.jsx(Z2,{scope:r,isInside:!0,children:a.jsx(NN,{id:c.contentId,role:"tooltip",children:s||n})})]})})});i1.displayName=Ca;var c1="TooltipArrow",rP=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=_p(r);return eP(c1,r).isInside?null:a.jsx(q2,{...s,...n,ref:t})});rP.displayName=c1;function nP(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function sP(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function oP(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function aP(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const l=t[o],c=t[i],u=l.x,d=l.y,h=c.x,m=c.y;d>n!=m>n&&r<(h-u)*(n-d)/(m-d)+u&&(s=!s)}return s}function iP(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),lP(t)}function lP(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var cP=o1,u1=i1;const uP=cP,dP=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>a.jsx(u1,{ref:n,sideOffset:t,className:ue("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));dP.displayName=u1.displayName;var La=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},no=typeof window>"u"||"Deno"in globalThis;function bt(){}function hP(e,t){return typeof e=="function"?e(t):e}function Rf(e){return typeof e=="number"&&e>=0&&e!==1/0}function d1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ls(e,t){return typeof e=="function"?e(t):e}function Xt(e,t){return typeof e=="function"?e(t):e}function Wy(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:l}=e;if(i){if(n){if(t.queryHash!==Cp(i,t.options))return!1}else if(!Gi(t.queryKey,i))return!1}if(r!=="all"){const c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||o&&!o(t))}function zy(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(so(t.options.mutationKey)!==so(o))return!1}else if(!Gi(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Cp(e,t){return((t==null?void 0:t.queryKeyHashFn)||so)(e)}function so(e){return JSON.stringify(e,(t,r)=>Of(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Gi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Gi(e[r],t[r])):!1}function h1(e,t){if(e===t)return e;const r=Hy(e)&&Hy(t);if(r||Of(e)&&Of(t)){const n=r?e:Object.keys(e),s=n.length,o=r?t:Object.keys(t),i=o.length,l=r?[]:{},c=new Set(n);let u=0;for(let d=0;d<i;d++){const h=r?d:o[d];(!r&&c.has(h)||r)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,u++):(l[h]=h1(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return s===i&&u===s?e:l}return t}function cu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function Hy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Of(e){if(!Vy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!Vy(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Vy(e){return Object.prototype.toString.call(e)==="[object Object]"}function fP(e){return new Promise(t=>{setTimeout(t,e)})}function If(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?h1(e,t):t}function mP(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function pP(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Np=Symbol();function f1(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Np?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function m1(e,t){return typeof e=="function"?e(...t):!!e}var Fs,Un,ra,ax,gP=(ax=class extends La{constructor(){super();Q(this,Fs);Q(this,Un);Q(this,ra);z(this,ra,t=>{if(!no&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){C(this,Un)||this.setEventListener(C(this,ra))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Un))==null||t.call(this),z(this,Un,void 0))}setEventListener(t){var r;z(this,ra,t),(r=C(this,Un))==null||r.call(this),z(this,Un,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){C(this,Fs)!==t&&(z(this,Fs,t),this.onFocus())}onFocus(){const t=this.isFocused();
vendor: 32,635 bytes, line 331
331this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof C(this,Fs)=="boolean"?C(this,Fs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Fs=new WeakMap,Un=new WeakMap,ra=new WeakMap,ax),Ep=new gP,na,Bn,sa,ix,yP=(ix=class extends La{constructor(){super();Q(this,na,!0);Q(this,Bn);Q(this,sa);z(this,sa,t=>{if(!no&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){C(this,Bn)||this.setEventListener(C(this,sa))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Bn))==null||t.call(this),z(this,Bn,void 0))}setEventListener(t){var r;z(this,sa,t),(r=C(this,Bn))==null||r.call(this),z(this,Bn,t(this.setOnline.bind(this)))}setOnline(t){C(this,na)!==t&&(z(this,na,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return C(this,na)}},na=new WeakMap,Bn=new WeakMap,sa=new WeakMap,ix),uu=new yP;function Lf(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function vP(e){return Math.min(1e3*2**e,3e4)}function p1(e){return(e??"online")==="online"?uu.isOnline():!0}var g1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function sh(e){return e instanceof g1}function y1(e){let t=!1,r=0,n=!1,s;const o=Lf(),i=y=>{var b;n||(m(new g1(y)),(b=e.abort)==null||b.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>Ep.isFocused()&&(e.networkMode==="always"||uu.isOnline())&&e.canRun(),d=()=>p1(e.networkMode)&&e.canRun(),h=y=>{var b;n||(n=!0,(b=e.onSuccess)==null||b.call(e,y),s==null||s(),o.resolve(y))},m=y=>{var b;n||(n=!0,(b=e.onError)==null||b.call(e,y),s==null||s(),o.reject(y))},f=()=>new Promise(y=>{var b;s=v=>{(n||u())&&y(v)},(b=e.onPause)==null||b.call(e)}).then(()=>{var y;s=void 0,n||(y=e.onContinue)==null||y.call(e)}),w=()=>{if(n)return;let y;const b=r===0?e.initialPromise:void 0;try{y=b??e.fn()}catch(v){y=Promise.reject(v)}Promise.resolve(y).then(h).catch(v=>{var j;if(n)return;const g=e.retry??(no?0:3),x=e.retryDelay??vP,k=typeof x=="function"?x(r,v):x,S=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,v);if(t||!S){m(v);return}r++,(j=e.onFail)==null||j.call(e,r,v),fP(k).then(()=>u()?void 0:f()).then(()=>{t?m(v):w()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?w():f().then(w),o)}}var xP=e=>setTimeout(e,0);function wP(){let e=[],t=0,r=l=>{l()},n=l=>{l()},s=xP;const o=l=>{t?e.push(l):s(()=>{r(l)})},i=()=>{const l=e;e=[],l.length&&s(()=>{n(()=>{l.forEach(c=>{r(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||i()}return c},batchCalls:l=>(...c)=>{o(()=>{l(...c)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}var Ye=wP(),$s,lx,v1=(lx=class{constructor(){Q(this,$s)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rf(this.gcTime)&&z(this,$s,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(no?1/0:5*60*1e3))}clearGcTimeout(){C(this,$s)&&(clearTimeout(C(this,$s)),z(this,$s,void 0))}},$s=new WeakMap,lx),oa,Us,Jt,Bs,ft,sl,Ws,pr,en,cx,bP=(cx=class extends v1{constructor(t){super();Q(this,pr);Q(this,oa);Q(this,Us);Q(this,Jt);Q(this,Bs);Q(this,ft);Q(this,sl);Q(this,Ws);z(this,Ws,!1),z(this,sl,t.defaultOptions),this.setOptions(t.options),this.observers=[],z(this,Bs,t.client),z(this,Jt,C(this,Bs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,z(this,oa,kP(this.options)),this.state=t.state??C(this,oa),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,ft))==null?void 0:t.promise}setOptions(t){this.options={...C(this,sl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,Jt).remove(this)}setData(t,r){const n=If(this.state.data,t,this.options);return ce(this,pr,en).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){ce(this,pr,en).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=C(this,ft))==null?void 0:n.promise;return(s=C(this,ft))==null||s.cancel(t),r?r.then(bt).catch(bt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,oa))}isActive(){return this.observers.some(t=>Xt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Np||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ls(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!d1(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,ft))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=C(this,ft))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,Jt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(C(this,ft)&&(C(this,Ws)?C(this,ft).cancel({revert:!0}):C(this,ft).cancelRetry()),this.scheduleGc()),C(this,Jt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ce(this,pr,en).call(this,{type:"invalidate"})}fetch(t,r){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(C(this,ft))return C(this,ft).continueRetry(),C(this,ft).promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(f=>f.options.queryFn);m&&this.setOptions(m.options)}const n=new AbortController,s=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(z(this,Ws,!0),n.signal)})},o=()=>{const m=f1(this.options,r),w=(()=>{const y={client:C(this,Bs),queryKey:this.queryKey,meta:this.meta};return s(y),y})();return z(this,Ws,!1),this.options.persister?this.options.persister(m,w,this):m(w)},l=(()=>{const m={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:C(this,Bs),state:this.state,fetchFn:o};return s(m),m})();(u=this.options.behavior)==null||u.onFetch(l,this),z(this,Us,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&ce(this,pr,en).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=m=>{var f,w,y,b;sh(m)&&m.silent||ce(this,pr,en).call(this,{type:"error",error:m}),sh(m)||((w=(f=C(this,Jt).config).onError)==null||w.call(f,m,this),(b=(y=C(this,Jt).config).onSettled)==null||b.call(y,this.state.data,m,this)),this.scheduleGc()};return z(this,ft,y1({initialPromise:r==null?void 0:r.initialPromise,fn:l.fetchFn,abort:n.abort.bind(n),onSuccess:m=>{var f,w,y,b;if(m===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(m)}catch(v){c(v);return}(w=(f=C(this,Jt).config).onSuccess)==null||w.call(f,m,this),(b=(y=C(this,Jt).config).onSettled)==null||b.call(y,m,this.state.error,this),this.scheduleGc()},onError:c,onFail:(m,f)=>{ce(this,pr,en).call(this,{type:"failed",failureCount:m,error:f})},onPause:()=>{ce(this,pr,en).call(this,{type:"pause"})},onContinue:()=>{ce(this,pr,en).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),C(this,ft).start()}},oa=new WeakMap,Us=new WeakMap,Jt=new WeakMap,Bs=new WeakMap,ft=new WeakMap,sl=new WeakMap,Ws=new WeakMap,pr=new WeakSet,en=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...x1(n.data,this.options),fetchMeta:t.meta??null};case"success":return z(this,Us,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return sh(s)&&s.revert&&C(this,Us)?{...C(this,Us),fetchStatus:"idle"}:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ye.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),C(this,Jt).notify({query:this,type:"updated",action:t})})},cx);function x1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:p1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function kP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ir,ux,SP=(ux=class extends La{constructor(t={}){super();Q(this,Ir);this.config=t,z(this,Ir,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??Cp(s,r);let i=this.get(o);return i||(i=new bP({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){C(this,Ir).has(t.queryHash)||(C(this,Ir).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=C(this,Ir).get(t.queryHash);r&&(t.destroy(),r===t&&C(this,Ir).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ye.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,Ir).get(t)}getAll(){return[...C(this,Ir).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>Wy(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>Wy(t,n)):r}notify(t){Ye.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ye.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ye.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ir=new WeakMap,ux),Lr,vt,zs,Dr,Rn,dx,jP=(dx=class extends v1{constructor(t){super();Q(this,Dr);Q(this,Lr);Q(this,vt);Q(this,zs);this.mutationId=t.mutationId,z(this,vt,t.mutationCache),z(this,Lr,[]),this.state=t.state||w1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Lr).includes(t)||(C(this,Lr).push(t),this.clearGcTimeout(),C(this,vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){z(this,Lr,C(this,Lr).filter(r=>r!==t)),this.scheduleGc(),C(this,vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Lr).length||(this.state.status==="pending"?this.scheduleGc():C(this,vt).remove(this))}continue(){var t;return((t=C(this,zs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,l,c,u,d,h,m,f,w,y,b,v,g,x,k,S,j,N,E;const r=()=>{ce(this,Dr,Rn).call(this,{type:"continue"})};z(this,zs,y1({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(_,P)=>{ce(this,Dr,Rn).call(this,{type:"failed",failureCount:_,error:P})},onPause:()=>{ce(this,Dr,Rn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,vt).canRun(this)}));const n=this.state.status==="pending",s=!C(this,zs).canStart();try{if(n)r();else{ce(this,Dr,Rn).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(o=C(this,vt).config).onMutate)==null?void 0:i.call(o,t,this));const P=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));P!==this.state.context&&ce(this,Dr,Rn).call(this,{type:"pending",context:P,variables:t,isPaused:s})}const _=await C(this,zs).start();return await((d=(u=C(this,vt).config).onSuccess)==null?void 0:d.call(u,_,t,this.state.context,this)),await((m=(h=this.options).onSuccess)==null?void 0:m.call(h,_,t,this.state.context)),await((w=(f=C(this,vt).config).onSettled)==null?void 0:w.call(f,_,null,this.state.variables,this.state.context,this)),await((b=(y=this.options).onSettled)==null?void 0:b.call(y,_,null,t,this.state.context)),ce(this,Dr,Rn).call(this,{type:"success",data:_}),_}catch(_){try{throw await((g=(v=C(this,vt).config).onError)==null?void 0:g.call(v,_,t,this.state.context,this)),await((k=(x=this.options).onError)==null?void 0:k.call(x,_,t,this.state.context)),await((j=(S=C(this,vt).config).onSettled)==null?void 0:j.call(S,void 0,_,this.state.variables,this.state.context,this)),await((E=(N=this.options).onSettled)==null?void 0:E.call(N,void 0,_,t,this.state.context)),_}finally{ce(this,Dr,Rn).call(this,{type:"error",error:_})}}finally{C(this,vt).runNext(this)}}},Lr=new WeakMap,vt=new WeakMap,zs=new WeakMap,Dr=new WeakSet,Rn=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ye.batch(()=>{C(this,Lr).forEach(n=>{n.onMutationUpdate(t)}),C(this,vt).notify({mutation:this,type:"updated",action:t})})},dx);function w1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var sn,gr,ol,hx,_P=(hx=class extends La{constructor(t={}){super();Q(this,sn);Q(this,gr);Q(this,ol);this.config=t,z(this,sn,new Set),z(this,gr,new Map),z(this,ol,0)}build(t,r,n){const s=new jP({mutationCache:this,mutationId:++Cl(this,ol)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){C(this,sn).add(t);const r=Yl(t);if(typeof r=="string"){const n=C(this,gr).get(r);n?n.push(t):C(this,gr).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,sn).delete(t)){const r=Yl(t);if(typeof r=="string"){const n=C(this,gr).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&C(this,gr).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Yl(t);if(typeof r=="string"){const n=C(this,gr).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=Yl(t);if(typeof r=="string"){const s=(n=C(this,gr).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ye.batch(()=>{C(this,sn).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,sn).clear(),C(this,gr).clear()})}getAll(){return Array.from(C(this,sn))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>zy(r,n))}findAll(t={}){return this.getAll().filter(r=>zy(t,r))}notify(t){Ye.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ye.batch(()=>Promise.all(t.map(r=>r.continue().catch(bt))))}},sn=new WeakMap,gr=new WeakMap,ol=new WeakMap,hx);function Yl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function qy(e){return{onFetch:(t,r)=>{var d,h,m,f,w;const n=t.options,s=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,o=((f=t.state.data)==null?void 0:f.pages)||[],i=((w=t.state.data)==null?void 0:w.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let y=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},v=f1(t.options,t.fetchOptions),g=async(x,k,S)=>{if(y)return Promise.reject();if(k==null&&x.pages.length)return Promise.resolve(x);const N=(()=>{const M={client:t.client,queryKey:t.queryKey,pageParam:k,direction:S?"backward":"forward",meta:t.options.meta};return b(M),M})(),E=await v(N),{maxPages:_}=t.options,P=S?pP:mP;return{pages:P(x.pages,E,_),pageParams:P(x.pageParams,k,_)}};if(s&&o.length){const x=s==="backward",k=x?CP:Gy,S={pages:o,pageParams:i},j=k(n,S);l=await g(S,j,x)}else{const x=e??o.length;do{const k=c===0?i[0]??n.initialPageParam:Gy(n,l);if(c>0&&k==null)break;l=await g(l,k),c++}while(c<x)}return l};t.options.persister?t.fetchFn=()=>{var y,b;return(b=(y=t.options).persister)==null?void 0:b.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function Gy(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function CP(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var De,Wn,zn,aa,ia,Hn,la,ca,fx,NP=(fx=class{constructor(e={}){Q(this,De);Q(this,Wn);Q(this,zn);Q(this,aa);Q(this,ia);Q(this,Hn);Q(this,la);Q(this,ca);z(this,De,e.queryCache||new SP),z(this,Wn,e.mutationCache||new _P),z(this,zn,e.defaultOptions||{}),z(this,aa,new Map),z(this,ia,new Map),z(this,Hn,0)}mount(){Cl(this,Hn)._++,C(this,Hn)===1&&(z(this,la,Ep.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,De).onFocus())})),z(this,ca,uu.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,De).onOnline())})))}unmount(){var e,t;Cl(this,Hn)._--,C(this,Hn)===0&&((e=C(this,la))==null||e.call(this),z(this,la,void 0),(t=C(this,ca))==null||t.call(this),z(this,ca,void 0))}isFetching(e){return C(this,De).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Wn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,De).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=C(this,De).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ls(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return C(this,De).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=C(this,De).get(n.queryHash),o=s==null?void 0:s.state.data,i=hP(t,o);if(i!==void 0)return C(this,De).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Ye.batch(()=>C(this,De).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=C(this,De).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=C(this,De);Ye.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=C(this,De);return Ye.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ye.batch(()=>C(this,De).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(bt).catch(bt)}invalidateQueries(e,t={}){return Ye.batch(()=>(C(this,De).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ye.batch(()=>C(this,De).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(bt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(bt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=C(this,De).build(this,t);return r.isStaleByTime(ls(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(bt).catch(bt)}fetchInfiniteQuery(e){return e.behavior=qy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(bt).catch(bt)}ensureInfiniteQueryData(e){return e.behavior=qy(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return uu.isOnline()?C(this,Wn).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,De)}getMutationCache(){return C(this,Wn)}getDefaultOptions(){return C(this,zn)}setDefaultOptions(e){z(this,zn,e)}setQueryDefaults(e,t){C(this,aa).set(so(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,aa).values()],r={};return t.forEach(n=>{Gi(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){C(this,ia).set(so(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,ia).values()],r={};return t.forEach(n=>{Gi(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,zn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Cp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Np&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,zn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,De).clear(),C(this,Wn).clear()}},De=new WeakMap,Wn=new WeakMap,zn=new WeakMap,aa=new WeakMap,ia=new WeakMap,Hn=new WeakMap,la=new WeakMap,ca=new WeakMap,fx),Tt,he,al,xt,Hs,ua,Vn,qn,il,da,ha,Vs,qs,Gn,fa,ge,ui,Df,Mf,Ff,$f,Uf,Bf,Wf,b1,mx,EP=(mx=class extends La{constructor(t,r){super();Q(this,ge);Q(this,Tt);Q(this,he);Q(this,al);Q(this,xt);Q(this,Hs);Q(this,ua);Q(this,Vn);Q(this,qn);Q(this,il);Q(this,da);Q(this,ha);Q(this,Vs);Q(this,qs);Q(this,Gn);Q(this,fa,new Set);this.options=r,z(this,Tt,t),z(this,qn,null),z(this,Vn,Lf()),this.options.experimental_prefetchInRender||C(this,Vn).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,he).addObserver(this),Ky(C(this,he),this.options)?ce(this,ge,ui).call(this):this.updateResult(),ce(this,ge,$f).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zf(C(this,he),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zf(C(this,he),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ce(this,ge,Uf).call(this),ce(this,ge,Bf).call(this),C(this,he).removeObserver(this)}setOptions(t){const r=this.options,n=C(this,he);if(this.options=C(this,Tt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xt(this.options.enabled,C(this,he))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ce(this,ge,Wf).call(this),C(this,he).setOptions(this.options),r._defaulted&&!cu(this.options,r)&&C(this,Tt).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,he),observer:this});const s=this.hasListeners();s&&Yy(C(this,he),n,this.options,r)&&ce(this,ge,ui).call(this),this.updateResult(),s&&(C(this,he)!==n||Xt(this.options.enabled,C(this,he))!==Xt(r.enabled,C(this,he))||ls(this.options.staleTime,C(this,he))!==ls(r.staleTime,C(this,he)))&&ce(this,ge,Df).call(this);const o=ce(this,ge,Mf).call(this);s&&(C(this,he)!==n||Xt(this.options.enabled,C(this,he))!==Xt(r.enabled,C(this,he))||o!==C(this,Gn))&&ce(this,ge,Ff).call(this,o)}getOptimisticResult(t){const r=C(this,Tt).getQueryCache().build(C(this,Tt),t),n=this.createResult(r,t);return PP(this,n)&&(z(this,xt,n),z(this,ua,this.options),z(this,Hs,C(this,he).state)),n}getCurrentResult(){return C(this,xt)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),Reflect.get(n,s))})}trackProp(t){C(this,fa).add(t)}getCurrentQuery(){return C(this,he)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=C(this,Tt).defaultQueryOptions(t),n=C(this,Tt).getQueryCache().build(C(this,Tt),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return ce(this,ge,ui).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,xt)))}createResult(t,r){var _;const n=C(this,he),s=this.options,o=C(this,xt),i=C(this,Hs),l=C(this,ua),u=t!==n?t.state:C(this,al),{state:d}=t;let h={...d},m=!1,f;if(r._optimisticResults){const P=this.hasListeners(),M=!P&&Ky(t,r),O=P&&Yy(t,n,r,s);(M||O)&&(h={...h,...x1(d.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:w,errorUpdatedAt:y,status:b}=h;f=h.data;let v=!1;if(r.placeholderData!==void 0&&f===void 0&&b==="pending"){let P;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(P=o.data,v=!0):P=typeof r.placeholderData=="function"?r.placeholderData((_=C(this,ha))==null?void 0:_.state.data,C(this,ha)):r.placeholderData,P!==void 0&&(b="success",f=If(o==null?void 0:o.data,P,r),m=!0)}if(r.select&&f!==void 0&&!v)if(o&&f===(i==null?void 0:i.data)&&r.select===C(this,il))f=C(this,da);else try{z(this,il,r.select),f=r.select(f),f=If(o==null?void 0:o.data,f,r),z(this,da,f),z(this,qn,null)}catch(P){z(this,qn,P)}C(this,qn)&&(w=C(this,qn),f=C(this,da),y=Date.now(),b="error");const g=h.fetchStatus==="fetching",x=b==="pending",k=b==="error",S=x&&g,j=f!==void 0,E={status:b,fetchStatus:h.fetchStatus,isPending:x,isSuccess:b==="success",isError:k,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:h.dataUpdatedAt,error:w,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!x,isLoadingError:k&&!j,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:k&&j,isStale:Tp(t,r),refetch:this.refetch,promise:C(this,Vn),isEnabled:Xt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=R=>{E.status==="error"?R.reject(E.error):E.data!==void 0&&R.resolve(E.data)},M=()=>{const R=z(this,Vn,E.promise=Lf());P(R)},O=C(this,Vn);switch(O.status){case"pending":t.queryHash===n.queryHash&&P(O);break;case"fulfilled":(E.status==="error"||E.data!==O.value)&&M();break;case"rejected":(E.status!=="error"||E.error!==O.reason)&&M();break}}return E}updateResult(){const t=C(this,xt),r=this.createResult(C(this,he),this.options);if(z(this,Hs,C(this,he).state),z(this,ua,this.options),C(this,Hs).data!==void 0&&z(this,ha,C(this,he)),cu(r,t))return;z(this,xt,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!C(this,fa).size)return!0;const i=new Set(o??C(this,fa));return this.options.throwOnError&&i.add("error"),Object.keys(C(this,xt)).some(l=>{const c=l;return C(this,xt)[c]!==t[c]&&i.has(c)})};ce(this,ge,b1).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ce(this,ge,$f).call(this)}},Tt=new WeakMap,he=new WeakMap,al=new WeakMap,xt=new WeakMap,Hs=new WeakMap,ua=new WeakMap,Vn=new WeakMap,qn=new WeakMap,il=new WeakMap,da=new WeakMap,ha=new WeakMap,Vs=new WeakMap,qs=new WeakMap,Gn=new WeakMap,fa=new WeakMap,ge=new WeakSet,ui=function(t){ce(this,ge,Wf).call(this);let r=C(this,he).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(bt)),r},Df=function(){ce(this,ge,Uf).call(this);const t=ls(this.options.staleTime,C(this,he));if(no||C(this,xt).isStale||!Rf(t))return;const n=d1(C(this,xt).dataUpdatedAt,t)+1;z(this,Vs,setTimeout(()=>{C(this,xt).isStale||this.updateResult()},n))},Mf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,he)):this.options.refetchInterval)??!1},Ff=function(t){ce(this,ge,Bf).call(this),z(this,Gn,t),!(no||Xt(this.options.enabled,C(this,he))===!1||!Rf(C(this,Gn))||C(this,Gn)===0)&&z(this,qs,setInterval(()=>{(this.options.refetchIntervalInBackground||Ep.isFocused())&&ce(this,ge,ui).call(this)},C(this,Gn)))},$f=function(){ce(this,ge,Df).call(this),ce(this,ge,Ff).call(this,ce(this,ge,Mf).call(this))},Uf=function(){C(this,Vs)&&(clearTimeout(C(this,Vs)),z(this,Vs,void 0))},Bf=function(){C(this,qs)&&(clearInterval(C(this,qs)),z(this,qs,void 0))},Wf=function(){const t=C(this,Tt).getQueryCache().build(C(this,Tt),this.options);if(t===C(this,he))return;const r=C(this,he);z(this,he,t),z(this,al,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},b1=function(t){Ye.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(C(this,xt))}),C(this,Tt).getQueryCache().notify({query:C(this,he),type:"observerResultsUpdated"})})},mx);function TP(e,t){return Xt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ky(e,t){return TP(e,t)||e.state.data!==void 0&&zf(e,t,t.refetchOnMount)}function zf(e,t,r){if(Xt(t.enabled,e)!==!1&&ls(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Tp(e,t)}return!1}function Yy(e,t,r,n){return(e!==t||Xt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Tp(e,r)}function Tp(e,t){return Xt(t.enabled,e)!==!1&&e.isStaleByTime(ls(t.staleTime,e))}function PP(e,t){return!cu(e.getCurrentResult(),t)}var Kn,Yn,Pt,on,dn,Pc,Hf,px,AP=(px=class extends La{constructor(r,n){super();Q(this,dn);Q(this,Kn);Q(this,Yn);Q(this,Pt);Q(this,on);z(this,Kn,r),this.setOptions(n),this.bindMethods(),ce(this,dn,Pc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var s;const n=this.options;this.options=C(this,Kn).defaultMutationOptions(r),cu(this.options,n)||C(this,Kn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Pt),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&so(n.mutationKey)!==so(this.options.mutationKey)?this.reset():((s=C(this,Pt))==null?void 0:s.state.status)==="pending"&&C(this,Pt).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=C(this,Pt))==null||r.removeObserver(this)}onMutationUpdate(r){ce(this,dn,Pc).call(this),ce(this,dn,Hf).call(this,r)}getCurrentResult(){return C(this,Yn)}reset(){var r;(r=C(this,Pt))==null||r.removeObserver(this),z(this,Pt,void 0),ce(this,dn,Pc).call(this),ce(this,dn,Hf).call(this)}mutate(r,n){var s;return z(this,on,n),(s=C(this,Pt))==null||s.removeObserver(this),z(this,Pt,C(this,Kn).getMutationCache().build(C(this,Kn),this.options)),C(this,Pt).addObserver(this),C(this,Pt).execute(r)}},Kn=new WeakMap,Yn=new WeakMap,Pt=new WeakMap,on=new WeakMap,dn=new WeakSet,Pc=function(){var n;const r=((n=C(this,Pt))==null?void 0:n.state)??w1();z(this,Yn,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Hf=function(r){Ye.batch(()=>{var n,s,o,i,l,c,u,d;if(C(this,on)&&this.hasListeners()){const h=C(this,Yn).variables,m=C(this,Yn).context;(r==null?void 0:r.type)==="success"?((s=(n=C(this,on)).onSuccess)==null||s.call(n,r.data,h,m),(i=(o=C(this,on)).onSettled)==null||i.call(o,r.data,null,h,m)):(r==null?void 0:r.type)==="error"&&((c=(l=C(this,on)).onError)==null||c.call(l,r.error,h,m),(d=(u=C(this,on)).onSettled)==null||d.call(u,void 0,r.error,h,m))}
331this.listeners.forEach(h=>{h(C(this,Yn))})})},px),k1=p.createContext(void 0),vs=e=>{const t=p.useContext(k1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},RP=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(k1.Provider,{value:e,children:t})),S1=p.createContext(!1),OP=()=>p.useContext(S1);S1.Provider;function IP(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var LP=p.createContext(IP()),DP=()=>p.useContext(LP),MP=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},FP=e=>{p.useEffect(()=>{e.clearReset()},[e])},$P=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||m1(r,[e.error,n])),UP=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},BP=(e,t)=>e.isLoading&&e.isFetching&&!t,WP=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Qy=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function zP(e,t,r){var h,m,f,w,y;const n=OP(),s=DP(),o=vs(),i=o.defaultQueryOptions(e);(m=(h=o.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,i),i._optimisticResults=n?"isRestoring":"optimistic",UP(i),MP(i,s),FP(s);const l=!o.getQueryCache().get(i.queryHash),[c]=p.useState(()=>new t(o,i)),u=c.getOptimisticResult(i),d=!n&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(b=>{const v=d?c.subscribe(Ye.batchCalls(b)):bt;return c.updateResult(),v},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setOptions(i)},[i,c]),WP(i,u))throw Qy(i,c,s);if($P({result:u,errorResetBoundary:s,throwOnError:i.throwOnError,query:o.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((w=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||w.call(f,i,u),i.experimental_prefetchInRender&&!no&&BP(u,n)){const b=l?Qy(i,c,s):(y=o.getQueryCache().get(i.queryHash))==null?void 0:y.promise;b==null||b.catch(bt).finally(()=>{c.updateResult()})}return i.notifyOnChangeProps?u:c.trackResult(u)}function zr(e,t){return zP(e,EP)}function j1(e,t){const r=vs(),[n]=p.useState(()=>new AP(r,e));p.useEffect(()=>{n.setOptions(e)},[n,e]);const s=p.useSyncExternalStore(p.useCallback(i=>n.subscribe(Ye.batchCalls(i)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=p.useCallback((i,l)=>{n.mutate(i,l).catch(bt)},[n]);if(s.error&&m1(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/** 332 * @remix-run/router v1.23.0 333 * 334 * Copyright (c) Remix Software Inc. 335 * 336 * This source code is licensed under the MIT license found in the 337 * LICENSE.md file in the root directory of this source tree. 338 * 339 * @license MIT 340 */function Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ki.apply(this,arguments)}var Xn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Xn||(Xn={}));const Jy="popstate";function HP(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:i,hash:l}=n.location;return Vf("",{pathname:o,search:i,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:du(s)}return qP(t,r,null,e)}function Be(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function VP(){return Math.random().toString(36).substr(2,8)}function Xy(e,t){return{usr:e.state,key:e.key,idx:t}}function Vf(e,t,r,n){return r===void 0&&(r=null),Ki({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Da(t):t,{state:r,key:t&&t.key||n||VP()})}function du(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Da(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function qP(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,l=Xn.Pop,c=null,u=d();u==null&&(u=0,i.replaceState(Ki({},i.state,{idx:u}),""));function d(){return(i.state||{idx:null}).idx}function h(){l=Xn.Pop;let b=d(),v=b==null?null:b-u;u=b,c&&c({action:l,location:y.location,delta:v})}function m(b,v){l=Xn.Push;let g=Vf(y.location,b,v);u=d()+1;let x=Xy(g,u),k=y.createHref(g);try{i.pushState(x,"",k)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(k)}o&&c&&c({action:l,location:y.location,delta:1})}function f(b,v){l=Xn.Replace;let g=Vf(y.location,b,v);u=d();let x=Xy(g,u),k=y.createHref(g);i.replaceState(x,"",k),o&&c&&c({action:l,location:y.location,delta:0})}function w(b){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof b=="string"?b:du(b);return g=g.replace(/ $/,"%20"),Be(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let y={get action(){return l},get location(){return e(s,i)},listen(b){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Jy,h),c=b,()=>{s.removeEventListener(Jy,h),c=null}},createHref(b){return t(s,b)},createURL:w,encodeLocation(b){let v=w(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:m,replace:f,go(b){return i.go(b)}};return y}var Zy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Zy||(Zy={}));function GP(e,t,r){return r===void 0&&(r="/"),KP(e,t,r,!1)}function KP(e,t,r,n){let s=typeof t=="string"?Da(t):t,o=Pp(s.pathname||"/",r);if(o==null)return null;let i=C1(e);YP(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let u=aA(o);l=sA(i[c],u,n)}return l}function C1(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,l)=>{let c={relativePath:l===void 0?o.path||"":l,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};c.relativePath.startsWith("/")&&(Be(c.relativePath.startsWith(n),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+n+'" is not val
340id. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(n.length));let u=cs([n,c.relativePath]),d=r.concat(c);o.children&&o.children.length>0&&(Be(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),C1(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:rA(u,o.index),routesMeta:d})};return e.forEach((o,i)=>{var l;if(o.path===""||!((l=o.path)!=null&&l.includes("?")))s(o,i);else for(let c of N1(o.path))s(o,i,c)}),t}function N1(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=N1(n.join("/")),l=[];return l.push(...i.map(c=>c===""?o:[o,c].join("/"))),s&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function YP(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:nA(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const QP=/^:[\w-]+$/,JP=3,XP=2,ZP=1,eA=10,tA=-2,ev=e=>e==="*";function rA(e,t){let r=e.split("/"),n=r.length;return r.some(ev)&&(n+=tA),t&&(n+=XP),r.filter(s=>!ev(s)).reduce((s,o)=>s+(QP.test(o)?JP:o===""?ZP:eA),n)}function nA(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function sA(e,t,r){let{routesMeta:n}=e,s={},o="/",i=[];for(let l=0;l<n.length;++l){let c=n[l],u=l===n.length-1,d=o==="/"?t:t.slice(o.length)||"/",h=tv({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),m=c.route;if(!h&&u&&r&&!n[n.length-1].route.index&&(h=tv({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;
vendor: 12,804 bytes, lines 340-357
340Object.assign(s,h.params),i.push({params:s,pathname:cs([o,h.pathname]),pathnameBase:uA(cs([o,h.pathnameBase])),route:m}),h.pathnameBase!=="/"&&(o=cs([o,h.pathnameBase]))}return i}function tv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=oA(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:n.reduce((u,d,h)=>{let{paramName:m,isOptional:f}=d;if(m==="*"){let y=l[h]||"";i=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const w=l[h];return f&&!w?u[m]=void 0:u[m]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function oA(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),_1(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(n.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function aA(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return _1(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Pp(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function iA(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Da(e):e;return{pathname:r?r.startsWith("/")?r:lA(r,t):t,search:dA(n),hash:hA(s)}}function lA(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function oh(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` 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 cA(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Ap(e,t){let r=cA(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Rp(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Da(e):(s=Ki({},e),Be(!s.pathname||!s.pathname.includes("?"),oh("?","pathname","search",s)),Be(!s.pathname||!s.pathname.includes("#"),oh("#","pathname","hash",s)),Be(!s.search||!s.search.includes("#"),oh("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,l;if(i==null)l=r;else{let h=t.length-1;if(!n&&i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),h-=1;s.pathname=m.join("/")}l=h>=0?t[h]:"/"}let c=iA(s,l),u=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const cs=e=>e.join("/").replace(/\/\/+/g,"/"),uA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),dA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,hA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function fA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const E1=["post","put","patch","delete"];new Set(E1);const mA=["get",...E1];new Set(mA);/** 341 * React Router v6.30.1 342 * 343 * Copyright (c) Remix Software Inc. 344 * 345 * This source code is licensed under the MIT license found in the 346 * LICENSE.md file in the root directory of this source tree. 347 * 348 * @license MIT 349 */function Yi(){return Yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yi.apply(this,arguments)}const Op=p.createContext(null),pA=p.createContext(null),xs=p.createContext(null),sd=p.createContext(null),bn=p.createContext({outlet:null,matches:[],isDataRoute:!1}),T1=p.createContext(null);function gA(e,t){let{relative:r}=t===void 0?{}:t;Ma()||Be(!1);let{basename:n,navigator:s}=p.useContext(xs),{hash:o,pathname:i,search:l}=R1(e,{relative:r}),c=i;return n!=="/"&&(c=i==="/"?n:cs([n,i])),s.createHref({pathname:c,search:l,hash:o})}function Ma(){return p.useContext(sd)!=null}function Kr(){return Ma()||Be(!1),p.useContext(sd).location}function P1(e){p.useContext(xs).static||p.useLayoutEffect(e)}function Cr(){let{isDataRoute:e}=p.useContext(bn);return e?TA():yA()}function yA(){Ma()||Be(!1);let e=p.useContext(Op),{basename:t,future:r,navigator:n}=p.useContext(xs),{matches:s}=p.useContext(bn),{pathname:o}=Kr(),i=JSON.stringify(Ap(s,r.v7_relativeSplatPath)),l=p.useRef(!1);return P1(()=>{l.current=!0}),p.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){n.go(u);return}let h=Rp(u,JSON.parse(i),o,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:cs([t,h.pathname])),(d.replace?n.replace:n.push)(h,d.state,d)},[t,n,i,o,e])}function A1(){let{matches:e}=p.useContext(bn),t=e[e.length-1];return t?t.params:{}}function R1(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=p.useContext(xs),{matches:s}=p.useContext(bn),{pathname:o}=Kr(),i=JSON.stringify(Ap(s,n.v7_relativeSplatPath));return p.useMemo(()=>Rp(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function vA(e,t){return xA(e,t)}function xA(e,t,r,n){Ma()||Be(!1);let{navigator:s}=p.useContext(xs),{matches:o}=p.useContext(bn),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let c=i?i.pathnameBase:"/";i&&i.route;let u=Kr(),d;if(t){var h;let b=typeof t=="string"?Da(t):t;c==="/"||(h=b.pathname)!=null&&h.startsWith(c)||Be(!1),d=b}else d=u;let m=d.pathname||"/",f=m;if(c!=="/"){let b=c.replace(/^\//,"").split("/");f="/"+m.replace(/^\//,"").split("/").slice(b.length).join("/")}let w=GP(e,{pathname:f}),y=jA(w&&w.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:cs([c,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:cs([c,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),o,r,n);return t&&y?p.createElement(sd.Provider,{value:{location:Yi({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Xn.Pop}},y):y}function wA(){let e=EA(),t=fA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:s},r):null,null)}const bA=p.createElement(wA,null);class kA extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?p.createElement(bn.Provider,{value:this.props.routeContext},p.createElement(T1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function SA(e){let{routeContext:t,match:r,children:n}=e,s=p.useContext(Op);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(bn.Provider,{value:t},n)}function jA(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,l=(s=r)==null?void 0:s.errors;if(l!=null){let d=i.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||Be(!1),i=i.slice(0,Math.min(i.length,d+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<i.length;d++){let h=i[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:m,errors:f}=r,w=h.route.loader&&m[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||w){c=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((d,h,m)=>{let f,w=!1,y=null,b=null;r&&(f=l&&h.route.id?l[h.route.id]:void 0,y=h.route.errorElement||bA,c&&(u<0&&m===0?(w=!0,b=null):u===m&&(w=!0,b=h.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,m+1)),g=()=>{let x;return f?x=y:w?x=b:h.route.Component?x=p.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=d,p.createElement(SA,{match:h,routeContext:{outlet:d,matches:v,isDataRoute:r!=null},children:x})};return r&&(h.route.ErrorBoundary||h.route.errorElement||m===0)?p.createElement(kA,{location:r.location,revalidation:r.revalidation,component:y,error:f,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var O1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(O1||{}),hu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(hu||{});function _A(e){let t=p.useContext(Op);return t||Be(!1),t}function CA(e){let t=p.useContext(pA);return t||Be(!1),t}function NA(e){let t=p.useContext(bn);return t||Be(!1),t}function I1(e){let t=NA(),r=t.matches[t.matches.length-1];return r.route.id||Be(!1),r.route.id}function EA(){var e;let t=p.useContext(T1),r=CA(hu.UseRouteError),n=I1(hu.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function TA(){let{router:e}=_A(O1.UseNavigateStable),t=I1(hu.UseNavigateStable),r=p.useRef(!1);return P1(()=>{r.current=!0}),p.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Yi({fromRouteId:t},o)))},[e,t])}function PA(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function od(e){let{to:t,replace:r,state:n,relative:s}=e;Ma()||Be(!1);let{future:o,static:i}=p.useContext(xs),{matches:l}=p.useContext(bn),{pathname:c}=Kr(),u=Cr(),d=Rp(t,Ap(l,o.v7_relativeSplatPath),c,s==="path"),h=JSON.stringify(d);return p.useEffect(()=>u(JSON.parse(h),{replace:r,state:n,relative:s}),[u,h,s,r,n]),null}function qe(e){Be(!1)}function AA(e){let{basename:t="/",children:r=null,location:n,navigationType:s=Xn.Pop,navigator:o,static:i=!1,future:l}=e;Ma()&&Be(!1);let c=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:c,navigator:o,static:i,future:Yi({v7_relativeSplatPath:!1},l)}),[c,l,o,i]);typeof n=="string"&&(n=Da(n));let{pathname:d="/",search:h="",hash:m="",state:f=null,key:w="default"}=n,y=p.useMemo(()=>{let b=Pp(d,c);return b==null?null:{location:{pathname:b,search:h,hash:m,state:f,key:w},navigationType:s}},[c,d,h,m,f,w,s]);return y==null?null:p.createElement(xs.Provider,{value:u},p.createElement(sd.Provider,{children:r,value:y}))}function RA(e){let{children:t,location:r}=e;return vA(qf(t),r)}new Promise(()=>{});function qf(e,t){t===void 0&&(t=[]);let r=[];return p.Children.forEach(e,(n,s)=>{if(!p.isValidElement(n))return;let o=[...t,s];if(n.type===p.Fragment){r.push.apply(r,qf(n.props.children,o));return}n.type!==qe&&Be(!1),!n.props.index||!n.props.children||Be(!1);let i={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&&(i.children=qf(n.props.children,o)),r.push(i)}),r}/** 350 * React Router DOM v6.30.1 351 * 352 * Copyright (c) Remix Software Inc. 353 * 354 * This source code is licensed under the MIT license found in the 355 * LICENSE.md file in the root directory of this source tree. 356 * 357 * @license MIT
358 */function Gf(){return Gf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gf.apply(this,arguments)}function OA(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function IA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function LA(e,t){return e.button===0&&(!t||t==="_self")&&!IA(e)}function Kf(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function DA(e,t){let r=Kf(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const MA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],FA="6";try{window.__reactRouterVersion=FA}catch{}const $A="startTransition",rv=mm[$A];function UA(e){let{basename:t,children:r,future:n,window:s}=e,o=p.useRef();o.current==null&&(o.current=HP({window:s,v5Compat:!0}));let i=o.current,[l,c]=p.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},d=p.useCallback(h=>{u&&rv?rv(()=>c(h)):c(h)},[c,u]);return p.useLayoutEffect(()=>i.listen(d),[i,d]),p.useEffect(()=>PA(n),[n]),p.createElement(AA,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:i,future:n})}const BA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",WA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,re=p.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,m=OA(t,MA),{basename:f}=p.useContext(xs),w,y=!1;if(typeof u=="string"&&WA.test(u)&&(w=u,BA))try{let x=new URL(window.location.href),k=u.startsWith("//")?new URL(x.protocol+u):new URL(u),S=Pp(k.pathname,f);k.origin===x.origin&&S!=null?u=S+k.search+k.hash:y=!0}catch{}let b=gA(u,{relative:s}),v=zA(u,{replace:i,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:h});function g(x){n&&n(x),x.defaultPrevented||v(x)}return p.createElement("a",Gf({},m,{href:w||b,onClick:y||o?n:g,ref:r,target:c}))});var nv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(nv||(nv={}));var sv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sv||(sv={}));function zA(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,viewTransition:l}=t===void 0?{}:t,c=Cr(),u=Kr(),d=R1(e,{relative:i});return p.useCallback(h=>{if(LA(h,r)){h.preventDefault();let m=n!==void 0?n:du(u)===du(d);c(e,{replace:m,state:s,preventScrollReset:o,relative:i,viewTransition:l})}},[u,c,d,n,s,r,e,o,i,l])}function HA(e){let t=p.useRef(Kf(e)),r=p.useRef(!1),n=Kr(),s=p.useMemo(()=>DA(n.search,r.current?null:t.current),[n.search]),o=Cr(),i=p.useCallback((l,c)=>{const u=Kf(typeof l=="function"?l(s):l);r.current=!0,o("?"+u,c)},[o,s]);return[s,i]}var Fr=function(){return Fr=Object.assign||function(t){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)&&(t[o]=r[o])}return t},Fr.apply(this,arguments)};function Fa(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function VA(e,t,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function l(d){try{u(n.next(d))}catch(h){i(h)}}function c(d){try{u(n.throw(d))}catch(h){i(h)}}function u(d){d.done?o(d.value):s(d.value).then(l,c)}u((n=n.apply(e,t||[])).next())})}function qA(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;
358n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}const GA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class Ip extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class KA extends Ip{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class ov extends Ip{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class av extends Ip{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Yf;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(Yf||(Yf={}));class YA{constructor(t,{headers:r={},customFetch:n,region:s=Yf.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=GA(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return VA(this,arguments,void 0,function*(r,n={}){var s;let o,i;try{const{headers:l,method:c,body:u,signal:d,timeout:h}=n;let m={},{region:f}=n;f||(f=this.region);const w=new URL(`${this.url}/${r}`);f&&f!=="any"&&(m["x-region"]=f,w.searchParams.set("forceFunctionRegion",f));let y;u&&(l&&!Object.prototype.hasOwnProperty.call(l,"Content-Type")||!l)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(m["Content-Type"]="application/octet-stream",y=u):typeof u=="string"?(m["Content-Type"]="text/plain",y=u):typeof FormData<"u"&&u instanceof FormData?y=u:(m["Content-Type"]="application/json",y=JSON.stringify(u)):u&&typeof u!="string"&&!(typeof Blob<"u"&&u instanceof Blob)&&!(u instanceof ArrayBuffer)&&!(typeof FormData<"u"&&u instanceof FormData)?y=JSON.stringify(u):y=u;let b=d;h&&(i=new AbortController,o=setTimeout(()=>i.abort(),h),d?(b=i.signal,d.addEventListener("abort",()=>i.abort())):b=i.signal);const v=yield this.fetch(w.toString(),{method:c||"POST",headers:Object.assign(Object.assign(Object.assign({},m),this.headers),l),body:y,signal:b}).catch(S=>{throw new KA(S)}),g=v.headers.get("x-relay-error");if(g&&g==="true")throw new ov(v);if(!v.ok)throw new av(v);let x=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),k;return x==="application/json"?k=yield v.json():x==="application/octet-stream"||x==="application/pdf"?k=yield v.blob():x==="text/event-stream"?k=v:x==="multipart/form-data"?k=yield v.formData():k=yield v.text(),{data:k,error:null,response:v}}catch(l){return{data:null,error:l,response:l instanceof av||l instanceof ov?l.context:void 0}}finally{o&&clearTimeout(o)}})}}var QA=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.co
358de=e.code}},JA=class{constructor(e){var t,r,n;this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=(t=e.shouldThrowOnError)!==null&&t!==void 0?t:!1,this.signal=e.signal,this.isMaybeSingle=(r=e.isMaybeSingle)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(n=e.urlLengthLimit)!==null&&n!==void 0?n:8e3,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}then(e,t){var r=this;this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json");const n=this.fetch;let s=n(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async o=>{let i=null,l=null,c=null,u=o.status,d=o.statusText;if(o.ok){var h,m;if(r.method!=="HEAD"){var f;const v=await o.text();v===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((f=r.headers.get("Accept"))===null||f===void 0)&&f.includes("application/vnd.pgrst.plan+text"))?l=v:l=JSON.parse(v))}const y=(h=r.headers.get("Prefer"))===null||h===void 0?void 0:h.match(/count=(exact|planned|estimated)/),b=(m=o.headers.get("content-range"))===null||m===void 0?void 0:m.split("/");y&&b&&b.length>1&&(c=parseInt(b[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(l)&&(l.length>1?(i={code:"PGRST116",details:`Results contain ${l.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},l=null,c=null,u=406,d="Not Acceptable"):l.length===1?l=l[0]:l=null)}else{var w;const y=await o.text();try{i=JSON.parse(y),Array.isArray(i)&&o.status===404&&(l=[],i=null,u=200,d="OK")}catch{o.status===404&&y===""?(u=204,d="No Content"):i={message:y}}if(i&&r.isMaybeSingle&&(!(i==null||(w=i.details)===null||w===void 0)&&w.includes("0 rows"))&&(i=null,u=200,d="OK"),i&&r.shouldThrowOnError)throw new QA(i)}return{error:i,data:l,count:c,status:u,statusText:d}});return this.shouldThrowOnError||(s=s.catch(o=>{var i;let l="",c="",u="";const d=o==null?void 0:o.cause;if(d){var h,m,f,w;const v=(h=d==null?void 0:d.message)!==null&&h!==void 0?h:"",g=(m=d==null?void 0:d.code)!==null&&m!==void 0?m:"";l=`${(f=o==null?void 0:o.name)!==null&&f!==void 0?f:"FetchError"}: ${o==null?void 0:o.message}`,l+=` 359 360Caused by: ${(w=d==null?void 0:d.name)!==null&&w!==void 0?w:"Error"}: ${v}`,g&&(l+=` (${g})`),d!=null&&d.stack&&(l+=` 361${d.stack}`)}else{var y;l=(y=o==null?void 0:o.stack)!==null&&y!==void 0?y:""}const b=this.url.toString().length;return(o==null?void 0:o.name)==="AbortError"||(o==null?void 0:o.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",b>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${b} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",b>this.urlLengthLimit&&(c+=`. Your request URL is ${b} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{error:{message:`${(i=o==null?void 0:o.name)!==null&&i!==void 0?i:"FetchError"}: ${o==null?void 0:o.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}})),s.then(e,t)}returns(){return this}overrideTypes(){return this}},XA=class extends JA{select(e){let t=!1;const r=(e??"*").split("").map(n=>/\s/.test(n)&&!t?"":(n==='"'&&(t=!t),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const o=s?`${s}.order`:"order",i=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${i?`${i},`:""}${e}.${t?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,o=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.method==="GET"?this.headers.set("Accept","application/json"):this.headers.set("Accept","application/vnd.pgrst.object+json"),this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}
361explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:o="text"}={}){var i;const l=[e?"analyze":null,t?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(i=this.headers.get("Accept"))!==null&&i!==void 0?i:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${o}; for="${c}"; options=${l};`),o==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};const iv=new RegExp("[,()]");var _o=class extends XA{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&iv.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){const r=Array.from(new Set(t)).map(n=>typeof n=="string"&&iv.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return typeof t=="string"?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return typeof t=="string"?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(e,`${s}fts${o}.${t}`),this}match(e){return Object.entries(e).forEach(([t,r])=>{this.url.searchParams.append(t,`eq.${r}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},ZA=class{constructor(e,{headers:t={},schema:r,fetch:n,urlLengthLimit:s=8e3}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=n,this.urlLengthLimit=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){const{head:r=!1,count:n}=t??{},s=r?"HEAD":"GET";let o=!1;const i=(e??"*").split("").map(u=>/\s/.test(u)&&!o?"":(u==='"'&&(o=!o),u)).join(""),{url:l,headers:c}=this.cloneRequestState();return l.searchParams.set("select",i),n&&c.append("Prefer",`count=${n}`),new _o({method:s,url:l,headers:c,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(e,{count:t,defaultToNull:r=!0}={}){var n;const s="POST",{url:o,headers:i}=this.cloneRequestState();if(t&&i.append("Prefer",`count=${t}`),r||i.append("Prefer","missing=default"),Array.isArray(e)){const l=e.reduce((c,u)=>c.concat(Object.keys(u)),[]);if(l.length>0){const c=[...new Set(l)].map(u=>`"${u}"`);o.searchParams.set("columns",c.join(","))}}return new _o({method:s,url:o,headers:i,schema:this.schema,body:e,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var o;const i="POST",{url:l,headers:c}=this.cloneRequestState();if(c.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),t!==void 0&&l.searchParams.set("on_conflict",t),n&&c.append("Prefer",`count=${n}`),s||c.append("Prefer","missing=default"),Array.isArray(e)){const u=e.reduce((d,h)=>d.concat(Object.keys(h)),[]);if(u.length>0){const d=[...new Set(u)].map(h=>`"${h}"`);l.searchParams.set("columns",d.join(","))}}return new _o({method:i,url:l,headers:c,schema:this.schema,body:e,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}update(e,{count:t}={}){var r;const n="PATCH",{url:s,headers:o}=this.cloneRequestState();return t&&o.append("Prefer",`count=${t}`),new _o({method:n,url:s,headers:o,schema:this.schema,body:e,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:e}={}){var t;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new _o({method:r,url:n,headers:s,schema:this.schema,fetch:(t=this.fetch)!==null&&t!==void 0?t:fetch,urlLengthLimit:this.urlLengthLimit})}};function Qi(e){"@babel/helpers - typeof";return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qi(e)}function eR(e,t){if(Qi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Qi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tR(e){var t=eR(e,"string");return Qi(t)=="symbol"?t:t+""}function rR(e,t,r){return(t=tR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Ql(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};
361t%2?lv(Object(r),!0).forEach(function(n){rR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var nR=class L1{constructor(t,{headers:r={},schema:n,fetch:s,timeout:o,urlLengthLimit:i=8e3}={}){this.url=t,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=i;const l=s??globalThis.fetch;o!==void 0&&o>0?this.fetch=(c,u)=>{const d=new AbortController,h=setTimeout(()=>d.abort(),o),m=u==null?void 0:u.signal;if(m){if(m.aborted)return clearTimeout(h),l(c,u);const f=()=>{clearTimeout(h),d.abort()};return m.addEventListener("abort",f,{once:!0}),l(c,Ql(Ql({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(h),m.removeEventListener("abort",f)})}return l(c,Ql(Ql({},u),{},{signal:d.signal})).finally(()=>clearTimeout(h))}:this.fetch=l}from(t){if(!t||typeof t!="string"||t.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new ZA(new URL(`${this.url}/${t}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(t){return new L1(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(t,r={},{head:n=!1,get:s=!1,count:o}={}){var i;let l;const c=new URL(`${this.url}/rpc/${t}`);let u;const d=f=>f!==null&&typeof f=="object"&&(!Array.isArray(f)||f.some(d)),h=n&&Object.values(r).some(d);h?(l="POST",u=r):n||s?(l=n?"HEAD":"GET",Object.entries(r).filter(([f,w])=>w!==void 0).map(([f,w])=>[f,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([f,w])=>{c.searchParams.append(f,w)})):(l="POST",u=r);const m=new Headers(this.headers);return h?m.set("Prefer",o?`count=${o},return=minimal`:"return=minimal"):o&&m.set("Prefer",`count=${o}`),new _o({method:l,url:c,headers:m,schema:this.schemaName,body:u,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}};class sR{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,o=parseInt(s.replace(/^v/,"").split(".")[0]);return o>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${o} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${o} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 362import ws from "ws" 363new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=` 364 365Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const oR="2.97.0",aR=`realtime-js/${oR}`,iR="1.0.0",D1="2.0.0",cv=D1,Qf=1e4,lR=1e3,cR=100;var Dn;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Dn||(Dn={}));var Ge;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Ge||(Ge={}));var vr;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(vr||(vr={}));var Jf;(function(e){e.websocket="websocket"})(Jf||(Jf={}));var As;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(As||(As={}));class uR{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},i=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,r,n){var s,o;const i=t.topic,l=(s=t.ref)!==null&&s!==void 0?s:"",c=(o=t.join_ref)!==null&&o!==void 0?o:"",u=t.payload.event,d=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},h=Object.keys(d).length===0?"":JSON.stringify(d);if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(h.length>255)throw new Error(`metadata length ${h.length} exceeds maximum of 255`);const m=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+i.length+u.length+h.length,f=new ArrayBuffer(this.HEADER_LENGTH+m);let w=new DataView(f),y=0;w.setUint8(y++,this.KINDS.userBroadcastPush),w.setUint8(y++,c.length),w.setUint8(y++,l.length),w.setUint8(y++,i.length),w.setUint8(y++,u.length),w.setUint8(y++,h.length),w.setUint8(y++,r),Array.from(c,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(l,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(i,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(u,v=>w.setUint8(y++,v.charCodeAt(0))),Array.from(h,v=>w.setUint8(y++,v.charCodeAt(0)));var b=new Uint8Array(f.byteLength+n.byteLength);return b.set(new Uint8Array(f),0),b.set(new Uint8Array(n),f.byteLength),b.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,o,i,l,c]=n;return r({join_ref:s,ref:o,topic:i,event:l,payload:c})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=r.getUint8(3),l=r.getUint8(4);let c=this.HEADER_LENGTH+4;const u=n.decode(t.slice(c,c+s));c=c+s;
365const d=n.decode(t.slice(c,c+o));c=c+o;const h=n.decode(t.slice(c,c+i));c=c+i;const m=t.slice(c,t.byteLength),f=l===this.JSON_ENCODING?JSON.parse(n.decode(m)):m,w={type:this.BROADCAST_EVENT,event:d,payload:f};return i>0&&(w.meta=JSON.parse(h)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:w}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class M1{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var _e;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(_e||(_e={}));const uv=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,i)=>(o[i]=dR(i,e,t,s),o),{}):{}},dR=(e,t,r,n)=>{const s=t.find(l=>
365l.name===e),o=s==null?void 0:s.type,i=r[e];return o&&!n.includes(o)?F1(o,i):Xf(i)},F1=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return pR(t,r)}switch(e){case _e.bool:return hR(t);case _e.float4:case _e.float8:case _e.int2:case _e.int4:case _e.int8:case _e.numeric:case _e.oid:return fR(t);case _e.json:case _e.jsonb:return mR(t);case _e.timestamp:return gR(t);case _e.abstime:case _e.date:case _e.daterange:case _e.int4range:case _e.int8range:case _e.money:case _e.reltime:case _e.text:case _e.time:case _e.timestamptz:case _e.timetz:case _e.tsrange:case _e.tstzrange:return Xf(t);default:return Xf(t)}},Xf=e=>e,hR=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},fR=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},mR=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e},pR=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const i=e.slice(1,r);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(l=>F1(t,l))}return e},gR=e=>typeof e=="string"?e.replace(" ","T"):e,$1=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class ah{constructor(t,r,n={},s=Qf){this.channel=t,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(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,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:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var dv;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(dv||(dv={}));class Si{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:o,onLeave:i,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=Si.syncState(this.state,s,o,i),this.pendingDiffs.forEach(c=>{this.state=Si.syncDiff(this.state,c,o,i)}),this.pendingDiffs=[],l()}),this.channel._on(n.diff,{},s=>{const{onJoin:o,onLeave:i,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=Si.syncDiff(this.state,s,o,i),l())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i})}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const o=this.cloneDeep(t),i=this.transformState(r),l={},c={};return this.map(o,(u,d)=>{i[u]||(c[u]=d)}),this.map(i,(u,d)=>{const h=o[u];if(h){const m=d.map(b=>b.presence_ref),f=h.map(b=>b.presence_ref),w=d.filter(b=>f.indexOf(b.presence_ref)<0),y=h.filter(b=>m.indexOf(b.presence_ref)<0);w.length>0&&(l[u]=w),y.length>0&&(c[u]=y)}else l[u]=d}),this.syncDiff(o,{joins:l,leaves:c},n,s)}static syncDiff(t,r,n,s){const{joins:o,leaves:i}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(o,(l,c)=>{var u;
365const d=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(c),d.length>0){const h=t[l].map(f=>f.presence_ref),m=d.filter(f=>h.indexOf(f.presence_ref)<0);t[l].unshift(...m)}n(l,d,c)}),this.map(i,(l,c)=>{let u=t[l];if(!u)return;const d=c.map(h=>h.presence_ref);u=u.filter(h=>d.indexOf(h.presence_ref)<0),t[l]=u,s(l,u,c),u.length===0&&delete t[l]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[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(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var hv;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(hv||(hv={}));var ji;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(ji||(ji={}));var rn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(rn||(rn={}));class Wo{constructor(t,r={config:{}},n){var s,o;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=Ge.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new ah(this,vr.join,this.params,this.timeout),this.rejoinTimer=new M1(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ge.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ge.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Ge.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ge.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Ge.errored,this.rejoinTimer.scheduleTimeout())}),this._on(vr.reply,{},(i,l)=>{this._trigger(this._replyEventName(l),i)}),this.presence=new Si(this),this.broadcastEndpointURL=$1(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.state==Ge.closed){const{config:{broadcast:i,presence:l,private:c}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(f=>f.filter))!==null&&s!==void 0?s:[],d=!!this.bindings[ji.PRESENCE]&&this.bindings[ji.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,h={},m={broadcast:i,presence:Object.assign(Object.assign({},l),{enabled:d}),postgres_changes:u,private:c};this.socket.accessTokenValue&&(h.access_token=this.socket.accessTokenValue),this._onError(f=>t==null?void 0:t(rn.CHANNEL_ERROR,f)),this._onClose(()=>t==null?void 0:t(rn.CLOSED)),this.updateJoinPayload(Object.assign({config:m},h)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:f})=>{var w;if(this.socket._isManualToken()||this.socket.setAuth(),f===void 0){t==null||t(rn.SUBSCRIBED);return}else{const y=this.bindings.postgres_changes,b=(w=y==null?void 0:y.length)!==null&&w!==void 0?w:0,v=[];for(let g=0;g<b;g++){const x=y[g],{filter:{event:k,schema:S,table:j,filter:N}}=x,E=f&&f[g];if(E&&E.event===k&&Wo.isFilterValueEqual(E.schema,S)&&Wo.isFilterValueEqual(E.table,j)&&Wo.isFilterValueEqual(E.filter,N))v.push(Object.assign(Object.assign({},x),{id:E.id}));else{this.unsubscribe(),this.state=Ge.errored,t==null||t(rn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=v,t&&t(rn.SUBSCRIBED);return}}).receive("error",f=>{this.state=Ge.errored,t==null||t(rn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(f).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(rn.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===Ge.joined&&t===ji.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(async()=>await this.subscribe())),this._on(t,r,n)}async httpSend(t,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const i={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:t,payload:r,private:this.private}]})},l=await this._fetchWithTimeout(this.broadcastEndpointURL,i,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(l.status===202)return{success:!0};let c=l.statusText;
365try{const u=await l.json();c=u.error||u.message||c}catch{}return Promise.reject(new Error(c))}async send(t,r={}){var n,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:i}=t,l={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(l.Authorization=`Bearer ${this.socket.accessTokenValue}`);const c={method:"POST",headers:l,body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,private:this.private}]})};try{const u=await this._fetchWithTimeout(this.broadcastEndpointURL,c,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,l,c;const u=this._push(t.type,t,r.timeout||this.timeout);t.type==="broadcast"&&!(!((c=(l=(i=this.params)===null||i===void 0?void 0:i.config)===null||l===void 0?void 0:l.broadcast)===null||c===void 0)&&c.ack)&&o("ok"),u.receive("ok",()=>o("ok")),u.receive("error",()=>o("error")),u.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Ge.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(vr.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new ah(this,vr.leave,{},t),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==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=Ge.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),i=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),i}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new ah(this,t,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>cR){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,o;const i=t.toLocaleLowerCase(),{close:l,error:c,leave:u,join:d}=vr;if(n&&[l,c,u,d].indexOf(i)>=0&&n!==this._joinRef())return;let m=this._onMessage(i,r,n);if(r&&!m)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(f=>{var w,y,b;return((w=f.filter)===null||w===void 0?void 0:w.event)==="*"||((b=(y=f.filter)===null||y===void 0?void 0:y.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===i}).map(f=>f.callback(m,n)):(o=this.bindings[i])===null||o===void 0||o.filter(f=>{var w,y,b,v,g,x;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in f){const k=f.id,S=(w=f.filter)===null||w===void 0?void 0:w.event;return k&&((y=r.ids)===null||y===void 0?void 0:y.includes(k))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((b=r.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const k=(g=(v=f==null?void 0:f.filter)===null||v===void 0?void 0:v.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return k==="*"||k===((x=r==null?void 0:r.event)===null||x===void 0?void 0:x.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===i}).map(f=>{if(typeof m=="object"&&"ids"in m){const w=m.data,{schema:y,table:b,commit_timestamp:v,type:g,errors:x}=w;m=Object.assign(Object.assign({},{schema:y,table:b,commit_timestamp:v,eventType:g,new:{},old:{},errors:x}),this._getPayloadRecords(w))}f.callback(m,n)})}_isClosed(){return this.state===Ge.closed}_isJoined(){return this.state===Ge.joined}_isJoining(){return this.state===Ge.joining}_isLeaving(){return this.state===Ge.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),o={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===n&&Wo.isEqual(s.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}static isFilterValueEqual(t,r){return(t??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(vr.close,{},t)}_onError(t){this._on(vr.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ge.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=uv(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=uv(t.columns,t.old_record)),r}}const ih=()=>{},Jl={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},yR=[1e3,2e3,5e3,1e4],vR=1e4,xR=` 366 addEventListener("message", (e) => { 367 if (e.data.event === "start") { 368 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 369 } 370 });`;class wR{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this._manuallySetToken=!1,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Qf,this.transport=null,this.heartbeatIntervalMs=Jl.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=ih,this.ref=0,this.reconnectTimer=null,this.vsn=cv,this.logger=ih,this.conn=null,this.sendBuffer=[],this.serializer
370=new uR,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._heartbeatSentAt=null,this._resolveFetch=s=>s?(...o)=>s(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${t}/${Jf.websocket}`,this.httpEndpoint=$1(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=sR.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r} 371 372To use Realtime in Node.js, you need to provide a WebSocket implementation: 373 374Option 1: Use Node.js 22+ which has native WebSocket support 375Option 2: Install and provide the "ws" package: 376 377 npm install ws 378 379 import ws from "ws" 380 const client = new RealtimeClient(url, { 381 ...options, 382 transport: ws 383 })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Dn.connecting:return As.Connecting;case Dn.open:return As.Open;case Dn.closing:return As.Closing;default:return As.Closed}}isConnected(){return this.connectionState()===As.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new Wo(`realtime:${t}`,r,this);return this.channels.push(o),o}}push(t){const{topic:r,event:n,payload:s,ref:o}=t,i=()=>{this.encode(t,l=>{var c;(c=this.conn)===null||c===void 0||c.send(l)})};this.log("push",`${r} ${n} (${o})`,s),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this._heartbeatSentAt=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(lR,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
vendor: 3,886 bytes, line 383
383heduleTimeout()},Jl.HEARTBEAT_TIMEOUT_FALLBACK);return}this._heartbeatSentAt=Date.now(),this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(r){this.log("error","error in heartbeat callback",r)}this._setAuthSafely("heartbeat")}onHeartbeat(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const u=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",u)}catch(d){this.log("error","error in heartbeat callback",d)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:s,payload:o,ref:i}=r,l=i?`(${i})`:"",c=o.status||"";this.log("receive",`${c} ${n} ${s} ${l}`.trim(),o),this.channels.filter(u=>u._isMember(n)).forEach(u=>u._trigger(s,o,i)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t),this.conn.readyState===Dn.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Dn.open||this.conn.readyState===Dn.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this._terminateWorker(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_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 t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this._terminateWorker()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
383heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t);try{this.heartbeatCallback("error")}catch(r){this.log("error","error in heartbeat callback",r)}}_triggerChanError(){this.channels.forEach(t=>t._trigger(vr.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${t}${n}${s}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([xR],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r,n=!1;if(t)r=t,n=!0;else if(this.accessToken)try{r=await this.accessToken()}catch(s){this.log("error","Error fetching access token from callback",s),r=this.accessTokenValue}else r=this.accessTokenValue;n?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(s=>{const o={access_token:r,version:aR};r&&s.updateJoinPayload(o),s.joinedOnce&&s._isJoined()&&s._push(vr.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new M1(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Jl.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,o,i,l,c,u,d,h,m,f;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:Qf,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Jl.HEARTBEAT_INTERVAL,this.worker=(o=t==null?void 0:t.worker)!==null&&o!==void 0?o:!1,this.accessToken=(i=t==null?void 0:t.accessToken)!==null&&i!==void 0?i:null,this.heartbeatCallback=(l=t==null?void 0:t.heartbeatCallback)!==null&&l!==void 0?l:ih,this.vsn=(c=t==null?void 0:t.vsn)!==null&&c!==void 0?c:cv,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:w=>yR[w-1]||vR,this.vsn){case iR:this.encode=(d=t==null?void 0:t.encode)!==null&&d!==void 0?d:(w,y)=>y(JSON.stringify(w)),this.decode=(h=t==null?void 0:t.decode)!==null&&h!==void 0?h:(w,y)=>y(JSON.parse(w));break;case D1:this.encode=(m=t==null?void 0:t.encode)!==null&&m!==void 0?m:this.serializer.encode.bind(this.serializer),this.decode=(f=t==null?void 0:t.decode)!==null&&f!==void 0?f:this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${this.vsn}`)}if(this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=t==null?void 0:t.workerUrl}}}var Ji=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function bR(e,t,r){const n=new URL(t,e);if(r)for(const[s,o]of Object.entries(r))o!==void 0&&n.searchParams.set(s,o);return n.toString()}async function kR(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function SR(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:i}){const l=bR(e.baseUrl,n,s),c=await kR(e.auth),u=await t(l,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...c,...i},body:o?JSON.stringify(o):void 0}),d=await u.text(),h=(u.headers.get("content-type")||"").includes("application/json"),m=h&&d?JSON.parse(d):d;if(!u.ok){const f=h?m:void 0,w=f==null?void 0:f.error;throw new Ji((w==null?void 0:w.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:w==null?void 0:w.type,icebergCode:w==null?void 0:w.code,details:f})}return{status:u.status,headers:u.headers,data:m}}}}function Xl(e){return e.join("�")}var jR=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:Xl(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Xl(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Xl(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Xl(e.namespace)}`}),!0}catch(t){if(t instanceof Ji&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Ji&&r.status===409)return;throw r}}};function po(e){return e.join("�")}var _R=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${po(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${po(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${po(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${po(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${po(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${po(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Ji&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Ji&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},CR=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=SR({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new jR(this.client,t),this.tableOps=new _R(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
383async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}},ad=class extends Error{constructor(e,t="storage",r,n){super(e),this.__isStorageError=!0,this.namespace=t,this.name=t==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function id(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}var Zl=class extends ad{constructor(e,t,r,n="storage"){super(e,n,t,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=t,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},U1=class extends ad{constructor(e,t,r="storage"){super(e,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=t}};const NR=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),ER=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Zf=e=>{if(Array.isArray(e))return e.map(r=>Zf(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=Zf(n)}),t},TR=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e);function Xi(e){"@babel/helpers - typeof";return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xi(e)}function PR(e,t){if(Xi(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Xi(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function AR(e){var t=PR(e,"string");return Xi(t)=="symbol"?t:t+""}function RR(e,t,r){return(t=AR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fv(Object(r),!0).forEach(function(n){RR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const mv=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},OR=async(e,t,r,n)=>{if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const s=e,o=s.status||500;if(typeof s.json=="function")s.json().then(i=>{const l=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||o+"";t(new Zl(mv(i),o,l,n))}).catch(()=>{if(n==="vectors"){const i=o+"";t(new Zl(s.statusText||`HTTP ${o} error`,o,i,n))}else{const i=o+"";t(new Zl(s.statusText||`HTTP ${o} error`,o,i,n))}});else{const i=o+"";t(new Zl(s.statusText||`HTTP ${o} error`,o,i,n))}}else t(new U1(mv(e),e,n))},IR=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||e==="HEAD"||!n?Z(Z({},s),r):(ER(n)?(s.headers=Z({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),Z(Z({},s),r))};async function ti(e,t,r,n,s,o,i){return new Promise((l,c)=>
383{e(r,IR(t,n,s,o)).then(u=>{if(!u.ok)throw u;if(n!=null&&n.noResolveJson)return u;if(i==="vectors"){const d=u.headers.get("content-type");if(u.headers.get("content-length")==="0"||u.status===204)return{};if(!d||!d.includes("application/json"))return{}}return u.json()}).then(u=>l(u)).catch(u=>OR(u,c,n,i))})}function B1(e="storage"){return{get:async(t,r,n,s)=>ti(t,"GET",r,n,s,void 0,e),post:async(t,r,n,s,o)=>ti(t,"POST",r,s,o,n,e),put:async(t,r,n,s,o)=>ti(t,"PUT",r,s,o,n,e),head:async(t,r,n,s)=>ti(t,"HEAD",r,Z(Z({},n),{},{noResolveJson:!0}),s,void 0,e),remove:async(t,r,n,s,o)=>ti(t,"DELETE",r,s,o,n,e)}}const LR=B1("storage"),{get:Zi,post:mr,put:em,head:DR,remove:Lp}=LR,Wt=B1("vectors");var $a=class{constructor(e,t={},r,n="storage"){this.shouldThrowOnError=!1,this.url=e,this.headers=t,this.fetch=NR(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(e,t){return this.headers=Z(Z({},this.headers),{},{[e]:t}),this}async handleOperation(e){var t=this;try{return{data:await e(),error:null}}catch(r){if(t.shouldThrowOnError)throw r;if(id(r))return{data:null,error:r};throw r}}},MR=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t}then(e,t){return this.execute().then(e,t)}async execute(){var e=this;try{return{data:(await e.downloadFn()).body,error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(id(t))return{data:null,error:t};throw t}}};let W1;W1=Symbol.toStringTag;var FR=class{constructor(e,t){this.downloadFn=e,this.shouldThrowOnError=t,this[W1]="BlobDownloadBuilder",this.promise=null}asStream(){return new MR(this.downloadFn,this.shouldThrowOnError)}then(e,t){return this.getPromise().then(e,t)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var e=this;try{return{data:await(await e.downloadFn()).blob(),error:null}}catch(t){if(e.shouldThrowOnError)throw t;if(id(t))return{data:null,error:t};throw t}}};const $R={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},pv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var UR=class extends $a{constructor(e,t={},r,n){super(e,t,n,"storage"),this.bucketId=r}async uploadOrUpdate(e,t,r,n){var s=this;return s.handleOperation(async()=>{let o;const i=Z(Z({},pv),n);let l=Z(Z({},s.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const c=i.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),c&&o.append("metadata",s.encodeMetadata(c)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.has("cacheControl")||o.append("cacheControl",i.cacheControl),c&&!o.has("metadata")&&o.append("metadata",s.encodeMetadata(c))):(o=r,l["cache-control"]=`max-age=${i.cacheControl}`,l["content-type"]=i.contentType,c&&(l["x-metadata"]=s.toBase64(s.encodeMetadata(c))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!i.duplex&&(i.duplex="half")),n!=null&&n.headers&&(l=Z(Z({},l),n.headers));const u=s._removeEmptyFolders(t),d=s._getFinalPath(u),h=await(e=="PUT"?em:mr)(s.fetch,`${s.url}/object/${d}`,o,Z({headers:l},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{path:u,id:h.Id,fullPath:h.Key}})}async upload(e,t,r){return this.uploadOrUpdate("POST",e,t,r)}async uploadToSignedUrl(e,t,r,n){var s=this;const o=s._removeEmptyFolders(e),i=s._getFinalPath(o),l=new URL(s.url+`/object/upload/sign/${i}`);return l.searchParams.set("token",t),s.handleOperation(async()=>{let c;const u=Z({upsert:pv.upsert},n),d=Z(Z({},s.headers),{"x-upsert":String(u.upsert)});return typeof Blob<"u"&&r instanceof Blob?(c=new FormData,c.append("cacheControl",u.cacheControl),c.append("",r)):typeof FormData<"u"&&r instanceof FormData?(c=r,c.append("cacheControl",u.cacheControl)):(c=r,d["cache-control"]=`max-age=${u.cacheControl}`,d["content-type"]=u.contentType),{path:o,fullPath:(await em(s.fetch,l.toString(),c,{headers:d})).Key}})}async createSignedUploadUrl(e,t){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(e);const s=Z({},r.headers);t!=null&&t.upsert&&(s["x-upsert"]="true");const o=await mr(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),i=new URL(r.url+o.url),l=i.searchParams.get("token");if(!l)throw new ad("No token returned by API");return{signedUrl:i.toString(),path:e,token:l}})}async update(e,t,r){return this.uploadOrUpdate("PUT",e,t,r)}async move(e,t,r){var n=this;return n.handleOperation(async()=>await mr(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,de
383stinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(e,t,r){var n=this;return n.handleOperation(async()=>({path:(await mr(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:e,destinationKey:t,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(e,t,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(e),o=await mr(n.fetch,`${n.url}/object/sign/${s}`,Z({expiresIn:t},r!=null&&r.transform?{transform:r.transform}:{}),{headers:n.headers});const i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{signedUrl:encodeURI(`${n.url}${o.signedURL}${i}`)}})}async createSignedUrls(e,t,r){var n=this;return n.handleOperation(async()=>{const s=await mr(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:t,paths:e},{headers:n.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s.map(i=>Z(Z({},i),{},{signedUrl:i.signedURL?encodeURI(`${n.url}${i.signedURL}${o}`):null}))})}download(e,t,r){const n=typeof(t==null?void 0:t.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((t==null?void 0:t.transform)||{}),o=s?`?${s}`:"",i=this._getFinalPath(e),l=()=>Zi(this.fetch,`${this.url}/${n}/${i}${o}`,{headers:this.headers,noResolveJson:!0},r);return new FR(l,this.shouldThrowOnError)}async info(e){var t=this;const r=t._getFinalPath(e);return t.handleOperation(async()=>Zf(await Zi(t.fetch,`${t.url}/object/info/${r}`,{headers:t.headers})))}async exists(e){var t=this;const r=t._getFinalPath(e);try{return await DR(t.fetch,`${t.url}/object/${r}`,{headers:t.headers}),{data:!0,error:null}}catch(n){if(t.shouldThrowOnError)throw n;if(id(n)&&n instanceof U1){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}}getPublicUrl(e,t){const r=this._getFinalPath(e),n=[],s=t!=null&&t.download?`download=${t.download===!0?"":t.download}`:"";s!==""&&n.push(s);const o=typeof(t==null?void 0:t.transform)<"u"?"render/image":"object",i=this.transformOptsToQueryString((t==null?void 0:t.transform)||{});i!==""&&n.push(i);let l=n.join("&");return l!==""&&(l=`?${l}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${r}${l}`)}}}async remove(e){var t=this;return t.handleOperation(async()=>await Lp(t.fetch,`${t.url}/object/${t.bucketId}`,{prefixes:e},{headers:t.headers}))}async list(e,t,r){var n=this;return n.handleOperation(async()=>{const s=Z(Z(Z({},$R),t),{},{prefix:e||""});return await mr(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(e,t){var r=this;return r.handleOperation(async()=>{const n=Z({},e);return await mr(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},t)})}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 t=[];return e.width&&t.push(`width=${e.width}`),e.height&&t.push(`height=${e.height}`),e.resize&&t.push(`resize=${e.resize}`),e.format&&t.push(`format=${e.format}`),e.quality&&t.push(`quality=${e.quality}`),t.join("&")}};const BR="2.97.0",bl={"X-Client-Info":`storage-js/${BR}`};var WR=class extends $a{constructor(e,t={},r,n){const s=new URL(e);n!=null&&n.useNewHostname&&/supabase\.(co|in|red)$/.test(s.hostname)&&!s.hostname.includes("storage.supabase.")&&(s.hostname=s.hostname.replace("supabase.","storage.supabase."));const o=s.href.replace(/\/$/,""),i=Z(Z({},bl),t);super(o,i,r,"storage")}async listBuckets(e){var t=this;return t.handleOperation(async()=>{const r=t.listBucketOptionsToQueryString(e);return await Zi(t.fetch,`${t.url}/bucket${r}`,{headers:t.headers})})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Zi(t.fetch,`${t.url}/bucket/${e}`,{headers:t.headers}))}async createBucket(e,t={public:!1}){var r=this;return r.handleOperation(async()=>await mr(r.fetch,`${r.url}/bucket`,{id:e,name:e,type:t.type,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async updateBucket(e,t){var r=this;return r.handleOperation(async()=>await em(r.fetch,`${r.url}/bucket/${e}`,{id:e,name:e,public:t.public,file_size_limit:t.fileSizeLimit,allowed_mime_types:t.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(e){var t=this;return t.handleOperation(async()=>await mr(t.fetch,`${t.url}/bucket/${e}/empty`,{},{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Lp(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}listBucketOptionsToQueryString(e){const t={};return e&&("limit"in e&&(t.limit=String(e.limit)),"offset"in e&&(t.offset=String(e.offset)),e.search&&(t.search=e.search),e.sortColumn&&(t.sortColumn=e.sortColumn),e.sortOrder&&(t.sortOrder=e.sortOrder)),Object.keys(t).length>0?"?"+new URLSearchParams(t).toString():""}},zR=class extends $a{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=Z(Z({},bl),t);super(n,s,r,"storage")}async createBucket(e){var t=this;return t.handleOperation(async()=>await mr(t.fetch,`${t.url}/bucket`,{name:e},{headers:t.headers}))}async listBuckets(e){var t=this;return t.handleOperation(async()=>
383{const r=new URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${t.url}/bucket?${n}`:`${t.url}/bucket`;return await Zi(t.fetch,s,{headers:t.headers})})}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Lp(t.fetch,`${t.url}/bucket/${e}`,{},{headers:t.headers}))}from(e){var t=this;if(!TR(e))throw new ad("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const r=new CR({baseUrl:this.url,catalogName:e,auth:{type:"custom",getHeaders:async()=>t.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,o){const i=s[o];return typeof i!="function"?i:async(...l)=>{try{return{data:await i.apply(s,l),error:null}}catch(c){if(n)throw c;return{data:null,error:c}}}}})}},HR=class extends $a{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=Z(Z({},bl),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createIndex(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/CreateIndex`,e,{headers:t.headers})||{})}async getIndex(e,t){var r=this;return r.handleOperation(async()=>await Wt.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers}))}async listIndexes(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/ListIndexes`,e,{headers:t.headers}))}async deleteIndex(e,t){var r=this;return r.handleOperation(async()=>await Wt.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:e,indexName:t},{headers:r.headers})||{})}},VR=class extends $a{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=Z(Z({},bl),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async putVectors(e){var t=this;if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/PutVectors`,e,{headers:t.headers})||{})}async getVectors(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/GetVectors`,e,{headers:t.headers}))}async listVectors(e){var t=this;if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/ListVectors`,e,{headers:t.headers}))}async queryVectors(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/QueryVectors`,e,{headers:t.headers}))}async deleteVectors(e){var t=this;if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/DeleteVectors`,e,{headers:t.headers})||{})}},qR=class extends $a{constructor(e,t={},r){const n=e.replace(/\/$/,""),s=Z(Z({},bl),{},{"Content-Type":"application/json"},t);super(n,s,r,"vectors")}async createBucket(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}async getBucket(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/GetVectorBucket`,{vectorBucketName:e},{headers:t.headers}))}async listBuckets(e={}){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/ListVectorBuckets`,e,{headers:t.headers}))}async deleteBucket(e){var t=this;return t.handleOperation(async()=>await Wt.post(t.fetch,`${t.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:t.headers})||{})}},GR=class extends qR{constructor(e,t={}){super(e,t.headers||{},t.fetch)}from(e){return new KR(this.url,this.headers,e,this.fetch)}async createBucket(e){var t=()=>super.createBucket,r=this;return t().call(r,e)}async getBucket(e){var t=()=>super.getBucket,r=this;return t().call(r,e)}async listBuckets(e={}){var t=()=>super.listBuckets,r=this;return t().call(r,e)}async deleteBucket(e){var t=()=>super.deleteBucket,r=this;return t().call(r,e)}},KR=class extends HR{constructor(e,t,r,n){super(e,t,n),this.vectorBucketName=r}async createIndex(e){var t=()=>super.createIndex,r=this;return t().call(r,Z(Z({},e),{},{vectorBucketName:r.vectorBucketName}))}
383async listIndexes(e={}){var t=()=>super.listIndexes,r=this;return t().call(r,Z(Z({},e),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(e){var t=()=>super.getIndex,r=this;return t().call(r,r.vectorBucketName,e)}async deleteIndex(e){var t=()=>super.deleteIndex,r=this;return t().call(r,r.vectorBucketName,e)}index(e){return new YR(this.url,this.headers,this.vectorBucketName,e,this.fetch)}},YR=class extends VR{constructor(e,t,r,n,s){super(e,t,s),this.vectorBucketName=r,this.indexName=n}async putVectors(e){var t=()=>super.putVectors,r=this;return t().call(r,Z(Z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(e){var t=()=>super.getVectors,r=this;return t().call(r,Z(Z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(e={}){var t=()=>super.listVectors,r=this;return t().call(r,Z(Z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(e){var t=()=>super.queryVectors,r=this;return t().call(r,Z(Z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(e){var t=()=>super.deleteVectors,r=this;return t().call(r,Z(Z({},e),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},QR=class extends WR{constructor(e,t={},r,n){super(e,t,r,n)}from(e){return new UR(this.url,this.headers,e,this.fetch)}get vectors(){return new GR(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new zR(this.url+"/iceberg",this.headers,this.fetch)}};const z1="2.97.0",Co=30*1e3,tm=3,lh=tm*Co,JR="http://localhost:9999",XR="supabase.auth.token",ZR={"X-Client-Info":`gotrue-js/${z1}`},rm="X-Supabase-Api-Version",H1={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},eO=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,tO=10*60*1e3;class el extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function G(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class rO extends el{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function nO(e){return G(e)&&e.name==="AuthApiError"}class Rs extends el{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class kn extends el{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class $t extends kn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ch(e){return G(e)&&e.name==="AuthSessionMissingError"}class go extends kn{constructor(){super("Auth session or user missing","AuthInvalidToken
383ResponseError",500,void 0)}}class ec extends kn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class tc extends kn{constructor(t,r=null){super(t,"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 sO(e){return G(e)&&e.name==="AuthImplicitGrantRedirectError"}class gv extends kn{constructor(t,r=null){super(t,"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 oO extends kn{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class nm extends kn{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function uh(e){return G(e)&&e.name==="AuthRetryableFetchError"}class yv extends kn{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class sm extends kn{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const fu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),vv=` 384\r=`.split(""),aO=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<vv.length;t+=1)e[vv[t].charCodeAt(0)]=-2;for(let t=0;t<fu.length;t+=1)e[fu[t].charCodeAt(0)]=t;return e})();function xv(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(fu[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(fu[n]),t.queuedBits-=6}}function V1(e,t,r){const n=aO[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function wv(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{cO(i,n,r)};for(let i=0;i<e.length;i+=1)V1(e.charCodeAt(i),s,o);return t.join("")}function iO(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function lO(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}iO(n,t)}}function cO(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function Zo(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)V1(e.charCodeAt(s),r,n);return new Uint8Array(t)}function uO(e){const t=[];return lO(e,r=>t.push(r)),new Uint8Array(t)}function Ds(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>xv(s,r,n)),xv(null,r,n),t.join("")}function dO(e){return Math.round(Date.now()/1e3)+e}function hO(){return Symbol("auth-callback")}const nt=()=>typeof window<"u"&&typeof document<"u",ks={tested:!1,writable:!1},q1=()=>{if(!nt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(ks.tested)return ks.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),ks.tested=!0,ks.writable=!0}catch{ks.tested=!0,ks.writable=!1}return ks.writable};function fO(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEac
384h((s,o)=>{t[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const G1=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),mO=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",No=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Ss=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},rt=async(e,t)=>{await e.removeItem(t)};class ld{constructor(){this.promise=new ld.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}ld.promiseConstructor=Promise;function rc(e){const t=e.split(".");if(t.length!==3)throw new sm("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!eO.test(t[n]))throw new sm("JWT not in base64url format");return{header:JSON.parse(wv(t[0])),payload:JSON.parse(wv(t[1])),signature:Zo(t[2]),raw:{header:t[0],payload:t[1]}}}async function pO(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function gO(e,t){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){n(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function yO(e){return("0"+e.toString(16)).substr(-2)}function vO(){const t=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(t),Array.from(t,yO).join("")}async function xO(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function wO(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await xO(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function yo(e,t,r=!1){const n=vO();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await No(e,`${t}-code-verifier`,s);const o=await wO(n);return[o,n===o?"plain":"s256"]}const bO=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function kO(e){const t=e.headers.get(rm);if(!t||!t.match(bO))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function SO(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function jO(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const _O=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function vo(e){if(!_O.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function dh(){const e={};return new Proxy(e,{get:(t,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:(t,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:(t,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 CO(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function bv(e){return JSON.parse(JSON.stringify(e))}const Ns=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),NO=[502,503,504];async function kv(e){var t;if(!mO(e))throw new nm(Ns(e),0);if(NO.includes(e.status))throw new nm(Ns(e),e.status);let r;try{r=await e.json()}catch(o){throw new Rs(Ns(o),o)}let n;const s=kO(e);
384if(s&&s.getTime()>=H1["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 yv(Ns(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new $t}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,i)=>o&&typeof i=="string",!0))throw new yv(Ns(r),e.status,r.weak_password.reasons);throw new rO(Ns(r),e.status||500,n)}const EO=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function ee(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[rm]||(o[rm]=H1["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const i=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(i.redirect_to=n.redirectTo);const l=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",c=await TO(e,t,r+l,{headers:o,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(c):{data:Object.assign({},c),error:null}}async function TO(e,t,r,n,s,o){const i=EO(t,n,s,o);let l;try{l=await e(r,Object.assign({},i))}catch(c){throw console.error(c),new nm(Ns(c),0)}if(l.ok||await kv(l),n!=null&&n.noResolveJson)return l;try{return await l.json()}catch(c){await kv(c)}}function hr(e){var t;let r=null;RO(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=dO(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function Sv(e){const t=hr(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function $n(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function PO(e){return{data:e,error:null}}function AO(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,i=Fa(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o},c=Object.assign({},i);return{data:{properties:l,user:c},error:null}}function jv(e){return e}function RO(e){return e.access_token&&e.refresh_token&&e.expires_in}const hh=["global","local","others"];class OO{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=G1(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=hh[0]){if(hh.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${hh.join(", ")}`);try{return await ee(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(G(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await ee(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:$n})}catch(n){if(G(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Fa(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await ee(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:AO,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(G(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:$n})}catch(r){if(G(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,o,i,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ee(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:jv});if(d.error)throw d.error;const h=await d.json(),m=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,f=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return f.length>0&&(f.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(m)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(G(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){vo(t);try{return await ee(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:$n})}catch(r){if(G(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){vo(t);try{return await ee(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:$n})}catch(n){if(G(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){vo(t);
384try{return await ee(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:$n})}catch(n){if(G(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){vo(t.userId);try{const{data:r,error:n}=await ee(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(G(r))return{data:null,error:r};throw r}}async _deleteFactor(t){vo(t.userId),vo(t.id);try{return{data:await ee(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(G(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,o,i,l,c;try{const u={nextPage:null,lastPage:0,total:0},d=await ee(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:jv});if(d.error)throw d.error;const h=await d.json(),m=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,f=(c=(l=d.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&c!==void 0?c:[];return f.length>0&&(f.forEach(w=>{const y=parseInt(w.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(w.split(";")[1].split("=")[1]);u[`${b}Page`]=y}),u.total=parseInt(m)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(G(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(G(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await ee(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(G(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await ee(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(G(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await ee(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(G(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await ee(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(G(r))return{data:null,error:r};throw r}}}function _v(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const xo={debug:!!(globalThis&&q1()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class K1 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Cv extends K1{}async function IO(e,t,r){xo.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;t>0&&setTimeout(()=>{n.abort(),xo.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve();try{return await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){xo.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{xo.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw xo.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Cv(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(xo.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()}})}catch(s){throw(s==null?void 0:s.name)==="AbortError"?new Cv(`Acquiring an exclusive Navigator LockManager lock "${e}" timed out waiting ${t}ms`):s}}function LO(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Y1(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
384" is invalid.`);return e.toLowerCase()}function DO(e){return parseInt(e,16)}function MO(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function FO(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:l,requestId:c,resources:u,scheme:d,uri:h,version:m}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!h)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(m!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${m}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(` 385`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const f=Y1(e.address),w=d?`${d}://${n}`:n,y=e.statement?`${e.statement} 386`:"",b=`${w} wants you to sign in with your Ethereum account: 387${f} 388 389${y}`;let v=`URI: ${h} 390Version: ${m} 391Chain ID: ${r}${i?` 392Nonce: ${i}`:""} 393Issued At: ${o.toISOString()}`;if(s&&(v+=` 394Expiration Time: ${s.toISOString()}`),l&&(v+=` 395Not Before: ${l.toISOString()}`),c&&(v+=` 396Request ID: ${c}`),u){let g=` 397Resources:`;for(const x of u){if(!x||typeof x!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${x}`);g+=` 398- ${x}`}v+=g}return`${b} 399${v}`}class He extends Error{constructor({message:t,code:r,cause:n,name:s}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class mu extends He{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function $O({error:e,options:t}){var r,n,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new He({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new He({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new He({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new He({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new He({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new He({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(l=>l.type==="public-key").length===0?new He({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new He({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if(Q1(i)){if(o.rp.id!==i)return new He({message:`The RP ID "${o.rp.id}
399" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new He({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new He({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new He({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new He({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function UO({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new He({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new He({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if(Q1(n)){if(r.rpId!==n)return new He({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new He({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new He({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new He({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class BO{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const WO=new BO;function zO(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=Fa(e,["challenge","user","excludeCredentials"]),o=Zo(t).buffer,i=Object.assign(Object.assign({},r),{id:Zo(r.id).buffer}),l=Object.assign(Object.assign({},s),{challenge:o,user:i});if(n&&n.length>0){l.excludeCredentials=new Array(n.length);for(let c=0;c<n.length;c++){const u=n[c];l.excludeCredentials[c]=Object.assign(Object.assign({},u),{id:Zo(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return l}function HO(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Fa(e,["challenge","allowCredentials"]),s=Zo(t).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const l=r[i];o.allowCredentials[i]=Object.assign(Object.assign({},l),{id:Zo(l.id).buffer,type:l.type||"public-key",transports:l.transports})}}return o}function VO(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Ds(new Uint8Array(e.response.attestationObject)),clientDataJSON:Ds(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function qO(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Ds(new Uint8Array(s.authenticatorData)),clientDataJSON:Ds(new Uint8Array(s.clientDataJSON)),signature:Ds(new Uint8Array(s.signature)),userHandle:s.userHandle?Ds(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Q1(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function Nv(){var e,t;return!!(nt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function GO(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new mu("Browser returned unexpected credential type",t)}:{data:null,error:new mu("Empty credential response",t)}}
399catch(t){return{data:null,error:$O({error:t,options:e})}}}async function KO(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new mu("Browser returned unexpected credential type",t)}:{data:null,error:new mu("Empty credential response",t)}}catch(t){return{data:null,error:UO({error:t,options:e})}}}const YO={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},QO={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function pu(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))n[o]=i;else if(r(i))n[o]=i;else if(t(i)){const l=n[o];t(l)?n[o]=pu(l,i):n[o]=pu(i)}else n[o]=i}return n}function JO(e,t){return pu(YO,e,t||{})}function XO(e,t){return pu(QO,e,t||{})}class ZO{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},o){var i;try{const{data:l,error:c}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!l)return{data:null,error:c};const u=s??WO.createNewAbortSignal();if(l.webauthn.type==="create"){const{user:d}=l.webauthn.credential_options.publicKey;if(!d.name){const h=n;if(h)d.name=`${d.id}:${h}`;else{const f=(await this.client.getUser()).data.user,w=((i=f==null?void 0:f.user_metadata)===null||i===void 0?void 0:i.name)||(f==null?void 0:f.email)||(f==null?void 0:f.id)||"User";d.name=`${d.id}:${w}`}}d.displayName||(d.displayName=d.name)}switch(l.webauthn.type){case"create":{const d=JO(l.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:h,error:m}=await GO({publicKey:d,signal:u});return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:m}}case"request":{const d=XO(l.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:h,error:m}=await KO(Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:d,signal:u}));return h?{data:{factorId:t,challengeId:l.id,webauthn:{type:l.webauthn.type,credential_response:h}},error:null}:{data:null,error:m}}}}catch(l){return G(l)?{data:null,error:l}:{data:null,error:new Rs("Unexpected error in challenge",l)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new el("rpId is required for WebAuthn authentication")};try{if(!Nv())return{data:null,error:new Rs("Browser does not support WebAuthn",null)};const{data:i,error:l}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!i)return{data:null,error:l};const{webauthn:c}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:c.type,rpId:r,rpOrigins:n,credential_response:c.credential_response}})}catch(i){return G(i)?{data:null,error:i}:{data:null,error:new Rs("Unexpected error in authenticate",i)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new el("rpId is required for WebAuthn registration")};try{if(!Nv())return{data:null,error:new Rs("Browser does not support WebAuthn",null)};const{data:i,error:l}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(d=>{var h;
399return(h=d.data)===null||h===void 0?void 0:h.all.find(m=>m.factor_type==="webauthn"&&m.friendly_name===t&&m.status!=="unverified")}).then(d=>d?this.client.mfa.unenroll({factorId:d==null?void 0:d.id}):void 0),{data:null,error:l};const{data:c,error:u}=await this._challenge({factorId:i.id,friendlyName:i.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:o});return c?this._verify({factorId:i.id,challengeId:c.challengeId,webauthn:{rpId:r,rpOrigins:n,type:c.webauthn.type,credential_response:c.webauthn.credential_response}}):{data:null,error:u}}catch(i){return G(i)?{data:null,error:i}:{data:null,error:new Rs("Unexpected error in register",i)}}}}LO();const eI={url:JR,storageKey:XR,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:ZR,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:1e4,skipAutoInitialize:!1};async function Ev(e,t,r){return await r()}const wo={};class tl{get jwks(){var t,r;return(r=(t=wo[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){wo[this.storageKey]=Object.assign(Object.assign({},wo[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=wo[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){wo[this.storageKey]=Object.assign(Object.assign({},wo[this.storageKey]),{cachedAt:t})}constructor(t){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},eI),t);
399if(this.storageKey=o.storageKey,this.instanceID=(r=tl.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,tl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&nt()){const i=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new OO({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=G1(o.fetch),this.lock=o.lock||Ev,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,this.lockAcquireTimeout=o.lockAcquireTimeout,o.lock?this.lock=o.lock:this.persistSession&&nt()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=IO:this.lock=Ev,this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new ZO(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:q1()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=_v(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=_v(this.memoryStorage)),nt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i);try{await this._notifyAllSubscribers(i.data.event,i.data.session,!1)}catch(l){this._debug("#broadcastChannel","error",l)}})}o.skipAutoInitialize||this.initialize().catch(i=>{this._debug("#initialize()","error",i)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${z1}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(nt()&&(r=fO(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),nt()&&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),sO(o)){const c=(t=o.details)===null||t===void 0?void 0:t.code;if(c==="identity_already_exists"||c==="identity_not_found"||c==="single_identity_not_deletable")return{error:o}}return{error:o}}const{session:i,redirectType:l}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",l),await this._saveSession(i),setTimeout(async()=>{l==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return G(r)?this._returnResult({error:r}):this._returnResult({error:new Rs("Unexpected error during initialization",r)}
399)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const o=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:hr}),{data:i,error:l}=o;if(l||!i)return this._returnResult({data:{user:null,session:null},error:l});const c=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(o){if(G(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,s;try{let o;if("email"in t){const{email:d,password:h,options:m}=t;let f=null,w=null;this.flowType==="pkce"&&([f,w]=await yo(this.storage,this.storageKey)),o=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:m==null?void 0:m.emailRedirectTo,body:{email:d,password:h,data:(r=m==null?void 0:m.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken},code_challenge:f,code_challenge_method:w},xform:hr})}else if("phone"in t){const{phone:d,password:h,options:m}=t;o=await ee(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:h,data:(n=m==null?void 0:m.data)!==null&&n!==void 0?n:{},channel:(s=m==null?void 0:m.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:m==null?void 0:m.captchaToken}},xform:hr})}else throw new ec("You must provide either an email or phone number and a password");const{data:i,error:l}=o;if(l||!i)return await rt(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l});const c=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(o){if(await rt(this.storage,`${this.storageKey}-code-verifier`),G(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:i,options:l}=t;r=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Sv})}else if("phone"in t){const{phone:o,password:i,options:l}=t;r=await ee(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Sv})}else throw new ec("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const o=new go;return this._returnResult({data:{user:null,session:null},error:o})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(G(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,o,i,l,c,u,d,h,m;let f,w;if("message"in t)f=t.message,w=t.signature;else{const{chain:y,wallet:b,statement:v,options:g}=t;let x;if(nt())if(typeof b=="object")x=b;else{const _=window;if("ethereum"in _&&typeof _.ethereum=="object"&&"request"in _.ethereum&&typeof _.ethereum.request=="function")x=_.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof b!="object"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=b}const k=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href),S=await x.request({method:"eth_requestAccounts"}).then(_=>_).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const j=Y1(S[0]);let N=(n=g==null?void 0:g.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!N){const _=await x.request({method:"eth_chainId"});N=DO(_)}const E={domain:k.host,address:j,statement:v,uri:k.href,version:"1",chainId:N,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=g==null?void 0:g.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.expirationTime,notBefore:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.notBefore,requestId:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(d=g==null?void 0:g.signInWithEthereum)===null||d===void 0?void 0:d.resources};f=FO(E),w=await x.request({method:"personal_sign",params:[MO(f),j]})}try{const{data:y,error:b}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:f,signature:w}
399,!((h=t.options)===null||h===void 0)&&h.captchaToken?{gotrue_meta_security:{captcha_token:(m=t.options)===null||m===void 0?void 0:m.captchaToken}}:null),xform:hr});if(b)throw b;if(!y||!y.session||!y.user){const v=new go;return this._returnResult({data:{user:null,session:null},error:v})}return y.session&&(await this._saveSession(y.session),await this._notifyAllSubscribers("SIGNED_IN",y.session)),this._returnResult({data:Object.assign({},y),error:b})}catch(y){if(G(y))return this._returnResult({data:{user:null,session:null},error:y});throw y}}async signInWithSolana(t){var r,n,s,o,i,l,c,u,d,h,m,f;let w,y;if("message"in t)w=t.message,y=t.signature;else{const{chain:b,wallet:v,statement:g,options:x}=t;let k;if(nt())if(typeof v=="object")k=v;else{const j=window;if("solana"in j&&typeof j.solana=="object"&&("signIn"in j.solana&&typeof j.solana.signIn=="function"||"signMessage"in j.solana&&typeof j.solana.signMessage=="function"))k=j.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=v}const S=new URL((r=x==null?void 0:x.url)!==null&&r!==void 0?r:window.location.href);
399if("signIn"in k&&k.signIn){const j=await k.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},x==null?void 0:x.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),g?{statement:g}:null));let N;if(Array.isArray(j)&&j[0]&&typeof j[0]=="object")N=j[0];else if(j&&typeof j=="object"&&"signedMessage"in j&&"signature"in j)N=j;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in N&&"signature"in N&&(typeof N.signedMessage=="string"||N.signedMessage instanceof Uint8Array)&&N.signature instanceof Uint8Array)w=typeof N.signedMessage=="string"?N.signedMessage:new TextDecoder().decode(N.signedMessage),y=N.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in k)||typeof k.signMessage!="function"||!("publicKey"in k)||typeof k!="object"||!k.publicKey||!("toBase58"in k.publicKey)||typeof k.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");w=[`${S.host} wants you to sign in with your Solana account:`,k.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(n=x==null?void 0:x.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=x==null?void 0:x.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${x.signInWithSolana.notBefore}`]:[],...!((i=x==null?void 0:x.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${x.signInWithSolana.expirationTime}`]:[],...!((l=x==null?void 0:x.signInWithSolana)===null||l===void 0)&&l.chainId?[`Chain ID: ${x.signInWithSolana.chainId}`]:[],...!((c=x==null?void 0:x.signInWithSolana)===null||c===void 0)&&c.nonce?[`Nonce: ${x.signInWithSolana.nonce}`]:[],...!((u=x==null?void 0:x.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${x.signInWithSolana.requestId}`]:[],...!((h=(d=x==null?void 0:x.signInWithSolana)===null||d===void 0?void 0:d.resources)===null||h===void 0)&&h.length?["Resources",...x.signInWithSolana.resources.map(N=>`- ${N}`)]:[]].join(` 400`);const j=await k.signMessage(new TextEncoder().encode(w),"utf8");if(!j||!(j instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");y=j}}try{const{data:b,error:v}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:w,signature:Ds(y)},!((m=t.options)===null||m===void 0)&&m.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:hr});if(v)throw v;if(!b||!b.session||!b.user){const g=new go;return this._returnResult({data:{user:null,session:null},error:g})}return b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("SIGNED_IN",b.session)),this._returnResult({data:Object.assign({},b),error:v})}catch(b){if(G(b))return this._returnResult({data:{user:null,session:null},error:b});throw b}}async _exchangeCodeForSession(t){const r=await Ss(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new oO;const{data:o,error:i}=await ee(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:hr});if(await rt(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const l=new go;return this._returnResult({data:{user:null,session:null,redirectType:null},error:l})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(await rt(this.storage,`${this.storageKey}-code-verifier`),G(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:o,nonce:i}=t,l=await ee(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:hr}),{data:c,error:u}=l;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!c||!c.session||!c.user){const d=new go;return this._returnResult({data:{user:null,session:null},error:d})}return c.session&&(await this._saveSession(c.session),await this._notifyAllSubscribers("SIGNED_IN",c.session)),this._returnResult({data:c,error:u})}catch(r){if(G(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,o,i;try{if("email"in t){const{email:l,options:c}=t;let u=null,d=null;this.flowType==="pkce"&&([u,d]=await yo(this.storage,this.storageKey));const{error:h}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(r=c==null?void 0:c.data)!==null&&r!==void 0?r:{},create_user:(n=c==null?void 0:c.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},code_challenge:u,code_challenge_method:d},redirectTo:c==null?void 0:c.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:h})}if("phone"in t){const{phone:l,options:c}=t,{data:u,error:d}=await ee(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(s=c==null?void 0:c.data)!==null&&s!==void 0?s:{},create_user:(o=c==null?void 0:c.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:c==null?void 0:c.captchaToken},channel:(i=c==null?void 0:c.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:d})}
400throw new ec("You must provide either an email or phone number.")}catch(l){if(await rt(this.storage,`${this.storageKey}-code-verifier`),G(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async verifyOtp(t){var r,n;try{let s,o;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:l}=await ee(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:hr});if(l)throw l;if(!i)throw new Error("An error occurred on token verification.");const c=i.session,u=i.user;return c!=null&&c.access_token&&(await this._saveSession(c),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",c)),this._returnResult({data:{user:u,session:c},error:null})}catch(s){if(G(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,o,i;try{let l=null,c=null;this.flowType==="pkce"&&([l,c]=await yo(this.storage,this.storageKey));const u=await ee(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:l,code_challenge_method:c}),headers:this.headers,xform:PO});return!((o=u.data)===null||o===void 0)&&o.url&&nt()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(l){if(await rt(this.storage,`${this.storageKey}-code-verifier`),G(l))return this._returnResult({data:null,error:l});throw l}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new $t;const{error:s}=await ee(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(G(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:o}=t,{error:i}=await ee(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in t){const{phone:n,type:s,options:o}=t,{data:i,error:l}=await ee(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:l})}throw new ec("You must provide either an email or phone number and a type")}catch(r){if(G(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async r=>r))}async _acquireLock(t,r){this._debug("#_acquireLock","begin",t);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}`,t,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(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(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 t=null;const r=await Ss(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
400id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<lh:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await Ss(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=dh()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=CO(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){if(t)return await this._getUser(t);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(t){try{return t?await ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:$n}):await this._useSession(async r=>{var n,s,o;const{data:i,error:l}=r;if(l)throw l;return!(!((n=i.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new $t}:await ee(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:$n})})}catch(r){if(G(r))return ch(r)&&(await this._removeSession(),await rt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new $t;const i=s.session;let l=null,c=null;this.flowType==="pkce"&&t.email!=null&&([l,c]=await yo(this.storage,this.storageKey));const{data:u,error:d}=await ee(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:c}),jwt:i.access_token,xform:$n});if(d)throw d;return i.user=u.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(await rt(this.storage,`${this.storageKey}-code-verifier`),G(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new $t;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=rc(t.access_token);if(i.exp&&(n=i.exp,s=n<=r),s){const{data:l,error:c}=await this._callRefreshToken(t.refresh_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l)return{data:{user:null,session:null},error:null};o=l}else{const{data:l,error:c}=await this._getUser(t.access_token);if(c)return this._returnResult({data:{user:null,session:null},error:c});o={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(G(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:i,error:l}=r;if(l)throw l;t=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new $t;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(G(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!nt())throw new tc("No browser detected.");
400if(t.error||t.error_description||t.error_code)throw new tc(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new gv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new tc("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new gv("No code detected.");const{data:g,error:x}=await this._exchangeCodeForSession(t.code);if(x)throw x;const k=new URL(window.location.href);return k.searchParams.delete("code"),window.history.replaceState(window.history.state,"",k.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:l,expires_at:c,token_type:u}=t;if(!o||!l||!i||!u)throw new tc("No session defined in URL");const d=Math.round(Date.now()/1e3),h=parseInt(l);let m=d+h;c&&(m=parseInt(c));const f=m-d;f*1e3<=Co&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${h}s`);const w=m-h;d-w>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",w,m,d):d-w<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",w,m,d);const{data:y,error:b}=await this._getUser(o);if(b)throw b;const v={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:h,expires_at:m,refresh_token:i,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(n){if(G(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),t):!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Ss(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o&&!ch(o))return this._returnResult({error:o});const i=(n=s.session)===null||n===void 0?void 0:n.access_token;if(i){const{error:l}=await this.admin.signOut(i,t);if(l&&!(nO(l)&&(l.status===404||l.status===401||l.status===403)||ch(l)))return this._returnResult({error:l})}return t!=="others"&&(await this._removeSession(),await rt(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=hO(),n={id:r,callback:t,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),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await yo(this.storage,this.storageKey,!0));try{return await ee(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(await rt(this.storage,`${this.storageKey}-code-verifier`),G(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async o=>{var i,l,c,u,d;const{data:h,error:m}=o;if(m)throw m;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(c=t.options)===null||c===void 0?void 0:c.queryParams,skipBrowserRedirect:!0});return await ee(this.fetch,"GET",f,{headers:this.headers,jwt:(d=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&d!==void 0?d:void 0})});if(s)throw s;return nt()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(G(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:o}}=r;if(s)throw s;const{options:i,provider:l,token:c,access_token:u,nonce:d}=t,h=await ee(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:l,id_token:c,access_token:u,nonce:d,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:hr}),{data:m,error:f}=h;return f?this._returnResult({data:{user:null,session:null},error:f}):!m||!m.session||!m.user?this._returnResult({data:{user:null,session:null},error:new go}):(m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("USER_UPDATED",m.session)),this._returnResult({data:m,error:f}))}catch(s){if(await rt(this.storage,`${this.storageKey}-code-verifier`),G(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)throw i;
400return await ee(this.fetch,"DELETE",`${this.url}/user/identities/${t.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(G(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await gO(async s=>(s>0&&await pO(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await ee(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:hr})),(s,o)=>{const i=200*Math.pow(2,s);return o&&uh(o)&&Date.now()+i-n<Co})}catch(n){if(this._debug(r,"error",n),G(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),nt()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Ss(this.storage,this.storageKey);if(s&&this.userStorage){let i=await Ss(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await No(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:dh()}else if(s&&!s.user&&!s.user){const i=await Ss(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await rt(this.storage,this.storageKey+"-user"),await No(this.storage,this.storageKey,s)):s.user=dh()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<lh;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${lh}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),uh(i)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:l}=await this._getUser(s.access_token);!l&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(n,"error getting user data, skipping SIGNED_IN notification",i)}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(t){var r,n;if(!t)throw new $t;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new ld;const{data:o,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!o.session)throw new $t;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const l={data:o.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(o){if(this._debug(s,"error",o),G(o)){const i={data:null,error:o};return uh(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,r)}catch(c){o.push(c)}});if(await Promise.all(i),o.length>0){for(let l=0;l<o.length;l+=1)console.error(o[l]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await rt(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await No(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=bv(s);await No(this.storage,this.storageKey,o)}else{const s=bv(r);await No(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await rt(this.storage,this.storageKey),await rt(this.storage,this.storageKey+"-code-verifier"),await rt(this.storage,this.storageKey+"-user"),this.userStorage&&await rt(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;
400try{t&&nt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Co);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t);const r=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=r,r&&typeof r=="object"&&typeof r.unref=="function"?r.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(r)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t);const r=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,r&&clearTimeout(r)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async 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-t)/Co);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Co}ms, refresh threshold is ${tm} ticks`),s<=tm&&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(t){if(t.isAcquireTimeout||t instanceof K1)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!nt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(t){this._debug("#visibilityChangedCallback","error",t)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,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(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,i]=await yo(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(l.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?this._returnResult({data:null,error:o}):await ee(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)return this._returnResult({data:null,error:i});const l=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:c,error:u}=await ee(this.fetch,"POST",`${this.url}/factors`,{body:l,headers:this.headers,jwt:(n=o==null?void 0:o.session)===null||n===void 0?void 0:n.access_token});return u?this._returnResult({data:null,error:u}):(t.factorType==="totp"&&c.type==="totp"&&(!((s=c==null?void 0:c.totp)===null||s===void 0)&&s.qr_code)&&(c.totp.qr_code=`data:image/svg+xml;utf-8,${c.totp.qr_code}`),this._returnResult({data:c,error:null}))})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=Object.assign({challenge_id:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?VO(t.webauthn.credential_response):qO(t.webauthn.credential_response)})}:{code:t.code}),{data:l,error:c}=await ee(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:i,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=await ee(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(i.error)return i;const{data:l}=i;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:zO(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:HO(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(t){var r,n,s,o;if(t)try{const{payload:f}=rc(t);let w=null;f.aal&&(w=f.aal);let y=w;const{data:{user:b},error:v}=await this.getUser(t);if(v)return this._returnResult({data:null,error:v});((n=(r=b==null?void 0:b.factors)===null||r===void 0?void 0:r.filter(k=>k.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(y="aal2");const x=f.amr||[];return{data:{currentLevel:w,nextLevel:y,currentAuthenticationMethods:x},error:null}}catch(f){if(G(f))return this._returnResult({data:null,error:f});throw f}const{data:{session:i},error:l}
400=await this.getSession();if(l)return this._returnResult({data:null,error:l});if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:c}=rc(i.access_token);let u=null;c.aal&&(u=c.aal);let d=u;((o=(s=i.user.factors)===null||s===void 0?void 0:s.filter(f=>f.status==="verified"))!==null&&o!==void 0?o:[]).length>0&&(d="aal2");const m=c.amr||[];return{data:{currentLevel:u,nextLevel:d,currentAuthenticationMethods:m},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await ee(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new $t})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new $t});const i=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:l=>({data:l,error:null})});return i.data&&i.data.redirect_url&&nt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(G(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new $t});const i=await ee(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:l=>({data:l,error:null})});return i.data&&i.data.redirect_url&&nt()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(G(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await ee(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new $t})})}catch(t){if(G(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await ee(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new $t})})}catch(r){if(G(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(l=>l.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(l=>l.kid===t),n&&this.jwks_cached_at+tO>s)return n;const{data:o,error:i}=await ee(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,n=o.keys.find(l=>l.kid===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:f,error:w}
400=await this.getSession();if(w||!f.session)return this._returnResult({data:null,error:w});n=f.session.access_token}const{header:s,payload:o,signature:i,raw:{header:l,payload:c}}=rc(n);r!=null&&r.allowExpired||SO(o.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:f}=await this.getUser(n);if(f)throw f;return{data:{claims:o,header:s,signature:i},error:null}}const d=jO(s.alg),h=await crypto.subtle.importKey("jwk",u,d,!0,["verify"]);if(!await crypto.subtle.verify(d,h,i,uO(`${l}.${c}`)))throw new sm("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if(G(n))return this._returnResult({data:null,error:n});throw n}}}tl.nextInstanceID={};const tI=tl,rI="2.97.0";let di="";typeof Deno<"u"?di="deno":typeof document<"u"?di="web":typeof navigator<"u"&&navigator.product==="ReactNative"?di="react-native":di="node";const nI={"X-Client-Info":`supabase-js-${di}/${rI}`},sI={headers:nI},oI={schema:"public"},aI={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},iI={};function rl(e){"@babel/helpers - typeof";return rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rl(e)}function lI(e,t){if(rl(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(rl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cI(e){var t=lI(e,"string");return rl(t)=="symbol"?t:t+""}function uI(e,t,r){return(t=cI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tv(Object(r),!0).forEach(function(n){uI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}const dI=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),hI=()=>Headers,fI=(e,t,r)=>{const n=dI(r),s=hI();return async(o,i)=>{var l;const c=(l=await t())!==null&&l!==void 0?l:e;let u=new s(i==null?void 0:i.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${c}`),n(o,Me(Me({},i),{},{headers:u}))}};function mI(e){return e.endsWith("/")?e:e+"/"}function pI(e,t){var r,n;const{db:s,auth:o,realtime:i,global:l}=e,{db:c,auth:u,realtime:d,global:h}=t,m={db:Me(Me({},c),s),auth:Me(Me({},u),o),realtime:Me(Me({},d),i),storage:{},global:Me(Me(Me({},h),l),{},{headers:Me(Me({},(r=h==null?void 0:h.headers)!==null&&r!==void 0?r:{}),(n=l==null?void 0:l.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?m.accessToken=e.accessToken:delete m.accessToken,m}function gI(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(mI(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var yI=class extends tI{constructor(e){super(e)}},vI=class{constructor(e,t,r){var n,s;this.supabaseUrl=e,this.supabaseKey=t;const o=gI(e);if(!t)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",o),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",o),this.storageUrl=new URL("storage/v1",o),this.functionsUrl=new URL("functions/v1",o);const i=`sb-${o.hostname.split(".")[0]}-auth-token`,l={db:oI,realtime:iI,auth:Me(Me({},aI),{},{storageKey:i}),global:sI},c=pI(r??{},l);if(this.storageKey=(n=c.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},c.accessToken)this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}});else{var u;this.auth=this._initSupabaseAuthClient((u=c.auth)!==null&&u!==void 0?u:{},this.headers,c.global.fetch)}this.fetch=fI(t,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Me({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new nR(new URL("rest/v1",o).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch,timeout:c.db.timeout,urlLengthLimit:c.db.urlLengthLimit}),this.storage=new QR(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new YA(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,t={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,t,r)}
400channel(e,t={config:{}}){return this.realtime.channel(e,t)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e=this,t,r;if(e.accessToken)return await e.accessToken();const{data:n}=await e.auth.getSession();return(t=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&t!==void 0?t:e.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:o,flowType:i,lock:l,debug:c,throwOnError:u},d,h){const m={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new yI({url:this.authUrl.href,headers:Me(Me({},m),d),storageKey:o,autoRefreshToken:e,persistSession:t,detectSessionInUrl:r,storage:n,userStorage:s,flowType:i,lock:l,debug:c,throwOnError:u,fetch:h,hasCustomAuthorizationHeader:Object.keys(this.headers).some(f=>f.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new wR(this.realtimeUrl.href,Me(Me({},e),{},{params:Me(Me({},{apikey:this.supabaseKey}),e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((e,t)=>{this._handleTokenChanged(e,"CLIENT",t==null?void 0:t.access_token)})}_handleTokenChanged(e,t,r){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),t=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const xI=(e,t,r)=>new vI(e,t,r);function wI(){if(typeof window<"u")return!1;const e=globalThis.process;if(!e)return!1;const t=e.version;if(t==null)return!1;const r=t.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}wI()&&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 Node.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const bI="https://nayyorvacnxaafwmpkrr.supabase.co",kI="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5heXlvcnZhY254YWFmd21wa3JyIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzg3NjY3NjgsImV4cCI6MjA5NDM0Mjc2OH0.E97Efx2ujSTvcYwAgfFrWBUlIp9zPoOaZ6u-xXHgX74",W=xI(bI,kI,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),J1=p.createContext({session:null,user:null,loading:!0,signOut:async()=>{}}),SI=({children:e})=>{const[t,r]=p.useState(null),[n,s]=p.useState(null),[o,i]=p.useState(!0);p.useEffect(()=>{const{data:{subscription:c}}=W.auth.onAuthStateChange((u,d)=>{r(d),s((d==null?void 0:d.user)??null),i(!1)});return W.auth.getSession().then(({data:{session:u}})=>{r(u),s((u==null?void 0:u.user)??null),i(!1)}),()=>c.unsubscribe()},[]);const l=async()=>{await W.auth.signOut()};return a.jsx(J1.Provider,{value:{session:t,user:n,loading:o,signOut:l},children:e})},Ct=()=>p.useContext(J1),Hr="/assets/logo-DhzlGits.png",Ua=()=>{const[e,t]=p.useState(!1),r=[{label:"Free AI Tools",action:()=>{},link:"/tools"},{label:"Blog",action:()=>{},link:"/blog"},{label:"Docs",action:()=>{},link:"/docs"}];return a.jsxs("header",{className:"flex justify-between items-center py-4 px-6 max-w-5xl mx-auto relative",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{src:Hr,alt:"EnrichAI logo",className:"w-9 h-9"}),a.jsx("span",{className:"font-display font-bold text-xl text-foreground",children:"EnrichAI"})]}),a.jsxs("nav",{className:"hidden md:flex items-center gap-6",children:[r.map(n=>n.link?a.jsx(re,{to:n.link,className:"text-sm font-body text-muted-foreground hover:text-foreground transition-colors",children:n.label},n.label):a.jsx("button",{onClick:n.action,className:"text-sm font-body text-muted-foreground hover:text-foreground transition-colors",children:n.label},n.label)),a.jsx(re,{to:"/auth?mode=login",className:"text-sm font-body text-muted-foreground hover:text-foreground transition-colors",children:"Login"}),a.jsx(re,{to:"/auth?mode=signup",className:"px-5 py-2.5 bg-primary text-primary-foreground rounded-lg font-display font-semibold text-sm hover:opacity-90 transition",children:"Get Started Free"})]}),a.jsx("button",{onClick:()=>t(!0),"aria-label":"Open mobile menu",className:"p-2 rounded-full hover:bg-muted transition-colors md:hidden",children:a.jsx("svg",{className:"w-6 h-6 text-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 12h16M4 18h16"})})}),e&&a.jsxs("div",{className:"fixed inset-0 z-50 md:hidden",children:[a.jsx("div",{className:"absolute inset-0 bg-black/40",onClick:()=>t(!1)}),a.jsxs("div",{className:"absolute top-0 right-0 w-full h-auto max-h-[85vh] bg-background border-b border-border shadow-2xl flex flex-col animate-in slide-in-from-top duration-300",children:[a.jsxs("div",{className:"flex items-center justify-between p-5 border-b border-border",children:[a.jsxs("div",{className:"flex items-center space-x-2",children:[a.jsx("img",{src:Hr,alt:"EnrichAI",className:"w-8 h-8"}),a.jsx("span",{className:"font-display font-bold text-lg text-foreground",children:"EnrichAI"})]}),a.jsx("button",{onClick:()=>t(!1),"aria-label":"Close mobile menu",className:"p-2 hover:bg-muted rounded-full transition-colors",children:a.jsx(Xu,{className:"w-6 h-6 text-foreground"})})]}),a.jsxs("nav",{className:"flex-1 flex flex-col px-5 py-4 space-y-1 overflow-y-auto",children:[r.map(n=>n.link?a.jsx(re,{to:n.link,onClick:()=>t(!1),className:"px-4 py-3 font-display font-semibold text-base text-foreground hover:bg-muted rounded-xl transition",children:n.label},n.label):a.jsx("button",{onClick:n.action,className:"w-full text-left px-4 py-3 font-display font-semibold text-base text-foreground hover:bg-muted rounded-xl transition",children:n.label},n.label)),a.jsx("div",{className:"border-t border-border my-2"}),a.jsx(re,{to:"/auth?mode=login",onClick:()=>t(!1),className:"px-4 py-3 font-display font-semibold text-base text-foreground hover:bg-muted rounded-xl transition",children:"Login"}),a.jsx(re,{to:"/auth?mode=signup",onClick:()=>t(!1),className:"px-4 py-3 bg-primary text-primary-foreground rounded-xl text-center font-display font-bold text-base transition hover:opacity-90",children:"Get Started Free"})]})]})]})]})},X1="/assets/instantly-logo-full-CzocWjhe.png",jI=()=>a.jsxs("section",{className:"relative w-full px-6 pt-14 sm:pt-20 pb-24 text-center overflow-hidden",children:[a.jsx("div",{className:"absolute top-10 right-[5%] w-32 h-32 bg-secondary/80 rounded-blob opacity-80 blur-xl animate-float pointer-events-none"}),a.jsx("div",{className:"absolute top-1/3 left-[5%] w-40 h-40 bg-accent/70 rounded-blob opacity-60 blur-2xl animate-wiggle pointer-events-none",style:{animationDelay:"1s"}}),a.jsx("div",{className:"absolute bottom-10 right-[10%] w-36 h-36 bg-highlight/60 rounded-blob opacity-70 blur-xl animate-float pointer-events-none",style:{animationDelay:"2s"}}),a.jsxs("div",{className:"relative z-10 space-y-5 max-w-3xl mx-auto",children:[a.jsxs("h1",{className:"font-display text-4xl sm:text-5xl md:text-[3.5rem] font-bold text-foreground leading-[1.15] tracking-tight",children:["Personalised Cold Outreach That"," ",a.jsxs("span",{className:"relative inline-block",children:["Gets Replies",a.jsx("svg",{className:"absolute w-full h-3 -bottom-1 left-0 opacity-60",preserveAspectRatio:"none",viewBox:"0 0 100 10",children:a.jsx("path",{d:"M0 5 Q 50 10 100 5",fill:"none",stroke:"hsl(var(--highlight))",strokeWidth:"3"})})]})]}),a.jsx("p",{className:"text-base sm:text-lg text-muted-foreground max-w-xl mx-auto leading-relaxed",children:"Upload your leads. EnrichAI researches every prospect and writes a personalised opener for each one â for email, LinkedIn, or any channel."}),a.jsx("div",{className:"flex flex-col sm:flex-row gap-3 justify-center pt-3",children:a.jsxs(re,{to:"/auth?mode=signup",className:"px-8 py-3.5 bg-primary text-primary-foreground rounded-xl font-display font-bold text-base shadow-lg hover:-translate-y-0.5 active:scale-[0.98] transition-all flex items-center justify-center gap-2 group",children:["Get Started Free",a.jsx("svg",{className:"w-4 h-4 group-hover:translate-x-1 transition-transform",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]})}),a.jsxs("div",{className:"mt-10 flex flex-col items-center gap-4",children:[a.jsxs("div",{className:"flex items-center justify-center gap-2 text-sm text-muted-foreground",children:[a.jsxs("span",{className:"relative flex h-2 w-2",children:[a.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-highlight opacity-75"}),a.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-highlight"})]}),a.jsxs("span",{children:[a.jsx("strong",{className:"text-foreground font-semibold",children:"30 free credits"})," · No card required"]})]}),a.jsx("div",{className:"h-px w-16 bg-border"}),a.jsxs("div",{className:"flex flex-col items-center gap-2",children:[a.jsx("img",{src:X1,alt:"Instantly AI",className:"h-8"}),a.jsx("p",{className:"text-muted-foreground text-sm font-medium",children:"One-click Instantly AI integration"})]})]})]})]}),_I=()=>{const e=[{icon:a.jsx("svg",{className:"w-7 h-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"})}),title:a.jsxs(a.Fragment,{children:["Generic Emails = ",a.jsx("span",{className:"scribble-underline text-accent",children:"Ignored"})]}),desc:"Generic templates get ignored. Prospects can spot a copy-paste email instantly.",color:"bg-
400accent/12 text-accent",borderColor:"border-accent/25"},{icon:a.jsx("svg",{className:"w-7 h-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"})}),title:a.jsxs(a.Fragment,{children:["Manual Research ",a.jsx("span",{className:"scribble-underline text-secondary",children:"Doesn't Scale"})]}),desc:a.jsxs(a.Fragment,{children:["Spending 10 min per lead? That's ",a.jsx("span",{className:"font-bold text-foreground",children:"160+ hours"})," for just 1,000 leads."]}),color:"bg-secondary/12 text-secondary-foreground",borderColor:"border-secondary/30"},{icon:a.jsx("svg",{className:"w-7 h-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z"})}),title:a.jsxs(a.Fragment,{children:["Other Tools Are ",a.jsx("span",{className:"scribble-underline text-highlight",children:"Expensive"})]}),desc:a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"font-bold text-foreground",children:"$0.40/lead"})," means 50k leads costs ",a.jsx("span",{className:"font-bold text-foreground",children:"$20,000"}),"."]}),color:"bg-highlight/12 text-highlight-foreground",borderColor:"border-highlight/25"},{icon:a.jsx("svg",{className:"w-7 h-7",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 2.25 0 00-2.25 2.25v.894m7.5 0a48.667 48.667 0 00-7.5 0"})}),title:a.jsxs(a.Fragment,{children:["Hiring an Agency is ",a.jsx("span",{className:"scribble-underline text-accent",children:"Costly"})]}),desc:a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"font-bold text-foreground",children:"$5k â $10k/month"}),". Expensive retainers, slow turnaround."]}),color:"bg-accent/12 text-accent",borderColor:"border-accent/25"}];return a.jsxs("section",{className:"px-6 py-24 max-w-4xl mx-auto",children:[a.jsxs("div",{className:"text-center mb-14",children:[a.jsxs("div",{className:"relative inline-block",children:[a.jsxs("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-foreground mb-3 relative z-10",children:["Cold Outreach is ",a.jsx("span",{className:"text-destructive",children:"Brokenâ"})]}),a.jsx("svg",{className:"absolute inset-0 w-full h-full -m-3 z-0 pointer-events-none",viewBox:"0 0 300 60",preserveAspectRatio:"none",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:a.jsx("ellipse",{cx:"150",cy:"30",rx:"145",ry:"26",stroke:"hsl(var(--highlight))",strokeWidth:"2.5",opacity:"0.6",transform:"rotate(-1.5 150 30)",strokeDasharray:"none"})})]}),a.jsx("p",{className:"text-muted-foreground text-sm mt-4 max-w-md mx-auto",children:"Four reasons your replies stay flat â and what it's costing you."})]}),a.jsx("div",{className:"grid sm:grid-cols-2 gap-5 sm:gap-6",children:e.map((t,r)=>{const n=r%2!==0;return a.jsxs("div",{className:`group bg-card border border-border rounded-2xl overflow-hidden hover:shadow-lg hover:border-border/80 transition-all duration-300 flex ${n?"flex-row-reverse":"flex-row"} items-stretch`,children:[a.jsx("div",{className:`flex items-center justify-center px-6 py-7 shrink-0 ${t.color} transition-colors`,children:a.jsx("div",{className:"w-13 h-13 rounded-2xl bg-background/70 backdrop-blur-sm flex items-center justify-center shadow-sm group-hover:scale-105 transition-transform duration-300",children:t.icon})}),a.jsx("div",{className:`w-px shrink-0 ${t.borderColor} bg-current opacity-20`}),a.jsxs("div",{className:"flex-1 px-5 py-5 flex flex-col justify-center gap-1.5",children:[a.jsx("h3",{className:"font-display font-bold text-[0.95rem] text-foreground leading-tight",children:t.title}),a.jsx("p",{className:"text-[0.8rem] text-muted-foreground leading-relaxed",children:t.desc})]})]},r)})})]})},CI=()=>a.jsxs("section",{className:"px-6 py-20 max-w-4xl mx-auto text-center",children:[a.jsxs("div",{className:"mb-10",children:[a.jsxs("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-foreground mb-3",children:["Meet ",a.jsx("span",{className:"text-highlight",children:"EnrichAI"})]}),a.jsx("div",{className:"w-24 h-1.5 bg-highlight mx-auto rounded-full mb-6"}),a.jsxs("p",{className:"text-muted-foreground max-w-xl mx-auto leading-relaxed",children:["The fastest way to turn a cold list into warm conversations. Lift reply rates by ",a.jsx("span",{className:"font-bold text-highlight",children:"20â30%"})," without writing a single opener yourself."]}
400)]}),a.jsx("div",{className:"grid sm:grid-cols-3 gap-5 max-w-3xl mx-auto",children:[{title:"Hours back",desc:"Skip manual research. Enrich thousands of leads in minutes.",accent:"bg-secondary/15 text-secondary-foreground border-secondary/40"},{title:"Higher replies",desc:"Every opener references something real about the prospect.",accent:"bg-accent/15 text-accent border-accent/40"},{title:"Zero friction",desc:"CSV in, CSV out. Plugs into Instantly or any outreach tool.",accent:"bg-highlight/15 text-highlight-foreground border-highlight/40"}].map((e,t)=>a.jsxs("div",{className:`bg-card border ${e.accent} rounded-2xl p-6 text-left transition-all hover:shadow-md`,children:[a.jsx("h3",{className:"font-display font-bold text-foreground text-base mb-1.5",children:e.title}),a.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.desc})]},t))})]}),NI=[{num:"01",title:"Upload your leads",desc:"Drop in a CSV with names and websites.",color:"bg-highlight",rotate:"rotate-3"},{num:"02",title:"AI researches each prospect",desc:"EnrichAI reads their website and pulls what matters.",color:"bg-secondary",rotate:"-rotate-6"},{num:"03",title:"Generate personalised openers",desc:"Set your tone and angle â get a unique opener per lead.",color:"bg-accent",rotate:"rotate-6"},{num:"04",title:"Export and send",desc:"Download the CSV or push straight into Instantly.",color:"bg-highlight",rotate:"-rotate-3"}],EI=()=>a.jsxs("section",{id:"how-it-works",className:"px-6 py-20 max-w-4xl mx-auto",children:[a.jsxs("div",{className:"text-center mb-14",children:[a.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-foreground mb-3",children:"How It Works"}),a.jsx("div",{className:"w-24 h-1.5 bg-secondary mx-auto rounded-full"})]}),a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-8",children:NI.map((e,t)=>a.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[a.jsx("div",{className:`w-20 h-20 ${e.color} rounded-blob ${e.rotate} flex items-center justify-center shadow-sm`,children:a.jsx("span",{className:"font-display font-bold text-2xl text-foreground",children:e.num})}),a.jsx("h3",{className:"font-display font-bold text-lg text-foreground",children:e.title}),a.jsx("p",{className:"text-sm text-muted-foreground max-w-[240px] leading-relaxed",children:e.desc})]},t))})]}),an="/assets/instantly-icon-DjEA0Im2.png",TI=[{title:"Personalised openers at scale",desc:"A unique first line for every lead â no templates, no copy-paste.",iconColor:"bg-highlight/20",glowClass:"shadow-[0_0_40px_hsl(var(--highlight)/0.55),0_0_80px_hsl(var(--highlight)/0.25)] border-highlight/60 ring-1 ring-highlight/30",icon:a.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09z"})})},{title:"AI research per lead",desc:"EnrichAI reads each prospect's website to find real, relevant signals.",iconColor:"bg-secondary/20",icon:a.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 14.15v4.25c0 1.094-.787 2.036-1.872 2.18-2.087.277-4.216.42-6.378.42s-4.291-.143-6.378-.42c-1.085-.144-1.872-1.086-1.872-2.18v-4.25m16.5 0a2.18 2.18 0 00.75-1.661V8.706c0-1.081-.768-2.015-1.837-2.175a48.114 48.114 0 00-3.413-.387m4.5 8.006c-.194.165-.42.295-.673.38A23.978 23.978 0 0112 15.75c-2.648 0-5.195-.429-7.577-1.22a2.016 2.016 0 01-.673-.38m0 0A2.18 2.18 0 013 12.489V8.706c0-1.081.768-2.015 1.837-2.175a48.111 48.111 0 013.413-.387m7.5 0V5.25A2.25 2.25 0 0013.5 3h-3a2.25 2.25 0 00-2.25 2.25v.894m7.5 0a48.667 48.667 0 00-7.5 0"})})},{title:"Custom tone control",desc:"Set the angle, length, and voice â for email, LinkedIn, or any channel.",iconColor:"bg-accent/20",icon:a.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10"})})}
400,{title:"CSV in, CSV out",desc:"Upload a list, get it back enriched. Works with the tools you already use.",iconColor:"bg-highlight/20",icon:a.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 9.776c.112-.017.227-.026.344-.026h15.812c.117 0 .232.009.344.026m-16.5 0a2.25 2.25 0 00-1.883 2.542l.857 6a2.25 2.25 0 002.227 1.932H19.05a2.25 2.25 0 002.227-1.932l.857-6a2.25 2.25 0 00-1.883-2.542m-16.5 0V6A2.25 2.25 0 016 3.75h3.879a1.5 1.5 0 011.06.44l2.122 2.12a1.5 1.5 0 001.06.44H18A2.25 2.25 0 0120.25 9v.776"})})},{title:"One-click Instantly sync",desc:"Push enriched leads straight into your Instantly campaigns â no exports.",iconColor:"bg-[#4B83F0]/15",isInstantly:!0,icon:null},{title:"Private and secure",desc:"Your data is yours. Bank-level encryption and delete-on-request, always.",iconColor:"bg-accent/20",icon:a.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1.5",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z"})})}],PI=()=>a.jsxs("section",{id:"features",className:"px-6 py-20 max-w-4xl mx-auto",children:[a.jsxs("div",{className:"text-center mb-12",children:[a.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-foreground mb-3",children:"Everything you need to personalise at scale"}),a.jsx("div",{className:"w-24 h-1.5 bg-highlight mx-auto rounded-full"})]}),a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-6",children:TI.map((e,t)=>a.jsxs("div",{className:`bg-card border border-border rounded-2xl p-6 space-y-3 hover:shadow-md transition-shadow ${e.glowClass||""}`,children:[a.jsx("div",{className:`w-11 h-11 rounded-blob flex items-center justify-center ${e.iconColor}`,children:e.isInstantly?a.jsx("img",{src:an,alt:"Instantly AI",className:"w-6 h-6"}):e.icon}),a.jsx("h3",{className:"font-display font-bold text-lg text-foreground",children:e.title}),a.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.desc})]},t))})]}),AI=[{name:"Basic",price:"$5.99",period:"/month",credits:"5,000 credits",creditsNote:"Credits roll over each month",maxUpload:"5,000 per upload",highlight:!1,badge:null},{name:"Lifetime Deal",price:"$599",period:"one-time",credits:"1,000,000 credits / month",creditsNote:"Auto-refills every month â forever",maxUpload:"50,000 per upload",highlight:!0,badge:"Limited Offer"},{name:"Premium",price:"$69.99",period:"/year",credits:"10,000 credits / month",creditsNote:"Credits roll over each month",maxUpload:"5,000 per upload",highlight:!1,badge:null}],RI=["AI-powered prospect research","Personalised cold email openers","CSV upload & download","Website context analysis","Only enriched leads count as credits","Credit packs from $10 (10,000 credits)"],OI=()=>a.jsxs("section",{id:"pricing",className:"px-6 py-20 max-w-5xl mx-auto",children:[a.jsxs("div",{className:"text-center mb-10",children:[a.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-foreground mb-3",children:"Simple Pricing"}),a.jsx("div",{className:"w-24 h-1.5 bg-secondary mx-auto rounded-full mb-4"}),a.jsx("p",{className:"text-muted-foreground",children:"Start with 30 free credits. No card required."})]}),a.jsx("div",{className:"grid sm:grid-cols-3 gap-6 mb-10",children:AI.map((e,t)=>a.jsxs("div",{className:`relative bg-card border rounded-2xl p-6 flex flex-col items-center text-center space-y-4 transition-shadow hover:shadow-lg ${e.highlight?"border-highlight shadow-md ring-2 ring-highlight/30":"border-border"}`,children:[e.badge&&a.jsx("span",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-highlight text-highlight-foreground text-[10px] font-bold uppercase tracking-wider px-3 py-1 rounded-full whitespace-nowrap",children:e.badge}),a.jsx("h3",{className:"font-display font-bold text-xl text-foreground pt-2",children:e.name}),a.jsxs("div",{children:[a.jsx("span",{className:"font-display text-4xl font-bold text-foreground",children:e.price}),a.jsx("span",{className:"text-muted-foreground text-sm ml-1",children:e.period})]}),a.jsxs("p",{className:"text-base font-bold text-foreground underline underline-offset-4 decoration-highlight",children:["Free 10M+ Verified Leads"," ",a.jsx(re,{to:"/terms#free-leads",className:"text-xs font-normal text-muted-foreground hover:text-foreground no-underline ml-1",children:"Read More"})]}),a.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[a.jsx("p",{children:e.credits}),e.creditsNote&&a.jsx("p",{className:"text-xs text-highlight font-medium",children:e.creditsNote}),a.jsxs("p",{children:["Max upload: ",e.maxUpload]})]}),a.jsxs("ul",{className:"text-sm text-muted-foreground space-y-2 w-full text-left",children:[RI.map((r,n)=>a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx("svg",{className:"w-4 h-4 text-highlight flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),r]},n)),a.jsxs("li",{className:"flex items-center gap-2",children:[a.jsx("img",{src:an,alt:"Instantly AI",className:"w-4 h-4 flex-shrink-0"}),a.jsx("span",{className:"text-foreground font-medium",children:"Instantly AI Integration"})]})]}),a.jsx(re,{to:"/auth?mode=signup",className:`w-full py-3 rounded-xl font-display font-bold text-sm transition active:scale-95 block text-center ${e.highlight?"bg-primary text-primary-foreground hover:opacity-90":"bg-muted text-foreground hover:bg-muted/80"}`,children:"Get Started Free"})]},t))}),a.jsx("div",{className:"text-center",children:a.jsxs("p",{className:"text-muted-foreground",children:["Need more volume?"," ",a.jsx("a",{href:"mailto:[email protected]",className:"text-foreground font-semibold underline underline-offset-4 hover:text-accent transition-colors",children:"Contact us for a custom plan"})]})})]}),II="/assets/icon-x-CGRS0hX5.png",Ba=()=>a.jsxs("footer",{className:"px-6 py-10 max-w-4xl mx-auto text-center space-y-4",children:[a.jsx("div",{className:"w-12 h-1 bg-border rounded-full mx-auto mb-4"}),a.jsxs("div",{className:"flex flex-wrap justify-center gap-x-6 gap-y-3 text-sm text-muted-foreground",children:[a.jsx(re,{to:"/terms",className:"hover:text-foreground transition-colors",children:"Terms"}),a.jsx(re,{to:"/privacy",className:"hover:text-foreground transition-colors",children:"Privacy Policy"}),a.jsx(re,{to:"/refund",className:"hover:text-foreground transition-colors",children:"Refund Policy"}),a.jsx(re,{to:"/docs",className:"hover:text-foreground transition-colors",children:"Docs"})]}),a.jsxs("div",{className:"flex flex-wrap justify-center items-center gap-x-6 gap-y-3 text-sm",children:[a.jsxs("a",{href:"https://x.com/tryenrichai",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 font-semibold text-foreground hover:opacity-80 transition",children:[a.jsx("img",{src:II,alt:"X social media logo",className:"w-5 h-5 rounded"}),"X (Twitter)"]}),a.jsxs("a",{href:"https://www.linkedin.com/company/tryenrichai/",target:"_blank",rel:"noopener noreferrer","aria-label":"EnrichAI on LinkedIn",className:"flex items-center gap-1.5 font-semibold text-foreground hover:opacity-80 transition",children:[a.jsx("span",{className:"w-5 h-5 rounded bg-foreground flex items-center justify-center",children:a.jsx(rE,{className:"w-3 h-3 text-background",fill:"currentColor",strokeWidth:0})}),"LinkedIn"]})]}),a.jsx("a",{href:"https://buysellstartups.com/startup-index/www.enrichai.online",target:"_blank",rel:"noopener noreferrer",className:"inline-block mx-auto",children:a.jsx("img",{src:"https://buysellstartups.com/api/index-badge/www.enrichai.online?style=light&name=EnrichAI%20",alt:"Featured on Startup Index by Buy Sell Startups",width:"300",height:"68",className:"mx-auto"})}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"© 2026 EnrichAI. All rights reserved."})]}),LI="https://www.enrichai.online",Pv="www.enrichai.online",it=({title:e,description:t,canonical:r,noindex:n=!1})=>{const s=r.startsWith("http")?r:`${LI}${r.startsWith("/")?r:`/${r}`}`,i=(typeof window<"u"?window.location.hostname:Pv)===Pv,l=n||!i;return a.jsxs(YC,{children:[a.jsx("title",{children:e}),a.jsx("meta",{name:"description",content:t}),a.jsx("link",{rel:"canonical",href:s}),a.jsx("meta",{name:"robots",content:l?"noindex, nofollow":"index, follow, max-image-preview:large, max-snippet:-1"}),a.jsx("meta",{property:"og:title",content:e}),a.jsx("meta",{property:"og:description",content:t}),a.jsx("meta",{property:"og:url",content:s}),a.jsx("meta",{name:"twitter:title",content:e}),a.jsx("meta",{name:"twitter:description",content:t})]})},Ys="https://www.enrichai.online",gu="EnrichAI",Z1="https://storage.googleapis.com/gpt-engineer-file-uploads/jkgauSoza2NLt2Wrj1qzoMcMkip2/social-images/social-1772873518423-20260307_095139.webp",Zr=(e,t,r,n)=>{let s=document.head.querySelector(e);s||(s=document.createElement("meta"),s.setAttribute(t,r),document.head.appendChild(s)),s.setAttribute("content",n)},Av="seo-jsonld",Sn=({title:e,description:t,path:r="/",image:n=Z1,noindex:s=!1,type:o="website",jsonLd:i,keywords:l})=>{p.useEffect(()=>{const c=`${Ys}${r==="/"?"":r}`;l&&l.length&&Zr('meta[name="keywords"]',"name","keywords",l.join(", ")),Zr('meta[name="robots"]',"name","robots",s?"noindex, nofollow":"index, follow, max-image-preview:large, max-snippet:-1"),Zr('meta[property="og:url"]',"property","og:url",c),Zr('meta[property="og:type"]',"property","og:type",o),Zr('meta[property="og:image"]',"property","og:image",n),Zr('meta[property="og:site_name"]',"property","og:site_name",gu),Zr('meta[name="twitter:card"]',"name","twitter:card","summary_large_image"),Zr('meta[name="twitter:image"]',"name","twitter:image",n),Zr('meta[name="twitter:site"]',"name","twitter:site","@tryenrichai");const u=document.getElementById(Av);if(u&&u.remove(),i){const d=document.createElement("script");
400d.type="application/ld+json",d.id=Av,d.text=JSON.stringify(i),document.head.appendChild(d)}},[e,t,r,n,s,o,JSON.stringify(i),JSON.stringify(l)])},DI=()=>({"@context":"https://schema.org","@type":"Organization",name:gu,url:Ys,logo:`${Ys}/favicon.png`,sameAs:["https://x.com/tryenrichai","https://www.linkedin.com/company/tryenrichai/"]}),MI=()=>({"@context":"https://schema.org","@type":"SoftwareApplication",name:"EnrichAI",applicationCategory:"BusinessApplication",operatingSystem:"Web",description:"AI-powered prospect research and personalised cold outreach. Upload your list â get unique openers that prove you actually looked. Works for email, LinkedIn DMs, and any outbound channel.",offers:{"@type":"Offer",price:"5.99",priceCurrency:"USD"},aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",reviewCount:"127"}}),cd=e=>({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map((t,r)=>({"@type":"ListItem",position:r+1,name:t.name,item:`${Ys}${t.path}`}))}),Dp=e=>({"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(t=>({"@type":"Question",name:t.q,acceptedAnswer:{"@type":"Answer",text:t.a}}))}),FI=e=>({"@context":"https://schema.org","@type":"BlogPosting",headline:e.title,description:e.description,image:e.image||Z1,datePublished:e.date,dateModified:e.date,author:{"@type":"Organization",name:gu,url:Ys},publisher:{"@type":"Organization",name:gu,logo:{"@type":"ImageObject",url:`${Ys}/favicon.png`}},mainEntityOfPage:{"@type":"WebPage","@id":`${Ys}/blog/${e.slug}`}}),nc=({children:e})=>{const t=p.useRef(null);return p.useEffect(()=>{const r=t.current;if(!r)return;const n=new IntersectionObserver(([s])=>{s.isIntersecting&&(r.classList.add("opacity-100","translate-y-0"),r.classList.remove("opacity-0","translate-y-6"),n.unobserve(r))},{threshold:.15});return n.observe(r),()=>n.disconnect()},[]),a.jsx("div",{ref:t,className:"opacity-0 translate-y-6 transition-all duration-700 ease-out",children:e})},$I=()=>(Sn({title:"EnrichAI â Personalised Cold Outreach That Gets Replies",description:"Upload your leads. EnrichAI researches every prospect and writes a personalised opener for email, LinkedIn, and any outbound channel. 30 free credits, no card required.",path:"/",keywords:["cold outreach","ai prospect research","lead enrichment","personalised outreach","cold email tool","linkedin outreach","b2b sales tool"],jsonLd:[DI(),MI(),Dp([{q:"Is EnrichAI free to try?",a:"Yes. Every new account gets 30 free credits â no card required."},{q:"How does AI personalisation work?",a:"You upload a CSV of leads. EnrichAI reads each prospect's website and writes a unique, personalised cold email opener for each one."},{q:"Do you integrate with Instantly AI?",a:"Yes â push enriched leads straight into your Instantly campaigns."},{q:"What does pricing look like?",a:"Basic is $5.99/month for 5,000 credits (roll over). Premium is $69.99/year for 10,000 credits per month (roll over). Lifetime is $599 one-time and auto-refills 1,000,000 credits every month forever â a limited offer."},{q:"Do unused credits expire?",a:"No â credits roll over each month on Basic and Premium, and Lifetime auto-refills 1,000,000 credits every month with no extra payment."}])]}),a.jsxs("div",{className:"min-h-screen bg-background relative overflow-x-hidden",children:[a.jsx(it,{title:"EnrichAI â AI Cold Email Personalisation That Gets Replies",description:"Upload your leads. EnrichAI researches each prospect and writes personalised cold email openers. 30 free credits, no card required.",canonical:"/"}),a.jsx("div",{className:"sticky top-0 z-50 bg-background/80 backdrop-blur-xl border-b border-border/40 shadow-sm transition-all duration-300",children:a.jsx(Ua,{})}),a.jsx(jI,{}),a.jsx(nc,{children:a.jsx(_I,{})}),a.jsx(nc,{children:a.jsx(CI,{})}),a.jsx(EI,{}),a.jsx(nc,{children:a.jsx(PI,{})}),a.jsx(nc,{children:a.jsx(OI,{})}),a.jsx(Ba,{})]})),Mp=up("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),oe=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?rN:"button";return a.jsx(i,{className:ue(Mp({variant:t,size:r,className:e})),ref:o,...s})});oe.displayName="Button";const be=p.forwardRef(({className:e,type:t,...r},n)=>
vendor: 5,083 bytes, line 400
400a.jsx("input",{type:t,className:ue("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));be.displayName="Input";var UI="Label",ek=p.forwardRef((e,t)=>a.jsx(ke.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));ek.displayName=UI;var tk=ek;const BI=up("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),K=p.forwardRef(({className:e,...t},r)=>a.jsx(tk,{ref:r,className:ue(BI(),e),...t}));K.displayName=tk.displayName;function rk(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ud="Checkbox",[WI,AM]=wn(ud),[zI,Fp]=WI(ud);function HI(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:s,disabled:o,form:i,name:l,onCheckedChange:c,required:u,value:d="on",internal_do_not_use_render:h}=e,[m,f]=Vu({prop:r,defaultProp:s??!1,onChange:c,caller:ud}),[w,y]=p.useState(null),[b,v]=p.useState(null),g=p.useRef(!1),x=w?!!i||!!w.closest("form"):!0,k={checked:m,disabled:o,setChecked:f,control:w,setControl:y,name:l,form:i,value:d,hasConsumerStoppedPropagationRef:g,required:u,defaultChecked:us(s)?!1:s,isFormControl:x,bubbleInput:b,setBubbleInput:v};return a.jsx(zI,{scope:t,...k,children:VI(h)?h(k):n})}var nk="CheckboxTrigger",sk=p.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},s)=>{const{control:o,value:i,disabled:l,checked:c,required:u,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:f,bubbleInput:w}=Fp(nk,e),y=We(s,d),b=p.useRef(c);return p.useEffect(()=>{const v=o==null?void 0:o.form;if(v){const g=()=>h(b.current);return v.addEventListener("reset",g),()=>v.removeEventListener("reset",g)}},[o,h]),a.jsx(ke.button,{type:"button",role:"checkbox","aria-checked":us(c)?"mixed":c,"aria-required":u,"data-state":ck(c),"data-disabled":l?"":void 0,disabled:l,value:i,...n,ref:y,onKeyDown:we(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:we(r,v=>{h(g=>us(g)?!0:!g),w&&f&&(m.current=v.isPropagationStopped(),m.current||v.stopPropagation())})})});sk.displayName=nk;var $p=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:o,required:i,disabled:l,value:c,onCheckedChange:u,form:d,...h}=e;return a.jsx(HI,{__scopeCheckbox:r,checked:s,defaultChecked:o,disabled:l,required:i,onCheckedChange:u,name:n,form:d,value:c,internal_do_not_use_render:({isFormControl:m})=>a.jsxs(a.Fragment,{children:[a.jsx(sk,{...h,ref:t,__scopeCheckbox:r}),m&&a.jsx(lk,{__scopeCheckbox:r})]})})});$p.displayName=ud;var ok="CheckboxIndicator",ak=p.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...s}=e,o=Fp(ok,r);return a.jsx(co,{present:n||us(o.checked)||o.checked===!0,children:a.jsx(ke.span,{"data-state":ck(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:t,style:{pointerEvents:"none",...e.style}})})});ak.displayName=ok;var ik="CheckboxBubbleInput",lk=p.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:i,required:l,disabled:c,name:u,value:d,form:h,bubbleInput:m,setBubbleInput:f}=Fp(ik,e),w=We(r,f),y=rk(o),b=Sp(n);p.useEffect(()=>{const g=m;if(!g)return;const x=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(x,"checked").set,j=!s.current;if(y!==o&&S){const N=new Event("click",{bubbles:j});g.indeterminate=us(o),S.call(g,us(o)?!1:o),g.dispatchEvent(N)}},[m,y,o,s]);const v=p.useRef(us(o)?!1:o);return a.jsx(ke.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:l,disabled:c,name:u,value:d,form:h,...t,tabIndex:-1,ref:w,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});lk.displayName=ik;function VI(e){return typeof e=="function"}function us(e){return e==="indeterminate"}function ck(e){return us(e)?"indeterminate":e?"checked":"unchecked"}const yu=p.forwardRef(({className:e,...t},r)=>a.jsx($p,{ref:r,className:ue("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:a.jsx(ak,{className:ue("flex items-center justify-center text-current"),children:a.jsx(Ps,{className:"h-4 w-4"})})}));yu.displayName=$p.displayName;const Rv="0x4AAAAAACrwTfISwGFVNY_5",qI="https://challenges.cloudflare.com/turnstile/v0/api.js?render=explicit";let sc=null;const GI=()=>window.turnstile?Promise.resolve():sc||(sc=new Promise((e,t)=>
400{const r=document.getElementById("turnstile-script");if(r){r.addEventListener("load",()=>e(),{once:!0}),r.addEventListener("error",()=>t(new Error("Failed to load Turnstile")),{once:!0});return}const n=document.createElement("script");n.id="turnstile-script",n.src=qI,n.async=!0,n.defer=!0,n.onload=()=>e(),n.onerror=()=>t(new Error("Failed to load Turnstile")),document.head.appendChild(n)}),sc),KI=()=>{const e=new URLSearchParams(window.location.search),[t,r]=p.useState(e.get("mode")==="login"),[n,s]=p.useState(""),[o,i]=p.useState(""),[l,c]=p.useState(""),[u,d]=p.useState(""),[h,m]=p.useState(!1),[f,w]=p.useState(!1),[y,b]=p.useState(!1),[v,g]=p.useState(!1),[x,k]=p.useState(null),[S,j]=p.useState(Rv),[N,E]=p.useState(!1),[_,P]=p.useState(null),M=p.useRef(null),O=Cr(),{toast:R}=_t();p.useEffect(()=>{let T=!1;return GI().then(()=>{T||E(!!Rv&&!!window.turnstile)}).catch(A=>{console.error("Turnstile initialization failed:",A),T||E(!1)}),()=>{T=!0}},[]),p.useEffect(()=>{if(!(!N||!S||!window.turnstile||!M.current)){if(_!==null)try{window.turnstile.remove(_)}catch{}M.current.innerHTML="";try{const T=window.turnstile.render(M.current,{sitekey:S,callback:A=>k(A),"expired-callback":()=>k(null),"error-callback":()=>k(null),theme:"light"});P(T)}catch(T){console.error("Turnstile render failed:",T)}}},[t,N,S]);const D=async T=>{try{const{data:A}=await W.functions.invoke("verify-turnstile",{body:{token:T}}),$=typeof A=="string"?JSON.parse(A):A;return($==null?void 0:$.success)===!0}catch{return!1}},U=()=>{if(k(null),window.turnstile&&_!==null)try{window.turnstile.reset(_)}catch{}},q=async T=>{T.preventDefault(),w(!0);try{if(S){if(!x){R({title:"Please complete the CAPTCHA verification",variant:"destructive"}),w(!1);return}if(!await D(x)){R({title:"CAPTCHA verification failed. Please try again.",variant:"destructive"}),U(),w(!1);return}}if(t){const{error:$}=await W.auth.signInWithPassword({email:n,password:o});if($)throw $;O("/dashboard");return}if(!h){R({title:"Please agree to Terms, Privacy Policy, and Refund Policy",variant:"destructive"}),w(!1);return}if(o!==l){R({title:"Passwords don't match",variant:"destructive"}),w(!1);return}if(o.length<8){R({title:"Password must be at least 8 characters with an uppercase letter and number",variant:"destructive"}),w(!1);return}if(!/[A-Z]/.test(o)||!/[0-9]/.test(o)){R({title:"Password must include at least one uppercase letter and one number",variant:"destructive"}),w(!1);return}const{error:A}=await W.auth.signUp({email:n,password:o,options:{data:{full_name:u},emailRedirectTo:"https://www.enrichai.online/dashboard"}});if(A)throw A;try{await W.functions.invoke("send-otp",{body:{email:n,type:"signup",fullName:u}})}catch($){console.error("OTP email error:",$)}O("/check-email",{state:{email:n,type:"signup"}})}catch(A){R({title:A.message,variant:"destructive"}),U()}finally{w(!1)}},te=async()=>{if(!n){R({title:"Enter your email first",variant:"destructive"});return}if(S){if(!x){R({title:"Please complete the CAPTCHA verification first",variant:"destructive"});return}if(!await D(x)){R({title:"CAPTCHA verification failed. Please try again.",variant:"destructive"}),U();return}}w(!0);try{const{data:T,error:A}=await W.functions.invoke("send-otp",{body:{email:n,type:"reset"}});if(A)throw A;const $=typeof T=="string"?JSON.parse(T):T;if($!=null&&$.error)throw new Error($.error);R({title:"Verification code sent! Check your inbox."}),O("/check-email",{state:{email:n,type:"reset"}})}catch(T){R({title:T.message||"Failed to send reset code",variant:"destructive"}),U()}finally{w(!1)}};return a.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:[a.jsx(it,{title:"Sign In or Sign Up â EnrichAI",description:"Access your EnrichAI account.",canonical:"/auth",noindex:!0}),a.jsxs("div",{className:"w-full max-w-md",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx(re,{to:"/",children:a.jsx("img",{src:Hr,alt:"EnrichAI",className:"h-10 mx-auto mb-4"})}),a.jsx("h1",{className:"font-display text-3xl font-bold text-foreground",children:t?"Welcome back":"Get started with EnrichAI"}),a.jsx("p",{className:"text-muted-foreground mt-2",children:t?"Log in to your account":"Create your account to start enriching leads"})]}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 shadow-sm",children:[a.jsxs("form",{onSubmit:q,className:"space-y-4",children:[!t&&a.jsxs("div",{children:[a.jsx(K,{htmlFor:"fullName",children:"Full Name"}),a.jsx(be,{id:"fullName",value:u,onChange:T=>d(T.target.value),placeholder:"Jane Smith",required:!t})]}),a.jsxs("div",{children:[a.jsx(K,{htmlFor:"email",children:"Email"}),a.jsx(be,{id:"email",type:"email",value:n,onChange:T=>s(T.target.value),placeholder:"[email protected]",required:!0})]}),a.jsxs("div",{children:[a.jsx(K,{htmlFor:"password",children:"Password"}),a.jsxs("div",{className:"relative",children:[a.jsx(be,{id:"password",type:y?"text":"password",value:o,onChange:T=>i(T.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0}),a.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",onClick:()=>b(!y),children:y?a.jsx(ka,{className:"w-4 h-4"}):a.jsx(Sa,{className:"w-4 h-4"})})]})]}),!t&&a.jsxs("div",{children:[a.jsx(K,{htmlFor:"confirmPassword",children:"Confirm Password"}),a.jsxs("div",{className:"relative",children:[a.jsx(be,{id:"confirmPassword",type:v?"text":"password",value:l,onCh
400ange:T=>c(T.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!t}),a.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",onClick:()=>g(!v),children:v?a.jsx(ka,{className:"w-4 h-4"}):a.jsx(Sa,{className:"w-4 h-4"})})]})]}),!t&&a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(yu,{id:"agree",checked:h,onCheckedChange:T=>m(T===!0)}),a.jsxs("label",{htmlFor:"agree",className:"text-xs text-muted-foreground leading-tight",children:["I agree to the"," ",a.jsx(re,{to:"/terms",className:"underline text-foreground",children:"Terms"}),","," ",a.jsx(re,{to:"/privacy",className:"underline text-foreground",children:"Privacy Policy"}),", and"," ",a.jsx(re,{to:"/refund",className:"underline text-foreground",children:"Refund Policy"})]})]}),S&&a.jsx("div",{className:"flex justify-center min-h-[65px]",children:a.jsx("div",{ref:M})}),a.jsx(oe,{type:"submit",className:"w-full",disabled:f,children:f?"Please wait...":t?"Log In":"Create Account"})]}),t&&a.jsx("button",{onClick:te,className:"text-xs text-muted-foreground hover:text-foreground mt-3 block mx-auto",disabled:f,children:"Forgot password?"}),a.jsxs("p",{className:"text-center text-sm text-muted-foreground mt-4",children:[t?"Don't have an account?":"Already have an account?"," ",a.jsx("button",{onClick:()=>{r(!t),U()},className:"text-foreground font-semibold hover:underline",children:t?"Sign Up":"Log In"})]})]})]})]})};var YI=Object.defineProperty,QI=Object.defineProperties,JI=Object.getOwnPropertyDescriptors,vu=Object.getOwnPropertySymbols,uk=Object.prototype.hasOwnProperty,dk=Object.prototype.propertyIsEnumerable,Ov=(e,t,r)=>t in e?YI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,XI=(e,t)=>{for(var r in t||(t={}))uk.call(t,r)&&Ov(e,r,t[r]);if(vu)for(var r of vu(t))dk.call(t,r)&&Ov(e,r,t[r]);return e},ZI=(e,t)=>QI(e,JI(t)),eL=(e,t)=>{var r={};for(var n in e)uk.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&vu)for(var n of vu(e))t.indexOf(n)<0&&dk.call(e,n)&&(r[n]=e[n]);return r};function tL(e){let t=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[t,r,n]}function rL(e){let t=p.useRef();return p.useEffect(()=>{t.current=e}),t.current}var nL=18,hk=40,sL=`${hk}px`,oL=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function aL({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:n}){let[s,o]=p.useState(!1),[i,l]=p.useState(!1),[c,u]=p.useState(!1),d=p.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&s&&i,[s,i,r]),h=p.useCallback(()=>{let m=e.current,f=t.current;if(!m||!f||c||r==="none")return;let w=m,y=w.getBoundingClientRect().left+w.offsetWidth,b=w.getBoundingClientRect().top+w.offsetHeight/2,v=y-nL,g=b;document.querySelectorAll(oL).length===0&&document.elementFromPoint(v,g)===m||(o(!0),u(!0))},[e,t,c,r]);return p.useEffect(()=>{let m=e.current;if(!m||r==="none")return;function f(){let y=window.innerWidth-m.getBoundingClientRect().right;l(y>=hk)}f();let w=setInterval(f,1e3);return()=>{clearInterval(w)}},[e,r]),p.useEffect(()=>{let m=n||document.activeElement===t.current;if(r==="none"||!m)return;let f=setTimeout(h,0),w=setTimeout(h,2e3),y=setTimeout(h,5e3),b=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(f),clearTimeout(w),clearTimeout(y),clearTimeout(b)}},[t,n,r,h]),{hasPWMBadge:s,willPushPWMBadge:d,PWM_BADGE_SPACE_WIDTH:sL}}var fk=p.createContext({}),mk=p.forwardRef((e,t)=>{var r=e,{value:n,onChange:s,maxLength:o,textAlign:i="left",pattern:l,placeholder:c,inputMode:u="numeric",onComplete:d,pushPasswordManagerStrategy:h="increase-width",pasteTransformer:m,containerClassName:f,noScriptCSSFallback:w=iL,render:y,children:b}=r,v=eL(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),g,x,k,S,j;let[N,E]=p.useState(typeof v.defaultValue=="string"?v.defaultValue:""),_=n??N,P=rL(_),M=p.useCallback(X=>{s==null||s(X),E(X)},[s]),O=p.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),R=p.useRef(null),D=p.useRef(null),U=p.useRef({value:_,onCh
400ange:M,isIOS:typeof window<"u"&&((x=(g=window==null?void 0:window.CSS)==null?void 0:g.supports)==null?void 0:x.call(g,"-webkit-touch-callout","none"))}),q=p.useRef({prev:[(k=R.current)==null?void 0:k.selectionStart,(S=R.current)==null?void 0:S.selectionEnd,(j=R.current)==null?void 0:j.selectionDirection]});p.useImperativeHandle(t,()=>R.current,[]),p.useEffect(()=>{let X=R.current,ne=D.current;if(!X||!ne)return;U.current.value!==X.value&&U.current.onChange(X.value),q.current.prev=[X.selectionStart,X.selectionEnd,X.selectionDirection];function ze(){if(document.activeElement!==X){V(null),B(null);return}let pe=X.selectionStart,ut=X.selectionEnd,Tr=X.selectionDirection,Nt=X.maxLength,gt=X.value,or=q.current.prev,Pr=-1,$e=-1,Et;if(gt.length!==0&&pe!==null&&ut!==null){let vd=pe===ut,jl=pe===gt.length&>.length<Nt;if(vd&&!jl){let ar=pe;if(ar===0)Pr=0,$e=1,Et="forward";else if(ar===Nt)Pr=ar-1,$e=ar,Et="backward";else if(Nt>1&>.length>1){let Ar=0;if(or[0]!==null&&or[1]!==null){Et=ar<or[1]?"backward":"forward";let _l=or[0]===or[1]&&or[0]<Nt;Et==="backward"&&!_l&&(Ar=-1)}Pr=Ar+ar,$e=Ar+ar+1}}Pr!==-1&&$e!==-1&&Pr!==$e&&R.current.setSelectionRange(Pr,$e,Et)}let kl=Pr!==-1?Pr:pe,Sl=$e!==-1?$e:ut,uo=Et??Tr;V(kl),B(Sl),q.current.prev=[kl,Sl,uo]}if(document.addEventListener("selectionchange",ze,{capture:!0}),ze(),document.activeElement===X&&$(!0),!document.getElementById("input-otp-style")){let pe=document.createElement("style");if(pe.id="input-otp-style",document.head.appendChild(pe),pe.sheet){let ut="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";ri(pe.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ri(pe.sheet,`[data-input-otp]:autofill { ${ut} }`),ri(pe.sheet,`[data-input-otp]:-webkit-autofill { ${ut} }`),ri(pe.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),ri(pe.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ct=()=>{ne&&ne.style.setProperty("--root-height",`${X.clientHeight}px`)};ct();let Xe=new ResizeObserver(ct);return Xe.observe(X),()=>{document.removeEventListener("selectionchange",ze,{capture:!0}),Xe.disconnect()}},[]);let[te,T]=p.useState(!1),[A,$]=p.useState(!1),[J,V]=p.useState(null),[L,B]=p.useState(null);p.useEffect(()=>{tL(()=>{var X,ne,ze,ct;(X=R.current)==null||X.dispatchEvent(new Event("input"));let Xe=(ne=R.current)==null?void 0:ne.selectionStart,pe=(ze=R.current)==null?void 0:ze.selectionEnd,ut=(ct=R.current)==null?void 0:ct.selectionDirection;Xe!==null&&pe!==null&&(V(Xe),B(pe),q.current.prev=[Xe,pe,ut])})},[_,A]),p.useEffect(()=>{P!==void 0&&_!==P&&P.length<o&&_.length===o&&(d==null||d(_))},[o,d,P,_]);let se=aL({containerRef:D,inputRef:R,pushPasswordManagerStrategy:h,isFocused:A}),fe=p.useCallback(X=>{let ne=X.currentTarget.value.slice(0,o);if(ne.length>0&&O&&!O.test(ne)){X.preventDefault();return}typeof P=="string"&&ne.length<P.length&&document.dispatchEvent(new Event("selectionchange")),M(ne)},[o,M,P,O]),ie=p.useCallback(()=>{var X;if(R.current){let ne=Math.min(R.current.value.length,o-1),ze=R.current.value.length;(X=R.current)==null||X.setSelectionRange(ne,ze),V(ne),B(ze)}$(!0)},[o]),Je=p.useCallback(X=>{var ne,ze;let ct=R.current;if(!m&&(!U.current.isIOS||!X.clipboardData||!ct))return;let Xe=X.clipboardData.getData("text/plain"),pe=m?m(Xe):Xe;X.preventDefault();let ut=(ne=R.current)==null?void 0:ne.selectionStart,Tr=(ze=R.current)==null?void 0:ze.selectionEnd,Nt=(ut!==Tr?_.slice(0,ut)+pe+_.slice(Tr):_.slice(0,ut)+pe+_.slice(ut)).slice(0,o);if(Nt.length>0&&O&&!O.test(Nt))return;ct.value=Nt,M(Nt);let gt=Math.min(Nt.length,o-1),or=Nt.length;ct.setSelectionRange(gt,or),V(gt),B(or)},[o,M,O,_]),lt=p.useMemo(()=>({position:"relative",cursor:v.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[v.disabled]),Mt=p.useMemo(()=>({position:"absolute",inset:0,width:se.willPushPWMBadge?`calc(100% + ${se.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:se.willPushPWMBadge?`inset(0 ${se.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[se.PWM_BADGE_SPACE_WIDTH,se.willPushPWMBadge,i]),Ft=p.useMemo(()=>p.createElement("input",ZI(XI({autoComplete:v.autoComplete||"one-time-code"},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":_.length===0||void 0,"data-input-otp-mss":J,"data-input-otp-mse":L,inputMode:u,pattern:O==null?void 0:O.source,"aria-placeholder":c,style:Mt,maxLength:o,value:_,ref:R,onPaste:X=>{var ne;Je(X),(ne=v.onPaste)==null||ne.call(v,X)},onChange:fe,onMouseOver:X=>{var ne;T(!0),(ne=v.onMouseOver)==null||ne.call(v,X)},onMouseLeave:X=>{var ne;T(!1),(ne=v.onMouseLeave)==null||ne.call(v,X)},onFocus:X=>{var ne;ie(),(ne=v.onFocus)==null||ne.call(v,X)},onBlur:X=>{var ne;$(!1),(ne=v.onBlur)==null||ne.call(v,X)}})),[fe,ie,Je,u,Mt,o,L,J,v,O==null?void 0:O.source,_]),tt=p.useMemo(()=>({slots:Array.from({length:o}).map((X,ne)=>{var ze;let ct=A&&J!==null&&L!==null&&(J===L&&ne===J||ne>=J&&ne<L),Xe=_[ne]!==void 0?_[ne]:null,pe=_[0]!==void 0?null:(ze=c==null?void 0:c[ne])!=null?ze:null;return{char:Xe,placeholderChar:pe,isActive:ct,hasFakeCaret:ct&&Xe===null}}),isFocused:A,isHovering:!v.disabled&&te}),[A,te,o,L,J,v.disabled,_]),Yt=p.useMemo(()=>y?y(tt):p.createElement(fk.Provider,{value:tt},b),[b,tt,y]);return p.createElement(p.Fragment,null,w!==null&&p.createElement("noscript",null,p.createElement("style",null,w)),p.createElement("div",{ref:D,"data-input-otp-container":!0,style:lt,className:f},Yt,p.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Ft)))});mk.displayName="Input";function ri(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var iL=` 401[data-input-otp] { 402 --nojs-bg: white !important; 403 --nojs-fg: black !important; 404 405 background-color: var(--nojs-bg) !important; 406 color: var(--nojs-fg) !important; 407 caret-color: var(--nojs-fg) !important; 408 letter-spacing: .25em !important; 409 text-align: center !important; 410 border: 1px solid var(--nojs-fg) !important; 411 border-radius: 4px !important; 412 width: 100% !important; 413} 414@media (prefers-color-scheme: dark) { 415 [data-input-otp] { 416 --nojs-bg: black !important; 417 --nojs-fg: white !important; 418 } 419}`;const pk=p.forwardRef(({className:e,containerClassName:t,...r},n)=>
419a.jsx(mk,{ref:n,containerClassName:ue("flex items-center gap-2 has-[:disabled]:opacity-50",t),className:ue("disabled:cursor-not-allowed",e),...r}));pk.displayName="InputOTP";const gk=p.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:ue("flex items-center",e),...t}));gk.displayName="InputOTPGroup";const Es=p.forwardRef(({index:e,className:t,...r},n)=>{const s=p.useContext(fk),{char:o,hasFakeCaret:i,isActive:l}=s.slots[e];return a.jsxs("div",{ref:n,className:ue("relative flex h-10 w-10 items-center justify-center border-y border-r border-input text-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 ring-2 ring-ring ring-offset-background",t),...r,children:[o,i&&a.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:a.jsx("div",{className:"animate-caret-blink h-4 w-px bg-foreground duration-1000"})})]})});Es.displayName="InputOTPSlot";const lL=p.forwardRef(({...e},t)=>a.jsx("div",{ref:t,role:"separator",...e,children:a.jsx(JN,{})}));lL.displayName="InputOTPSeparator";const cL=()=>{var b,v;const e=Kr(),t=Cr(),{toast:r}=_t(),n=((b=e.state)==null?void 0:b.email)||"",s=((v=e.state)==null?void 0:v.type)||"signup",[o,i]=p.useState(""),[l,c]=p.useState(!1),[u,d]=p.useState(!1),[h,m]=p.useState(0),f=()=>{m(120);const g=setInterval(()=>{m(x=>x<=1?(clearInterval(g),0):x-1)},1e3)},w=async()=>{if(o.length!==6){r({title:"Please enter the full 6-digit code",variant:"destructive"});return}c(!0);try{const{data:g,error:x}=await W.functions.invoke("verify-otp",{body:{email:n,code:o,type:s}});if(x)throw x;const k=typeof g=="string"?JSON.parse(g):g;if(k!=null&&k.error)throw new Error(k.error);s==="signup"?(r({title:"Email verified! Please log in to continue."}),t("/auth?mode=login")):s==="reset"&&(r({title:"Verified! Set your new password."}),t("/update",{state:{email:n,verified:!0}}))}catch(g){r({title:g.message||"Verification failed",variant:"destructive"})}finally{c(!1)}},y=async()=>{if(!(h>0)){d(!0);try{const{data:g,error:x}=await W.functions.invoke("send-otp",{body:{email:n,type:s}});if(x)throw x;const k=typeof g=="string"?JSON.parse(g):g;if(k!=null&&k.error)throw new Error(k.error);r({title:"New code sent! Check your inbox."}),f()}catch(g){r({title:g.message||"Failed to resend code",variant:"destructive"})}finally{d(!1)}}};return n?a.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:[a.jsx(it,{title:"Verify Your Email â EnrichAI",description:"Confirm your email to continue.",canonical:"/check-email",noindex:!0}),a.jsxs("div",{className:"w-full max-w-md text-center",children:[a.jsx(re,{to:"/",children:a.jsx("img",{src:Hr,alt:"EnrichAI",className:"h-12 mx-auto mb-8"})}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 sm:p-10 shadow-sm",children:[a.jsx("div",{className:"w-20 h-20 rounded-full bg-highlight/15 flex items-center justify-center mx-auto mb-8",children:s==="signup"?a.jsx(Qu,{className:"w-10 h-10 text-highlight"}):a.jsx(iE,{className:"w-10 h-10 text-highlight"})}),a.jsx("h1",{className:"font-display text-3xl font-bold text-foreground mb-4",children:s==="signup"?"Verify Your Email":"Reset Your Password"}),a.jsxs("p",{className:"text-muted-foreground text-base leading-relaxed mb-2",children:["We've sent you a ",a.jsx("span",{className:"text-foreground font-semibold",children:"6-digit verification code"})," to"," ",a.jsx("span",{className:"text-foreground font-semibold",children:n}),"."]}),a.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed mb-8",children:["Please check your"," ",a.jsx("span",{className:"text-foreground font-semibold underline underline-offset-4 decoration-highlight/50",children:"inbox"})," ","or"," ",a.jsx("span",{className:"text-foreground font-semibold underline underline-offset-4 decoration-highlight/50",children:"spam folder"})," ","and enter the code below to ",s==="signup"?"verify your account":"reset your password","."]}),a.jsx("div",{className:"flex justify-center mb-6",children:a.jsx(pk,{maxLength:6,value:o,onChange:i,children:a.jsxs(gk,{children:[a.jsx(Es,{index:0}),a.jsx(Es,{index:1}),a.jsx(Es,{index:2}),a.jsx(Es,{index:3}),a.jsx(Es,{index:4}),a.jsx(Es,{index:5})]})})}),a.jsx(oe,{onClick:w,disabled:l||o.length!==6,className:"w-full mb-4",children:l?"Verifying...":"
419Verify Code"}),a.jsx("button",{onClick:y,disabled:u||h>0,className:"text-sm text-muted-foreground hover:text-foreground transition disabled:opacity-50",children:h>0?`Resend code in ${h}s`:u?"Sending...":"Didn't receive it? Resend code"})]})]})]}):a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:a.jsxs("div",{className:"w-full max-w-md text-center",children:[a.jsx(re,{to:"/",children:a.jsx("img",{src:Hr,alt:"EnrichAI",className:"h-12 mx-auto mb-8"})}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-sm",children:[a.jsx("p",{className:"text-muted-foreground mb-6",children:"No email provided. Please start the signup process again."}),a.jsx(re,{to:"/auth",className:"inline-block px-8 py-3 bg-primary text-primary-foreground rounded-xl font-display font-bold text-sm hover:opacity-90 transition",children:"Go to Sign Up"})]})]})})},uL=()=>{const[e,t]=p.useState(""),[r,n]=p.useState(""),[s,o]=p.useState(!1),[i,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(!1),m=Cr(),f=Kr(),{toast:w}=_t();p.useEffect(()=>{if(window.location.hash.includes("type=recovery")){l(!0);return}const j=f.state;if(j!=null&&j.verified&&(j!=null&&j.email)){l(!0);return}const{data:{subscription:N}}=W.auth.onAuthStateChange(E=>{E==="PASSWORD_RECOVERY"&&l(!0)});return()=>N.unsubscribe()},[f]);const y=e.length>=8,b=/[A-Z]/.test(e),v=/[0-9]/.test(e),g=e===r&&r.length>0,x=y&&b&&v&&g,k=async S=>{if(S.preventDefault(),!x){w({title:"Please meet all password requirements",variant:"destructive"});return}o(!0);const{error:j}=await W.auth.updateUser({password:e});j?w({title:j.message,variant:"destructive"}):(w({title:"Password updated successfully! Please log in."}),await W.auth.signOut(),m("/auth?mode=login")),o(!1)};return i?a.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:[a.jsx(it,{title:"Reset Password â EnrichAI",description:"Reset your EnrichAI account password.",canonical:"/reset-password",noindex:!0}),a.jsxs("div",{className:"w-full max-w-md",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx(re,{to:"/",children:a.jsx("img",{src:Hr,alt:"EnrichAI",className:"h-12 mx-auto mb-4"})}),a.jsx("h1",{className:"font-display text-3xl font-bold text-foreground",children:"Set New Password"}),a.jsx("p",{className:"text-muted-foreground mt-2",children:"Enter your new password below"})]}),a.jsx("div",{className:"bg-card border border-border rounded-2xl p-6 shadow-sm",children:a.jsxs("form",{onSubmit:k,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(K,{children:"New Password"}),a.jsxs("div",{className:"relative",children:[a.jsx(be,{type:c?"text":"password",value:e,onChange:S=>t(S.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0}),a.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",onClick:()=>u(!c),children:c?a.jsx(ka,{className:"w-4 h-4"}):a.jsx(Sa,{className:"w-4 h-4"})})]}),a.jsxs("div",{className:"mt-2 space-y-1",children:[a.jsxs("p",{className:`text-xs flex items-center gap-1.5 ${y?"text-highlight":"text-muted-foreground"}`,children:[a.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${y?"bg-highlight":"bg-border"}`}),"At least 8 characters"]}),a.jsxs("p",{className:`text-xs flex items-center gap-1.5 ${b?"text-highlight":"text-muted-foreground"}`,children:[a.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${b?"bg-highlight":"bg-border"}`}),"One uppercase letter"]}),a.jsxs("p",{className:`text-xs flex items-center gap-1.5 ${v?"text-highlight":"text-muted-foreground"}`,children:[a.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${v?"bg-highlight":"bg-border"}`}),"One number"]})]})]}),a.jsxs("div",{children:[a.jsx(K,{children:"Confirm New Password"}),a.jsxs("div",{className:"relative",children:[a.jsx(be,{type:d?"text":"password",value:r,onChange:S=>n(S.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0}),a.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",onClick:()=>h(!d),children:d?a.jsx(ka,{className:"w-4 h-4"}):a.jsx(Sa,{className:"w-4 h-4"})})]}),r.length>0&&a.jsx("p",{className:`text-xs mt-1 ${g?"text-highlight":"text-destructive"}`,children:g?"Passwords match":"Passwords don't match"})]}),a.jsx(oe,{type:"submit",className:"w-full",disabled:s||!x,children:s?"Updating...":"Update Password"})]})})]})]}):a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:a.jsxs("div",{className:"w-full max-w-md text-center",children:[a.jsx(re,{to:"/",children:a.jsx("img",{src:Hr,alt:"EnrichAI",className:"h-12 mx-auto mb-8"})}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-sm",children:[a.jsx("div",{className:"w-16 h-16 rounded-full bg-destructive/10 flex items-center justify-center mx-auto mb-6",children:a.jsx(vb,{className:"w-8 h-8 text-destructive"})}),a.jsx("h1",{className:"font-display text-2xl font-bold text-foreground mb-3",children:"Invalid Reset Link"}),a.jsx("p",{className:"text-muted-foreground mb-6",children:"This password reset link is invali
419d or has expired."}),a.jsx(re,{to:"/auth?mode=login",className:"inline-block px-8 py-3 bg-primary text-primary-foreground rounded-xl font-display font-bold text-sm hover:opacity-90 transition",children:"Back to Login"})]})]})})},dL=()=>{const[e,t]=p.useState(""),[r,n]=p.useState(""),[s,o]=p.useState(!1),[i,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(!1);Cr();const m=Kr(),{toast:f}=_t(),w=m.state,y=w==null?void 0:w.email,b=w==null?void 0:w.verified,v=e.length>=8,g=/[A-Z]/.test(e),x=/[0-9]/.test(e),k=e===r&&r.length>0,S=v&&g&&x&&k;if(!b||!y)return a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:a.jsxs("div",{className:"w-full max-w-md text-center",children:[a.jsx(re,{to:"/",children:a.jsx("img",{src:Hr,alt:"EnrichAI",className:"h-12 mx-auto mb-8"})}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-sm",children:[a.jsx("div",{className:"w-16 h-16 rounded-full bg-destructive/10 flex items-center justify-center mx-auto mb-6",children:a.jsx(vb,{className:"w-8 h-8 text-destructive"})}),a.jsx("h1",{className:"font-display text-2xl font-bold text-foreground mb-3",children:"Invalid Request"}),a.jsx("p",{className:"text-muted-foreground mb-6",children:"This page can only be accessed after verifying your identity."}),a.jsx(re,{to:"/auth?mode=login",className:"inline-block px-8 py-3 bg-primary text-primary-foreground rounded-xl font-display font-bold text-sm hover:opacity-90 transition",children:"Back to Login"})]})]})});if(d)return a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:a.jsxs("div",{className:"w-full max-w-md text-center",children:[a.jsx(re,{to:"/",children:a.jsx("img",{src:Hr,alt:"EnrichAI",className:"h-12 mx-auto mb-8"})}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 shadow-sm",children:[a.jsx("div",{className:"w-16 h-16 rounded-full bg-highlight/15 flex items-center justify-center mx-auto mb-6",children:a.jsx(yl,{className:"w-8 h-8 text-highlight"})}),a.jsx("h1",{className:"font-display text-2xl font-bold text-foreground mb-3",children:"Password Updated!"}),a.jsx("p",{className:"text-muted-foreground mb-6",children:"Your password has been updated successfully. You can now log in with your new password."}),a.jsx(re,{to:"/auth?mode=login",className:"inline-block px-8 py-3 bg-primary text-primary-foreground rounded-xl font-display font-bold text-sm hover:opacity-90 transition",children:"Log In"})]})]})});const j=async E=>{if(E.preventDefault(),!S){f({title:"Please meet all password requirements",variant:"destructive"});return}o(!0);try{const{data:_,error:P}=await W.functions.invoke("verify-otp",{body:{email:y,action:"update-password",newPassword:e}});if(P)throw P;const M=typeof _=="string"?JSON.parse(_):_;if(M!=null&&M.error)throw new Error(M.error);h(!0)}catch(_){f({title:_.message||"Failed to update password",variant:"destructive"})}finally{o(!1)}},N=({met:E,label:_})=>a.jsxs("p",{className:`text-xs flex items-center gap-1.5 ${E?"text-highlight":"text-muted-foreground"}`,children:[a.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${E?"bg-highlight":"bg-border"}`}),_]});return a.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:[a.jsx(it,{title:"Update Password â EnrichAI",description:"Update your EnrichAI account password.",canonical:"/update",noindex:!0}),a.jsxs("div",{className:"w-full max-w-md",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx(re,{to:"/",children:a.jsx("img",{src:Hr,alt:"EnrichAI",className:"h-12 mx-auto mb-4"})}),a.jsx("h1",{className:"font-display text-3xl font-bold text-foreground",children:"Set New Password"}),a.jsx("p",{className:"text-muted-foreground mt-2",children:"Choose a strong password for your account"})]}),a.jsx("div",{className:"bg-card border border-border rounded-2xl p-6 shadow-sm",children:a.jsxs("form",{onSubmit:j,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(K,{children:"New Password"}),a.jsxs("div",{className:"relative",children:[a.jsx(be,{type:i?"text":"password",value:e,onCh
419ange:E=>t(E.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0}),a.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",onClick:()=>l(!i),children:i?a.jsx(ka,{className:"w-4 h-4"}):a.jsx(Sa,{className:"w-4 h-4"})})]}),a.jsxs("div",{className:"mt-2 space-y-1",children:[a.jsx(N,{met:v,label:"At least 8 characters"}),a.jsx(N,{met:g,label:"One uppercase letter"}),a.jsx(N,{met:x,label:"One number"})]})]}),a.jsxs("div",{children:[a.jsx(K,{children:"Confirm New Password"}),a.jsxs("div",{className:"relative",children:[a.jsx(be,{type:c?"text":"password",value:r,onChange:E=>n(E.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0}),a.jsx("button",{type:"button",className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",onClick:()=>u(!c),children:c?a.jsx(ka,{className:"w-4 h-4"}):a.jsx(Sa,{className:"w-4 h-4"})})]}),r.length>0&&a.jsx("p",{className:`text-xs mt-1 ${k?"text-highlight":"text-destructive"}`,children:k?"Passwords match":"Passwords don't match"})]}),a.jsx(oe,{type:"submit",className:"w-full",disabled:s||!S,children:s?"Updating...":"Update Password"})]})})]})]})},hL=async e=>{const{data:t,error:r}=await W.rpc("get_cap_state",{target_user_id:e});if(r)throw r;return(Array.isArray(t)?t[0]:t)??null},yk=e=>{if(!e||e.is_blocked)return!1;const t=e.subscription_status;return t==="active"||t==="lifetime"||t==="trial"?!0:t==="canceled"&&e.plan_expires_at?new Date(e.plan_expires_at)>new Date:!1},dd=()=>{const{user:e}=Ct(),t=vs();return p.useEffect(()=>{if(!(e!=null&&e.id))return;const r=W.channel(`user-plan-${e.id}`).on("postgres_changes",{event:"*",schema:"public",table:"user_plans",filter:`user_id=eq.${e.id}`},()=>{t.invalidateQueries({queryKey:["user-plan",e.id]})}).subscribe();return()=>{W.removeChannel(r)}},[e==null?void 0:e.id,t]),zr({queryKey:["user-plan",e==null?void 0:e.id],queryFn:async()=>e?hL(e.id):null,enabled:!!e,staleTime:0,refetchOnWindowFocus:!0,refetchInterval:1e4})},vk=()=>{const{user:e}=Ct();return zr({queryKey:["profile",e==null?void 0:e.id],queryFn:async()=>{if(!e)return null;const{data:t,error:r}=await W.from("profiles").select("*").eq("user_id",e.id).single();if(r)throw r;return t},enabled:!!e})},fL=()=>{const{user:e}=Ct(),t=vs();return j1({mutationFn:async r=>{if(!e)throw new Error("Not authenticated");const{error:n}=await W.from("profiles").update(r).eq("user_id",e.id);if(n)throw n},onSuccess:()=>{t.invalidateQueries({queryKey:["profile"]})}})},mL=[{id:"upload",label:"Upload leads",icon:xl},{id:"enrichment",label:"In progress",icon:to},{id:"history",label:"History",icon:ZN},{id:"transactions",label:"Transactions",icon:wb},{id:"billing",label:"Billing",icon:hp},{id:"analytics",label:"Usage",icon:dp},{id:"instantly",label:"Instantly AI",icon:null,logo:an},{id:"profile",label:"Profile",icon:jb}],pL=({activeTab:e,setActiveTab:t})=>{var m;const{signOut:r,user:n}=Ct(),{data:s}=dd(),{data:o}=vk(),i=Cr(),[l,c]=p.useState(!1),u=(o==null?void 0:o.full_name)||((m=n==null?void 0:n.email)==null?void 0:m.split("@")[0])||"User",d=u.split(" ").map(f=>f[0]).join("").slice(0,2).toUpperCase(),h=f=>{t(f),c(!1)};return a.jsxs(a.Fragment,{children:[a.jsx("button",{className:"fixed left-4 top-4 z-50 rounded-xl border border-border bg-card p-2.5 text-foreground shadow-sm md:hidden",onClick:()=>c(f=>!f),"aria-label":"Toggle dashboard navigation",children:l?a.jsx(Xu,{className:"h-5 w-5"}):a.jsx(nE,{className:"h-5 w-5"})}),a.jsxs("aside",{className:`fixed left-0 top-0 z-40 flex h-screen w-[272px] flex-col border-r border-border bg-card transition-transform duration-300 md:sticky md:translate-x-0 ${l?"translate-x-0":"-translate-x-full"}`,children:[a.jsx("div",{className:"border-b border-border px-5 py-5",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"flex h-11 w-11 items-center justify-center rounded-2xl bg-primary text-primary-foreground",children:a.jsx("span",{className:"text-sm font-bold",children:d})}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"truncate font-display text-sm font-bold text-foreground",children:u}),a.jsx("p",{className:"truncate text-[11px] text-muted-foreground",children:n==null?void 0:n.email})]})]})}),a.jsx("div",{className:"px-3 py-4",children:a.jsx("p",{className:"px-3 text-[11px] font-semibold uppercase tracking-[0.18em] text-muted-foreground",children:"Worksp
419ace"})}),a.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto px-3 pb-4",children:mL.map(f=>{const y=e===f.id;return a.jsxs("button",{onClick:()=>h(f.id),className:`flex w-full items-center gap-3 rounded-xl px-3.5 py-3 text-left text-sm font-medium transition-colors ${y?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"} `,children:[f.logo?a.jsx("img",{src:f.logo,alt:"",className:"h-4 w-4 shrink-0 rounded"}):f.icon?a.jsx(f.icon,{className:"h-4 w-4 shrink-0"}):null,a.jsx("span",{className:"truncate",children:f.label}),!1]},f.id)})}),a.jsxs("div",{className:"border-t border-border p-3",children:[(s==null?void 0:s.plan_name)==="trial"&&a.jsxs("button",{onClick:()=>{t("billing"),c(!1)},className:"mb-2 flex w-full items-center gap-2 rounded-xl bg-primary/10 px-3 py-2 text-xs font-semibold text-primary transition-colors hover:bg-primary/15",children:[a.jsx(Aa,{className:"h-4 w-4"}),"Upgrade to a paid plan"]}),a.jsxs(oe,{variant:"ghost",size:"sm",className:"h-10 w-full justify-start gap-2.5 text-sm text-muted-foreground hover:text-foreground",onClick:async()=>{await r(),i("/")},children:[a.jsx(xb,{className:"h-4 w-4"}),"Log out"]})]})]}
419),l&&a.jsx("div",{className:"fixed inset-0 z-30 bg-foreground/20 md:hidden",onClick:()=>c(!1)})]})},gL=()=>{const{data:e,isLoading:t}=vk(),{user:r}=Ct(),n=fL(),{toast:s}=_t(),[o,i]=p.useState("");p.useEffect(()=>{e&&i(e.full_name)},[e]);const l=()=>{n.mutate({full_name:o},{onSuccess:()=>s({title:"Profile updated"}),onError:u=>s({title:u.message,variant:"destructive"})})};if(t)return a.jsx("div",{className:"animate-pulse h-32 bg-muted rounded-2xl"});const c=((e==null?void 0:e.full_name)||"U").split(" ").map(u=>u[0]).join("").slice(0,2).toUpperCase();return a.jsxs("div",{className:"max-w-lg space-y-6",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Profile"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Keep your basic account details clean and up to date."})]}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl overflow-hidden",children:[a.jsxs("div",{className:"bg-gradient-to-r from-primary/5 to-highlight/5 px-6 py-8 flex items-center gap-4",children:[a.jsx("div",{className:"w-16 h-16 rounded-2xl bg-gradient-to-br from-primary to-primary/70 flex items-center justify-center shadow-lg",children:a.jsx("span",{className:"text-primary-foreground text-xl font-bold",children:c})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-display font-bold text-lg text-foreground",children:(e==null?void 0:e.full_name)||"User"}),a.jsxs("p",{className:"text-sm text-muted-foreground flex items-center gap-1.5",children:[a.jsx(Ju,{className:"w-3.5 h-3.5"})," Verified account"]})]})]}),a.jsxs("div",{className:"p-6 space-y-5",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsxs(K,{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[a.jsx(jb,{className:"w-3.5 h-3.5"})," Full Name"]}),a.jsx(be,{value:o,onChange:u=>i(u.target.value),className:"h-11 bg-muted/40 border-border/50 focus:bg-background transition-colors"})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs(K,{className:"text-xs font-semibold text-muted-foreground uppercase tracking-wider flex items-center gap-1.5",children:[a.jsx(Qu,{className:"w-3.5 h-3.5"})," Email"]}),a.jsx(be,{value:(r==null?void 0:r.email)||"",disabled:!0,className:"h-11 opacity-50 bg-muted/40 border-border/50"})]}),a.jsxs(oe,{onClick:l,disabled:n.isPending,className:"gap-2 h-10",children:[a.jsx(kb,{className:"w-4 h-4"}),n.isPending?"Saving...":"Save Changes"]})]})]})]})},Se=p.forwardRef(({className:e,...t},r)=>a.jsx("textarea",{className:ue("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
419ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));Se.displayName="Textarea";function Nr(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function oo(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const xk=6048e5,yL=864e5;let vL={};function hd(){return vL}function nl(e,t){var l,c,u,d;const r=hd(),n=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??r.weekStartsOn??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,s=Nr(e),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function xu(e){return nl(e,{weekStartsOn:1})}function wk(e){const t=Nr(e),r=t.getFullYear(),n=oo(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=xu(n),o=oo(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=xu(o);return t.getTime()>=s.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function Iv(e){const t=Nr(e);return t.setHours(0,0,0,0),t}function Lv(e){const t=Nr(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function xL(e,t){const r=Iv(e),n=Iv(t),s=+r-Lv(r),o=+n-Lv(n);return Math.round((s-o)/yL)}function wL(e){const t=wk(e),r=oo(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),xu(r)}function bL(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function kL(e){if(!bL(e)&&typeof e!="number")return!1;const t=Nr(e);return!isNaN(Number(t))}function SL(e){const t=Nr(e),r=oo(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}const jL={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_L=(e,t,r)=>{let n;const s=jL[e];return typeof s=="string"?n=s:t===1?n=s.one:n=s.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function fh(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const CL={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},NL={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},EL={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},TL={date:fh({formats:CL,defaultWidth:"full"}),time:fh({formats:NL,defaultWidth:"full"}),dateTime:fh({formats:EL,defaultWidth:"full"})},PL={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},AL=(e,t,r,n)=>PL[e];function ni(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):i;s=e.formattingValues[l]||e.formattingValues[i]}else{const i=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;s=e.values[l]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const RL={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},OL={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},IL={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},LL={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
419ay","Saturday"]},DL={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ML={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},FL=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},$L={ordinalNumber:FL,era:ni({values:RL,defaultWidth:"wide"}),quarter:ni({values:OL,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ni({values:IL,defaultWidth:"wide"}),day:ni({values:LL,defaultWidth:"wide"}),dayPeriod:ni({values:DL,defaultWidth:"wide",formattingValues:ML,defaultFormattingWidth:"wide"})};function si(e){return(t,r={})=>{const n=r.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const i=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?BL(l,h=>h.test(i)):UL(l,h=>h.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(i.length);return{value:u,rest:d}}}function UL(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function BL(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function WL(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const s=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const l=t.slice(s.length);return{value:i,rest:l}}}const zL=/^(\d+)(th|st|nd|rd)?/i,HL=/\d+/i,VL={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},qL={any:[/^b/i,/^(a|c)/i]},GL={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},KL={any:[/1/i,/2/i,/3/i,/4/i]},YL={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},QL={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},JL={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},XL={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ZL={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},e5={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},t5={ordinalNumber:WL({matchPattern:zL,parsePattern:HL,valueCallback:e=>parseInt(e,10)}),era:si({matchPatterns:VL,defaultMatchWidth:"wide",parsePatterns:qL,defaultParseWidth:"any"}),quarter:si({matchPatterns:GL,defaultMatchWidth:"wide",parsePatterns:KL,defaultParseWidth:"any",valueCallback:e=>e+1}),month:si({matchPatterns:YL,defaultMatchWidth:"wide",parsePatterns:QL,defaultParseWidth:"any"}),day:si({matchPatterns:JL,defaultMatchWidth:"wide",parsePatterns:XL,defaultParseWidth:"any"}),dayPeriod:si({matchPatterns:ZL,defaultMatchWidth:"any",parsePatterns:e5,defaultParseWidth:"any"})},r5={code:"en-US",formatDistance:_L,formatLong:TL,formatRelative:AL,localize:$L,match:t5,options:{weekStartsOn:0,firstWeekContainsDate:1}};function n5(e){const t=Nr(e);return xL(t,SL(t))+1}function s5(e){const t=Nr(e),r=+xu(t)-+wL(t);return Math.round(r/xk)+1}function bk(e,t){var d,h,m,f;const r=Nr(e),n=r.getFullYear(),s=hd(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((f=(m=s.locale)==null?void 0:m.options)==null?void 0:f.firstWeekContainsDate)??1,i=oo(e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const l=nl(i,t),c=oo(e,0);c.setFullYear(n,0,o),c.setHours(0,0,0,0);const u=nl(c,t);return r.getTime()>=l.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function o5(e,t){var l,c,u,d;const r=hd(),n=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,s=bk(e,t),o=oo(e,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),nl(o,t)}function a5(e,t){const r=Nr(e),n=+nl(r,t)-+o5(r,t);return Math.round(n/xk)+1}function ye(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const An={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return ye(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):ye(r+1,2)},d(e,t){return ye(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return ye(e.getHours()%12||12,t.length)},H(e,t){return ye(e.getHours(),t.length)},m(e,t){return ye(e.getMinutes(),t.length)},s(e,t){return ye(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),s=Math.trunc(n*Math.pow(10,r-3));return ye(s,t.length)}},bo={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dv={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),s=n>0?n:1-n;return r.ordinalNumber(s,{unit:"year"})}return An.y(e,t)},Y:function(e,t,r,n){const s=bk(e,n),o=s>0?s:1-s;if(t==="YY"){const i=o%100;return ye(i,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):ye(o,t.length)},R:function(e,t){const r=wk(e);return ye(r,t.length)},u:function(e,t){const r=e.getFullYear();return ye(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return ye(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return ye(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return An.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return ye(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const s=a5(e,n);return t==="wo"?r.ordinalNumber(s,{unit:"week"}):ye(s,t.length)},I:function(e,t,r){const n=s5(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):ye(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):An.d(e,t)},D:function(e,t,r){const n=n5(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):ye(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const s=e.getDay(),o=(s-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ye(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const s=e.getDay(),o=(s-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ye(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),s=n===0?7:n;switch(t){case"i":return String(s);case"ii":return ye(s,t.length);case"io":return r.ordinalNumber(s,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let s;switch(n===12?s=bo.noon:n===0?s=bo.midnight:s=n/12>
vendor: 1,315 bytes, line 419
419=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let s;switch(n>=17?s=bo.evening:n>=12?s=bo.afternoon:n>=4?s=bo.morning:s=bo.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return An.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):An.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):ye(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):ye(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):An.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}
419):An.s(e,t)},S:function(e,t){return An.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return Fv(n);case"XXXX":case"XX":return Ts(n);case"XXXXX":case"XXX":default:return Ts(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return Fv(n);case"xxxx":case"xx":return Ts(n);case"xxxxx":case"xxx":default:return Ts(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Mv(n,":");case"OOOO":default:return"GMT"+Ts(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Mv(n,":");case"zzzz":default:return"GMT"+Ts(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return ye(n,t.length)},T:function(e,t,r){const n=e.getTime();return ye(n,t.length)}};function Mv(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),s=Math.trunc(n/60),o=n%60;return o===0?r+String(s):r+String(s)+t+ye(o,2)}function Fv(e,t){return e%60===0?(e>0?"-":"+")+ye(Math.abs(e)/60,2):Ts(e,t)}function Ts(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),s=ye(Math.trunc(n/60),2),o=ye(n%60,2);return r+s+t+o}const $v=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},kk=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},i5=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return $v(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",$v(n,t)).replace("{{time}}",kk(s,t))},l5={p:kk,P:i5},c5=/^D+$/,u5=/^Y+$/,d5=["D","DD","YY","YYYY"];function h5(e){return c5.test(e)}function f5(e){return u5.test(e)}function m5(e,t,r){const n=p5(e,t,r);if(console.warn(n),d5.includes(e))throw new RangeError(n)}function p5(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const g5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,y5=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,v5=/^'([^]*?)'?$/,x5=/''/g,w5=/[a-zA-Z]/;function Zn(e,t,r){var d,h,m,f;const n=hd(),s=n.locale??r5,o=n.firstWeekContainsDate??((h=(d=n.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,i=n.weekStartsOn??((f=(m=n.locale)==null?void 0:m.options)==null?void 0:f.weekStartsOn)??0,l=Nr(e);if(!kL(l))throw new RangeError("Invalid time value");let c=t.match(y5).map(w=>{const y=w[0];if(y==="p"||y==="P"){const b=l5[y];return b(w,s.formatLong)}return w}).join("").match(g5).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const y=w[0];if(y==="'")return{isToken:!1,value:b5(w)};if(Dv[y])return{isToken:!0,value:w};if(y.match(w5))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:w}});s.localize.preprocessor&&(c=s.localize.preprocessor(l,c));const u={firstWeekContainsDate:o,weekStartsOn:i,locale:s};return c.map(w=>{if(!w.isToken)return w.value;const y=w.value;(f5(y)||h5(y))&&m5(y,t,String(e));const b=Dv[y[0]];return b(l,y,s.localize,u)}).join("")}function b5(e){const t=e.match(v5);return t?t[1].replace(x5,"'"):e}var Up="Progress",Bp=100,[k5,RM]=wn(Up),[S5,j5]=k5(Up),Sk=p.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:s,getValueLabel:o=_5,...i}=e;(s||s===0)&&!Uv(s)&&console.error(C5(`${s}`,"Progress"));const l=Uv(s)?s:Bp;n!==null&&!Bv(n,l)&&console.error(N5(`${n}`,"Progress"));const c=Bv(n,l)?n:null,u=wu(c)?o(c,l):void 0;return a.jsx(S5,{scope:r,value:c,max:l,children:a.jsx(ke.div,{"aria-valuemax":l,"aria-valuemin":0,"aria-valuenow":wu(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":Ck(c,l),"data-value":c??void 0,"data-max":l,...i,ref:t})})});Sk.displayName=Up;var jk="ProgressIndicator",_k=p.forwardRef((e,t)=>
vendor: 4,926 bytes, lines 419-424
419{const{__scopeProgress:r,...n}=e,s=j5(jk,r);return a.jsx(ke.div,{"data-state":Ck(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...n,ref:t})});_k.displayName=jk;function _5(e,t){return`${Math.round(e/t*100)}%`}function Ck(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function wu(e){return typeof e=="number"}function Uv(e){return wu(e)&&!isNaN(e)&&e>0}function Bv(e,t){return wu(e)&&!isNaN(e)&&e<=t&&e>=0}function C5(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Bp}\`.`}function N5(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: 420 - a positive number 421 - less than the value passed to \`max\` (or ${Bp} if no \`max\` prop is set) 422 - \`null\` or \`undefined\` if the progress is indeterminate. 423 424Defaulting to \`null\`.`}var Nk=Sk,E5=_k;const Wp=p.forwardRef(({className:e,value:t,...r},n)=>a.jsx(Nk,{ref:n,className:ue("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:a.jsx(E5,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Wp.displayName=Nk.displayName;var mh="focusScope.autoFocusOnMount",ph="focusScope.autoFocusOnUnmount",Wv={bubbles:!1,cancelable:!0},T5="FocusScope",Ek=p.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[l,c]=p.useState(null),u=Vr(s),d=Vr(o),h=p.useRef(null),m=We(t,y=>c(y)),f=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let y=function(x){if(f.paused||!l)return;const k=x.target;l.contains(k)?h.current=k:On(h.current,{select:!0})},b=function(x){if(f.paused||!l)return;const k=x.relatedTarget;k!==null&&(l.contains(k)||On(h.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const S of x)S.removedNodes.length>0&&On(l)};document.addEventListener("focusin",y),document.addEventListener("focusout",b);const g=new MutationObserver(v);return l&&g.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",b),g.disconnect()}}},[n,l,f.paused]),p.useEffect(()=>{if(l){Hv.add(f);const y=document.activeElement;if(!l.contains(y)){const v=new CustomEvent(mh,Wv);l.addEventListener(mh,u),l.dispatchEvent(v),v.defaultPrevented||(P5(L5(Tk(l)),{select:!0}),document.activeElement===y&&On(l))}return()=>{l.removeEventListener(mh,u),setTimeout(()=>{const v=new CustomEvent(ph,Wv);l.addEventListener(ph,d),l.dispatchEvent(v),v.defaultPrevented||On(y??document.body,{select:!0}),l.removeEventListener(ph,d),Hv.remove(f)},0)}}},[l,u,d,f]);const w=p.useCallback(y=>{if(!r&&!n||f.paused)return;const b=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,v=document.activeElement;if(b&&v){const g=y.currentTarget,[x,k]=A5(g);x&&k?!y.shiftKey&&v===k?(y.preventDefault(),r&&On(x,{select:!0})):y.shiftKey&&v===x&&(y.preventDefault(),r&&On(k,{select:!0})):v===g&&y.preventDefault()}},[r,n,f.paused]);return a.jsx(ke.div,{tabIndex:-1,...i,ref:m,onKeyDown:w})});Ek.displayName=T5;function P5(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(On(n,{select:t}),document.activeElement!==r)return}function A5(e){const t=Tk(e),r=zv(t,e),n=zv(t.reverse(),e);return[r,n]}function Tk(e){const t=[],r=document.createTreeWalker(e,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();)t.push(r.currentNode);return t}function zv(e,t){for(const r of e)if(!R5(r,{upTo:t}))return r}function R5(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function O5(e){return e instanceof HTMLInputElement&&"select"in e}function On(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&O5(e)&&t&&e.select()}}var Hv=I5();function I5(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Vv(e,t),e.unshift(t)},remove(t){var r;e=Vv(e,t),(r=e[0])==null||r.resume()}}}function Vv(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function L5(e){return e.filter(t=>t.tagName!=="A")}var gh=0;function D5(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qv()),document.body.insertAdjacentElement("beforeend",e[1]??qv()),gh++,()=>{gh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),gh--}},[])}function qv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.
vendor: 4,904 bytes, lines 424-439
424style.position="fixed",e.style.pointerEvents="none",e}var Ac="right-scroll-bar-position",Rc="width-before-scroll-bar",M5="with-scroll-bars-hidden",F5="--removed-body-scroll-bar-size";function yh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function $5(e,t){var r=p.useState(function(){return{value:e,callback:t,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=t,r.facade}var U5=typeof window<"u"?p.useLayoutEffect:p.useEffect,Gv=new WeakMap;function B5(e,t){var r=$5(null,function(n){return e.forEach(function(s){return yh(s,n)})});return U5(function(){var n=Gv.get(r);if(n){var s=new Set(n),o=new Set(e),i=r.current;s.forEach(function(l){o.has(l)||yh(l,null)}),o.forEach(function(l){s.has(l)||yh(l,i)})}Gv.set(r,e)},[e]),r}function W5(e){return e}function z5(e,t){t===void 0&&(t=W5);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]:e},useMedium:function(o){var i=t(o,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(o){for(n=!0;r.length;){var i=r;r=[],i.forEach(o)}r={push:function(l){return o(l)},filter:function(){return r}}},assignMedium:function(o){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(o),i=r}var c=function(){var d=i;i=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),r}}}};return s}function H5(e){e===void 0&&(e={});var t=z5(null);return t.options=Fr({async:!0,ssr:!1},e),t}var Pk=function(e){var t=e.sideCar,r=Fa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,Fr({},r))};Pk.isSideCarExport=!0;function V5(e,t){return e.useMedium(t),Pk}var Ak=H5(),vh=function(){},fd=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:vh,onWheelCapture:vh,onTouchMoveCapture:vh}),s=n[0],o=n[1],i=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,f=e.noRelative,w=e.noIsolation,y=e.inert,b=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,x=e.gapMode,k=Fa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=m,j=B5([r,t]),N=Fr(Fr({},k),s);return p.createElement(p.Fragment,null,d&&p.createElement(S,{sideCar:Ak,removeScrollBar:u,shards:h,noRelative:f,noIsolation:w,inert:y,setCallbacks:o,allowPinchZoom:!!b,lockRef:r,gapMode:x}),i?p.cloneElement(p.Children.only(l),Fr(Fr({},N),{ref:j})):p.createElement(g,Fr({},N,{className:c,ref:j}),l))});fd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fd.classNames={fullWidth:Rc,zeroRight:Ac};var q5=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=q5();return t&&e.setAttribute("nonce",t),e}function K5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Y5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Q5=function(){var e=0,t=null;return{add:function(r){e==0&&(t=G5())&&(K5(t,r),Y5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},J5=function(){var e=Q5();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Rk=function(){var e=J5(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},X5={left:0,top:0,right:0,gap:0},xh=function(e){return parseInt(e||"",10)||0},Z5=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[xh(r),xh(n),xh(s)]},e4=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return X5;var t=Z5(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},t4=Rk(),ea="data-scroll-locked",r4=function(e,t,r,n){var s=e.left,o=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),` 425 .`.concat(M5,` { 426 overflow: hidden `).concat(n,`; 427 padding-right: `).concat(l,"px ").concat(n,`; 428 } 429 body[`).concat(ea,`] { 430 overflow: hidden `).concat(n,`; 431 overscroll-behavior: contain; 432 `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&` 433 padding-left: `.concat(s,`px; 434 padding-top: `).concat(o,`px; 435 padding-right: `).concat(i,`px; 436 margin-left:0; 437 margin-top:0; 438 margin-right: `).concat(l,"px ").concat(n,`; 439 `),r==="padding"&&"padding-right: ".concat(l,"px ").concat(n,";
439")].filter(Boolean).join(""),` 440 } 441 442 .`).concat(Ac,` { 443 right: `).concat(l,"px ").concat(n,`; 444 } 445 446 .`).concat(Rc,` { 447 margin-right: `).concat(l,"px ").concat(n,`; 448 } 449 450 .`).concat(Ac," .").concat(Ac,` { 451 right: 0 `).concat(n,`; 452 } 453 454 .`).concat(Rc," .").concat(Rc,` { 455 margin-right: 0 `).concat(n,`; 456 } 457 458 body[`).concat(ea,`] { 459 `).concat(F5,": ").concat(l,`px; 460 } 461`)},Kv=function(){var e=parseInt(document.body.getAttribute(ea)||"0",10);return isFinite(e)?e:0},n4=function(){p.useEffect(function(){return document.body.setAttribute(ea,(Kv()+1).toString()),function(){var e=Kv()-1;e<=0?document.body.removeAttribute(ea):document.body.setAttribute(ea,e.toString())}},[])},s4=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;n4();var o=p.useMemo(function(){return e4(s)},[s]);return p.createElement(t4,{styles:r4(o,!t,s,r?"":"!important")})},om=!1;if(typeof window<"u")try{var oc=Object.defineProperty({},"passive",{get:function(){return om=!0,!0}});window.addEventListener("test",oc,oc),window.removeEventListener("test",oc,oc)}catch{om=!1}var ko=om?{passive:!1}:!1,o4=function(e){return e.tagName==="TEXTAREA"},Ok=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!o4(e)&&r[t]==="visible")},a4=function(e){return Ok(e,"overflowY")},i4=function(e){return Ok(e,"overflowX")},Yv=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=Ik(e,n);if(s){var o=Lk(e,n),i=o[1],l=o[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},l4=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},c4=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Ik=function(e,t){return e==="v"?a4(t):i4(t)},Lk=function(e,t){return e==="v"?l4(t):c4(t)},u4=function(e,t){return e==="h"&&t==="rtl"?-1:1},d4=function(e,t,r,n,s){var o=u4(e,window.getComputedStyle(t).direction),i=o*n,l=r.target,c=t.contains(l),u=!1,d=i>0,h=0,m=0;do{if(!l)break;var f=Lk(e,l),w=f[0],y=f[1],b=f[2],v=y-b-o*w;(w||v)&&Ik(e,l)&&(h+=v,m+=w);var g=l.parentNode;l=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!s)||!d&&(Math.abs(m)<1||!s))&&(u=!0),u},ac=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Qv=function(e){return[e.deltaX,e.deltaY]},Jv=function(e){return e&&"current"in e?e.current:e},h4=function(e,t){return e[0]===t[0]&&e[1]===t[1]},f4=function(e){return` 462 .block-interactivity-`.concat(e,` {pointer-events: none;} 463 .allow-interactivity-`).concat(e,` {pointer-events: all;} 464`)},m4=0,So=[];function p4(e){var t=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),s=p.useState(m4++)[0],o=p.useState(Rk)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var y=qA([e.lockRef.current],(e.shards||[]).map(Jv),!0).filter(Boolean);return y.forEach(function(b){return b.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),y.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var l=p.useCallback(function(y,b){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!i.current.allowPinchZoom;var v=ac(y),g=r.current,x="deltaX"in y?y.deltaX:g[0]-v[0],k="deltaY"in y?y.deltaY:g[1]-v[1],S,j=y.target,N=Math.abs(x)>Math.abs(k)?"h":"v";if("touches"in y&&N==="h"&&j.type==="range")return!1;var E=Yv(N,j);if(!E)return!0;if(E?S=N:(S=N==="v"?"h":"v",E=Yv(N,j)),!E)return!1;if(!n.current&&"changedTouches"in y&&(x||k)&&(n.current=S),!S)return!0;var _=n.current||S;return d4(_,b,y,_==="h"?x:k,!0)},[]),c=p.useCallback(function(y){var b=y;if(!(!So.length||So[So.length-1]!==o)){var v="deltaY"in b?Qv(b):ac(b),g=t.current.filter(function(S){return S.name===b.type&&(S.target===b.target||b.target===S.shadowParent)&&h4(S.delta,v)}
vendor: 4,137 bytes, line 464
464)[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var x=(i.current.shards||[]).map(Jv).filter(Boolean).filter(function(S){return S.contains(b.target)}),k=x.length>0?l(b,x[0]):!i.current.noIsolation;k&&b.cancelable&&b.preventDefault()}}},[]),u=p.useCallback(function(y,b,v,g){var x={name:y,delta:b,target:v,should:g,shadowParent:g4(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(k){return k!==x})},1)},[]),d=p.useCallback(function(y){r.current=ac(y),n.current=void 0},[]),h=p.useCallback(function(y){u(y.type,Qv(y),y.target,l(y,e.lockRef.current))},[]),m=p.useCallback(function(y){u(y.type,ac(y),y.target,l(y,e.lockRef.current))},[]);p.useEffect(function(){return So.push(o),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",c,ko),document.addEventListener("touchmove",c,ko),document.addEventListener("touchstart",d,ko),function(){So=So.filter(function(y){return y!==o}),document.removeEventListener("wheel",c,ko),document.removeEventListener("touchmove",c,ko),document.removeEventListener("touchstart",d,ko)}},[]);var f=e.removeScrollBar,w=e.inert;return p.createElement(p.Fragment,null,w?p.createElement(o,{styles:f4(s)}):null,f?p.createElement(s4,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function g4(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const y4=V5(Ak,p4);var Dk=p.forwardRef(function(e,t){return p.createElement(fd,Fr({},e,{ref:t,sideCar:y4}))});Dk.classNames=fd.classNames;var v4=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jo=new WeakMap,ic=new WeakMap,lc={},wh=0,Mk=function(e){return e&&(e.host||Mk(e.parentNode))},x4=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Mk(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},w4=function(e,t,r,n){var s=x4(t,Array.isArray(e)?e:[e]);lc[r]||(lc[r]=new WeakMap);var o=lc[r],i=[],l=new Set,c=new Set(s),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};s.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(m){if(l.has(m))d(m);else try{var f=m.getAttribute(n),w=f!==null&&f!=="false",y=(jo.get(m)||0)+1,b=(o.get(m)||0)+1;jo.set(m,y),o.set(m,b),i.push(m),y===1&&w&&ic.set(m,!0),b===1&&m.setAttribute(r,"true"),w||m.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return d(t),l.clear(),wh++,function(){i.forEach(function(h){var m=jo.get(h)-1,f=o.get(h)-1;jo.set(h,m),o.set(h,f),m||(ic.has(h)||h.removeAttribute(n),ic.delete(h)),f||h.removeAttribute(r)}),wh--,wh||(jo=new WeakMap,jo=new WeakMap,ic=new WeakMap,lc={})}},b4=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=v4(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),w4(n,s,r,"aria-hidden")):function(){return null}},md="Dialog",[Fk,$k]=wn(md),[k4,Er]=Fk(md),Uk=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,l=p.useRef(null),c=p.useRef(null),[u,d]=Vu({prop:n,defaultProp:s??!1,onChange:o,caller:md});return a.jsx(k4,{scope:t,triggerRef:l,contentRef:c,contentId:th(),titleId:th(),descriptionId:th(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(h=>!h),[d]),modal:i,children:r})};Uk.displayName=md;var Bk="DialogTrigger",Wk=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Er(Bk,r),o=We(t,s.triggerRef);return a.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Vp(s.open),...n,ref:o,onClick:we(e.onClick,s.onOpenToggle)})});Wk.displayName=Bk;var zp="DialogPortal",[S4,zk]=Fk(zp,{forceMount:void 0}),Hk=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=Er(zp,t);return a.jsx(S4,{scope:t,forceMount:r,children:p.Children.map(n,i=>a.jsx(co,{present:r||o.open,children:a.jsx(ap,{asChild:!0,container:s,children:i})}))})};Hk.displayName=zp;var bu="DialogOverlay",Vk=p.forwardRef((e,t)=>
vendor: 4,269 bytes, lines 464-468
464{const r=zk(bu,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Er(bu,e.__scopeDialog);return o.modal?a.jsx(co,{present:n||o.open,children:a.jsx(_4,{...s,ref:t})}):null});Vk.displayName=bu;var j4=Hi("DialogOverlay.RemoveScroll"),_4=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Er(bu,r);return a.jsx(Dk,{as:j4,allowPinchZoom:!0,shards:[s.contentRef],children:a.jsx(ke.div,{"data-state":Vp(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),ao="DialogContent",qk=p.forwardRef((e,t)=>{const r=zk(ao,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=Er(ao,e.__scopeDialog);return a.jsx(co,{present:n||o.open,children:o.modal?a.jsx(C4,{...s,ref:t}):a.jsx(N4,{...s,ref:t})})});qk.displayName=ao;var C4=p.forwardRef((e,t)=>{const r=Er(ao,e.__scopeDialog),n=p.useRef(null),s=We(t,r.contentRef,n);return p.useEffect(()=>{const o=n.current;if(o)return b4(o)},[]),a.jsx(Gk,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:we(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:we(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0;(i.button===2||l)&&o.preventDefault()}),onFocusOutside:we(e.onFocusOutside,o=>o.preventDefault())})}),N4=p.forwardRef((e,t)=>{const r=Er(ao,e.__scopeDialog),n=p.useRef(!1),s=p.useRef(!1);return a.jsx(Gk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),Gk=p.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,l=Er(ao,r),c=p.useRef(null),u=We(t,c);return D5(),a.jsxs(a.Fragment,{children:[a.jsx(Ek,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:a.jsx(Hu,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Vp(l.open),...i,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),a.jsxs(a.Fragment,{children:[a.jsx(T4,{titleId:l.titleId}),a.jsx(A4,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Hp="DialogTitle",Kk=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Er(Hp,r);return a.jsx(ke.h2,{id:s.titleId,...n,ref:t})});Kk.displayName=Hp;var Yk="DialogDescription",Qk=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Er(Yk,r);return a.jsx(ke.p,{id:s.descriptionId,...n,ref:t})});Qk.displayName=Yk;var Jk="DialogClose",Xk=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=Er(Jk,r);return a.jsx(ke.button,{type:"button",...n,ref:t,onClick:we(e.onClick,()=>s.onOpenChange(!1))})});Xk.displayName=Jk;function Vp(e){return e?"open":"closed"}var Zk="DialogTitleWarning",[E4,eS]=eN(Zk,{contentName:ao,titleName:Hp,docsSlug:"dialog"}),T4=({titleId:e})=>{const t=eS(Zk),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 465 466If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 467 468For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},P4="DialogDescriptionWarning",A4=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${eS(P4).contentName}}.`;return p.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},tS=Uk,R4=Wk,rS=Hk,qp=Vk,Gp=qk,Kp=Kk,Yp=Qk,Qp=Xk;const am=tS,O4=rS,nS=p.forwardRef(({className:e,...t},r)=>a.jsx(qp,{ref:r,className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));nS.displayName=qp.displayName;
468const ku=p.forwardRef(({className:e,children:t,...r},n)=>a.jsxs(O4,{children:[a.jsx(nS,{}),a.jsxs(Gp,{ref:n,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background 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:rounded-lg",e),...r,children:[t,a.jsxs(Qp,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[a.jsx(Xu,{className:"h-4 w-4"}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ku.displayName=Gp.displayName;const Su=({className:e,...t})=>a.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Su.displayName="DialogHeader";const ju=({className:e,...t})=>a.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ju.displayName="DialogFooter";const _u=p.forwardRef(({className:e,...t},r)=>a.jsx(Kp,{ref:r,className:ue("text-lg font-semibold leading-none tracking-tight",e),...t}));_u.displayName=Kp.displayName;const Cu=p.forwardRef(({className:e,...t},r)=>a.jsx(Yp,{ref:r,className:ue("text-sm text-muted-foreground",e),...t}));Cu.displayName=Yp.displayName;function Xv(e){return e>=1e6?`${(e/1e6).toFixed(e%1e6===0?0:1)}M`:e>=1e4?`${(e/1e3).toFixed(e%1e3===0?0:1)}k`:e>=1e3?`${(e/1e3).toFixed(1)}k`:e.toString()}const Zv=[{id:"pdt_0NdoZ2r1ggucuBTiL15Aj",name:"Basic",price:"$5.99",period:"/month",credits:"5,000",perUpload:"5,000",highlight:!1,badge:null},{id:"pdt_0NdoZP2VXO7em9G0ENcJV",name:"Lifetime Deal",price:"$599",period:"one-time",credits:"1,000,000/mo",perUpload:"50,000",highlight:!0,badge:"Limited Offer"},{id:"pdt_0NdoZCJD8MRR6fdQszQmm",name:"Premium",price:"$69.99",period:"/year",credits:"10,000/mo",perUpload:"5,000",highlight:!1,badge:null}],I4=[{id:"pdt_0NaSZCElYG5QwfFkVi3MC",name:"10,000 Credits",credits:1e4,price:"$10"},{id:"pdt_0NaSZNrsLbYGQuzpZCtUl",name:"20,000 Credits",credits:2e4,price:"$20"},{id:"pdt_0NaSZUxe3Qzy6E6tWgF1N",name:"30,000 Credits",credits:3e4,price:"$30"},{id:"pdt_0NaSZiR7emzUQDZc4lrQt",name:"100,000 Credits",credits:1e5,price:"$100"}],ex=()=>{Ct();const{data:e,isLoading:t,refetch:r}=dd(),{toast:n}=_t(),[s,o]=p.useState(null),[i,l]=p.useState(!1),[c,u]=p.useState(""),[d,h]=p.useState(!1),[m,f]=p.useState(!1),[w,y]=p.useState(!1),b=yk(e??null),v=!!e&&e.is_exhausted,g=(e==null?void 0:e.subscription_status)==="canceled",x=(e==null?void 0:e.subscription_status)==="lifetime",k=(e==null?void 0:e.plan_name)==="trial"||(e==null?void 0:e.subscription_status)==="trial",S=b&&!g&&!k,j=async(_,P)=>{o(_);try{const M=(P==null?void 0:P.type)==="credit_topup"?"credit_topup":"subscription",O=new URLSearchParams({type:M,productId:_}),R={productId:_,successUrl:`${window.location.origin}/checkout/success?${O.toString()}`};P!=null&&P.amount&&(R.amount=P.amount),P!=null&&P.type&&(R.type=P.type);const{data:D,error:U}=await W.functions.invoke("dodo-checkout",{body:R});if(U)throw U;if(D!=null&&D.url)window.location.href=D.url;else throw new Error("No checkout URL")}catch{n({title:"Could not start checkout.",variant:"destructive"})}finally{o(null)}},N=async()=>{if(!c.trim()){n({title:"Please enter a reason.",variant:"destructive"});return}h(!0);try{const{data:_,error:P}=await W.functions.invoke("cancel-subscription",{body:{action:"cancel",reason:c.trim()}});if(P)throw P;const M=typeof _=="string"?JSON.parse(_):_;if(M.error)throw new Error(M.error);n({title:"Subscription canceled. Access continues until billing period ends."}),l(!1),u(""),r()}catch(_){n({title:(_==null?void 0:_.message)||"Failed to cancel.",variant:"destructive"})}finally{h(!1)}},E=async()=>{y(!0);try{const{data:_,error:P}=await W.functions.invoke("cancel-subscription",{body:{action:"resubscribe"}});if(P)throw P;const M=typeof _=="string"?JSON.parse(_):_;if(M.error)throw new Error(M.error);n({title:"Subscription reactivated! Welcome back."}),f(!1),r()}catch(_){n({title:(_==null?void 0:_.message)||"Failed to reactivate.",variant:"destructive"})}finally{y(!1)}};if(t)return a.jsx("div",{className:"animate-pulse h-64 bg-muted rounded-2xl"});if(b&&e){const _=e.total_cap-e.total_cap_left,P=e.total_cap>0?Math.round(_/e.total_cap*100):0,M=k?"Free Trial":g?"Cancels at period end":x?"Lifetime":"Active",O=k?"text-primary":g?"text-amber-500":"text-highlight";return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:k?"Free Trial":"Plan & credits"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:k?"You have 30 free credits to try EnrichAI. Upgrade anytime to unlock more.":"See your plan, remaining credits, and top up when you need more."})]}),g&&e.plan_expires_at&&a.jsxs("div",{className:"bg-amber-500/5 border border-amber-500/20 rounded-2xl p-5 flex flex-col sm:flex-row sm:items-center gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[a.jsx("div",{className:"w-2 h-2 rounded-full bg-amber-500 shrink-0"}),a.jsxs("p",{className:"text-sm text-foreground",children:[a.jsx("span",{className:"font-semibold",children:"Subscription canceled."})," ","Access until ",a.jsx("span",{className:"font-semibold",children:Zn(new Date(e.plan_expires_at),"MMMM d, yyyy")})]})]}),a.jsxs(oe,{size:"sm",onClick:()=>f(!0),className:"gap-1.5 shrink-0",children:[a.jsx(Cs,{className:"w-3.5 h-3.5"})," Resubscribe"]})]}),a.jsx("div",{className:"grid grid-cols-3 gap-3",children:[{label:"Available",value:e.total_cap_left,icon:mb,color:"text-highlight",bg:"bg-highlight/10"},{label:"Used",value:_,icon:mp,color:"text-primary",bg:"bg-primary/10"},{label:"Total",value:e.total_cap,icon:to,color:"text-muted-foreground",bg:"bg-muted"}].map(R=>a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-4 text-center",children:[a.jsx("div",{className:`w-8 h-8 rounded-xl ${R.bg} flex items-center justify-center mx-auto mb-2`,children:a.jsx(R.icon,{className:`w-4 h-4 ${R.color}`})}),a.jsx("p",{className:`text-xl sm:text-2xl font-bold ${R.color}`,children:Xv(R.value)}),a.jsx("p",{className:"text-[10px] text-muted-foreground mt-0.5",children:R.label})]},R.label))}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl overflow-hidden",children:[a.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ps,{className:"w-4 h-4 text-highlight"}),a.jsx("span",{className:"font-display font-bold text-lg",children:e.plan_name})]}),a.jsx("span",{className:`text-xs font-semibold ${O}`,children:M})]}),a.jsxs("div",{className:"px-5 pb-5 space-y-4",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"flex justify-between text-xs mb-1.5",children:[a.jsx("span",{className:"text-muted-foreground",children:"Credits Used"}),a.jsxs("span",{className:"font-semibold",children:[_.toLocaleStr
468ing()," / ",e.total_cap.toLocaleString()]})]}),a.jsx(Wp,{value:P,className:"h-2"})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 text-xs",children:[a.jsxs("div",{className:"bg-muted/50 rounded-xl p-3",children:[a.jsx("p",{className:"text-muted-foreground mb-0.5",children:"Per Upload"}),a.jsx("p",{className:"font-semibold text-foreground",children:Xv(e.per_upload_cap_left)})]}),e.plan_start_date&&a.jsxs("div",{className:"bg-muted/50 rounded-xl p-3",children:[a.jsx("p",{className:"text-muted-foreground mb-0.5",children:"Started"}),a.jsx("p",{className:"font-semibold text-foreground",children:Zn(new Date(e.plan_start_date),"MMM d, yyyy")})]}),e.plan_renewal_date&&!x&&a.jsxs("div",{className:"bg-muted/50 rounded-xl p-3",children:[a.jsx("p",{className:"text-muted-foreground mb-0.5",children:g?"Ends":"Renews"}),a.jsx("p",{className:"font-semibold text-foreground",children:Zn(new Date(e.plan_renewal_date),"MMM d, yyyy")})]}),g&&e.plan_expires_at&&a.jsxs("div",{className:"bg-amber-500/5 border border-amber-500/20 rounded-xl p-3",children:[a.jsx("p",{className:"text-muted-foreground mb-0.5",children:"Access Until"}),a.jsx("p",{className:"font-semibold text-amber-500",children:Zn(new Date(e.plan_expires_at),"MMM d, yyyy")})]})]}),e.dodo_customer_id&&!x&&a.jsxs("div",{className:"flex gap-2 pt-2",children:[!g&&a.jsxs(oe,{variant:"outline",onClick:()=>l(!0),className:"gap-2 border-destructive/40 text-destructive hover:bg-destructive/10 hover:border-destructive/60",children:[a.jsx(vl,{className:"w-4 h-4"})," Cancel Subscription"]}),g&&a.jsxs(oe,{onClick:()=>f(!0),className:"gap-2",children:[a.jsx(Cs,{className:"w-4 h-4"})," Resubscribe Now"]})]})]})]}),k&&a.jsxs("div",{className:"bg-card border border-border rounded-2xl overflow-hidden",children:[a.jsxs("div",{className:"px-5 py-4 flex items-center gap-2 border-b border-border/50",children:[a.jsx(Aa,{className:"w-4 h-4 text-primary"}),a.jsx("h3",{className:"font-display font-bold text-sm",children:"Upgrade for unlimited enrichments"})]}),a.jsx("div",{className:"p-5 grid gap-3 md:grid-cols-3",children:Zv.map(R=>a.jsxs("div",{className:`bg-card border rounded-2xl p-4 flex flex-col relative ${R.highlight?"border-highlight ring-2 ring-highlight/20":"border-border"}`,children:[R.highlight&&a.jsx("span",{className:"absolute -top-2.5 left-3 bg-highlight text-highlight-foreground text-[10px] font-bold uppercase tracking-wider px-2 py-0.5 rounded-md",children:"Best Value"}),a.jsx("h4",{className:"font-display font-bold text-base mt-1",children:R.name}),a.jsxs("p",{className:"text-xl font-bold mt-1",children:[R.price," ",a.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:R.period})]}),a.jsxs("p",{className:"text-xs text-muted-foreground mt-1.5",children:[R.credits," credits · ",R.perUpload," per upload"]}),a.jsx(oe,{size:"sm",className:"mt-3 gap-1.5",variant:R.highlight?"default":"outline",onClick:()=>j(R.id),disabled:!!s,children:s===R.id?"Loading...":`Choose ${R.name}`})]},R.id))}),a.jsx("p",{className:"px-5 pb-4 text-[11px] text-muted-foreground",children:"Credit packs unlock once you're on a paid plan."})]}),!k&&a.jsxs("div",{className:`bg-card border rounded-2xl overflow-hidden ${S?"border-border":"border-border/50 opacity-50"}`,children:[a.jsxs("div",{className:"px-5 py-4 flex items-center gap-2 border-b border-border/50",children:[a.jsx(to,{className:"w-4 h-4 text-highlight"}),a.jsx("h3",{className:"font-display font-bold text-sm",children:"Top Up Credits"})]}),a.jsxs("div",{className:"p-5 space-y-4",children:[!S&&g&&a.jsxs("div",{className:"flex items-start gap-3 bg-amber-500/5 border border-amber-500/20 rounded-xl p-3",children:[a.jsx(ki,{className:"w-4 h-4 text-amber-500 mt-0.5 shrink-0"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Top-ups require an active subscription."})]}),v&&S&&a.jsxs("div",{className:"flex items-start gap-3 bg-destructive/5 border border-destructive/20 rounded-xl p-3",children:[a.jsx(ki,{className:"w-4 h-4 text-destructive mt-0.5 shrink-0"}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Credits exhausted. ",x?"Top up to continue."
468:"Credits refresh on renewal, or top up now."]})]}),a.jsx("div",{className:"grid grid-cols-2 gap-3",children:I4.map(R=>a.jsxs("div",{className:`bg-card border rounded-2xl p-4 flex flex-col transition-all ${S?"border-border hover:border-primary/40 hover:shadow-md":"opacity-40 cursor-not-allowed border-border/50"}`,children:[a.jsx("p",{className:"text-lg font-bold text-foreground",children:R.price}),a.jsx("p",{className:"text-sm font-semibold text-foreground mt-0.5",children:R.name}),a.jsxs("p",{className:"text-[10px] text-muted-foreground mt-1",children:[(R.credits/1e3).toFixed(0),"k credits â added instantly"]}),a.jsx(oe,{size:"sm",className:"mt-3 gap-1.5 w-full",variant:"outline",onClick:()=>S&&j(R.id,{type:"credit_topup"}),disabled:!S||s===R.id,children:s===R.id?a.jsxs(a.Fragment,{children:[a.jsx(Cs,{className:"w-3.5 h-3.5 animate-spin"})," Processingâ¦"]}):a.jsxs(a.Fragment,{children:[a.jsx(hp,{className:"w-3.5 h-3.5"})," Buy Now"]})})]},R.id))}),a.jsx("p",{className:"text-[10px] text-muted-foreground text-center",children:"1 enriched lead = 1 credit · Added instantly after payment"})]})]}),!k&&a.jsxs("a",{href:"https://drive.google.com/drive/folders/1cwxUIGRBoNC6L9P8HRHYMAUWcmDIWK6A",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-3 bg-highlight/5 border border-highlight/20 rounded-2xl p-4 hover:bg-highlight/10 transition-colors group",children:[a.jsx(XN,{className:"w-5 h-5 text-highlight shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-semibold text-sm text-foreground group-hover:text-highlight transition-colors",children:"Get Free 10M+ Leads"}),a.jsx("p",{className:"text-xs text-muted-foreground",children:"Verified leads by niche â included with your plan"})]}),a.jsx(gb,{className:"w-3.5 h-3.5 text-muted-foreground shrink-0"})]}),a.jsxs("div",{className:"flex items-center gap-3 bg-muted/50 rounded-2xl p-4",children:[a.jsx(Qu,{className:"w-4 h-4 text-primary shrink-0"}),a.jsxs("div",{className:"text-xs",children:[a.jsx("span",{className:"text-muted-foreground",children:"Need help? "}),a.jsx("a",{href:"mailto:[email protected]",className:"text-primary font-medium underline",children:"[email protected]"})]})]}),a.jsx(am,{open:i,onOpenChange:R=>{d||(l(R),R||u(""))},children:a.jsxs(ku,{className:"sm:max-w-md",children:[a.jsxs(Su,{children:[a.jsx(_u,{children:"Cancel Subscription"}),a.jsxs(Cu,{children:["Are you sure you want to cancel your ",e.plan_name," plan?"]})]}),a.jsxs("div",{className:"space-y-4 py-2",children:[a.jsx("div",{className:"bg-amber-500/5 border border-amber-500/20 rounded-xl p-4 space-y-2",children:a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(ki,{className:"w-4 h-4 text-amber-500 mt-0.5 shrink-0"}),a.jsxs("div",{className:"text-sm text-foreground space-y-1.5",children:[a.jsx("p",{className:"font-semibold",children:"Before you go, please note:"}),a.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1 list-disc list-inside",children:[a.jsxs("li",{children:["Your credits will ",a.jsx("strong",{className:"text-foreground",children:"not reset immediately"})," if you unsubscribe."]}),a.jsxs("li",{children:["You will retain access until the ",a.jsx("strong",{className:"text-foreground",children:"end of your current billing period"}),"."]}),a.jsxs("li",{children:["Remaining credits will ",a.jsx("strong",{className:"text-foreground",children:"not roll over"})," after your billing period ends."]})]})]})]})}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("label",{className:"text-sm font-medium",children:["Why are you canceling? ",a.jsx("span",{className:"text-destructive",children:"*"})]}),a.jsx(Se,{value:c,onChange:R=>u(R.target.value),placeholder:"We'd love to know so we can improve...",rows:3,className:"resize-none"})]})]}),a.jsxs(ju,{className:"flex-col-reverse sm:flex-row gap-2",children:[a.jsx(oe,{variant:"outline",onClick:()=>{l(!1),u("")},disabled:d,children:"Keep Subscription"}),a.jsx(oe,{variant:"destructive",onClick:N,disabled:d||!c.trim(),className:"gap-2",children:d?a.jsxs(a.Fragment,{children:[a.jsx(Cs,{className:"w-4 h-4 animate-spin"}),"Cancelingâ¦"]}):"Confirm Cancellation"})]})]})}),a.jsx(am,{open:m,onOpenChange:R=>{w||f(R)},children:a.jsxs(ku,{className:"sm:max-w-md",children:[a.jsxs(Su,{children:[a.jsx(_u,{children:"Welcome Back! ð"}),a.jsxs(Cu,{children:["Resubscribe to your ",e.plan_name," plan and continue enriching leads."]})]}),a.jsx("div",{className:"bg-highlight/5 border border-highlight/20 rounded-xl p-4 space-y-2",children:a.jsxs("div",{className:"flex items-start gap-2",children:[a.jsx(Ps,{className:"w-4 h-4 text-highlight mt-0.5 shrink-0"}),a.jsxs("div",{className:"text-sm space-y-1",children:[a.jsx("p",{className:"font-semibold text-foreground",children:"What happens when you resubscribe:"}),a.jsxs("ul",{className:"text-xs text-muted-foreground space-y-1 list-disc list-inside",children:[a.jsxs("li",{children:["Your subscription resumes ",a.jsx("strong",{className:"text-foreground",children:"immediately"})]}),a.jsxs("li",{children:["Your remaining credits stay ",a.jsx("strong",{className:"text-foreground",children:"intact"})]}),a.jsxs("li",{children:["Full access to all features is ",a.jsx("strong",{className:"text-foreground",children:"restored"})]})]})]})]})}),a.jsxs(ju,{className:"flex-col-reverse sm:flex-row gap-2 pt-2",children:[a.jsx(oe,{variant:"outline",onClick:()=>f(!1),disabled:w,children:"Not Now"}),a.jsx(oe,{onClick:E,disabled:w,className:"gap-2",children:w?a.jsxs(a.Fragment,{children:[a.jsx(Cs,{className:"w-4 h-4 animate-spin"}),"Reactivatingâ¦"]}):a.jsxs(a.Fragment,{children:[a.jsx(Cs,{className:"w-4 h-4"}),"Resubscribe"]})})]})]})})]})}return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Choose Your Plan"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Unlock AI-powered lead enrichment. All plans include the same features."})]}),a.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:Zv.map(_=>a.jsxs("div",{className:`bg-card border rounded-2xl p-5 flex flex-col relative transition-shadow hover:shadow-md ${_.highlight?"border-highlight ring-2 ring-highlight/20 shadow-sm":"border-border"}`,children:[_.highlight&&a.jsx("span",{className:"absolute -top-2.5 left-4 bg-highlight text-highlight-foreground text-[10px] font-bold uppercase tracking-wider px-2.5 py-1 rounded-md",children:"Best Value"}),a.jsx("h4",{className:"font-display font-bold text-lg mt-1",children:_.name}),a.jsxs("p",{className:"text-2xl font-bold mt-1.5",children:[_.price," ",a.jsx("span",{className:"text-sm font-normal text-muted-foreground",children:_.period})]}),a.jsxs("div",{className:"text-xs text-muted-foreground mt-3 space-y-1.5 flex-1",children:[a.jsxs("p",{className:"flex items-center gap-1.5",children:[a.jsx(Ps,{className:"w-3 h-3 text-highlight"})," ",_.credits," credits"]}),a.jsxs("p",{className:"flex items-center gap-1.5",children:[a.jsx(Ps,{className:"w-3 h-3 text-highlight"})," ",_.perUpload," per upload"]}),a.jsxs("p",{className:"flex items-center gap-1.5",children:[a.jsx(Ps,{className:"w-3 h-3 text-highlight"})," Only enriched leads count"]})]}),a.jsxs(oe,{className:"mt-4 gap-2",variant:_.highlight?"default":"outline",onClick:()=>j(_.id),disabled:!!s,children:[s===_.id?"Loading...":`Get ${_.name}`,!s&&a.jsx(ba,{className:"w-3 h-3"})]})]},_.id))}),a.jsx("p",{className:"text-center text-[11px] text-muted-foreground",children:"Credit packs available for active plans · 1 enriched lead = 1 credit"}),a.jsxs("div",{className:"text-center text-sm text-muted-foreground",children:["Need help?"," ",a.jsx("a",{href:"mailto:[email protected]",className:"underline text-foreground",children:"[email protected]"})]})]})},L4=()=>{const{user:e}=Ct(),{toast:t}=_t(),r=vs(),[n,s]=p.useState(null),{data:o,isLoading:i}=zr({queryKey:["enrichment-jobs",e==null?void 0:e.id],queryFn:async()=>{const{data:h,error:m}=await W.from("enrichment_jobs").select("*").eq("user_id",e.id).in("status",["completed","failed","canceled"]).order("created_at",{ascending:!1});if(m)throw m;return h},enabled:!!e}),l=j1({mutationFn:async h=>{const{error:m}=await W.from("enrichment_jobs").delete().eq("id",h);if(m)throw m},onSuccess:()=>{r.invalidateQueries({queryKey:["enrichment-jobs"]}),t({title:"Record deleted"})}}),c=async h=>{s(h);try{const{data:m}=await W.rpc("get_cap_state",{target_user_id:e.id}),f=Array.isArray(m)?m[0]:m;if(!f||f.is_blocked||f.total_cap_left<=0){t({title:"No credits available to retry.",variant:"destructive"});return}await W.from("leads").update({status:"pending",error_message:null}).eq("job_id",h).eq("status","failed"),await W.from("enrichment_jobs").update({status:"processing"}).eq("id",h),await W.functions.invoke("enrich-leads",{body:{jobId:h}}),t({title:"Retrying failed leads..."}),r.invalidateQueries({queryKey:["enrichment-jobs"]}),r.invalidateQueries({queryKey:["active-jobs"]})}catch(m){console.error("Retry failed:",m),t({title:"Retry failed. Please try again.",variant:"destructive"})}finally{s(null)}},u=async(h,m,f,w=!1)=>{try{let y=W.from("leads").select("lead_data, icebreaker, status").eq("job_id",h).order("lead_index",{ascending:!0});w&&(y=y.eq("status","completed"));const{data:b,error:v}=await y;if(v||!b||b.length===0){t({title:"No lead data found",variant:"destructive"});return}const g=E=>E?E.includes(",")||E.includes('"')||E.includes(` 469`)?`"${E.replace(/"/g,'""').replace(/\n/g," ")}"`:E:"",x=[...f,"icebreaker"];w||x.push("status");const k=[x.map(g).join(",")];for(const E of b){const _=E.lead_data,P=f.map(M=>g(_[M]||""));
469P.push(g(E.icebreaker||"")),w||P.push(g(E.status||"")),k.push(P.join(","))}const S=new Blob([k.join(` 470`)],{type:"text/csv"}),j=URL.createObjectURL(S),N=document.createElement("a");N.href=j,N.download=`${m}${w?"-successful":"-enriched"}.csv`,N.click(),URL.revokeObjectURL(j),w&&t({title:`Downloaded ${b.length} enriched leads`})}catch{t({title:"Download failed",variant:"destructive"})}};if(i)return a.jsx("div",{className:"animate-pulse h-32 bg-muted rounded-2xl"});const d={completed:{color:"text-highlight",bg:"bg-highlight/10",label:"Completed"},failed:{color:"text-destructive",bg:"bg-destructive/10",label:"Failed"},canceled:{color:"text-muted-foreground",bg:"bg-muted",label:"Canceled"}};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"History"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Review completed runs, download files, or retry the failed leads."})]}),!o||o.length===0?a.jsxs("div",{className:"bg-card border border-dashed border-border rounded-2xl p-12 text-center",children:[a.jsx("div",{className:"w-12 h-12 bg-muted rounded-2xl flex items-center justify-center mx-auto mb-4",children:a.jsx(fp,{className:"w-6 h-6 text-muted-foreground/50"})}),a.jsx("p",{className:"font-display font-semibold text-foreground mb-1",children:"No history yet"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Upload your first CSV to get started."})]}):a.jsx("div",{className:"space-y-3",children:o.map(h=>{const m=d[h.status]||d.completed,f=h.total_leads>0?Math.round(h.enriched_leads/h.total_leads*100):0;return a.jsxs("div",{className:"bg-card border border-border rounded-2xl overflow-hidden",children:[a.jsxs("div",{className:"px-5 py-4 flex items-center gap-3",children:[a.jsx("div",{className:`w-8 h-8 rounded-lg flex items-center justify-center shrink-0 ${m.bg}`,children:h.status==="completed"?a.jsx(yl,{className:`w-4 h-4 ${m.color}`}):h.status==="failed"?a.jsx(vl,{className:`w-4 h-4 ${m.color}`}):a.jsx(Yu,{className:`w-4 h-4 ${m.color}`})}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-semibold text-sm truncate",children:h.batch_name}),a.jsx("p",{className:"text-[11px] text-muted-foreground",children:Zn(new Date(h.created_at),"MMM d, yyyy · h:mm a")})]}),a.jsx("span",{className:`text-[10px] font-bold uppercase tracking-wider px-2 py-1 rounded-lg ${m.bg} ${m.color}`,children:m.label}),a.jsx(oe,{size:"icon",variant:"ghost",className:"h-8 w-8 text-muted-foreground hover:text-destructive shrink-0",onClick:()=>l.mutate(h.id),children:a.jsx(cE,{className:"w-3.5 h-3.5"})})]}),a.jsxs("div",{className:"px-5 pb-4",children:[a.jsx("div",{className:"h-1.5 bg-muted rounded-full overflow-hidden mb-3",children:a.jsx("div",{className:"h-full bg-highlight rounded-full transition-all",style:{width:`${f}%`}})}),a.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground mb-3",children:[a.jsxs("span",{children:[a.jsx("strong",{className:"text-foreground",children:h.total_leads})," total"]}),a.jsxs("span",{className:"text-highlight",children:[a.jsx("strong",{children:h.enriched_leads})," enriched"]}),h.failed_leads>0&&a.jsxs("span",{className:"text-destructive",children:[a.jsx("strong",{children:h.failed_leads})," failed"]}),a.jsxs("span",{className:"ml-auto font-semibold text-foreground",children:[f,"%"]})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[h.failed_leads>0&&a.jsxs(oe,{size:"sm",variant:"outline",className:"h-8 gap-1.5 text-xs border-amber-500/30 text-amber-600 hover:bg-amber-500/10",onClick:()=>c(h.id),disabled:n===h.id,children:[a.jsx(bb,{className:`w-3 h-3 ${n===h.id?"animate-spin":""}`}),n===h.id?"Retrying...":`Retry ${h.failed_leads} Failed`]}),h.enriched_leads>0&&a.jsxs(oe,{size:"sm",className:"h-8 gap-1.5 text-xs",onClick:()=>u(h.id,h.batch_name,h.selected_fields,!0),children:[a.jsx(jf,{className:"w-3 h-3"})," Download (",h.enriched_leads,")"]}),(h.status==="completed"||h.status==="canceled")&&a.jsxs(oe,{size:"sm",variant:"outline",className:"h-8 gap-1.5 text-xs",onClick:()=>u(h.id,h.batch_name,h.selected_fields,!1),children:[a.jsx(jf,{className:"w-3 h-3"})," All Leads"]})]})]})]}
470,h.id)})})]})};var sS="AlertDialog",[D4,OM]=wn(sS,[$k]),jn=$k(),oS=e=>{const{__scopeAlertDialog:t,...r}=e,n=jn(t);return a.jsx(tS,{...n,...r,modal:!0})};oS.displayName=sS;var M4="AlertDialogTrigger",aS=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=jn(r);return a.jsx(R4,{...s,...n,ref:t})});aS.displayName=M4;var F4="AlertDialogPortal",iS=e=>{const{__scopeAlertDialog:t,...r}=e,n=jn(t);return a.jsx(rS,{...n,...r})};iS.displayName=F4;var $4="AlertDialogOverlay",lS=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=jn(r);return a.jsx(qp,{...s,...n,ref:t})});lS.displayName=$4;var ta="AlertDialogContent",[U4,B4]=D4(ta),W4=$0("AlertDialogContent"),cS=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...s}=e,o=jn(r),i=p.useRef(null),l=We(t,i),c=p.useRef(null);return a.jsx(E4,{contentName:ta,titleName:uS,docsSlug:"alert-dialog",children:a.jsx(U4,{scope:r,cancelRef:c,children:a.jsxs(Gp,{role:"alertdialog",...o,...s,ref:l,onOpenAutoFocus:we(s.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=c.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[a.jsx(W4,{children:n}),a.jsx(H4,{contentRef:i})]})})})});cS.displayName=ta;var uS="AlertDialogTitle",dS=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=jn(r);return a.jsx(Kp,{...s,...n,ref:t})});dS.displayName=uS;var hS="AlertDialogDescription",fS=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=jn(r);return a.jsx(Yp,{...s,...n,ref:t})});fS.displayName=hS;var z4="AlertDialogAction",mS=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,s=jn(r);return a.jsx(Qp,{...s,...n,ref:t})});mS.displayName=z4;var pS="AlertDialogCancel",gS=p.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:s}=B4(pS,r),o=jn(r),i=We(t,s);return a.jsx(Qp,{...o,...n,ref:i})});gS.displayName=pS;var H4=({contentRef:e})=>{const t=`\`${ta}\` requires a description for the component to be accessible for screen reader users. 471 472You can add a description to the \`${ta}\` by passing a \`${hS}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 473 474Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ta}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 475 476For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return p.useEffect(()=>{var n;document.getElementById((n=e.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},V4=oS,q4=aS,G4=iS,yS=lS,vS=cS,xS=mS,wS=gS,bS=dS,kS=fS;const K4=V4,Y4=q4,Q4=G4,SS=p.forwardRef(({className:e,...t},r)=>a.jsx(yS,{className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));SS.displayName=yS.displayName;const jS=p.forwardRef(({className:e,...t},r)=>a.jsxs(Q4,{children:[a.jsx(SS,{}),a.jsx(vS,{ref:r,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background 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:rounded-lg",e),...t})]}));jS.displayName=vS.displayName;const _S=({className:e,...t})=>a.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...t});_S.displayName="AlertDialogHeader";const CS=({className:e,...t})=>a.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});CS.displayName="AlertDialogFooter";const NS=p.forwardRef(({className:e,...t},r)=>a.jsx(bS,{ref:r,className:ue("text-lg font-semibold",e),...t}));
476NS.displayName=bS.displayName;const ES=p.forwardRef(({className:e,...t},r)=>a.jsx(kS,{ref:r,className:ue("text-sm text-muted-foreground",e),...t}));ES.displayName=kS.displayName;const TS=p.forwardRef(({className:e,...t},r)=>a.jsx(xS,{ref:r,className:ue(Mp(),e),...t}));TS.displayName=xS.displayName;const PS=p.forwardRef(({className:e,...t},r)=>a.jsx(wS,{ref:r,className:ue(Mp({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));PS.displayName=wS.displayName;const J4=()=>{const{user:e}=Ct(),{toast:t}=_t(),r=vs(),[n,s]=p.useState(null),[o,i]=p.useState(null),{data:l,isLoading:c}=zr({queryKey:["active-jobs",e==null?void 0:e.id],queryFn:async()=>{const{data:g,error:x}=await W.from("enrichment_jobs").select("*").eq("user_id",e.id).in("status",["pending","processing","paused"]).order("created_at",{ascending:!1});if(x)throw x;return g},enabled:!!e,refetchInterval:3e3}),u=(l==null?void 0:l.map(g=>g.id))||[],{data:d}=zr({queryKey:["lead-stats",u],queryFn:async()=>{if(u.length===0)return{};const g={};for(const x of u){const{data:k}=await W.from("leads").select("status").eq("job_id",x);k&&(g[x]={pending:k.filter(S=>S.status==="pending").length,processing:k.filter(S=>S.status==="processing").length,completed:k.filter(S=>S.status==="completed").length,failed:k.filter(S=>S.status==="failed").length,missing_website:k.filter(S=>S.status==="missing_website").length})}return g},enabled:u.length>0,refetchInterval:3e3}),h=async g=>{s(g);try{const{data:x}=await W.rpc("get_cap_state",{target_user_id:e.id}),k=Array.isArray(x)?x[0]:x;if(!k||k.is_blocked||k.total_cap_left<=0){t({title:"No credits available to retry.",variant:"destructive"});return}await W.from("leads").update({status:"pending",error_message:null}).eq("job_id",g).eq("status","failed"),await W.from("enrichment_jobs").update({status:"pending"}).eq("id",g),await W.functions.invoke("enrich-leads",{body:{jobId:g}}),t({title:"Retrying enrichment job..."}),r.invalidateQueries({queryKey:["active-jobs"]})}catch{t({title:"Retry failed.",variant:"destructive"})}finally{s(null)}},m=async g=>{i(g);try{await W.from("enrichment_jobs").update({status:"paused"}).eq("id",g),t({title:"Enrichment paused."}),r.invalidateQueries({queryKey:["active-jobs"]})}catch{t({title:"Failed to pause.",variant:"destructive"})}finally{i(null)}},f=async g=>{i(g);try{await W.from("enrichment_jobs").update({status:"processing"}).eq("id",g),W.functions.invoke("enrich-leads",{body:{jobId:g}}).catch(()=>{}),t({title:"Enrichment resumed!"}),r.invalidateQueries({queryKey:["active-jobs"]})}catch{t({title:"Failed to resume.",variant:"destructive"})}finally{i(null)}},w=async g=>{i(g);try{await W.from("enrichment_jobs").update({status:"canceled"}).eq("id",g),t({title:"Enrichment canceled."}),r.invalidateQueries({queryKey:["active-jobs"]}),r.invalidateQueries({queryKey:["user-plan",e==null?void 0:e.id]})}catch{t({title:"Failed to cancel.",variant:"destructive"})}finally{i(null)}},y=g=>{const x=Date.now()-new Date(g).getTime(),k=Math.floor(x/6e4),S=Math.floor(x%6e4/1e3);return k<1?`${S}s`:`${k}m ${S}s`},b=(g,x)=>{const k=(Date.now()-new Date(x).getTime())/6e4;return k<.1||g===0?null:(g/k).toFixed(1)},v=(g,x,k)=>{const S=(Date.now()-new Date(k).getTime())/6e4;if(S<.1||g===0)return null;const N=(x-g)/(g/S);return N<1?"< 1 min":`~${Math.ceil(N)} min`};return c?a.jsx("div",{className:"animate-pulse h-32 bg-muted rounded-2xl"}):a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"In progress"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Track jobs that are currently running, paused, or waiting to finish."})]}),!l||l.length===0?a.jsxs("div",{className:"bg-card border border-dashed border-border rounded-2xl p-12 text-center",children:[a.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-2xl flex items-center justify-center mx-auto mb-4",children:a.jsx(to,{className:"w-6 h-6 text-primary"})}),a.jsx("p",{className:"font-display font-semibold text-foreground mb-1",children:"Nothing is running right now"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Start a new upload and it will appear here."})]}):a.jsx("div",{className:"space-y-3",children:l.map(g=>{const x=d==null?void 0:d[g.id],k=x?x.completed+x.failed+x.missing_website:g.enriched_leads+g.failed_leads,S=g.total_leads>0?Math.round(k/g.total_leads*100):0,j=(x==null?void 0:x.completed)??g.enriched_leads,N=g.status==="processing"?b(j,g.created_at):null,E=g.status==="processing"?v(k,g.total_leads,g.created_at):null,_=g.status==="paused",P=g.status==="processing"||g.status==="pending",M=o===g.id,O={processing:"bg-primary/10 text-primary",pending:"bg-muted text-muted-foreground",paused:"bg-amber-500/10 text-amber-600"};return a.jsxs("div",{className:`bg-card border rounded-2xl overflow-hidden transition-colors ${_?"border-amber-500/30":"border-border"}`,children:[a.jsxs("div",{className:"px-5 py-4 flex items-center gap-3",children:[a.jsx("div",{className:`w-2 h-2 rounded-full shrink-0 ${P?"bg-primary animate-pulse":_?"bg-amber-500":"bg-muted-foreground"}`}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-semibold text-sm truncate",children:g.batch_name}),a.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[g.total_leads," leads · ",y(g.created_at)," ago"]})]}),a.jsx("span",{className:`text-[10px] font-bold uppercase tracking-wider px-2 py-1 rounded-lg ${O[g.status]||"bg-muted text-muted-foreground"}`,children:g.status})]}),a.jsxs("div",{className:"px-5 pb-4 space-y-3",children:[a.jsxs("div",{children:[a.jsx(Wp,{value:S,className:"h-2"}),a.jsxs("div",{className:"flex items-center justify-between text-[11px] text-muted-foreground mt-1.5",children:[a.jsxs("span",{className:"font-semibold text-foreground",children:[S,"%"]}),a.jsxs("div",{className:"flex items-center gap-3",children:[N&&a.jsxs("span",{children:[N," leads/min"]}),E&&a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(lE,{className:"w-3 h-3"}),E]})]})]})]}),a.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Yu,{className:"w-3 h-3"})," ",(x==null?void 0:x.pending)??"-"," pending"]}),a.jsxs("span",{className:"flex items-center gap-1 text-highlight",children:[a.jsx(yl,{className:"w-3 h-3"})," ",j]}),a.jsxs("span",{className:"flex items-center gap-1 text-destructive",children:[a.jsx(vl,{className:"w-3 h-3"})," ",(x==null?void 0:x.failed)??g.failed_leads]}),((x==null?void 0:x.missing_website)??0)>0&&a.jsxs("span",{className:"flex items-center gap-1 text-amber-500",children:[a.jsx(ki,{className:"w-3 h-3"})," ",x==null?void 0:x.missing_website]})]}),a.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[P&&a.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>m(g.id),disabled:M,className:"h-8 gap-1.5 text-xs",children:[a.jsx(sE,{className:"w-3 h-3"})," Pause"]}),_&&a.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>f(g.id),disabled:M,className:"h-8 gap-1.5 text-xs",children:[a.jsx(oE,{className:"w-3 h-3"})," Resume"]}),g.status==="failed"&&a.jsxs(oe,{variant:"outline",size:"sm",onClick:()=>
476h(g.id),disabled:n===g.id,className:"h-8 gap-1.5 text-xs",children:[a.jsx(bb,{className:"w-3 h-3"})," ",n===g.id?"Retrying...":"Retry"]}),(P||_)&&a.jsxs(K4,{children:[a.jsx(Y4,{asChild:!0,children:a.jsxs(oe,{variant:"outline",size:"sm",disabled:M,className:"h-8 gap-1.5 text-xs text-destructive border-destructive/30 hover:bg-destructive/10",children:[a.jsx(YN,{className:"w-3 h-3"})," Cancel"]})}),a.jsxs(jS,{children:[a.jsxs(_S,{children:[a.jsx(NS,{children:"Cancel Enrichment?"}),a.jsx(ES,{className:"space-y-2",children:a.jsx("p",{children:"Are you sure? Already enriched leads count toward usage."})})]}),a.jsxs(CS,{children:[a.jsx(PS,{children:"Keep Running"}),a.jsx(TS,{onClick:()=>w(g.id),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Yes, Cancel"})]})]})]})]})]})]},g.id)})})]})};function X4(e){const t=(e.match(/,/g)||[]).length,r=(e.match(/;/g)||[]).length,n=(e.match(/\t/g)||[]).length;return n>t&&n>r?" ":r>t?";":","}function Z4(e){return e.replace(/^\uFEFF/,"")}function tx(e,t){const r=[];let n="",s=!1;for(let o=0;o<e.length;o++){const i=e[o];s?i==='"'?o+1<e.length&&e[o+1]==='"'?(n+='"',o++):s=!1:n+=i:i==='"'?s=!0:i===t?(r.push(n.trim()),n=""):n+=i}return r.push(n.trim()),r}function eD(e){const t=[];let r="",n=!1;for(let s=0;s<e.length;s++){const o=e[s];o==='"'?(n=!n,r+=o):(o===` 477`||o==="\r")&&!n?(o==="\r"&&s+1<e.length&&e[s+1]===` 478`&&s++,r.trim()&&t.push(r),r=""):r+=o}return r.trim()&&t.push(r),t}function tD(e){return e.replace(/^["']|["']$/g,"").trim()}function rD(e){let t=e.trim().replace(/^["']|["']$/g,"");return t?(!/^https?:\/\//i.test(t)&&t.includes(".")&&(t=`https://${t}`),t):""}function nD(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}function sD(e){const t=[],r=Z4(e),n=eD(r);if(n.length===0)return{headers:[],rows:[],totalRows:0,emptyRows:0,delimiter:",",errors:["Empty file"]};const s=X4(n[0]),o=tx(n[0],s).map(tD);if(o.length===0||o.every(c=>!c))return t.push("No valid headers found"),{headers:[],rows:[],totalRows:0,emptyRows:0,delimiter:s,errors:t};let i=0;const l=[];for(let c=1;c<n.length;c++){const u=n[c];if(!u.trim()){i++;continue}const d=tx(u,s);if(d.every(m=>!m.trim())){i++;continue}const h={};for(let m=0;m<o.length;m++)h[o[m]]=(d[m]||"").trim();l.push(h)}return{headers:o,rows:l,totalRows:n.length-1,emptyRows:i,delimiter:s,errors:t}}function rx(e,t,r){let n=0,s=0;return{leads:e.map((i,l)=>{const c={};for(const d of r)i[d]!==void 0&&(c[d]=i[d]);let u=null;for(const d of t){const h=i[d];if(h){const m=rD(h);if(nD(m)){u=m;break}}}return u?n++:s++,{lead_index:l+1,lead_data:c,website:u,status:u?"pending":"missing_website"}}),validUrlCount:n,missingUrlCount:s}}const oD="https://docs.google.com/document/d/18KSqL2utLnGgiwYkIKR5z8Ugb5mhzHWeveE642Nc-CE/edit?usp=drivesdk",aD=()=>a.jsxs("a",{href:oD,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl text-sm font-bold bg-primary text-primary-foreground shadow-md hover:shadow-lg hover:-translate-y-0.5 active:scale-95 transition-all duration-200 group",children:[a.jsx(Aa,{className:"w-4 h-4"}),a.jsx("span",{children:"View Prompt Guide"}),a.jsx(hb,{className:"w-4 h-4 transition-transform group-hover:translate-x-0.5 group-hover:-translate-y-0.5"})]}),iD=[{value:"v1",label:"V1 â Fast",desc:"Quick extraction, best for standard pages",icon:a.jsx(to,{className:"w-4 h-4"})},{value:"v2",label:"V2 â Advanced",desc:"Built-in deep crawler, no external APIs",icon:a.jsx(Ju,{className:"w-4 h-4"})},{value:"v1v2",label:"V1 + V2 â Fallback",desc:"Tries V1 first, falls back to V2",icon:a.jsx(yb,{className:"w-4 h-4"})}],lD=()=>{const{user:e}=Ct(),{data:t}=dd(),{toast:r}=_t(),n=vs(),[s,o]=p.useState(""),[i,l]=p.useState(null),[c,u]=p.useState(null),[d,h]=p.useState([]),[m,f]=p.useState([]),[w,y]=p.useState(""),[b,v]=p.useState(""),[g,x]=p.useState(!1),[k,S]=p.useState(1),[j,N]=p.useState(null),[E,_]=p.useState("v1v2"),P=yk(t??null),M=(t==null?void 0:t.total_cap_left)??null,O=(t==null?void 0:t.per_upload_cap_left)??null,R=P&&!(t!=null&&t.is_blocked)&&(M??0)>0&&(O??0)>0,D=p.useCallback(async()=>
478{if(!e)return null;const{data:L,error:B}=await W.rpc("get_cap_state",{target_user_id:e.id});if(B)throw B;const se=(Array.isArray(L)?L[0]:L)??null;return n.setQueryData(["user-plan",e.id],se),se},[n,e]),U=p.useCallback(async L=>{const B=await D();if(!B||B.is_blocked){r({title:"Your account is currently restricted.",variant:"destructive"});return}if(B.total_cap_left<=0||B.per_upload_cap_left<=0){r({title:"No upload capacity available right now.",variant:"destructive"});return}l(L);const se=new FileReader;se.onload=fe=>{var lt;const ie=(lt=fe.target)==null?void 0:lt.result,Je=sD(ie);if(!(Je.errors.length>0&&(r({title:`CSV parsing issues: ${Je.errors.join(", ")}`,variant:"destructive"}),Je.headers.length===0))){if(Je.rows.length===0){r({title:"CSV file has no data rows",variant:"destructive"});return}u(Je),h([...Je.headers]),f([]),N(null),y(""),S(2)}},se.readAsText(L)},[D,r]),q=p.useCallback(async L=>{var se;const B=(se=L.target.files)==null?void 0:se[0];if(B){if(!B.name.endsWith(".csv")){r({title:"Please upload a CSV file",variant:"destructive"});return}await U(B)}},[U,r]),te=p.useCallback(async L=>{L.preventDefault();const B=L.dataTransfer.files[0];if(!(B!=null&&B.name.endsWith(".csv"))){r({title:"Please upload a CSV file",variant:"destructive"});return}await U(B)},[U,r]),T=L=>{m.includes(L)||h(B=>B.includes(L)?B.filter(se=>se!==L):[...B,L])},A=L=>{f(B=>{const se=B.includes(L)?B.filter(fe=>fe!==L):[...B,L];if(B.includes(L)||h(fe=>fe.includes(L)?fe:[...fe,L]),c){const{validUrlCount:fe,missingUrlCount:ie}=rx(c.rows,se,d);N({valid:fe,missing:ie})}return se})},$=Math.max(1,Math.min((c==null?void 0:c.rows.length)||1,(t==null?void 0:t.per_upload_cap)??1)),J=async()=>{if(!s){r({title:"Name your batch",variant:"destructive"});return}if(m.length===0){r({title:"Select at least one website URL field",variant:"destructive"});return}if(!b){r({title:"Enter a prompt",variant:"destructive"});return}if(!c){r({title:"No CSV data parsed",variant:"destructive"});return}const L=await D();if(!L||L.is_blocked){r({title:"Your account is currently restricted.",variant:"destructive"});return}if(L.total_cap_left<=0||L.per_upload_cap_left<=0){r({title:"No upload capacity available right now.",variant:"destructive"});return}const B=typeof w=="number"?w:0;if(B<1){r({title:"Enter the number of leads to enrich",variant:"destructive"});return}const se=Math.min(L.per_upload_cap_left,c.rows.length);if(B>se){r({title:`Maximum ${se.toLocaleString()} leads per upload`,variant:"destructive"});return}x(!0);try{const fe=c.rows.slice(0,B),{leads:ie}=rx(fe,m,d),{data:Je,error:lt}=await W.from("enrichment_jobs").insert({user_id:e.id,batch_name:s,total_leads:ie.length,selected_fields:d,website_fields:m,user_prompt:b,enrichment_mode:E,status:"pending"}).select("id").single();if(lt)throw lt;const Mt=Je.id,Ft=100;for(let tt=0;tt<ie.length;tt+=Ft){const Yt=ie.slice(tt,tt+Ft).map(ne=>({job_id:Mt,user_id:e.id,lead_index:ne.lead_index,lead_data:ne.lead_data,website:ne.website,status:ne.status})),{error:X}=await W.from("leads").insert(Yt);if(X)throw X}W.functions.invoke("enrich-leads",{body:{jobId:Mt}}).catch(tt=>console.error("Enrich invoke error:",tt)),r({title:"Enrichment started. Track progress in Enrichment."}),n.invalidateQueries({queryKey:["active-jobs"]}),n.invalidateQueries({queryKey:["user-plan",e==null?void 0:e.id]}),S(1),l(null),u(null),h([]),f([]),o(""),v(""),y(""),N(null)}catch(fe){console.error("Upload/enrich start error",fe),r({title:"Could not start enrichment. Please try again.",variant:"destructive"})}finally{x(!1)}},V=Math.ceil((typeof w=="number"?w:0)*(E==="v1"?.4:E==="v2"?.3:.5));return a.jsxs("div",{className:"max-w-2xl space-y-1",children:[a.jsx("h2",{className:"mb-2 font-display text-2xl font-bold text-foreground",children:"Upload leads"}),R&&M!==null&&O!==null&&a.jsxs("p",{className:"mb-6 text-sm text-muted-foreground",children:["You can use ",M.toLocaleString()," credits right now, with ",O.toLocaleString()," leads available in this upload."]}),(t==null?void 0:t.is_blocked)&&a.jsx("div",{className:"bg-destructive/10 border border-destructive/20 text-destructive rounded-xl p-4 mb-6",children:"Your account is currently blocked. Contact support at [email protected]"}),k===1&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx(K,{children:"Batch Name"}),a.jsx(be,{value:s,onChange:L=>o(L.target.value),placeholder:"e.g., Q1 Outreach List"})]}),a.jsxs("div",{onDragOver:L=>L.preventDefault(),onDrop:te,className:"border-2 border-dashed border-border rounded-2xl p-10 text-center cursor-pointer hover:border-primary/50 transition-colors",children:[a.jsx(xl,{className:"w-8 h-8 mx-auto mb-3 text-muted-foreground"}),a.jsx("p",{className:"text-muted-foreground mb-2",children:"Drag & drop your CSV here, or click to browse"}),a.jsx("input",{type:"file",accept:".csv",onChange:q,className:"hidden",id:"csv-upload"}),a.jsx("label",{htmlFor:"csv-upload",children:a.jsx(oe,{variant:"outline",asChild:!0,children:a.jsx("span",{children:"Choose File"})})}),i&&a.jsxs("p",{className:"mt-3 text-sm flex items-center gap-2 justify-center",children:[a.jsx(fp,{className:"w-4 h-4"})," ",i.name]})]})]}),k===2&&c&&a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"bg-muted rounded-xl p-4 text-sm space-y-1",children:[a.jsx("p",{className:"font-semibold text-foreground",children:"CSV Parsed Successfully"}),a.jsxs("p",{className:"text-muted-foreground",children:[c.rows.length," data rows ⢠",c.headers.length," columns ⢠Delimiter: ",c.delimiter===","?"comma":c.delimiter===";"?"semicolon":"tab",c.emptyRows>0&&` ⢠${c.emptyRows} empty rows skipped`]})]}),a.jsxs("div",{children:[a.jsx(K,{className:"mb-2 block",children:"Select fields to keep"}),a.jsx("div",{className:"flex flex-wrap gap-2",children:c.headers.map(L=>a.jsxs("label",{className:`flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer text-sm transition-colors ${d.includes(L)?"bg-primary text-primary-foreground border-primary":"border-border"}`,children:[a.jsx(yu,{checked:d.includes(L),onCheckedChange:()=>T(L),disabled:m.includes(L)}),L]},L))})]}),a.jsxs("div",{children:[a.jsx(K,{children:"Website URL field(s) â select one or more"}),a.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:c.headers.map(L=>a.jsxs("label",{className:`flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer text-sm transition-colors ${m.includes(L)?"bg-highlight text-highlight-foreground border-highlight":"border-border"}`,children:[a.jsx(yu,{checked:m.includes(L),onCheckedChange:()=>A(L)}),L]},L))})]}),j&&m.length>0&&a.jsxs("div",{className:"bg-muted rounded-xl p-4 text-sm space-y-1",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(fb,{className:"w-4 h-4 text-highlight"}),a.jsxs("span",{children:[j.valid," rows with valid URLs"]})]}),j.missing>0&&a.jsxs("div",{className:"flex items-center gap-2 text-amber-500",children:[a.jsx(ki,{className:"w-4 h-4"}),a.jsxs("span",{children:[j.missing," rows with missing/invalid URLs (will be marked as missing_website)"]})]})]}),a.jsxs("div",{children:[a.jsx(K,{className:"mb-2 block",children:"Enrichment Mode"}),a.jsx("div",{className:"grid gap-2",children:iD.map(L=>a.jsxs("button",{type:"button",onClick:()=>
478_(L.value),className:`flex items-center gap-3 px-4 py-3 rounded-xl border text-left transition-all active:scale-[0.98] ${E===L.value?"border-primary bg-primary/5 ring-1 ring-primary/20":"border-border hover:border-primary/30"}`,children:[a.jsx("div",{className:`shrink-0 ${E===L.value?"text-primary":"text-muted-foreground"}`,children:L.icon}),a.jsxs("div",{children:[a.jsx("p",{className:`text-sm font-medium ${E===L.value?"text-foreground":"text-muted-foreground"}`,children:L.label}),a.jsx("p",{className:"text-xs text-muted-foreground",children:L.desc})]})]},L.value))})]}),a.jsxs("div",{children:[a.jsxs(K,{children:["Number of leads to enrich (max ",$.toLocaleString(),")"]}),a.jsx(be,{type:"number",value:w,onChange:L=>{const B=L.target.value;if(B===""){y("");return}const se=Number(B);Number.isNaN(se)||y(Math.max(1,Math.min(se,$)))},min:1,max:$,placeholder:`Enter up to ${$.toLocaleString()}`})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsx(K,{children:"Your Prompt â give detailed instructions (required words, opening, closing, length, tone). The AI will follow it strictly."}),a.jsx(aD,{})]}),a.jsx(Se,{value:b,onChange:L=>v(L.target.value),rows:12,maxLength:4e3,className:"min-h-[260px] font-mono text-sm leading-relaxed",placeholder:`Example: 479 480Write a 3-sentence cold-outreach opener (works for email or LinkedIn). 481- Start with: "Hey {first_name}," 482- Mention something specific from their website (a product, page, customer, or recent post). 483- End with: "Worth a quick chat?" 484- Tone: friendly, direct, no jargon. 485- Must include the word "noticed" naturally. 486- Length: 50-70 words.`}),a.jsxs("p",{className:"mt-1 text-[11px] text-muted-foreground",children:[b.length," / 4000 characters"]})]}),a.jsxs("div",{className:"bg-muted rounded-xl p-4 text-sm text-muted-foreground",children:["Estimated completion: ~",V<60?`${V} min`:`${Math.round(V/60)} hr ${V%60} min`]}),a.jsxs("div",{className:"flex gap-3",children:[a.jsx(oe,{variant:"outline",onClick:()=>S(1),children:"Back"}),a.jsx(oe,{onClick:J,disabled:g||!R,children:g?"Starting...":"Enrich Leads"})]})]})]})},cD=()=>{var s,o;const{user:e}=Ct(),{data:t,isLoading:r}=zr({queryKey:["analytics",e==null?void 0:e.id],queryFn:async()=>{const{data:i,error:l}=await W.from("enrichment_jobs").select("total_leads, enriched_leads, failed_leads, status").eq("user_id",e.id);if(l)throw l;const c=i.reduce((w,y)=>w+y.total_leads,0),u=i.reduce((w,y)=>w+y.enriched_leads,0),d=i.reduce((w,y)=>w+y.failed_leads,0),h=i.length,m=i.filter(w=>w.status==="completed").length,f=c>0?Math.round(u/c*100):0;return{totalUploaded:c,totalEnriched:u,totalFailed:d,totalJobs:h,completedJobs:m,successRate:f}},enabled:!!e});if(r)return a.jsx("div",{className:"animate-pulse h-48 bg-muted rounded-2xl"});const n=[{label:"Uploaded",value:(t==null?void 0:t.totalUploaded)??0,icon:xl,color:"text-primary",bg:"bg-primary/10"},{label:"Enriched",value:(t==null?void 0:t.totalEnriched)??0,icon:yl,color:"text-highlight",bg:"bg-highlight/10"},{label:"Failed",value:(t==null?void 0:t.totalFailed)??0,icon:vl,color:"text-destructive",bg:"bg-destructive/10"},{label:"Total Jobs",value:(t==null?void 0:t.totalJobs)??0,icon:yb,color:"text-primary",bg:"bg-primary/10"},{label:"Completed",value:(t==null?void 0:t.completedJobs)??0,icon:mp,color:"text-highlight",bg:"bg-highlight/10"}];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Usage"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"A simple view of what you have uploaded, enriched, and completed."})]}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 flex items-center gap-6",children:[a.jsxs("div",{className:"relative w-20 h-20 shrink-0",children:[a.jsxs("svg",{viewBox:"0 0 36 36",className:"w-20 h-20 -rotate-90",children:[a.jsx("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",stroke:"hsl(var(--muted))",strokeWidth:"3"}),a.jsx("circle",{cx:"18",cy:"18",r:"15.5",fill:"none",stroke:"hsl(var(--highlight))",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:`${((t==null?void 0:t.successRate)??0)*.975} 97.5`,className:"transition-all duration-700"})]}),a.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-lg font-bold text-foreground",children:[(t==null?void 0:t.successRate)??0,"%"]})]}),a.jsxs("div",{children:[a.jsx("p",{className:"font-display font-bold text-lg text-foreground",children:"Success Rate"}),a.jsxs("p",{className:"text-sm text-muted-foreground",children:[((s=t==null?void 0:t.totalEnriched)==null?void 0:s.toLocaleStr
486ing())??0," of ",((o=t==null?void 0:t.totalUploaded)==null?void 0:o.toLocaleString())??0," leads enriched successfully"]})]})]}),a.jsx("div",{className:"grid gap-3 grid-cols-2 sm:grid-cols-3 lg:grid-cols-5",children:n.map(i=>a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-4 hover:shadow-sm transition-shadow",children:[a.jsx("div",{className:`w-8 h-8 rounded-xl ${i.bg} flex items-center justify-center mb-3`,children:a.jsx(i.icon,{className:`w-4 h-4 ${i.color}`})}),a.jsx("p",{className:"font-display text-2xl font-bold text-foreground",children:i.value.toLocaleString()}),a.jsx("p",{className:"text-[11px] text-muted-foreground font-medium mt-0.5",children:i.label})]},i.label))})]})};function uD(e){const t=e.toLowerCase();return t.includes("credit")?{label:"Credit Top-Up",badge:"Top-Up",icon:a.jsx(mb,{className:"w-4 h-4"}),bgClass:"bg-highlight/10",textClass:"text-highlight"}:t.includes("lifetime")?{label:"Lifetime Plan",badge:"One-Time",icon:a.jsx(eE,{className:"w-4 h-4"}),bgClass:"bg-purple-500/10",textClass:"text-purple-500"}:t.includes("premium")?{label:"Premium Plan",badge:"Subscription",icon:a.jsx(pb,{className:"w-4 h-4"}),bgClass:"bg-amber-500/10",textClass:"text-amber-500"}:t.includes("basic")?{label:"Basic Plan",badge:"Subscription",icon:a.jsx(Aa,{className:"w-4 h-4"}),bgClass:"bg-blue-500/10",textClass:"text-blue-500"}:{label:e||"Payment",badge:"Payment",icon:a.jsx(to,{className:"w-4 h-4"}),bgClass:"bg-primary/10",textClass:"text-primary"}}const dD=()=>{const{user:e}=Ct(),[t,r]=p.useState("all"),{data:n,isLoading:s}=zr({queryKey:["transactions",e==null?void 0:e.id],queryFn:async()=>{const{data:l,error:c}=await W.from("transactions").select("*").eq("user_id",e.id).order("created_at",{ascending:!1}).limit(50);if(c)throw c;return l},enabled:!!e});if(s)return a.jsx("div",{className:"animate-pulse h-48 bg-muted rounded-2xl"});const o=(n||[]).filter(l=>{var u;if(t==="all")return!0;const c=(u=l.product_name)==null?void 0:u.toLowerCase().includes("credit");return t==="topup"?c:!c}),i=[{key:"all",label:"All payments"},{key:"topup",label:"Credit top-ups"},{key:"subscription",label:"Subscriptions"}];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Transactions"}),a.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"See both subscription charges and credit top-ups in one clean list."})]}),a.jsx("div",{className:"flex gap-1.5 bg-muted/60 p-1 rounded-xl",children:i.map(l=>a.jsx("button",{onClick:()=>r(l.key),className:`px-3 py-1.5 rounded-lg text-xs font-medium transition-all ${t===l.key?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:l.label},l.key))})]}),o.length===0?a.jsxs("div",{className:"bg-card border border-dashed border-border rounded-2xl p-12 text-center",children:[a.jsx("div",{className:"w-12 h-12 bg-muted rounded-2xl flex items-center justify-center mx-auto mb-4",children:a.jsx(fp,{className:"w-6 h-6 text-muted-foreground/50"})}),a.jsx("p",{className:"font-display font-semibold text-foreground mb-1",children:"No transactions yet"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:t!=="all"?"No transactions match this filter.":"Your payment history will appear here."})]}):a.jsx("div",{className:"bg-card border border-border rounded-2xl overflow-hidden divide-y divide-border/50",children:o.map(l=>{const c=uD(l.product_name||""),u=(l.amount/100).toFixed(2),d=l.credits_added>0?l.credits_added:null;return a.jsxs("div",{className:"flex items-center gap-3 sm:gap-4 px-4 sm:px-5 py-4 hover:bg-muted/30 transition-colors",children:[a.jsx("div",{className:`w-9 h-9 rounded-xl flex items-center justify-center shrink-0 ${c.bgClass} ${c.textClass}`,children:c.icon}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[a.jsx("p",{className:"font-semibold text-sm text-foreground truncate",children:c.label}),a.jsx("span",{className:`text-[10px] font-bold uppercase tracking-wider px-1.5 py-0.5 rounded-md ${c.bgClass} ${c.textClass}`,children:c.badge})]}),a.jsx("p",{className:"text-[11px] text-muted-foreground",children:Zn(new Date(l.created_at),"MMM d, yyyy · h:mm a")})]}),d&&a.jsxs("div",{className:"hidden sm:flex items-center gap-1 bg-highlight/10 text-highlight text-[11px] font-bold px-2 py-1 rounded-lg shrink-0",children:[a.jsx(hb,{className:"w-3 h-3"}
486),"+",d.toLocaleString()]}),a.jsxs("div",{className:"text-right shrink-0",children:[a.jsxs("p",{className:"font-bold text-sm text-foreground",children:["$",u]}),a.jsx("span",{className:`text-[10px] font-semibold uppercase ${l.status==="succeeded"?"text-highlight":l.status==="failed"?"text-destructive":"text-muted-foreground"}`,children:l.status})]})]},l.id)})})]})},Eo=p.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:ue("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Eo.displayName="Card";const Oc=p.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:ue("flex flex-col space-y-1.5 p-6",e),...t}));Oc.displayName="CardHeader";const Ic=p.forwardRef(({className:e,...t},r)=>a.jsx("h3",{ref:r,className:ue("text-2xl font-semibold leading-none tracking-tight",e),...t}));Ic.displayName="CardTitle";const im=p.forwardRef(({className:e,...t},r)=>a.jsx("p",{ref:r,className:ue("text-sm text-muted-foreground",e),...t}));im.displayName="CardDescription";const To=p.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:ue("p-6 pt-0",e),...t}));To.displayName="CardContent";const hD=p.forwardRef(({className:e,...t},r)=>a.jsx("div",{ref:r,className:ue("flex items-center p-6 pt-0",e),...t}));hD.displayName="CardFooter";const fD=()=>{const{user:e}=Ct(),{toast:t}=_t(),r=vs(),[n,s]=p.useState(""),[o,i]=p.useState(!1),[l,c]=p.useState(!1),[u,d]=p.useState(null),[h,m]=p.useState(""),[f,w]=p.useState(!1),{data:y,isLoading:b}=zr({queryKey:["user-integration",e==null?void 0:e.id],queryFn:async()=>{const{data:_,error:P}=await W.from("user_integrations").select("*").eq("user_id",e.id).maybeSingle();if(P)throw P;return _},enabled:!!e}),v=!!(y!=null&&y.instantly_api_key),{data:g,isLoading:x,refetch:k}=zr({queryKey:["instantly-campaigns",e==null?void 0:e.id],queryFn:async()=>{const{data:_,error:P}=await W.functions.invoke("instantly-api",{body:{action:"list-campaigns"}});if(P)throw P;if(!_.success)throw new Error(_.error);return _.campaigns||[]},enabled:!!e&&v,staleTime:3e4}),{data:S}=zr({queryKey:["enriched-jobs-for-instantly",e==null?void 0:e.id],queryFn:async()=>{const{data:_,error:P}=await W.from("enrichment_jobs").select("id, batch_name, enriched_leads, selected_fields, created_at").eq("user_id",e.id).eq("status","completed").gt("enriched_leads",0).order("created_at",{ascending:!1}).limit(20);if(P)throw P;return _},enabled:!!e&&v}),j=async()=>{if(!n.trim()||n.trim().length<10){t({title:"Please enter a valid API key",variant:"destructive"});return}i(!0);try{const{data:_,error:P}=await W.functions.invoke("instantly-api",{body:{action:"test-connection",api_key:n.trim()}});if(P||!(_!=null&&_.success))throw new Error((_==null?void 0:_.error)||"Invalid API key");const{error:M}=await W.from("user_integrations").upsert({user_id:e.id,instantly_api_key:n.trim(),instantly_connected_at:new Date().toISOString()},{onConflict:"user_id"});if(M)throw M;s(""),r.invalidateQueries({queryKey:["user-integration"]}),r.invalidateQueries({queryKey:["instantly-campaigns"]}),t({title:"Instantly AI connected successfully!"})}catch(_){t({title:"Connection failed",description:_.message,variant:"destructive"})}finally{i(!1)}},N=async()=>{const{error:_}=await W.from("user_integrations").update({instantly_api_key:null,instantly_connected_at:null}).eq("user_id",e.id);if(_){t({title:"Failed to disconnect",variant:"destructive"});return}r.invalidateQueries({queryKey:["user-integration"]}),r.invalidateQueries({queryKey:["instantly-campaigns"]}),t({title:"Instantly AI disconnected"})},E=async()=>{if(!u||!h){t({title:"Select a campaign",variant:"destructive"}),w(!1);return}w(!0);try{const{data:_,error:P}=await W.from("leads").select("lead_data, icebreaker").eq("job_id",u.id).eq("status","completed").order("lead_index",{ascending:!0});if(P||!(_!=null&&_.length))throw new Error("No enriched leads found");const M=_.map(D=>{const U=D.lead_data,q={email:U.email||U.Email||U.EMAIL||""};return(U.first_name||U.firstName||U["First Name"])&&(q.first_name=U.first_name||U.firstName||U["First Name"]),(U.last_name||U.lastName||U["Last Name"])&&(q.last_name=U.last_name||U.lastName||U["Last Name"]),(U.company||U.Company||U.company_name)&&(q.company_name=U.company||U.Company||U.company_name),(U.website||U.Website)&&(q.website=U.website||U.Website),(U.phone||U.Phone)&&(q.phone=U.phone||U.Phone),D.icebreaker&&(q.custom_variables={icebreaker:D.icebreaker}),q}).filter(D=>D.email);if(M.length===0)throw new Error("No leads with valid emails found");const{data:O,error:R}=await W.functions.invoke("instantly-api",{body:{action:"push-leads",campaign_id:h,leads:M}});if(R||!(O!=null&&O.success))throw new Error((O==null?void 0:O.error)||"Push failed");t({title:`${O.total_added} leads sent to Instantly!`,description:O.total_failed>0?`${O.total_failed} failed`:void 0}),c(!1),d(null),m("")}catch(_){t({title:"Push failed",description:_.message,variant:"destructive"})}finally{w(!1)}};return b?a.jsx("div",{className:"animate-pulse h-32 bg-muted rounded-2xl"}
486):v?a.jsxs("div",{className:"max-w-3xl mx-auto space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("img",{src:an,alt:"Instantly AI",className:"h-10 w-10"}),a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Instantly AI"}),a.jsxs("div",{className:"flex items-center gap-1.5 mt-0.5",children:[a.jsx(yl,{className:"h-3.5 w-3.5 text-highlight"}),a.jsx("span",{className:"text-xs text-highlight font-medium",children:"Connected"})]})]})]}),a.jsxs(oe,{variant:"outline",size:"sm",onClick:N,className:"gap-1.5 text-xs text-destructive hover:text-destructive",children:[a.jsx(uE,{className:"h-3.5 w-3.5"})," Disconnect"]})]}),a.jsxs(Eo,{children:[a.jsx(Oc,{className:"pb-3",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs(Ic,{className:"text-base flex items-center gap-2",children:[a.jsx("img",{src:an,alt:"",className:"h-4 w-4"}),"Your Campaigns"]}),a.jsxs(oe,{variant:"outline",size:"sm",className:"h-8 gap-1.5 text-xs",onClick:()=>k(),children:[a.jsx(Cs,{className:"h-3 w-3"})," Refresh"]})]})}),a.jsx(To,{children:x?a.jsx("div",{className:"space-y-2",children:[1,2,3].map(_=>a.jsx("div",{className:"h-12 bg-muted animate-pulse rounded-xl"},_))}):g!=null&&g.length?a.jsx("div",{className:"space-y-2",children:g.map(_=>a.jsx("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:_.name}),a.jsx("p",{className:"text-[11px] text-muted-foreground capitalize",children:_.status||"draft"})]})},_.id))}):a.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:"No campaigns found. Create one in your Instantly account first."})})]}),a.jsxs(Eo,{children:[a.jsxs(Oc,{className:"pb-3",children:[a.jsxs(Ic,{className:"text-base flex items-center gap-2",children:[a.jsx(Ec,{className:"h-4 w-4 text-primary"}),"Push Enriched Leads"]}),a.jsx(im,{children:"Select a completed enrichment and send leads to an Instantly campaign."})]}),a.jsx(To,{children:S!=null&&S.length?a.jsx("div",{className:"space-y-2",children:S.map(_=>a.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"text-sm font-medium truncate",children:_.batch_name}),a.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[_.enriched_leads," enriched leads"]})]}),a.jsxs(oe,{size:"sm",className:"h-8 gap-1.5 text-xs shrink-0",onClick:()=>{d(_),c(!0),m("")},children:[a.jsx(Ec,{className:"h-3 w-3"})," Push to Instantly"]})]},_.id))}):a.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:"No enriched jobs available. Enrich some leads first!"})})]}),a.jsx(Eo,{className:"border-dashed",children:a.jsxs(To,{className:"pt-6",children:[a.jsxs("h3",{className:"font-semibold text-sm mb-3 text-foreground flex items-center gap-2",children:[a.jsx("img",{src:an,alt:"",className:"h-4 w-4"}),"Field Mapping"]}),a.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[a.jsxs("div",{className:"bg-muted rounded-lg px-3 py-2",children:[a.jsx("span",{className:"text-muted-foreground",children:"email â"})," ",a.jsx("span",{className:"font-medium",children:"email"})]}),a.jsxs("div",{className:"bg-muted rounded-lg px-3 py-2",children:[a.jsx("span",{className:"text-muted-foreground",children:"first_name â"})," ",a.jsx("span",{className:"font-medium",children:"first_name"})]}),a.jsxs("div",{className:"bg-muted rounded-lg px-3 py-2",children:[a.jsx("span",{className:"text-muted-foreground",children:"last_name â"})," ",a.jsx("span",{className:"font-medium",children:"last_name"})]}),a.jsxs("div",{className:"bg-muted rounded-lg px-3 py-2",children:[a.jsx("span",{className:"text-muted-foreground",children:"company â"})," ",a.jsx("span",{className:"font-medium",children:"company_name"})]}),a.jsxs("div",{className:"bg-muted rounded-lg px-3 py-2 col-span-2",children:[a.jsx("span",{className:"text-muted-foreground",children:"icebreaker â"})," ",a.jsx("span",{className:"font-medium text-highlight",children:"{{icebreaker}}"})," ",a.jsx("span",{className:"text-muted-foreground",children:"(custom variable)"})]})]})]})}),a.jsx(am,{open:l,onOpenChange:c,children:a.jsxs(ku,{className:"sm:max-w-md",children:[a.jsxs(Su,{children:[a.jsxs(_u,{className:"flex items-center gap-2",children:[a.jsx("img",{src:an,alt:"",className:"h-5 w-5"}),"Send to Instantly"]}),a.jsxs(Cu,{children:["Pushing ",a.jsx("strong",{children:u==null?void 0:u.enriched_leads})," leads from ",a.jsx("strong",{children:u==null?void 0:u.batch_name})]})]}),a.jsx("div",{className:"space-y-4 py-2",children:a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium mb-1.5 block",children:"Select Campaign"}),x?a.jsx("div",{className:"h-10 bg-muted animate-pulse rounded-md"}):a.jsxs("select",{className:"w-full h-10 rounded-md border border-input bg-background px-3 text-sm",value:h,onChange:_=>m(_.target.value),children:[a.jsx("option",{value:"",children:"Choose a campaign..."}),g==null?void 0:g.map(_=>
486a.jsxs("option",{value:_.id,children:[_.name," (",_.status||"draft",")"]},_.id))]}),a.jsx("p",{className:"mt-1.5 text-[11px] text-muted-foreground",children:"Leads will be added to the selected campaign. The campaign runs based on your Instantly settings."})]})}),a.jsxs(ju,{children:[a.jsx(oe,{variant:"outline",onClick:()=>c(!1),disabled:f,children:"Cancel"}),a.jsxs(oe,{onClick:E,disabled:f||!h,className:"gap-2",children:[f?a.jsx(ja,{className:"h-4 w-4 animate-spin"}):a.jsx(Ec,{className:"h-4 w-4"}),f?"Pushing...":"Push Leads"]})]})]})})]}):a.jsxs("div",{className:"max-w-2xl mx-auto space-y-6",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("img",{src:an,alt:"Instantly AI",className:"h-10 w-10"}),a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground",children:"Connect Instantly AI"}),a.jsx("p",{className:"mt-0.5 text-sm text-muted-foreground",children:"Push enriched leads directly into your Instantly campaigns."})]})]}),a.jsxs(Eo,{children:[a.jsxs(Oc,{children:[a.jsxs(Ic,{className:"flex items-center gap-2 text-lg",children:[a.jsx(Ju,{className:"h-5 w-5 text-primary"}),"Secure Connection"]}),a.jsx(im,{children:"Your API key is stored securely and only used to communicate with Instantly on your behalf."})]}),a.jsxs(To,{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{className:"text-sm font-medium text-foreground mb-1.5 block",children:"Instantly API Key"}),a.jsx(be,{type:"password",placeholder:"Enter your Instantly API key",value:n,onChange:_=>s(_.target.value)}),a.jsxs("p",{className:"mt-1.5 text-xs text-muted-foreground",children:["Find your API key at"," ",a.jsxs("a",{href:"https://app.instantly.ai/app/settings/integrations",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline inline-flex items-center gap-1",children:["Instantly Settings â Integrations ",a.jsx(gb,{className:"h-3 w-3"})]})]})]}),a.jsxs(oe,{onClick:j,disabled:o,className:"gap-2",children:[o?a.jsx(ja,{className:"h-4 w-4 animate-spin"}):a.jsx(tE,{className:"h-4 w-4"}),o?"Verifying...":"Connect Instantly"]})]})]}),a.jsx(Eo,{className:"border-dashed",children:a.jsxs(To,{className:"pt-6",children:[a.jsx("h3",{className:"font-semibold text-sm mb-3 text-foreground",children:"How it works"}),a.jsxs("ol",{className:"space-y-2 text-sm text-muted-foreground",children:[a.jsxs("li",{className:"flex gap-2",children:[a.jsx("span",{className:"font-bold text-primary",children:"1."})," Connect your Instantly account with an API key"]}),a.jsxs("li",{className:"flex gap-2",children:[a.jsx("span",{className:"font-bold text-primary",children:"2."})," Enrich your leads as usual in EnrichAI"]}),a.jsxs("li",{className:"flex gap-2",children:[a.jsx("span",{className:"font-bold text-primary",children:"3."})," Push enriched leads to any Instantly campaign"]}),a.jsxs("li",{className:"flex gap-2",children:[a.jsx("span",{className:"font-bold text-primary",children:"4."})," Use ",a.jsx("code",{className:"bg-muted px-1 rounded text-xs",children:"{{icebreaker}}"})," in your email templates"]})]})]})})]})},mD=()=>{const{user:e,loading:t}=Ct(),{isLoading:r}=dd(),[n,s]=p.useState("upload");if(t||r)return a.jsx("div",{className:"flex min-h-screen items-center justify-center bg-background",children:a.jsxs("div",{className:"flex flex-col items-center gap-3",children:[a.jsx("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading dashboard..."})]})});if(!e)return a.jsx(od,{to:"/auth"});const o=()=>{switch(n){case"profile":return a.jsx(gL,{});case"billing":return a.jsx(ex,{});case"history":return a.jsx(L4,{});case"enrichment":return a.jsx(J4,{});case"upload":return a.jsx(lD,{});case"transactions":return a.jsx(dD,{});case"instantly":return a.jsx(fD,{});case"analytics":return a.jsx(cD,{});default:return a.jsx(ex,{})}};return a.jsxs("div",{className:"flex min-h-screen bg-background",children:[a.jsx(it,{title:"Dashboard â EnrichAI",description:"Manage your EnrichAI account, plans and enrichments.",canonical:"/dashboard",noindex:!0}),a.jsx(pL,{activeTab:n,setActiveTab:s}),a.jsx("main",{className:"min-w-0 flex-1 overflow-y-auto",children:a.jsx("div",{className:"mx-auto max-w-5xl px-4 pb-8 pt-20 sm:px-6 md:pt-8 lg:px-8",children:o()})})]})},pD=()=>{const e=Cr(),[t]=HA(),{toast:r}=_t(),n=p.useRef(!1),o=(t.get("type")||"subscription")==="credit_topup";return p.useEffect(()=>{n.current||(n.current=!0,r({title:o?"â
Top-up successful":"â
Subscription activated",description:o?"Your credits have been added to your balance â check your email for the receipt.":"Your subscription plan is now active â check your email for the receipt."}),e("/dashboard",{replace:!0}))},[o,e,r]),null},gD=()=>{const{user:e}=Ct(),t=Cr(),{toast:r}=_t(),[n,s]=p.useState(""),[o,i]=p.useState(""),[l,c]=p.useState(!1),[u,d]=p.useState(!0);p.useEffect(()=>{(async()=>
486{if(!e){d(!1);return}const{data:f}=await W.rpc("has_role",{_user_id:e.id,_role:"admin"});f&&t("/private/dashboard"),d(!1)})()},[e,t]);const h=async m=>{m.preventDefault(),c(!0);try{const{data:f,error:w}=await W.functions.invoke("admin-login",{body:{email:n,password:o}});if(w)throw new Error(w.message);if(!(f!=null&&f.success))throw new Error((f==null?void 0:f.error)||"Invalid credentials");const{data:y,error:b}=await W.auth.signInWithPassword({email:n,password:o});if(b)throw b;const{data:v}=await W.rpc("has_role",{_user_id:y.user.id,_role:"admin"});v?t("/private/dashboard"):(await W.auth.signOut(),r({title:"Unauthorized",variant:"destructive"}))}catch(f){r({title:f.message||"Login failed",variant:"destructive"})}finally{c(!1)}};return u?a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:a.jsx("div",{className:"animate-spin w-8 h-8 border-2 border-primary border-t-transparent rounded-full"})}):a.jsxs("div",{className:"min-h-screen bg-background flex items-center justify-center px-4",children:[a.jsx(it,{title:"Admin Access â EnrichAI",description:"Restricted admin login.",canonical:"/private",noindex:!0}),a.jsxs("div",{className:"w-full max-w-sm",children:[a.jsx("h1",{className:"font-display text-2xl font-bold text-foreground mb-6 text-center",children:"Admin Access"}),a.jsxs("form",{onSubmit:h,className:"bg-card border border-border rounded-2xl p-6 space-y-4",children:[a.jsxs("div",{children:[a.jsx(K,{children:"Email"}),a.jsx(be,{type:"email",value:n,onChange:m=>s(m.target.value),required:!0})]}),a.jsxs("div",{children:[a.jsx(K,{children:"Password"}),a.jsx(be,{type:"password",value:o,onChange:m=>i(m.target.value),required:!0})]}),a.jsx(oe,{type:"submit",className:"w-full",disabled:l,children:l?"...":"Log In"})]})]})]})},yD=()=>{const[e,t]=p.useState(null),[r,n]=p.useState(!0);if(p.useEffect(()=>{(async()=>{const{data:l,error:c}=await W.rpc("admin_get_stats");!c&&l&&t(l),n(!1)})()},[]),r)return a.jsx("div",{className:"animate-pulse h-32 bg-muted rounded-xl"});const s=(e==null?void 0:e.total_trial)??0,o=[{label:"Total Users",value:(e==null?void 0:e.total_users)??0,icon:_f,color:"text-primary",bg:"bg-primary/10"},{label:"Paying Users",value:(e==null?void 0:e.total_paying)??0,icon:hp,color:"text-highlight",bg:"bg-highlight/10"},{label:"Free Trial Users",value:s,icon:_f,color:"text-secondary",bg:"bg-secondary/10"},{label:"Blocked",value:(e==null?void 0:e.total_blocked)??0,icon:aE,color:"text-destructive",bg:"bg-destructive/10"}];return a.jsxs("div",{className:"space-y-4",children:[a.jsx("h2",{className:"font-display text-lg font-bold text-foreground",children:"Overview"}),a.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:o.map(i=>a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-5 shadow-sm hover:shadow-md transition-shadow",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[a.jsx("div",{className:`w-9 h-9 rounded-xl ${i.bg} flex items-center justify-center`,children:a.jsx(i.icon,{className:`w-4 h-4 ${i.color}`})}),a.jsx("p",{className:"text-sm text-muted-foreground font-medium",children:i.label})]}),a.jsx("p",{className:"font-display text-3xl font-bold text-foreground",children:i.value.toLocaleString()})]},i.label))}),(e==null?void 0:e.plans_breakdown)&&e.plans_breakdown.length>0&&a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-5 shadow-sm",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(mp,{className:"w-4 h-4 text-primary"}),a.jsx("p",{className:"text-sm font-bold text-foreground",children:"Paying Users by Plan"})]}),a.jsx("div",{className:"space-y-2",children:e.plans_breakdown.map(i=>a.jsxs("div",{className:"flex justify-between items-center bg-muted/60 border border-border rounded-xl px-4 py-3",children:[a.jsx("span",{className:"text-sm font-semibold capitalize text-foreground",children:i.plan_name}),a.jsx("span",{className:"text-sm font-bold bg-primary/10 text-primary px-3 py-0.5 rounded-full",children:i.count})]},i.plan_name))})]})]})},vD=()=>{const[e,t]=p.useState(null),[r,n]=p.useState(!0),[s,o]=p.useState("all");
486if(p.useEffect(()=>{(async()=>{const{data:w,error:y}=await W.rpc("admin_get_enrichment_stats");!y&&w&&t(w),n(!1)})()},[]),r)return a.jsx("div",{className:"animate-pulse h-32 bg-muted rounded-xl"});if(!e)return null;const i=s==="week"?"this_week_":s==="month"?"this_month_":"total_",l=e[`${i}uploaded`],c=e[`${i}enriched`],u=e[`${i}failed`],d=l>0?Math.round(c/l*100):0,h=[{id:"all",label:"All Time"},{id:"week",label:"This Week"},{id:"month",label:"This Month"}],m=[{label:"Leads Uploaded",value:l,icon:xl,color:"text-primary",bg:"bg-primary/10"},{label:"Leads Enriched",value:c,icon:fb,color:"text-highlight",bg:"bg-highlight/10"},{label:"Failed Leads",value:u,icon:vl,color:"text-destructive",bg:"bg-destructive/10"},{label:"Success Rate",value:`${d}%`,icon:Ku,color:"text-secondary",bg:"bg-secondary/10"}];return a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h2",{className:"font-display text-lg font-bold text-foreground",children:"Enrichment Metrics"}),a.jsx("div",{className:"flex gap-1 bg-muted rounded-xl p-1",children:h.map(f=>a.jsx("button",{onClick:()=>o(f.id),className:`text-xs font-semibold px-3 py-1.5 rounded-lg transition-all ${s===f.id?"bg-card text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:f.label},f.id))})]}),a.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:m.map(f=>a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-5 shadow-sm hover:shadow-md transition-shadow",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[a.jsx("div",{className:`w-9 h-9 rounded-xl ${f.bg} flex items-center justify-center`,children:a.jsx(f.icon,{className:`w-4 h-4 ${f.color}`})}),a.jsx("p",{className:"text-sm text-muted-foreground font-medium",children:f.label})]}),a.jsx("p",{className:"font-display text-3xl font-bold text-foreground",children:typeof f.value=="number"?f.value.toLocaleString():f.value})]},f.label))})]})};var pd="Switch",[xD,IM]=wn(pd),[wD,bD]=xD(pd),AS=p.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:i,disabled:l,value:c="on",onCheckedChange:u,form:d,...h}=e,[m,f]=p.useState(null),w=We(t,x=>f(x)),y=p.useRef(!1),b=m?d||!!m.closest("form"):!0,[v,g]=Vu({prop:s,defaultProp:o??!1,onChange:u,caller:pd});return a.jsxs(wD,{scope:r,checked:v,disabled:l,children:[a.jsx(ke.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":LS(v),"data-disabled":l?"":void 0,disabled:l,value:c,...h,ref:w,onClick:we(e.onClick,x=>{g(k=>!k),b&&(y.current=x.isPropagationStopped(),y.current||x.stopPropagation())})}),b&&a.jsx(IS,{control:m,bubbles:!y.current,name:n,value:c,checked:v,required:i,disabled:l,form:d,style:{transform:"translateX(-100%)"}})]})});AS.displayName=pd;var RS="SwitchThumb",OS=p.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,s=bD(RS,r);return a.jsx(ke.span,{"data-state":LS(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})});OS.displayName=RS;var kD="SwitchBubbleInput",IS=p.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...s},o)=>{const i=p.useRef(null),l=We(i,o),c=rk(r),u=Sp(t);return p.useEffect(()=>{const d=i.current;if(!d)return;const h=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(h,"checked").set;if(c!==r&&f){const w=new Event("click",{bubbles:n});f.call(d,r),d.dispatchEvent(w)}},[c,r,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:l,style:{...s.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});IS.displayName=kD;function LS(e){return e?"checked":"unchecked"}var DS=AS,SD=OS;const MS=p.forwardRef(({className:e,...t},r)=>a.jsx(DS,{className:ue("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",e),...t,ref:r,children:a.jsx(SD,{className:ue("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}
486));MS.displayName=DS.displayName;const jD=({userId:e})=>{var l;const[t,r]=p.useState(null),[n,s]=p.useState(!0);if(p.useEffect(()=>{(async()=>{s(!0);const{data:u,error:d}=await W.rpc("admin_get_user_details",{target_user_id:e});!d&&u&&r(u),s(!1)})()},[e]),n)return a.jsx("div",{className:"animate-pulse h-24 bg-muted rounded-xl mt-4"});if(!t)return null;const o=t.enrichment_stats,i=[{label:"Total Jobs",value:o.total_jobs,color:"text-primary"},{label:"Completed",value:o.completed_jobs,color:"text-highlight"},{label:"Leads Uploaded",value:o.total_leads_uploaded,color:"text-foreground"},{label:"Enriched",value:o.total_enriched,color:"text-secondary"},{label:"Failed",value:o.total_failed,color:"text-destructive"}];return a.jsxs("div",{className:"space-y-4",children:[((l=t.profile)==null?void 0:l.created_at)&&a.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a.jsx(Ku,{className:"w-3.5 h-3.5"}),a.jsxs("span",{children:["Joined ",new Date(t.profile.created_at).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})]})]}),a.jsxs("div",{className:"border border-border rounded-xl p-4 bg-muted/30",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx("div",{className:"w-7 h-7 rounded-lg bg-primary/10 flex items-center justify-center",children:a.jsx(dp,{className:"w-3.5 h-3.5 text-primary"})}),a.jsx("p",{className:"text-sm font-bold text-foreground",children:"Enrichment Activity"})]}),a.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-5 gap-2",children:i.map(c=>a.jsxs("div",{className:"text-center bg-card border border-border rounded-lg p-2.5",children:[a.jsx("p",{className:"text-[10px] uppercase tracking-wider text-muted-foreground font-medium mb-0.5",children:c.label}),a.jsx("p",{className:`font-bold text-lg ${c.color}`,children:c.value.toLocaleString()})]},c.label))})]}),t.transactions.length>0&&a.jsxs("div",{className:"border border-border rounded-xl p-4 bg-muted/30",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsx("div",{className:"w-7 h-7 rounded-lg bg-highlight/10 flex items-center justify-center",children:a.jsx(wb,{className:"w-3.5 h-3.5 text-highlight"})}),a.jsxs("p",{className:"text-sm font-bold text-foreground",children:["Transactions (",t.transactions.length,")"]})]}),a.jsx("div",{className:"space-y-1.5 max-h-48 overflow-y-auto",children:t.transactions.map(c=>a.jsxs("div",{className:"flex justify-between items-center bg-card border border-border rounded-lg px-3 py-2.5 text-sm",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(to,{className:"w-3 h-3 text-highlight shrink-0"}),a.jsx("span",{className:"font-semibold text-foreground",children:c.product_name||"Payment"}),a.jsx("span",{className:"text-muted-foreground text-xs",children:new Date(c.created_at).toLocaleDateString()})]}),a.jsxs("span",{className:"font-bold text-highlight",children:["$",(c.amount/100).toFixed(2)," ",c.currency.toUpperCase()]})]},c.id))})]})]})},_D=()=>{var y;const{toast:e}=_t(),[t,r]=p.useState(""),[n,s]=p.useState([]),[o,i]=p.useState(null),[l,c]=p.useState(null),[u,d]=p.useState(!1),h=async()=>{if(!t.trim())return;const{data:b,error:v}=await W.rpc("admin_search_users",{search_email:t.trim()});if(v){e({title:"Could not search users",variant:"destructive"});return}s(b||[]),i(null),c(null)},m=async b=>{i(b);const{data:v,error:g}=await W.from("user_plans").select("plan_name,total_cap,per_upload_cap,is_blocked,usage_count,subscription_status,monthly_credit_grant").eq("user_id",b.user_id).single();if(g){e({title:"Could not load user plan",variant:"destructive"}),c(null);return}c(v)},f=async b=>{if(!o||!l)return;const v=l.is_blocked;c({...l,is_blocked:b});const{error:g}=await W.from("user_plans").update({is_blocked:b}).eq("user_id",o.user_id);if(g){c({...l,is_blocked:v}),e({title:"Could not update block status",variant:"destructive"});return}e({title:b?"User blocked":"User unblocked"})},w=async()=>{if(!l||!o)return;d(!0);const{error:b}=await W.rpc("admin_set_user_plan",{p_user_id:o.user_id,p_plan_name:l.plan_name,p_total_cap:l.total_cap,p_per_upload_cap:l.per_upload_cap,p_monthly_credit_grant:l.monthly_credit_grant,p_subscription_status:"lifetime"});if(b){e({title:b.message||"Could not save plan",variant:"destructive"}),d(!1);return}e({title:"Custom plan assigned successfully"});try{await W.functions.invoke("send-license-email",{body:{email:o.email,planName:l.plan_name,totalCap:l.total_cap,perUploadCap:l.per_upload_cap}}),e({title:"Notification email sent to user"})}catch{e({title:"Plan saved, but notification email failed",variant:"destructive"})}d(!1)};return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 shadow-sm",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[a.jsx(_y,{className:"w-5 h-5 text-primary"}),a.jsx("h3",{className:"font-display font-bold text-lg text-foreground",children:"Search Users"})]}),a.jsxs("div",{className:"flex gap-3",children:[a.jsx(be,{value:t,onChange:b=>r(b.target.value),placeholder:"Search by email...",onKeyDown:b=>b.key==="Enter"&&h(),className:"flex-1"}),a.jsxs(oe,{onClick:h,className:"gap-2 shrink-0",children:[a.jsx(_y,{className:"w-4 h-4"})," Search"]})]}),n.length>0&&a.jsx("div",{className:"mt-4 space-y-2",children:n.map(b=>a.jsxs("button",{onClick:()=>m(b),className:`w-full text-left p-4 rounded-xl border transition-all duration-200 ${(o==null?void 0:o.user_id
486)===b.user_id?"border-primary bg-primary/5 shadow-sm":"border-border hover:bg-muted hover:shadow-sm"}`,children:[a.jsx("p",{className:"font-semibold text-foreground",children:b.full_name||"No name"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:b.email})]},b.user_id))})]}),l&&o&&a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 space-y-6 shadow-sm",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-11 h-11 rounded-full bg-gradient-to-br from-primary/20 to-secondary/20 flex items-center justify-center text-lg font-bold text-primary",children:(y=(o.full_name||o.email)[0])==null?void 0:y.toUpperCase()}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-display font-bold text-lg text-foreground",children:o.full_name||"No name"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:o.email})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[l.is_blocked&&a.jsx("span",{className:"text-xs font-bold bg-destructive/10 text-destructive px-3 py-1 rounded-full",children:"Blocked"}),a.jsx("span",{className:`text-xs font-bold px-3 py-1 rounded-full capitalize ${l.subscription_status==="lifetime"?"bg-secondary/10 text-secondary":l.subscription_status==="active"?"bg-highlight/10 text-highlight":"bg-muted text-muted-foreground"}`,children:l.subscription_status})]})]}),a.jsx(jD,{userId:o.user_id}),a.jsxs("div",{className:"border border-secondary/30 bg-secondary/5 rounded-xl p-5 space-y-4",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(pb,{className:"w-5 h-5 text-secondary"}),a.jsx("h4",{className:"font-display font-bold text-foreground",children:"Manage Plan"})]}),a.jsxs("p",{className:"text-xs text-muted-foreground",children:["Used: ",a.jsx("span",{className:"font-bold text-foreground",children:l.usage_count.toLocaleString()})," / ",l.total_cap.toLocaleString()]})]}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[a.jsxs("div",{children:[a.jsx(K,{className:"text-foreground text-xs font-semibold",children:"Plan Name"}),a.jsx(be,{value:l.plan_name,onChange:b=>c({...l,plan_name:b.target.value}),placeholder:"e.g. Lifetime, Custom"})]}),a.jsxs("div",{children:[a.jsx(K,{className:"text-foreground text-xs font-semibold",children:"Total Credits"}),a.jsx(be,{type:"number",value:l.total_cap,onChange:b=>c({...l,total_cap:Number(b.target.value)})})]}),a.jsxs("div",{children:[a.jsx(K,{className:"text-foreground text-xs font-semibold",children:"Per Upload Cap"}),a.jsx(be,{type:"number",value:l.per_upload_cap,onChange:b=>c({...l,per_upload_cap:Number(b.target.value)})})]}),a.jsxs("div",{children:[a.jsxs(K,{className:"text-foreground text-xs font-semibold",children:["Monthly Refill Credits ",a.jsx("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),a.jsx(be,{type:"number",value:l.monthly_credit_grant??"",placeholder:"Leave blank for no monthly reset",onChange:b=>c({...l,monthly_credit_grant:b.target.value===""?null:Number(b.target.value)})}),a.jsx("p",{className:"mt-1 text-[11px] text-muted-foreground",children:"If set, this many credits roll in every month automatically."})]}),a.jsx("div",{className:"flex items-end md:col-span-2",children:a.jsxs("div",{className:"flex items-center gap-3 pb-2",children:[a.jsx(MS,{checked:l.is_blocked,onCheckedChange:f}),a.jsx(K,{className:`text-sm ${l.is_blocked?"text-destructive font-bold":"text-foreground"}`,children:l.is_blocked?"â User Blocked":"Block User"})]})})]}),a.jsxs(oe,{className:"w-full gap-2 mt-2",onClick:w,disabled:u,children:[a.jsx(kb,{className:"w-4 h-4"}),u?"Saving & Notifying...":"Save Plan & Notify User"]})]})]})]})},CD=[{id:"overview",label:"Overview",icon:dp},{id:"users",label:"Users",icon:_f},{id:"churned",label:"Churned",icon:Sb},{id:"broadcast",label:"Broadcast",icon:Qu}],ND=()=>{const{user:e,loading:t,signOut:r}=Ct(),n=Cr(),{toast:s}=_t(),[o,i]=p.useState(null),[l,c]=p.useState("overview"),[u,d]=p.useState(""),[h,m]=p.useState(""),[f,w]=p.useState(!1),[y,b]=p.useState([]),[v,g]=p.useState(!1);if(p.useEffect(()=>{(async()=>
486{if(!e)return;const{data:S}=await W.rpc("has_role",{_user_id:e.id,_role:"admin"});i(!!S)})()},[e]),p.useEffect(()=>{if(!o)return;(async()=>{g(!0);try{const{data:S,error:j}=await W.rpc("admin_get_canceled_users");if(j)throw j;b(S||[])}catch(S){console.error("Failed to fetch canceled users:",S)}finally{g(!1)}})()},[o]),t||o===null)return a.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:a.jsx("div",{className:"animate-spin w-8 h-8 border-2 border-primary border-t-transparent rounded-full"})});if(!e||!o)return a.jsx(od,{to:"/private"});const x=async()=>{if(!u||!h){s({title:"Subject and body required",variant:"destructive"});return}w(!0);try{const{data:k,error:S}=await W.functions.invoke("send-broadcast-email",{body:{subject:u,body:h}});if(S)throw new Error(S.message||"Edge function error");const j=typeof k=="string"?JSON.parse(k):k;if(j!=null&&j.error)throw new Error(j.error);s({title:`Broadcast sent to ${j.sent} users${j.failed?` (${j.failed} failed)`:""}`}),d(""),m("")}catch(k){console.error("Broadcast error:",k),s({title:(k==null?void 0:k.message)||"Broadcast failed",variant:"destructive"})}finally{w(!1)}};return a.jsxs("div",{className:"min-h-screen bg-background flex flex-col",children:[a.jsx(it,{title:"Admin Dashboard â EnrichAI",description:"Internal admin tools.",canonical:"/private/dashboard",noindex:!0}),a.jsx("div",{className:"border-b border-border bg-card/80 backdrop-blur-xl sticky top-0 z-20",children:a.jsxs("div",{className:"max-w-6xl mx-auto px-4 sm:px-6",children:[a.jsxs("div",{className:"flex items-center justify-between h-14",children:[a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("div",{className:"w-8 h-8 rounded-lg bg-primary flex items-center justify-center",children:a.jsx(Ju,{className:"w-4 h-4 text-primary-foreground"})}),a.jsx("span",{className:"font-display font-bold text-foreground text-base hidden sm:inline",children:"EnrichAI Admin"})]}),a.jsxs(oe,{variant:"ghost",size:"sm",onClick:async()=>{await r(),n("/")},className:"gap-2 text-muted-foreground hover:text-foreground",children:[a.jsx(xb,{className:"w-4 h-4"})," ",a.jsx("span",{className:"hidden sm:inline",children:"Logout"})]})]}),a.jsx("nav",{className:"flex gap-1 -mb-px overflow-x-auto scrollbar-none",children:CD.map(k=>{const S=l===k.id;return a.jsxs("button",{onClick:()=>c(k.id),className:`flex items-center gap-2 px-4 py-2.5 text-sm font-medium border-b-2 transition-all whitespace-nowrap ${S?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground hover:border-border"}`,children:[a.jsx(k.icon,{className:"w-4 h-4"}),k.label]},k.id)})})]})}),a.jsxs("div",{className:"flex-1 max-w-6xl mx-auto w-full px-4 sm:px-6 py-6 sm:py-8",children:[l==="overview"&&a.jsxs("div",{className:"space-y-8",children:[a.jsx(yD,{}),a.jsx(vD,{})]}),l==="users"&&a.jsx(_D,{}),l==="churned"&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-lg font-bold text-foreground",children:"Churned Users"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Users who canceled with their reasons."})]}),v?a.jsx("div",{className:"animate-pulse h-32 bg-muted rounded-xl"}):y.length===0?a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 text-center",children:[a.jsx(Sb,{className:"w-10 h-10 text-muted-foreground/40 mx-auto mb-3"}),a.jsx("p",{className:"text-sm text-muted-foreground",children:"No churned users yet."})]}):a.jsx("div",{className:"bg-card border border-border rounded-2xl shadow-sm overflow-hidden",children:a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full text-sm",children:[a.jsx("thead",{children:a.jsxs("tr",{className:"border-b border-border bg-muted/40",children:[a.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground text-xs uppercase tracking-wider",children:"Name"}),a.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground text-xs uppercase tracking-wider",children:"Email"}),a.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground text-xs uppercase tracking-wider",children:"Plan"}),a.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground text-xs uppercase tracking-wider",children:"Reason"}),a.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground text-xs uppercase tracking-wider",children:"Canceled"}),a.jsx("th",{className:"px-4 py-3 text-left font-semibold text-muted-foreground text-xs uppercase tracking-wider",children:"Access Until"})]})}),a.jsx("tbody",{className:"divide-y divide-border",children:y.map((k,S)=>a.jsxs("tr",{className:"hover:bg-muted/20 transition-colors",children:[a.jsx("td",{className:"px-4 py-3 text-foreground font-medium",children:k.full_name||"â"}),a.jsx("td",{className:"px-4 py-3 text-foreground",children:k.email}),a.jsx("td",{className:"px-4 py-3",children:a.jsx("span",{className:"text-xs font-bold bg-muted px-2 py-0.5 rounded-full text-foreground capitalize",children:k.plan_name})}),a.jsx("td",{className:"px-4 py-3 text-muted-foreground max-w-[200px] truncate",title:k.cancel_reason,children:k.cancel_reason||"â"}),a.jsx("td",{className:"px-4 py-3 text-muted-foreground",children:k.cancel_requested_at?Zn(new Date(k.cancel_requested_at),"MMM d, yyyy"):"â"}),a.jsx("td",{className:"px-4 py-3",children:a.jsx("span",{className:"text-xs font-bold bg-secondary/10 text-secondary px-2 py-0.5 rounded-full",children:k.plan_expires_at?Zn(new Date(k.plan_expires_at),"MMM d, yyyy"):"â"})})]},S))})]})})})]}),l==="broadcast"&&a.jsxs("div",{className:"max-w-2xl space-y-4",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"font-display text-lg font-bold text-foreground",children:"Email Broadcast"}),a.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:["Send an email to ",a.jsx("strong",{children:"all registered users"})," from [email protected]"]})]}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 shadow-sm space-y-4",children:[a.jsxs("div",{children:[a.jsx(K,{className:"text-foreground text-xs font-semibold",children:"Subject"}),a.jsx(be,{value:u,onChange:k=>d(k.target.value),placeholder:"e.g., New Feature Announcement"})]}),a.jsxs("div",{children:[a.jsx(K,{className:"text-foreground text-xs font-semibold",children:"Body (HTML supported)"}),a.jsx(Se,{value:h,onChange:k=>m(k.target.value),rows:8,placeholder:"Write your email content here..."})]}),h&&a.jsxs("div",{className:"bg-muted/40 border border-border rounded-xl p-4",children:[a.jsx("p",{className:"text-xs text-muted-foreground mb-2 font-semibold uppercase tracking-wider",children:"Preview (plain text)"}),a.jsx("div",{className:"text-sm whitespace-pre-wrap break-words font-sans text-foreground",children:h})]}),a.jsxs(oe,{onClick:x,disabled:f,className:"gap-2 w-full",children:[a.jsx(Ec,{className:"w-4 h-4"}),f?"Sending...":"Send Broadcast"]})]})]})]})]})},ED=()=>(Sn({title:"Terms of Service â EnrichAI",description:"EnrichAI terms of service. Plain-English rules for using our AI prospect research and cold outreach platform.",path:"/terms"}),a.jsxs("div",{className:"min-h-screen bg-background px-6 py-12 max-w-3xl mx-auto",children:[a.jsx(it,{title:"Terms of Service â EnrichAI",description:"EnrichAI terms of service. Plain-English rules for using our AI prospect research and cold outreach platform.",canonical:"/terms"}),a.jsx(re,{to:"/",className:"text-sm text-muted-foreground hover:text-foreground transition-colors mb-8 inl
486ine-block",children:"â Back to Home"}),a.jsx("h1",{className:"font-display text-3xl font-bold text-foreground mb-6",children:"Terms of Service"}),a.jsxs("div",{className:"prose prose-sm text-muted-foreground space-y-4 font-body",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"Last updated:"})," April 2026"]}),a.jsx("p",{children:"By using EnrichAI, you agree to these terms. If you do not agree, please do not use the service."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"1. What we do"}),a.jsx("p",{children:"EnrichAI is an AI-powered tool that researches your prospects from their website and writes a personalised opener for each one â for cold email, LinkedIn DMs, X, or any outbound channel. You upload a CSV, we return enriched data."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"2. Free trial"}),a.jsxs("p",{children:["Every new account gets ",a.jsx("strong",{className:"text-foreground",children:"30 free credits"}),". No card required. Once used, you can keep your account but must upgrade to continue enriching."]}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"3. Plans & pricing"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[a.jsxs("li",{children:[a.jsx("strong",{className:"text-foreground",children:"Basic â $5.99/month:"})," 5,000 credits monthly, 5,000 per upload. Unused credits roll over."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-foreground",children:"Premium â $69.99/year:"})," 10,000 credits per month, 5,000 per upload. Unused credits roll over."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-foreground",children:"Lifetime â $599 one-time (Limited Offer):"})," 1,000,000 credits auto-refilled every month, 50,000 per upload. No additional payments unless you top up."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-foreground",children:"Credit packs:"})," $10 â 10,000 · $20 â 20,000 · $30 â 30,000 · $100 â 100,000. Only available to users on a paid plan."]})]}),a.jsx("p",{children:"1 successfully enriched lead = 1 credit. Failed enrichments are not charged. Prices in USD. Subscriptions auto-renew until canceled."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"4. Acceptable use"}),a.jsx("p",{children:"You must comply with applicable laws including GDPR, CAN-SPAM, and any local anti-spam rules. You are responsible for the messages you send and for having a lawful basis to contact your prospects."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"5. Your data"}),a.jsxs("p",{children:["You own your uploads and the enriched output. We process your data only to deliver the service. We do not sell or share it. See our ",a.jsx(re,{to:"/privacy",className:"text-foreground underline",children:"Privacy Policy"})," for details."]}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"6. Our IP"}),a.jsx("p",{children:"The EnrichAI platform, brand, and software remain ours. You can use the icebreakers we generate for you freely."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"7. No guarantee"}),a.jsx("p",{children:'EnrichAI is provided "as is". We do not guarantee specific reply rates. Our maximum liability is limited to what you paid us in the past 12 months.'}),a.jsx("h2",{id:"free-leads",className:"font-display text-lg font-bold text-foreground pt-4",children:"8. Free 10M+ verified leads bonus"}),a.jsx("p",{children:"Paid plans include access to a community-sourced dataset of 10M+ leads, organised by niche. This data is shared as-is from public outreach communities â we do not own it, cannot guarantee 100% accuracy, and you remain responsible for compliant use."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"9. Contact"}),a.jsxs("p",{children:["Questions? ",a.jsx("a",{href:"mailto:[email protected]",className:"text-foreground underline",children:"[email protected]"})]})]})]})),TD=()=>(Sn({title:"Privacy Policy â EnrichAI",description:"How EnrichAI collects, uses and protects your data. GDPR-friendly, in plain English.",path:"/privacy"}),a.jsxs("div",{className:"min-h-screen bg-background px-6 py-12 max-w-3xl mx-auto",children:[a.jsx(it,{title:"Privacy Policy â EnrichAI",description:"How EnrichAI collects, uses and protects your data. GDPR-friendly, in plain English.",canonical:"/privacy"}),a.jsx(re,{to:"/",className:"text-sm text-muted-foreground hover:text-foreground transition-colors mb-8 inl
486ine-block",children:"â Back to Home"}),a.jsx("h1",{className:"font-display text-3xl font-bold text-foreground mb-6",children:"Privacy Policy"}),a.jsxs("div",{className:"prose prose-sm text-muted-foreground space-y-4 font-body",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"Last updated:"})," April 2026"]}),a.jsx("p",{children:"EnrichAI respects your privacy. This page explains, in plain English, what we collect, why, and your rights under GDPR."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"1. What we collect"}),a.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[a.jsxs("li",{children:[a.jsx("strong",{className:"text-foreground",children:"Account info:"})," your name and email."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-foreground",children:"Lead data:"})," the CSVs you upload."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-foreground",children:"Payment info:"})," handled directly by our payment provider â we never see your card details."]}),a.jsxs("li",{children:[a.jsx("strong",{className:"text-foreground",children:"Basic usage:"})," minimal analytics to keep the product working."]})]}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"2. Why we use it"}),a.jsxs("p",{children:["To run your account, process enrichments, prevent abuse, and improve the service. Your lead data is used ",a.jsx("strong",{className:"text-foreground",children:"only"})," to generate your icebreakers."]}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"3. Legal basis (GDPR)"}),a.jsx("p",{children:"We rely on your consent and on contract performance (delivering the service you signed up for)."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"4. Sharing"}),a.jsx("p",{children:"We do not sell or rent your data. We use trusted processors (hosting, payments, AI models) under strict contracts."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"5. Retention"}),a.jsx("p",{children:"We keep your data only as long as needed to provide the service or as required by law. You can request deletion at any time."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"6. Your rights"}),a.jsxs("p",{children:["You can access, correct, export, or delete your data, withdraw consent, or object to processing. Email ",a.jsx("a",{href:"mailto:[email protected]",className:"text-foreground underline",children:"[email protected]"})," and we will respond within 30 days."]}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"7. Security"}),a.jsx("p",{children:"Data is encrypted in transit and at rest. No system is 100% secure, but we apply standard safeguards."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"8. Contact"}),a.jsx("p",{children:a.jsx("a",{href:"mailto:[email protected]",className:"text-foreground underline",children:"[email protected]"})})]})]})),PD=()=>(Sn({title:"Refund Policy â EnrichAI",description:"Our plain-English refund policy. 7-day refund window if you've used less than 15% of your credits.",path:"/refund"}),a.jsxs("div",{className:"min-h-screen bg-background px-6 py-12 max-w-3xl mx-auto",children:[a.jsx(it,{title:"Refund Policy â EnrichAI",description:"Our plain-English refund policy. 7-day refund window if you've used less than 15% of your credits.",canonical:"/refund"}),a.jsx(re,{to:"/",className:"text-sm text-muted-foreground hover:text-foreground transition-colors mb-8 inline-block",children:"â Back to Home"}),a.jsx("h1",{className:"font-display text-3xl font-bold text-foreground mb-6",children:"Refund Policy"}),a.jsxs("div",{className:"prose prose-sm text-muted-foreground space-y-4 font-body",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"Last updated:"})," April 2026"]}),a.jsx("p",{children:"We want EnrichAI to work for you. Here's our refund policy in plain language."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"1. Try before you pay"}),a.jsxs("p",{children:["Every account starts with ",a.jsx("strong",{className:"text-foreground",children:"30 free credits"}),", no card required. Use them to make sure EnrichAI fits your workflow before upgrading."]}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"2. Refund eligibility"}),a.jsxs("p",{children:["If you've used ",a.jsx("strong",{className:"text-foreground",children:"less than 15%"})," of your plan's credits, you can request a refund within 7 days of purchase. This applies to:"]}),a.jsxs("ul",{className:"list-disc pl-5 space-y-1",children:[a.jsx("li",{children:"Basic â $5.99/month (5,000 credits/month, roll over)"}),a.jsx("li",{children:"Premium â $69.99/year (10,000 credits/month, roll over)"}),a.jsx("li",{children:"Lifetime â $599 one-time (1,000,000 credits/month, auto-refilled â Limited Offer)"})]}),a.jsxs("p",{children:["Credit pack top-ups ($10, $20, $30, $100) are ",a.jsx("strong",{className:"text-foreground",children:"non-refundable"})," once credits are added."]}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"3. How to cancel or request a refund"}),a.jsxs("p",{children:["Cancel anytime from ",a.jsx("strong",{className:"text-foreground",children:"Billing"})," in your dashboard. For refunds, email ",a.jsx("a",{href:"mailto:[email protected]",className:"text-foreground underline",children:"[email protected]"})," with your purchase details."]}),a.jsx("p",{children:"After cancellation you keep access until the end of the current billing period. Unused credits do not roll over once that period ends."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"4. Processing time"}),a.jsx("p",{children:"We respond within 24 hours. Approved refunds are issued immediately on our end and may take 5â7 business days to reach your bank."}),a.jsx("h2",{className:"font-display text-lg font-bold text-foreground pt-4",children:"5. Technical issues"}),a.jsx("p",{children:"If something we built prevents you from using the service, we'll either fix it fast or issue a full refund â usage limits don't apply in that case."})]})]})),yt=({title:e,children:t})=>a.jsxs("div",{className:"relative pl-7 pb-7 last:pb-0",children:[a.jsx("span",{className:"absolute left-0 top-1.5 w-3 h-3 rounded-full bg-primary ring-4 ring-primary/15"}),a.jsx("span",{className:"absolute left-[5px] top-5 bottom-0 w-px bg-border last:hidden"}),a.jsx("h3",{className:"font-display font-bold text-foreground text-base mb-1",children:e}),a.jsx("div",{className:"text-sm text-muted-foreground leading-relaxed space-y-1.5",children:t})]}),oi=({title:e,children:t})=>a.jsxs("section",{className:"mb-10",children:[a.jsx("h2",{className:"font-display text-xl sm:text-2xl font-bold text-foreground mb-2 underline decoration-primary/40 decoration-2 underline-offset-[6px]",children:e}),a.jsx("div",{className:"mt-5",children:t})]}),AD=()=>(Sn({title:"Docs â How EnrichAI Works",description:"Step-by-step guide to using EnrichAI for AI-powered cold email personalisation.",path:"/docs"}),a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(it,{title:"Docs â How EnrichAI Works",description:"Step-by-step guide to using EnrichAI for AI-powered cold email personalisation.",canonical:"/docs"}),a.jsx("div",{className:"sticky top-0 z-50 bg-background/80 backdrop-blur-xl border-b border-border/40 shadow-sm",children:a.jsx(Ua,{})}),a.jsxs("main",{className:"max-w-2xl mx-auto px-6 py-12",children:[a.jsxs("div",{className:"flex items-center gap-3 mb-10",children:[a.jsx("img",{src:an,alt:"Instantly AI",className:"h-10 w-10 rounded-xl"}),a.jsxs("div",{children:[a.jsx("h1",{className:"font-display text-2xl sm:text-3xl font-bold text-foreground",children:"Instantly AI Integration"}),a.jsx("p",{className:"text-sm text-muted-foreground mt-0.5",children:"Push enriched leads straight into your campaigns."})]})]}),a.jsxs(oi,{title:"Overview",children:[a.jsx(yt,{title:"What it does",children:"Connects EnrichAI to Instantly so you can send enriched, personalised leads directly into a campaign."}),a.jsx(yt,{title:"Who it's for",children:"Anyone running cold email at scale who wants real personalisation without manual exports."}),a.jsx(yt,{title:"What you get",children:"EnrichAI handles research and icebreakers. Instantly handles sending, scheduling, and follow-ups."})]}),a.jsxs(oi,{title:"How It Works",children:[a.jsx(yt,{title:"Upload",children:"Drop your CSV of prospects into EnrichAI."}),a.jsx(yt,{title:"Enrich",children:"EnrichAI researches each prospect and writes a personalised opener."}),a.jsx(yt,{title:"Push",children:"Pick a campaign in Instantly and send your enriched leads to it."}),a.jsx(yt,{title:"Send",children:"Instantly delivers your emails with the personalised opener auto-inserted."})]}),a.jsxs(oi,{title:"Setup",children:[a.jsxs(yt,{title:"Get your Instantly API key",children:["Log in to ",a.jsx("a",{href:"https://app.instantly.ai",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Instantly"}),", open ",a.jsx("strong",{className:"text-foreground",children:"Settings â Integrations â API"}),", and copy your key."]}),a.jsxs(yt,{title:"Connect in EnrichAI",children:["Open your ",a.jsx(re,{to:"/dashboard",className:"text-primary hover:underline",children:"Dashboard"}),", click ",a.jsx("strong",{className:"text-foreground",children:"Instantly AI"})," in the sidebar, paste your key, and connect."]}
486),a.jsx(yt,{title:"Push your first batch",children:"After enrichment, open the Instantly AI tab, find your batch, pick a campaign, and push."})]}),a.jsxs(oi,{title:"The Icebreaker Variable",children:[a.jsxs(yt,{title:"The variable",children:["Each lead arrives in Instantly with a custom variable: ",a.jsx("code",{className:"font-mono font-bold text-highlight",children:"{{icebreaker}}"})]}),a.jsxs(yt,{title:"Where to use it",children:["Place it on the ",a.jsx("strong",{className:"text-foreground",children:"first 1â2 lines"})," of your email â it's the attention-grabbing opener."]}),a.jsx(yt,{title:"Example template",children:a.jsxs("div",{className:"bg-muted/50 rounded-xl p-3 mt-2 text-foreground border border-border space-y-1.5",children:[a.jsx("p",{className:"text-highlight font-medium",children:"{{icebreaker}}"}),a.jsxs("p",{children:["I noticed your team at ","{{company_name}}"," is growing fast â I'd love to share how we can help."]}),a.jsx("p",{children:"Open to a quick 15-min chat this week?"}),a.jsxs("p",{className:"text-muted-foreground",children:["Best,",a.jsx("br",{}),"Your Name"]})]})})]}),a.jsxs(oi,{title:"Field Mapping",children:[a.jsx(yt,{title:"Automatic mapping",children:"Your lead fields map straight to Instantly's standard fields â no manual setup."}),a.jsx(yt,{title:"Mapped fields",children:a.jsxs("div",{className:"grid sm:grid-cols-2 gap-2 text-xs mt-2",children:[[["email","email"],["first_name","first_name"],["last_name","last_name"],["company","company_name"],["website","website"],["phone","phone"]].map(([e,t])=>a.jsxs("div",{className:"bg-muted rounded-lg px-3 py-2",children:[a.jsxs("span",{className:"text-muted-foreground",children:[e," â"]})," ",a.jsx("span",{className:"font-medium text-foreground",children:t})]},e)),a.jsxs("div",{className:"bg-highlight/10 border border-highlight/20 rounded-lg px-3 py-2 sm:col-span-2",children:[a.jsx("span",{className:"text-muted-foreground",children:"icebreaker â"})," ",a.jsx("span",{className:"font-medium text-highlight",children:"{{icebreaker}}"})]})]})})]}),a.jsxs("div",{className:"text-center bg-card border border-border rounded-2xl p-7 mt-4",children:[a.jsx("img",{src:X1,alt:"Instantly AI",className:"h-7 mx-auto mb-3"}),a.jsx("h3",{className:"font-display text-lg font-bold text-foreground mb-1.5",children:"Ready to get started?"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Try EnrichAI free with 30 credits â no card required."}),a.jsx(re,{to:"/auth?mode=signup",className:"inline-block bg-primary text-primary-foreground font-display font-bold text-sm px-7 py-2.5 rounded-xl hover:opacity-90 transition active:scale-95",children:"Get Started â"})]})]}),a.jsx(Ba,{})]})),nx={"cold-email":{label:"Cold Email",description:"Write better outbound, faster."},extraction:{label:"Extractors",description:"Pull emails, domains and contacts from anywhere."},sitemap:{label:"Sitemaps",description:"Find, validate, split and merge sitemaps."},"csv-data":{label:"CSV & Data",description:"Clean, format and convert your lead lists."},"email-validation":{label:"Email Validation",description:"Format, dedupe and verify email lists."},converters:{label:"Converters",description:"Convert between formats in one click."}},gd=[{slug:"cold-email-analyzer",name:"Free 'Why Your Cold Email Sucks' Analyzer",shortName:"Cold Email Analyzer",category:"cold-email",metaTitle:"Free Cold Email Analyzer â See Why Your Emails Get Ignored",metaDescription:"Paste your cold email and get an instant, brutally honest score. Find out what's killing your reply rate â free, no signup.",intro:"Paste your cold email. Get a brutally honest report on why it's not getting replies.",longDescription:"Most cold emails fail for the same handful of reasons: weak openers, vague value, fluffy CTAs, spam-trigger words. This free tool reads your draft and scores it on the things that actually move reply rates.",keywords:["cold email analyzer","free cold email checker","why my cold emails don't get replies","cold email score"],features:["Reply-rate score 0â100","Spam-trigger word check","Subject line + opener review","Free forever"],blogSlug:"why-your-cold-email-sucks"},{slug:"cold-email-subject-line-generator",name:"Free Cold Email Subject Line Generator",shortName:"Subject Line Generator",category:"cold-email",metaTitle:"Free Cold Email Subject Line Generator â Get Higher Open Rates",metaDescription:"Generate 10+ proven cold email subject lines in seconds. Free tool, no signup, instant results.",intro:"Generate cold email subject lines that get opened. Free, instant, no signup.",longDescription:"Type in what your email is about and get a fresh batch of subject lines built around the patterns that actually get opened â short, curious, specific, human.",ke
486ywords:["cold email subject line generator","free subject line tool","email subject lines"],features:["10+ variations per run","Curiosity, value & question patterns","Spam-safe phrasing","Free forever"],blogSlug:"cold-email-subject-lines-that-open"},{slug:"subject-line-tester",name:"Free Subject Line Tester",shortName:"Subject Line Tester",category:"cold-email",metaTitle:"Free Subject Line Tester â Score Your Email Open Rate",metaDescription:"Score any email subject line for clarity, curiosity, length and spam risk. Free, instant.",intro:"Drop in any subject line. Get a score and clear reasons why it will (or won't) get opened.",longDescription:"Subject lines decide whether your email gets read or trashed. This tool grades clarity, length, curiosity and spam risk so you can ship the strongest version.",keywords:["subject line tester","free email subject line checker","subject line score"],features:["Open-rate prediction","Spam-risk warnings","Length & clarity score","Free"]},{slug:"cold-email-opener-generator",name:"Free Cold Email Opener Generator",shortName:"Opener Generator",category:"cold-email",metaTitle:"Free Cold Email Opener Generator â Personalised Icebreakers",metaDescription:"Generate personalised cold email openers from a website URL. Free, instant, no signup.",intro:"Paste a prospect's website. Get a personalised opener that doesn't sound like a robot wrote it.",longDescription:"Personalised first lines are the single biggest lever on reply rate. This free tool reads a website and writes one for you in seconds.",keywords:["cold email opener generator","free icebreaker tool","personalised cold email"],features:["URL-based personalisation","Human, casual tone","Multiple variations","Free"]},{slug:"spam-trigger-word-checker",name:"Free Spam Trigger Word Checker",shortName:"Spam Word Checker",category:"cold-email",metaTitle:"Free Spam Trigger Word Checker â Avoid the Promotions Tab",metaDescription:"Scan your email for spam-trigger words that send you straight to junk. Free, instant.",intro:"Paste your email. Find every spam-trigger word that's getting you filtered.",longDescription:"Inbox providers flag a long list of words and phrases. This tool highlights every one in your draft so you can swap them out before sending.",keywords:["spam trigger words","free spam checker","avoid spam folder"],features:["100+ flagged words","Per-word severity","Suggested rewrites","Free"],blogSlug:"spam-trigger-words-list"},{slug:"cta-strength-checker",name:"Free CTA Strength Checker",shortName:"CTA Checker",category:"cold-email",metaTitle:"Free CTA Strength Checker â Score Your Email Call-to-Action",metaDescription:"Score your email's call-to-action for clarity and reply potential. Free, instant.",intro:"Paste your CTA. Find out if it's actually asking for something â or just hoping.",longDescription:"Weak CTAs kill reply rates. This tool grades your ask on clarity, friction and specificity.",keywords:["CTA checker","call to action score","free cold email CTA"],features:["Clarity score","Friction warnings","Examples to copy","Free"]},{slug:"email-readability-score",name:"Free Email Readability Score",shortName:"Readability Score",category:"cold-email",metaTitle:"Free Email Readability Checker â Make Your Emails Easy to Read",metaDescription:"Get an instant readability grade on any email. Shorten, simplify and ship. Free.",intro:"Score any email's readability. Shorter, simpler emails get more replies.",longDescription:"Most cold emails are written at college reading level â far too complex. This tool grades yours and tells you what to simplify.",keywords:["email readability checker","Flesch score email","free readability tool"],features:["Flesch reading ease","Sentence length warnings","Word complexity flags","Free"]},{slug:"website-summariser",name:"Free Website Summariser",shortName:"Website Summariser",category:"cold-email",metaTitle:"Free Website Summariser â What Does This Company Actually Do?",metaDescription:"Paste any URL and get a 2-line summary of what the company does. Perfect for cold email research. Free.",intro:"Paste any website. Get a clean 2-line summary of what they actually do.",longDescription:"Skip the marketing fluff. This tool reads a website and gives you the punchline so you can research prospects 10Ã faster.",keywords:["website summariser","url summary tool","free website summarizer"],features:["2-line clean summary","Skips marketing fluff","Works on any URL","Free"]},{slug:"email-extractor",name:"Free Email Extractor (Text/CSV)",shortName:"Email Extractor",category:"extraction",metaTitle:"Free Email Extractor â Pull Emails From Any Text or CSV",metaDescription:"Paste text or upload a CSV. Get a clean, deduped list of email addresses. Free, no signup.",intro:"Paste any text or upload a CSV. Get a clean, deduped list of every email address inside.",longDescription:"Whether it's a giant blob of text or a messy spreadsheet, this tool finds every valid email and gives you a clean list, ready to use.",keywords:["free email extractor","extract emails from text","csv email extractor"],features:["Text + CSV input","Auto-dedupe","One-click copy / download","Free"],blogSlug:"best-free-email-extractor"},{slug:"html-email-extractor",name:"Free HTML Email Extractor",shortName:"HTML Email Extractor",category:"extraction",metaTitle:"Free HTML Email Extractor â Scrape Emails From HTML Source",metaDescription:"Paste raw HTML and get every email address inside. Free, instant, no signup.",intro:"Drop in raw HTML. Walk away with every email it contains.",longDescription:"Built for when you have the HTML source of a page or export and just need every email out of it â fast.",keywords:["html email extractor","extract emails from html","free html scraper"],features:["Handles obfuscated emails","Auto-dedupe","Free download","N
486o signup"]},{slug:"html-contact-info-extractor",name:"Free HTML â Contact Info Extractor",shortName:"HTML Contact Extractor",category:"extraction",metaTitle:"Free HTML Contact Info Extractor â Emails, Phones, Socials",metaDescription:"Paste HTML and extract every email, phone number and social link in seconds. Free.",intro:"Paste HTML. Get every email, phone number and social handle out of it.",longDescription:"Goes beyond emails â pulls phone numbers, X / LinkedIn handles and other contact-shaped data from any HTML you give it.",keywords:["html contact extractor","extract phone numbers","free contact scraper"],features:["Emails + phones + socials","Deduped output","Per-type filters","Free"]},{slug:"domain-extractor",name:"Free Domain Extractor",shortName:"Domain Extractor",category:"extraction",metaTitle:"Free Domain Extractor â Pull Domains From URLs or Emails",metaDescription:"Paste URLs or emails and extract clean root domains. Free, instant.",intro:"Paste URLs or emails. Get a clean list of root domains, deduped.",longDescription:"Strips subdomains, paths and query strings to give you just the root domain â perfect for company-list cleanup.",keywords:["domain extractor","free domain tool","extract domain from url"],features:["Root-domain output","Strips www / subdomains","Auto-dedupe","Free"]},{slug:"bulk-url-domain-company-extractor",name:"Free Bulk URL â Domain + Company Extractor",shortName:"URL â Domain + Company",category:"extraction",metaTitle:"Free Bulk URL to Domain + Company Extractor",metaDescription:"Paste a list of URLs and get domain + company-name guesses for each. Free.",intro:"Paste URLs in bulk. Get domain + best-guess company name for each row.",longDescription:"Built for cleaning lead lists â turns a wall of URLs into a tidy domain + company list, ready for outreach.",keywords:["bulk url to domain","extract company from url","free lead list cleaner"],features:["Bulk paste","Domain + company columns","CSV download","Free"]},{slug:"website-url-extractor",name:"Free Website URL Extractor â Company List Cleaner",shortName:"URL Extractor",category:"extraction",metaTitle:"Free Website URL Extractor â Clean Your Company List",metaDescription:"Pull every website URL out of a messy list and clean it for outreach. Free.",intro:"Paste messy text. Pull every website URL out and dedupe it instantly.",longDescription:"Drops in everything from CSV exports to scraped pages and gives you back a clean list of unique URLs.",keywords:["website url extractor","url list cleaner","free url extractor"],features:["Handles messy input","Auto-dedupe","CSV download","Free"]},{slug:"page-text-extractor",name:"Free Page Text Extractor",shortName:"Page Text Extractor",category:"extraction",metaTitle:"Free Page Text Extractor â Get Plain Text From Any URL",metaDescription:"Paste a URL and get its clean, readable plain text. Perfect for research and prompts. Free.",intro:"Paste any URL. Get the clean plain text of the page â no nav, no ads.",longDescription:"Strips navigation, ads and boilerplate so you get only the meaningful body text â perfect for research or feeding into AI prompts.",keywords:["page text extractor","url to text","free webpage text"],features:["Strips nav + ads","One-click copy","Works on any public URL","Free"]},{slug:"website-metadata-extractor",name:"Free Website Metadata Extractor",shortName:"Metadata Extractor",category:"extraction",metaTitle:"Free Website Metadata Extractor â Title, Description, OG Tags",metaDescription:"Paste any URL and pull every meta tag â title, description, OG, Twitter. Free.",intro:"Paste any URL. See every meta tag the page exposes.",longDescription:"Inspect title, description, canonical, robots, Open Graph and Twitter tags for any public page in one click.",keywords:["metadata extractor","free meta tag tool","og tag checker"],features:["Title + description","OG + Twitter cards","Canonical + robots","Free"]},{slug:"sitemap-lead-extractor",name:"Free Sitemap â Lead Extractor",shortName:"Sitemap â Leads",category:"extraction",metaTitle:"Free Sitemap to
486Lead Extractor â Turn Sitemaps Into Lead Lists",metaDescription:"Drop in a sitemap URL and extract every linked page as a lead list. Free.",intro:"Drop in a sitemap. Walk away with a clean lead list of every URL it contains.",longDescription:"Treat sitemaps as a goldmine â this tool flattens them into a tidy CSV of URLs, ready for enrichment.",keywords:["sitemap lead extractor","free sitemap to leads","sitemap scraper"],features:["Handles sitemap index","Bulk CSV export","Filter by path","Free"]},{slug:"sitemap-finder-checker",name:"Free Sitemap Finder & Checker",shortName:"Sitemap Finder",category:"sitemap",metaTitle:"Free Sitemap Finder & Checker â Find Any Site's Sitemap",metaDescription:"Paste a domain and find its sitemap automatically. Free, instant.",intro:"Paste any domain. Find its sitemap URL in one click.",longDescription:"Checks robots.txt and the most common sitemap paths so you don't have to guess.",keywords:["sitemap finder","free sitemap checker","find sitemap url"],features:["Auto-detects sitemap location","Handles sitemap index","Status check","Free"],blogSlug:"find-any-website-sitemap"},{slug:"sitemap-validator",name:"Free Sitemap Validator",shortName:"Sitemap Validator",category:"sitemap",metaTitle:"Free Sitemap Validator â Check Your Sitemap.xml",metaDescription:"Paste a sitemap URL or XML and validate against the sitemap protocol. Free.",intro:"Paste a sitemap URL or XML. Get a full validity + best-practice report.",longDescription:"Catches malformed XML, missing tags, oversized sitemaps and broken URLs before Google does.",keywords:["sitemap validator","free xml sitemap checker","sitemap.xml validator"],features:["Spec compliance check","Best-practice warnings","URL count + size","Free"]},{slug:"sitemap-url-extractor",name:"Free Sitemap URL Extractor",shortName:"Sitemap URL Extractor",category:"sitemap",metaTitle:"Free Sitemap URL Extractor â Get Every URL From a Sitemap",metaDescription:"Drop in a sitemap and download every URL inside as a clean list. Free.",intro:"Drop in a sitemap. Download every URL inside as a clean CSV.",longDescription:"Recursively walks sitemap-index files so you get the full picture in one click.",keywords:["sitemap url extractor","extract urls from sitemap","free sitemap exp
486ort"],features:["Recursive sitemap walk","CSV / TXT export","Filter by pattern","Free"]},{slug:"sitemap-to-robots-generator",name:"Free Sitemap to Robots.txt Generator",shortName:"Sitemap â Robots",category:"sitemap",metaTitle:"Free Sitemap to Robots.txt Generator",metaDescription:"Generate a clean robots.txt that points to your sitemap. Free.",intro:"Paste your sitemap URL. Get a clean robots.txt ready to upload.",longDescription:"Builds a minimal, correct robots.txt that references your sitemap and follows current best practice.",keywords:["robots.txt generator","sitemap robots","free robots.txt"],features:["Best-practice template","Sitemap reference included","User-agent presets","Free"]},{slug:"sitemap-index-generator",name:"Free Sitemap Index Generator",shortName:"Sitemap Index Generator",category:"sitemap",metaTitle:"Free Sitemap Index Generator â Combine Multiple Sitemaps",metaDescription:"Paste multiple sitemap URLs and generate a valid sitemap index file. Free.",intro:"Paste sitemap URLs. Get a valid sitemap-index.xml in seconds.",longDescription:"Combine multiple sitemaps into a single index file Google can crawl efficiently.",keywords:["sitemap index generator","combine sitemaps","free sitemap index"],features:["Valid XML output","Bulk paste input","One-click download","Free"]},{slug:"sitemap-split-merger",name:"Free Sitemap Split / Merger Tool",shortName:"Sitemap Split / Merge",category:"sitemap",metaTitle:"Free Sitemap Splitter & Merger â Stay Under 50k URL Limit",metaDescription:"Split oversized sitemaps or merge small ones. Stay within Google's 50k URL limit. Free.",intro:"Split big sitemaps or merge small ones â stay under Google's limits.",longDescription:"Sitemaps over 50,000 URLs or 50MB get rejected. This tool splits them into chunks or merges fragments back together.",keywords:["sitemap splitter","sitemap merger","free sitemap tool"],features:["Split by URL count","Auto-generate index","Merge fragments","Free"]},{slug:"sitemap-urls-comparison",name:"Free Sitemap URLs Comparison Tool",shortName:"Sitemap Compare",category:"sitemap",metaTitle:"Free Sitemap Comparison Tool â Diff Two Sitemaps",metaDescription:"Compare two sitemaps and see what's added, removed or changed. Free.",intro:"Paste two sitemaps. See exactly what's new, removed or changed.",longDescription:"Perfect for tracking site changes after a migration or release.",keywords:["sitemap comparison","diff sitemaps","free sitemap diff"],features:["Added / removed / shared","CSV export","Bulk paste","Free"]},{slug:"csv-column-cleaner",name:"Free CSV Column Cleaner",shortName:"CSV Column Cleaner",category:"csv-data",metaTitle:"Free CSV Column Cleaner â Trim, Lowercase, Dedupe",metaDescription:"Clean any CSV column â trim whitespace, fix case, remove dupes. Free, browser-only.",intro:"Upload a CSV. Pick a column. Trim, lowercase, dedupe â all in your browser.",longDescription:"Runs entirely in your browser, so your data never leaves your machine. Perfect for prep before outreach.",keywords:["csv cleaner","free csv tool","csv column cleaner"],features:["Trim + case fix","Dedupe","Per-column rules","Browser-only"]},{slug:"csv-column-extractor",name:"Free CSV Column Extractor",shortName:"CSV Column Extractor",category:"csv-data",metaTitle:"Free CSV Column Extractor â Pull One Column Out",metaDescription:"Upload a CSV and download just the column you need. Free, browser-only.",intro:"Upload a CSV. Download just the columns you actually need.",longDescription:"No spreadsheet gymnastics â pick the columns and export.",keywords:["csv column extractor","extract csv column","free csv tool"],features:["Multi-column select","Reorder on export","Browser-only","Free"]},{slug:"text-to-csv-converter",name:"Free Text to CSV Converter",shortName:"Text â CSV",category:"csv-data",metaTitle:"Free Text to CSV Converter â Paste, Convert, Download",metaDescription:"Convert any structured text into a clean CSV. Free, instant, browser-only.",intro:"Paste structured text. Get a clean CSV in seconds.",longDescription:"Detects delimiters automatically and lets you fix headers before export.",keywords:["text to csv","free csv converter","convert text csv"],features:["Auto delimiter detection","Header fix-up","Browser-only","Free"]},{slug:"csv-to-json-converter",name:"Free CSV to JSON Converter",shortName:"CSV â JSON",category:"converters",metaTitle:"Free CSV to JSON Converter â Browser-Only, No Upload",metaDescription:"Convert any CSV to JSON in your browser. Free, instant, fully private.",intro:"Drop in a CSV. Get clean JSON. Your data never leaves the browser.",longDescription:"Built for developers and growth teams who need a fast, private CSVâJSON conversion.",keywords:["csv to json","free csv json converter","browser csv json"],features:["Pretty-print or minified","Custom key mapping","Browser-only","Free"],blogSlug:"csv-to-json-quick-guide"},{slug:"csv-to-markdown",name:"Free Convert CSV to Markdown",shortName:"CSV â Markdown",category:"converters",metaTitle:"Free CSV to Markdown Table Converter",metaDescription:"Convert any CSV into a Markdown table in seconds. Free.",intro:"Paste CSV. Get a clean Markdown table â ready for docs or PRs.",longDescription:"Handles alignment and escaping so the output looks right in any Markdown renderer.",keywords:["csv to markdown","free markdown table","csv md converter"],features:["Alignment options","Escape-safe output","One-click copy","Free"]},{slug:"json-to-markdown",name:"Free Convert JSON to Markdown",shortName:"JSON â Markdown",category:"converters",metaTitle:"Free JSON to Markdown Converter",metaDescription:"Turn any JSON into readable Markdown â tables, lists or sections. Free.",intro:"Paste JSON. Get readable Markdown â tables, lists or nested sections.",longDescription:"Smart enough to render arrays of objects as tables and nested objects as sections.",ke
486ywords:["json to markdown","free json md converter"],features:["Table / list / section modes","Nested handling","Copy to clipboard","Free"]},{slug:"pdf-to-markdown",name:"Free Convert PDF to Markdown",shortName:"PDF â Markdown",category:"converters",metaTitle:"Free PDF to Markdown Converter",metaDescription:"Drop a PDF and get clean Markdown â perfect for AI prompts. Free.",intro:"Drop a PDF. Get Markdown â clean, structured, prompt-ready.",longDescription:"Preserves headings, lists and tables where possible â built for feeding documents into AI.",keywords:["pdf to markdown","free pdf md","pdf to text"],features:["Heading + list preservation","Table extraction","Browser-only","Free"]},{slug:"webpage-to-markdown",name:"Free Convert Webpage to Markdown",shortName:"Webpage â Markdown",category:"converters",metaTitle:"Free Webpage to Markdown Converter",metaDescription:"Paste a URL and get clean Markdown â perfect for research and prompts. Free.",intro:"Paste any URL. Get clean Markdown â headings, links, the lot.",longDescription:"Strips clutter and gives you only the meaningful content, in Markdown form.",keywords:["webpage to markdown","url to md","free html to markdown"],features:["Strips clutter","Preserves links + headings","Copy / download","Free"]},{slug:"html-to-markdown",name:"Free Convert HTML to Markdown",shortName:"HTML â Markdown",category:"converters",metaTitle:"Free HTML to Markdown Converter",metaDescription:"Paste HTML and get clean, semantic Markdown. Free, browser-only.",intro:"Paste HTML. Get clean, semantic Markdown â instantly.",longDescription:"Handles tables, code blocks, links and lists faithfully.",keywords:["html to markdown","free html md converter"],features:["Semantic conversion","Code-block aware","Browser-only","Free"]},{slug:"duplicate-email-remover",name:"Free Duplicate Email Remover",shortName:"Dedupe Emails",category:"email-validation",metaTitle:"Free Duplicate Email Remover â Dedupe Lists Instantly",metaDescription:"Paste or upload an email list and remove every duplicate in one click. Free.",intro:"Paste or upload your list. Walk away with zero duplicates.",longDescription:"Case-insensitive, whitespace-safe and lightning fast â dedupe lists with millions of rows in your browser.",keywords:["duplicate email remover","free email dedupe","remove duplicate emails"],features:["Case-insensitive","Handles huge lists","Browser-only","Free"]},{slug:"email-list-formatter",name:"Free Email List Formatter",shortName:"Email List Formatter",category:"email-validation",metaTitle:"Free Email List Formatter â Lowercase, Trim, Sort",metaDescription:"Clean and format any email list â lowercase, trim, sort, dedupe. Free.",intro:"Paste your list. Get it lowercased, trimmed, sorted and deduped.",longDescription:"All the boring cleanup jobs in one place â done in your browser, no upload.",keywords:["email list formatter","free email cleaner","format email list"],features:["Lowercase + trim","Sort + dedupe","Browser-only","Free"]},{slug:"bulk-email-formatter",name:"Free Bulk Email Formatter",shortName:"Bulk Email Formatter",category:"email-validation",metaTitle:"Free Bulk Email Formatter â Clean 100k+ Emails In One Click",metaDescription:"Format huge email lists â lowercase, trim, dedupe, validate syntax. Free.",intro:"Drop in a huge list. Get it cleaned, deduped and validated in one pass.",longDescription:"Handles 100k+ rows in the browser. Perfect for prepping lists before sending.",keywords:["bulk email formatter","free bulk email cleaner","format emails bulk"],features:["100k+ rows","Lowercase + trim + dedupe","Syntax validation","Free"]},{slug:"email-format-checker",name:"Free Email Format Checker",shortName:"Email Format Checker",category:"email-validation",metaTitle:"Free Email Format Checker â Validate Email Syntax",metaDescription:"Check any email address against RFC syntax. Free, instant.",intro:"Check whether any email is syntactically valid â no API limits.",longDescription:"Validates against the RFC syntax spec. For deeper checks (MX, disposable) use our other tools.",keywords:["email format checker","free email syntax check","rfc email validator"],features:["RFC compliant","Bulk paste mode","No limits","Free"]},{slug:"disposable-email-detector",name:"Free Disposable Email Detector",shortName:"Disposable Email Detector",category:"email-validation",metaTitle:"Free Disposable Email Detector â Block Burner Emails",metaDescription:"Detect disposable / burner email addresses in your list. Free, instant.",intro:"Paste a list. Find every disposable, burner or temp-mail address.",longDescription:"Maintained against a fresh list of known disposable providers â keeps your real signups clean.",ke
486ywords:["disposable email detector","burner email checker","free temp mail detector"],features:["Up-to-date provider list","Bulk mode","CSV export","Free"],blogSlug:"block-disposable-emails"}],FS=e=>gd.find(t=>t.slug===e),RD=e=>gd.filter(t=>t.category===e),OD=()=>{const e=Object.keys(nx);return Sn({title:"Free AI Tools for Cold Email & Lead Gen â EnrichAI",description:"41+ free AI tools for cold email, lead extraction, sitemap analysis, CSV cleanup, and email validation. No signup, no card.",path:"/tools",keywords:["free AI tools","free cold email tools","free email extractor","free sitemap tools","csv cleaner free","free lead gen tools"],jsonLd:[cd([{name:"Home",path:"/"},{name:"Free AI Tools",path:"/tools"}]),{"@context":"https://schema.org","@type":"ItemList",itemListElement:gd.map((t,r)=>({"@type":"ListItem",position:r+1,url:`https://www.enrichai.online/tools/${t.slug}`,name:t.name}))},Dp([{q:"Are these tools really free?",a:"Yes. Every tool on this page is free to use. No signup, no card."},{q:"Do you store my data?",a:"Tools that don't need server-side AI run entirely in your browser â your data never leaves your machine."},{q:"Can I use these for commercial work?",a:"Yes."}])]}),a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(it,{title:"Free AI Tools for Cold Email & Lead Gen â EnrichAI",description:"41+ free AI tools for cold email, lead extraction, sitemap analysis, CSV cleanup, and email validation. No signup, no card.",canonical:"/tools"}),a.jsx(Ua,{}),a.jsxs("main",{className:"max-w-5xl mx-auto px-6 py-14",children:[a.jsxs("div",{className:"text-center mb-12",children:[a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-highlight/10 text-highlight text-xs font-semibold mb-4",children:[a.jsx(Aa,{className:"w-3.5 h-3.5"})," 41 Free AI Tools"]}),a.jsx("h1",{className:"font-display text-4xl sm:text-5xl font-bold text-foreground mb-3 leading-tight",children:"Free AI Tools for Cold Email"}),a.jsx("p",{className:"text-muted-foreground max-w-xl mx-auto",children:"A growing collection of free utilities for outbound, lead extraction, sitemap analysis and CSV cleanup. No signup. No card."})]}),e.map(t=>{const r=RD(t);if(r.length===0)return null;const n=nx[t];return a.jsxs("section",{className:"mb-12",children:[a.jsxs("div",{className:"mb-5",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground mb-1",children:n.label}),a.jsx("p",{className:"text-sm text-muted-foreground",children:n.description})]}),a.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:r.map(s=>a.jsxs(re,{to:`/tools/${s.slug}`,className:"group bg-card border border-border rounded-2xl p-5 hover:shadow-md hover:-translate-y-0.5 transition-all",children:[a.jsx("h3",{className:"font-display font-bold text-base text-foreground mb-1.5 leading-snug",children:s.shortName}),a.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-3",children:s.intro}),a.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-semibold text-highlight",children:["Open tool ",a.jsx(ba,{className:"w-3 h-3 group-hover:translate-x-0.5 transition-transform"})]})]},s.slug))})]},t)}),a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 text-center mt-4",children:[a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground mb-2",children:"Want the full engine?"}),a.jsx("p",{className:"text-muted-foreground mb-5",children:"Try EnrichAI on your own leads â 30 free credits, no card required."}),a.jsx(re,{to:"/auth?mode=signup",className:"inline-block px-6 py-3 bg-primary text-primary-foreground rounded-xl font-display font-bold text-sm hover:opacity-90 transition",children:"Get Started"})]})]}),a.jsx(Ba,{})]})},_i=[{slug:"why-your-cold-email-sucks",title:"Why Your Cold Email Sucks (And the Fix Takes 5 Minutes)",metaTitle:"Why Your Cold Email Sucks â And How to Fix It Fast",metaDescription:"The honest reasons most cold emails get ignored, plus a 5-minute checklist to fix yours. Free analyzer inside.",excerpt:"Reply rates are crashing. Here's the honest reason â and the 5-minute fix that actually works.",date:"2026-04-12",readTime:"10 min",keywords:["why my cold email doesn't get replies","cold email mistakes","improve reply rate","cold email tips 2026"],tag:"Cold Email",body:["If you're sending 200 cold emails a day and getting 1 reply, you don't have a volume problem. You have a writing problem. And the worst part is, you probably already know it.","I've reviewed thousands of cold emails over the last few years. The same five mistakes show up in 90% of them. None are mysterious. All are fixable in an afternoon. Once you fix them, reply rates roughly double â not because of any magic trick, but because you stop doing the things that train inboxes to delete you on sight.","This post walks through each one. At the end, there's a 5-minute checklist you can run on every email before you hit send.","## 1. Your subject line is trying too hard",`"Quick question." "Are you the right person?" "Touching base." "Following up." These were great in 2014. They're now the email equivalent of a robocall â your brain filters them out before your conscious mind even sees them.`,`Inboxes have seen these subject lines a literal billion times. Every cold-email "guru" recommended them, every SDR copied them, and now they're radioactive. Worse, Gmail's filters have started downranking them â there's a reasonable chance your "quick question" is landing in Promotions instead of Primary.`,"What works in 2026 is specificity. Reference something only you and the prospect would know. A line from their pricing page. A feature they shipped last week. A number from their public report. The format almost doesn't matter â what matters is that the subject line proves you're a human who actually looked at them.","Examples that work right now:",'- "the new dashboard onboarding"','- "about that c
486omparison page vs Notion"','- "saw the Series A â congrats"','- "is the EU pricing page intentional?"',"Each one passes the test: it could only have been written for that one specific person. That's the bar.","## 2. Your first line is about you",`Read the first line of your last cold email. If it contains the words "I," "my," "we," or "our" â you've already lost. The first line is the most expensive real estate in the email. Wasting it on yourself tells the reader "this is going to be about you, not me" and they're gone.`,"Worse first lines, ranked from bad to fatal:",'- "My name is X and I work at Y" â no one cares','- "I came across your website" â generic, lying, both','- "I hope this email finds you well" â auto-delete',`- "I'm reaching out because" â you're literally explaining the email, in the email`,"The first line should be one observed thing about them. Specific, recent, true. Then nothing else. The shorter the better.",'Compare: "My name is Jake from EnrichAI and I help SaaS companies improve their cold email performance through AI personalisation" vs "saw the new comparison page â the Notion section is brutal."',"Same sender. Same product. The second one gets read. The first one gets deleted before the second sentence.","## 3. Your value prop is fluff",`"We help SaaS companies scale their pipeline." "We empower teams to do more with less." "We're transforming the way enterprises think about X." These are not value props. They are noise. They mean nothing because they could mean anything.`,"A real value prop names a specific change. A number. A time saved. A problem removed. Compare:",'- Bad: "We help with sales productivity"','- Better: "Our customers send 3à more outbound with the same headcount"','- Best: "Acme cut their SDR ramp time from 6 weeks to 9 days using us"',"Specificity is credibility. The more concrete you are, the more believable. Vague claims set off every alarm in the reader's brain.",`If you can't write a specific value prop, that's information. It means you don't yet understand the change you create. Go talk to three customers and ask them to finish the sentence "before EnrichAI, I used to spend X hours on Y. Now I spend Z." Use their actual words.`,"## 4. Your CTA is a maze","Cold-email CTAs fail in two opposite directions: too vague, or too demanding.",`Too vague: "Let me know if interested." â Interested in what? How? When? You've made the prospect do all the work of figuring out how to respond. They won't.`,`Too demanding: "Are you free Tuesday at 2pm CST or Wednesday at 10am for a 15-minute discovery call to see if we'd be a mutual fit?" â You're asking a stranger to commit to a calendar event before they know what your product is.`,"The sweet spot is a low-friction, easy-to-reply question. Something they can answer with one word.",'- "Worth a 10-min look next week?"','- "Want me to send a 90-second Loom?"',`- "Reply 'send' and I'll share the case study."`,'- "Curious â is X still a priority for you?"','Each one is answerable in a single word and creates an obvious next step. Compare with "book a demo here [link]" â which feels like a sales funnel and reads like one too.',"## 5. You triggered the spam filter",'Words like "guaranteed," "free trial," "act now," "limited offer," and "100% free" all push your email toward Promotions. Inbox providers maintain shifting blocklists, and even one or two of these words can be enough to demote you.',"It gets worse. Other deliverability killers in 2026:","- ALL CAPS in subject lines","- Multiple exclamation marks (!!!)","- Tracking pixels (Gmail downranks these now)","- Click-tracking on every link (rewrites your domain to a redirector â looks like phishing)","- Long URL with UTM params","- Image-heavy HTML â plain text outperforms in 2026","Run your draft through our free Spam Trigger Word Checker before you send. It takes ten seconds and catches problems your eye won't.","## The 5-minute checklist","Before you send any cold email, run this checklist:",'- Subject line: â¤8 words, specific, no "quick question"',"- First line: about them, not you, â¤20 words","- Value prop: contains a number or named outcome","- CTA: answerable in one word","- Spam check: zero flagged words","- Length: under 90 words total. Yes, total.","If any of those fail, rewrite. Five minutes. That's the whole fix.","## The shortcut","Drop your email into our free Cold Email Analyzer. Get a 0â100 score, see your spam triggers, and get specific suggestions for each section. Most people see reply rates double after one round of edits â not because the tool is magic, but because it forces you to read your own email like a stranger would.",`Then write the next one. And the next. The first 50 are practice. By the time you've sent 100, this stuff is automatic, and you'll wonder how you ever wrote a 200-word email starting with "My name is."`],relatedToolSlugs:["cold-email-analyzer","spam-trigger-word-checker","cta-strength-checker","subject-line-tester"]}
486,{slug:"cold-email-subject-lines-that-open",title:"Cold Email Subject Lines That Actually Get Opened (37 Real Examples)",metaTitle:"Cold Email Subject Lines That Get Opens â 37 Examples",metaDescription:"37 subject lines that get cold emails opened in 2026 â plus the patterns behind them. Free generator and tester inside.",excerpt:"37 subject lines that actually get opened in 2026, broken down by the pattern that makes them work.",date:"2026-04-08",readTime:"9 min",keywords:["cold email subject lines","subject lines that get opens","best subject lines 2026","b2b email subject lines"],tag:"Cold Email",body:["Subject lines decide whether your email gets read or trashed. That's it. The rest of your beautiful 90-word email â the personalised opener, the elegant value prop, the smart CTA â doesn't matter if no one opens it.","I've A/B tested thousands of cold-email subject lines over the past four years. Patterns hold. Here are the ones that still work in 2026, with real examples you can steal, plus the ones that have officially died.","## The four open-rate laws","Before the patterns, the rules every winning subject line obeys:","- Under 8 words","- All lowercase (looks like a real human typed it on their phone)","- No emojis (great for newsletters, instant trash for cold)","- No punctuation pile-ups","- No spam words (free, guaranteed, act now, urgent, winner, $$$)","Break any of these and you halve your open rate. Break two and you're in Promotions.","## Pattern 1: Curiosity gap","These create a tiny mystery â specific enough to feel real, vague enough that the reader has to open to find out what.",'- "saw this on your pricing page"','- "about that thing on your homepage"','- "a small thing about [their product]"','- "the comparison page â quick note"','- "one weird thing about your blog"','- "noticed something about [feature]"','- "about your Series A"',"Why they work: they imply you've actually been on their site. The reader opens to confirm. The opener then has to deliver â name the specific thing â or the trust evaporates.","## Pattern 2: Question they want to answer","Questions get replies. Questions in subject lines get opens.",'- "how are you handling [problem]?"','- "who runs [thing] over there?"','- "is [observation] still true?"','- "still doing [old approach]?"','- "how did the [recent launch] go?"','- "is X still a priority for Q2?"',`Why they work: humans are hardwired to answer questions. Even if they don't reply, they open to see what's being asked. Avoid yes/no questions that feel like sales bait â "want a demo?" loses every time.`,"## Pattern 3: Compliment-shaped","Honest, specific, not creepy. The line between flattering and gross is razor-thin â be specific or skip it.",'- "[their product] vs [competitor] â your take?"','- "loved your post on [topic]"','- "the [feature] is genuinely good"','- "the new docs are much better"','- "the rebrand looks great"','- "the blog post about [thing] â well done"',"Why they work: most cold emails attack a problem. A compliment is a pattern interrupt. Just don't fake it. If you didn't read the post, don't say you loved it.","## Pattern 4: Mutual context","Reference something that connects you. A shared event, a customer, a city, a tool.",'- "both at SaaStr last month?"','- "saw you on [podcast]"','- "Acme mentioned you"','- "fellow [tool] user â quick q"','- "from the Notion launch event"',"Why they work: any bridge of context lowers the stranger barrier. Even a weak connection beats no connection.","## Pattern 5: Direct & specific","Sometimes the boring answer wins. State the thing.",'- "a 9-second loom for [name]"','- "cold email from the EnrichAI team"','- "reaching out re: SDR ramp time"','- "intro: [your name] @ [your company]"',"Why they work: in a world of clever subject lines, radical honesty is itself a pattern interrupt. These work best when paired with a strong, deserving body â they over-promise nothing.","## What's officially dead in 2026","Stop using these. Inboxes have downranked them or trained reply rates to zero:",'- "Quick question"','- "Are you the right person?"','- "Touching base"','- "Following up"','- "Re: our conversation" (when there was no conversation â high spam-flag rate)','- "[First name], a quick favor"','- "Permission to send you something?"','- Any subject with "free," "guaranteed," "act now," "limited"',"- ALL CAPS","- More than 8 words","- ð¥ (or any emoji, in cold context)","## How to test before sending","Two quick steps:","1. Run your subject line through our free Subject Line Tester. It scores length, spam risk, capitalisation and punctuation. Aim for 80+.","2. Generate alternatives with our Subject Line Generator. Always pick from at least 5 options. The first one you write is rarely the best.","## The lazy truth","If you don't want to think about subject-line patterns, just write what you'd actually text a friend about the prospect. Lowercase, casual, â¤8 words, specific. That's it. The whole game."],relatedToolSlugs:["cold-email-subject-line-generator","subject-line-tester","spam-trigger-word-checker"]},{slug:"best-free-email-extractor",title:"The Best Free Email Extractor in 2026 (Browser-Based, No Upload, No Signup)",metaTitle:"Best Free Email Extractor 2026 â No Signup, Browser-Only",metaDescription:"A free email extractor that runs in your browser â no signup, no upload, your data stays local. Try it now.",excerpt:"A free email extractor that works in your browser, doesn't need a signup, and never uploads your data. Here's why that matters.",date:"2026-04-05",readTime:"8 min",keywords:["free email extractor","email scraper free","extract emails from text","browser email extractor"],tag:"Tools",body:[`If you've ever Googled "free email extractor," you know the experience. Page one is a graveyard of identical-looking tools, each one more aggressive than the last about getting your email address before it'll do anything. Most of them upload your text to a server. Some require a signup. A few are flat-out trying to harvest the very emails you're trying to extract.`,"There's a better way: an email extractor that runs entirely in your browser. No upload, no signup, no logs, no trackers. Your text stays on your machine. The whole process takes about three seconds.","Ours is exactly that. This post explains why browser-only matters, when you'd actually use an email extractor, and how the regex actually works under the hood (in case you want to roll your own).","## What an email extractor does","Simple: takes any blob of text and pulls every email address out of it.","Use cases:","- Cleaning a scraped page","- Pulling addresses out of a Slack/WhatsApp/Discord export","- Deduping a messy CSV before outreach","- Extracting from PDF text, meeting notes, or chat logs","- Just because spreadsheets are painful and Find/Replace is slower","## Why browser-only matters","Once your email list is on someone else's server, three things become true:","1. They have a copy. Even if their privacy policy says they delete it, they still had it. Logs, backups, accidental retention â it's a meaningful exposure.","2. You don't know
486what else they did with it. The free tool that costs you nothing is being paid for somehow. Sometimes that's ads. Sometimes it's selling the addresses you uploaded.","3. If they get breached, your contacts get breached too. You inherited their security posture the moment you uploaded.","Browser-only means none of that. The JavaScript runs on your machine, the regex matches happen in your machine's memory, and the result never leaves the page. Open Network tab in DevTools â there's no outbound request. That's the proof.","## How the regex actually works","The pattern most extractors use is some variant of:","`/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/g`",'Translated: one or more allowed username characters, an @, one or more allowed domain characters, a literal dot, and a TLD of two or more letters. The `g` flag means "find all matches."',"This catches the vast majority of real-world emails. It has a few known weaknesses:","- It misses RFC-edge-case addresses with quoted local parts (rare in practice)","- It can grab punctuation glued to the end of an email if the source is messy","- It doesn't validate that the TLD is real (`.zzz` would match)","For lead-gen work, none of those matter. You're then deduping and validating downstream.","## When to dedupe","Always. Always always always. The same email shows up multiple times in almost every extraction â once in plain text, once in a `mailto:` link, once in a footer.","Our extractor dedupes case-insensitively (so `[email protected]` and `[email protected]` collapse) and trims whitespace. The output is the unique, canonical list.","## When to validate",`Extraction â validation. The regex says "this looks like an email." It doesn't say "this email exists" or "this address accepts mail."`,"After extraction, run the list through:","- Format validation (we have a free tool for this)","- Disposable detection (mailinator etc.)","- MX-record check (does the domain accept mail at all?)","- Optional: SMTP ping (most paid validators)","For most outbound use cases, format + disposable is enough. MX/SMTP is overkill until you're sending tens of thousands.","## Roll your own (it's 5 lines)","If you want a one-liner without any tool:","`text.match(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}/g)`","That's literally it. Open the browser console on any page, paste `document.body.innerText.match(/.../g)`, get every email on the page. No tool required.","## When to use ours instead","When you want:","- Auto-dedupe","- A clean download/copy","- File upload (CSV, TXT)","- Visual feedback","- Zero risk of pasting into the wrong console and breaking the page","It's free, browser-only, and doesn't ask for an email address (which would be ironic given the use case). Try it here.","## What to do with the list","Once you have a clean list, the next steps depend on what you're doing:","- Outbound: enrich with EnrichAI, write personalised openers, send 10â50 a day from a warmed-up domain","- Cleanup: dedupe against your existing list (also free), then format-check","- Research: just save the file and move on","Whatever you do â don't upload your list anywhere you don't trust. The cost of a leak is way higher than the convenience of a third-party tool."],relatedToolSlugs:["email-extractor","duplicate-email-remover","email-list-formatter","disposable-email-detector"]},{slug:"spam-trigger-words-list",title:"The 2026 Spam Trigger Words List (And Exactly What to Use Instead)",metaTitle:"Spam Trigger Words List 2026 â Free Checker Inside",metaDescription:"The current list of spam-trigger words that send cold emails to junk in 2026 â with safer alternatives for every one. Free checker.",excerpt:"The words and phrases that still trip spam filters in 2026 â with safer alternatives you can use right now.",date:"2026-04-02",readTime:"8 min",keywords:["spam trigger words","avoid spam filter","spam words 2026","cold email deliverability"],tag:"Cold Email",body:["Spam filters in 2026 are smarter than they were five years ago, but they still scan your text for high-risk patterns. One wrong word and you're in Promotions. Two and you're in Junk. Three and you're never getting out.","What's changed is that the filters are now layered. There's a lexical scan (the old-school word list), a sender-reputation score (your domain's history), an engagement score (do recipients actually open and reply to you), and a content-similarity score (does this email look like 10,000 others sent today). The lexical scan is the easiest one to fix in five minutes.","Here's the current word list and exactly what to use instead.","## Money words","Anything that smells like a sales pitch.",'- "free" â "included" / "no cost" / "on us"','- "guaranteed" â "reliable" / "proven"','- "earn $" â "add revenue"',`- "cash bonus" â just don't`,'- "discount" â "reduced price" / "better rate"','- "100% free" â instant flag, kill it','- "no cost to you" â reword to plain "free for the first month" â actually safer despite the word, because the surrounding context normalises it',"## Urgency words","Old-school marketing language that pings every modern filter.",`- "act now" â "when you're ready"`,'- "limited time" â "open until [date]"','- "hurry" â drop entirely',`- "don't miss out" â drop`,'- "now" + "!" â never combine','- "urgent" â "time-sensitive" (still risky â only use when actually true)',"## Sales close words","Direct closes belong on landing pages, not in the body of an email.",'- "buy now" â "start trial"','- "order now" â "get started"','- "sign up now" â "create your account" / drop "now"','- "call now" â "reply with a time"','- "click here" â write the actual link as text','- "subscribe" â "join the list"',"## Salesy intros","These are the dead giveaways that you're sending bulk.",'- "Dear friend" â use their first name','- "Dear [insert name]" â fix your merge tags','- "This is not spam" â the most ironic instant flag in email history','- "You won" â unless they actually won, never','- "Congratulations" + sales context â flag','- "Hello" alone with no name â looks like a template',"## Hyperbole","Anything that sounds like a 1990s infomercial.",'- "Amazing" â drop or use specific praise','- "Best" â "top" or specific ("#1 in [niche]")','- "Incredible" â drop','- "Revolutionary" â drop, almost always a lie anyway','- "Game-changing" â drop',"## Finance and crypto","These are the highest-risk category in 2026.",'- "Loan" â "financing" (only when relevant)','- "Credit" â context matters; "credit card" is fine, "bad credit" is not','- "Investment" â "opportunity" if salesy, otherwise OK','- "Bitcoin / crypto" â high flag if not in legitimate context','- "Make money" â drop',"## Punctuation and formatting traps","Filters scan format, not just words.","- Multiple ! or ? in a row (!!!) â flag","- ALL CAPS in subject or body â flag","- Heavy use of $$$ or %%% â flag","- Lots of emojis in cold context â flag","- Image-only emails (no text) â flag","- Mismatched links (display says one thing, href another) â flag","- Tracking pixels â not a content flag, but Gmail downranks the sender","## Things that USED to be safe but now aren't","The list shifts every year. Currently moving from safe to risky:",'- "Quick question" â low engagement, getting downranked','- "Following up" â very low engagement','- "Just checking in" â flag in some filters now',"- Emojis in subject line â fine for B2C newsletters, dangerous in cold B2B","## What actually matters more than words","Honestly? Word choice is the fifth most important deliverability factor in 2026. The first four:","1. Sender reputation (warmed-up domain, low complaint rate)","2. Engagement (people actually open and reply)","3. Authentication (SPF, DKIM, DMARC all aligned)","4. Sending pattern (gradual ramp, no sudden volume spikes)","If those four are dialled in, you can use a few risky words and still land. If they're broken, even the cleanest email goes to spam.","## How to check yours","Drop your draft into our free Spam Trigger Word Checker. It'll highlight every flagged word and suggest a swap. Two minutes of edits typically improves deliverability noticeably.","Then run a real-world test: send to a Gmail, Outlook, and Apple Mail inbox. If it lands in Primary on all three, ship it. If it lands in Promotions, swap two more words and try again."],relatedToolSlugs:["spam-trigger-word-checker","cold-email-analyzer","email-readability-score"]},{slug:"find-any-website-sitemap",title:"How to Find Any Website's Sitemap (Even When It's Hidden)",metaTitle:"How to Find Any Website's Sitemap â Free Tool & Methods",metaDescription:"Five reliable ways to find any website's sitemap â plus a free tool that does it for you in one click.",excerpt:"Five reliable ways to find any website's sitemap, plus a free tool that does it for you in one click.",date:"2026-03-29",readTime:"7 min",keywords:["how to find sitemap","find website sitemap","sitemap finder","sitemap.xml lookup"],tag:"SEO",body:["Sitemaps are gold. They tell you every page a site wants Google to index â which means every page they care about. For SEO research, lead generation, competitive analysis, c
486ontent gap mining and a dozen other workflows, getting a target's sitemap is step one.",'Most sites publish one. A surprising number try to hide it (or just have a broken setup). Here are the five reliable ways to find any sitemap, ranked from "obvious" to "detective work."',"## 1. The obvious URLs","Try these first. About 80% of sites use one of them.","- /sitemap.xml","- /sitemap_index.xml","- /sitemap-index.xml","- /sitemap.txt","- /sitemap1.xml","Most CMSs default to one of these out of the box. WordPress (with Yoast or RankMath) puts it at /sitemap_index.xml. Webflow uses /sitemap.xml. Shopify uses /sitemap.xml. Wix uses /sitemap.xml. Squarespace uses /sitemap.xml.","Just paste the domain into your browser bar with /sitemap.xml on the end and try. If you get XML back, you found it.","## 2. The robots.txt declaration","Every site that follows best practice declares its sitemap location in /robots.txt. Visit example.com/robots.txt and look for a line that starts with `Sitemap:`.","Example:","`Sitemap: https://example.com/wp-sitemap.xml`","This is the canonical, site-owner-declared location. If it's there, that's the right URL to use, even if it's at a weird path.","## 3. Google's index","If neither of the above works, Google itself will often surface it. Search:","`site:example.com filetype:xml sitemap`","Or just:","`site:example.com sitemap`","Often the sitemap appears in the results because Google indexed it. This works for sites that publish at non-standard paths.","## 4. Bing Webmaster Tools (without an account)","Bing exposes some sitemap data publicly through its index. Search bing.com for:","`site:example.com sitemap`","Bing tends to be more permissive than Google about what shows up here.","## 5. Detective work","If all of the above fail, the site has either no sitemap (rare) or a deliberately obscured one (rarer). Try:",'- View page source of the homepage and search for "sitemap"',"- Check if there's a sitemap link in the footer (some old WordPress themes still do this)",'- Look for `<link rel="sitemap" type="application/xml"` in the page head',"- Check common subdomain patterns: sitemap.example.com, www.example.com/sitemap.xml","- Check the API: some sites generate sitemaps on-demand at /api/sitemap","## Sitemap-index files","Big sites split their sitemaps because Google rejects single sitemaps over 50,000 URLs or 50MB. So they publish a sitemap-index.xml that just contains links to the actual sitemaps.","When you find a sitemap-index, the URLs you actually want are inside the linked sub-sitemaps. Walk the tree.","Our free Sitemap URL Extractor handles this automatically â paste a sitemap-index, get every URL from every sub-sitemap.","## What to do with a sitemap once you find it","Possibilities:","- Extract URLs as a CSV â enrich them as leads","- Diff against an old version â see what content was added/removed (great for tracking competitors)","- Validate it for errors â useful when auditing a client site","- Pull metadata from each URL â build a content inventory","- Generate a clean robots.txt for your own site â use ours","## The lazy way","Use our free Sitemap Finder. Paste a domain, hit go, get every common sitemap location checked in one click. Done.","Then plug the result into the Sitemap URL Extractor to flatten it into a clean lead list. Two free tools, one workflow, zero setup."],relatedToolSlugs:["sitemap-finder-checker","sitemap-validator","sitemap-url-extractor","sitemap-lead-extractor"]},{slug:"csv-to-json-quick-guide",title:"CSV to JSON in 60 Seconds: The Browser-Only Method (No Upload)",metaTitle:"CSV to JSON in 60 Seconds â Free, Browser-Only, No Upload",metaDescription:"Convert any CSV to JSON in 60 seconds without uploading your data. Free browser tool inside.",excerpt:"The fastest way to convert CSV to JSON in 2026 â without uploading your data anywhere.",date:"2026-03-25",readTime:"6 min",keywords:["csv to json","convert csv to json","free csv json","browser csv converter"],tag:"Tools",body:[`If you've Googled "csv to json" recently, you've seen the same ten near-identical sites: aggressive ads, a pop-up asking for your email, and a big upload button. That's not great when the file you're converting has customer emails, internal pricing, or anything you'd be embarrassed about leaking.`,"Here's a faster, safer way: a converter that runs entirely in your browser. No upload, no signup, no logs.","## How to use it (60 seconds)","Step 1 â Open the CSV â JSON tool. Single page, no signup, no ads.","Step 2 â Paste your CSV (or drop a file). Everything happens in your browser. The file never goes anywhere.","Step 3 â Choose pretty-printed (with indentation) or minified (one line). Copy or download.","Done.","## Why browser-only matters","Same reason it matters for email extractors. Once your CSV is on someone else's server, three things become true: they have a copy;
486 you don't know what else they did with it; if they get breached, your data is in the breach.","Browser-only means the conversion runs in JavaScript on your machine. The data is in your browser's memory and nowhere else. Open the Network tab in DevTools â no outbound request to anywhere.","## What CSV â JSON actually does","Maps each row to an object, using the first row as keys.","Input:","`name,email,company\\nJane,[email protected],Acme\\nBob,[email protected],Beta`","Output:",'`[\\n { "name": "Jane", "email": "[email protected]", "company": "Acme" },\\n { "name": "Bob", "email": "[email protected]", "company": "Beta" }\\n]`',"## Edge cases the tool handles","Real CSVs are messy. Things to watch for:",'- Quoted fields with commas inside ("Smith, John")','- Quoted fields with quotes inside (""escaped"")',"- Mixed line endings (CRLF, LF, CR)","- Empty trailing rows","- Headers with spaces or special chars","- Cells with newlines inside quotes","Our parser handles all of those. The trivial one-liner `text.split('\\n').map(r => r.split(','))` does not â don't use it for anything real.","## When you'd want JSON instead of CSV","- Feeding into an API","- Loading into a JavaScript app","- Pasting into a config file","- Sending to an LLM (most prompts work better with JSON than CSV)","- Importing into MongoDB or any document store","## When to stay with CSV","- Excel/Sheets work","- Sharing with non-technical teammates","- Email attachments (smaller files)","- Simple imports into SaaS tools (most prefer CSV)","## What about the reverse?","JSON â CSV is in our converter section too. Same browser-only guarantee.","## The other CSV tools you'll want","Once you're converting CSVs, you'll probably also want:","- CSV Column Cleaner (trim, lowercase, dedupe a single column)","- CSV Column Extractor (download just the columns you need)","- Text â CSV converter (auto-detects delimiter)","- CSV â Markdown (for docs and PRs)","All free, all browser-only, all on the /tools page.","Open the CSV to JSON Converter â"],relatedToolSlugs:["csv-to-json-converter","csv-column-cleaner","csv-column-extractor","text-to-csv-converter","csv-to-markdown"]},{slug:"block-disposable-emails",title:"How to Block Disposable Emails From Your Signups (Free Tool + 2026 List)",metaTitle:"Block Disposable Emails â Free Detector & 2026 List",metaDescription:"How to detect and block disposable / burner email addresses from your signups. Free detector inside.",excerpt:"Burner emails ruin trial conversion and inflate your top-of-funnel metrics. Here's how to spot them â and a free tool to scan your list right now.",date:"2026-03-22",readTime:"8 min",keywords:["block disposable email","burner email detector","free disposable email check","temporary email list 2026"],tag:"SaaS",body:["If your free trial conversion looks bad, look at the email domains in your signup list. There's a good chance 10â30% are disposable. They inflate your top-of-funnel numbers, ruin your activation analytics, and never convert into anything because the inbox they signed up with self-destructed an hour later.","Disposable email blocking is one of the highest-ROI things a SaaS team can do. It takes an afternoon and the cleanup of your funnel metrics is dramatic.","## What disposable emails are","Domains like mailinator.com, 10minutemail.com, guerrillamail.com, yopmail.com â and a thousand more â that exist purely to give you a temporary inbox for receiving one verification email and then disappearing.","There are three rough categories:","1. Public temp-mail services (mailinator, etc.) â the obvious ones","2. Plus-aliasing abuse ([email protected]) â same person, fake-feeling addresses","3. Catch-all domains ([email protected] routes to one inbox) â used for trial abuse","Category 1 is easy to block. Categories 2 and 3 require more work.","## Why people use them","- Free trial abuse (the classic â sign up, abuse, signup again with a new burner)","- Privacy paranoia (legitimate but rare)","- Avoiding marketing emails","- Spam protection on forums","- Just testing your product without committing","From your perspective, none of these reasons are good. None of them convert. None of them care about your product.","## Why blocking them helps","Concrete wins:","- Cleaner activation metrics. Your true Day-1 retention is higher than your reports show â burner accounts skew it down.","- Lower abuse on free plans. Same person can't keep signing up to dodge limits.","- Better deliverability for transactional emails. Burner inboxes bounce or auto-delete, dragging down your sender reputation.","- More accurate cohort analysis. Your real cohort sizes are smaller than reported.","- Higher trial â paid conversion rate, just by removing fake denominator.","## Two ways to block them",'Option A: at signup. The cleanest fix. When a user submits the signup form, check their email domain against a maintained block-list. Reject with a polite message: "please use your work email."',"Option B: scan your existing list and flag/delete burners. Useful as a one-shot cleanup. Doesn't prevent new ones.","Most teams should do both. Option A is a 30-line backend change. Option B is one CSV scan with our free Disposable Email Detector.","## The 2026 disposable list","The major ones to block (this list shifts â keep it updated quarterly):","- mailinator.com","- 10minutemail.com","- guerrillamail.com","- yopmail.com","- tempmail.com / temp-mail.org","- throwaway.email","- trashmail.com","- sharklasers.com","- getnada.com","- maildrop.cc","- mintemail.com","- dispostable.com","- mohmal.com","- mailnesia.com","- spambox.us","- tempr.email","- tmpmail.org","- mailcatch.com","- emailondeck.com","- getairmail.com","- inboxbear.com","- fakemail.net / fakeinbox.com","There are many more â community-maintained lists like disposable-email-domains on GitHub track 1,000+ provider domains and update weekly. For production, sync from there.","## What about Gmail aliasing?","Tricky. `[email protected]` is a perfectly legitimate address that routes to `[email protected]`. But if you see the same `yourname@` signing up 50 times with different `+x` suffixes, that's abuse.","The fix: normalize Gmail addresses (strip `+...` and dots in the local part) when you store them, so duplicate detection collapses them to one identity. Don't block â just collapse.","## What about catch-all domains?","Harder. A catch-all domain accepts mail at any address (`[email protected]` works). Some legitimate small businesses do this. Some scammers do too.","MX-record checks won't catch this. Best signal: behaviour. If signups from a single domain spike suddenly, look closer.",'## What about "disposable but legitimate"?',"Some folks use SimpleLogin, AnonAddy, Apple Hide My Email, or DuckDuckGo Email Protection. These are al
486iasing services â they forward to a real inbox but mask the user's true address. They're not disposable in the abuse sense, but they look similar.","Decision: most SaaS should allow these. The user is real, just privacy-conscious. Reject only if the domain ends in known temp-mail providers.","## Free tool","Our Disposable Email Detector handles all of this for one-shot list scans. Paste or upload your list, get every burner flagged in one click. Browser-only, no upload, free forever.","Server-side blocking is on the EnrichAI roadmap â for now, scan, clean, and consider adding a JSON block-list to your backend."],relatedToolSlugs:["disposable-email-detector","email-format-checker","duplicate-email-remover"]},{slug:"personalisation-at-scale",title:"Personalisation at Scale: How to Send 1,000 Cold Emails That Each Feel Hand-Written",metaTitle:"Personalisation at Scale â How to Send 1,000 Personal Cold Emails",metaDescription:"The exact workflow to send 1,000 cold emails that each feel hand-written â without losing a week to it.",excerpt:"The workflow we use to send a thousand cold emails a week that each feel like they were written for one person.",date:"2026-03-18",readTime:"11 min",keywords:["cold email personalisation","personalisation at scale","ai cold email","cold outbound 2026"],tag:"Cold Email",body:['Generic cold email is dead. Truly hand-written cold email is too slow. The middle ground â "AI-personalised" â is where the wins are in 2026.',`Done badly, AI personalisation is worse than generic. The infamous "I noticed you work at [Company] which is incredible" openers from 2023 trained an entire generation of inboxes to spot AI-generated outbound and downrank it instantly. The fix isn't more AI. It's better AI, used in a smarter pipeline.`,"Here's the exact workflow we use to send 1,000+ cold emails a week with reply rates in the 8â14% range â well above the cold-outbound average of 1â3%.","## Step 1 â Start with a tight list","100 perfect prospects beat 1,000 mediocre ones. By a lot.","Filter ruthlessly:","- Industry: exact match for your ICP","- Headcount: tight band (e.g. 50â250)","- Tech stack: must use a tool you complement","- Recent signal: hiring, funding, launch, news mention in the last 90 days",`- Decision-maker title: not "VP of anything," but specific roles you've sold to before`,"If your list has 5,000 names, you didn't filter hard enough. Cut it to 500. Then cut it again to 200.","Why it matters: every email you send to a non-fit prospect costs you reputation. Filters track who replies positively vs. who deletes/marks-as-spam. Your domain reputation IS your cold-outbound success metric. Don't burn it on poor-fit prospects.","## Step 2 â One observation per prospect","For each lead, pull one specific, observed thing. This is the single line that proves you actually looked.","Sources:","- Their company homepage (one specific feature, claim, or messaging line)","- Their blog (one recent post)","- Their pricing page (one specific tier or change)","- LinkedIn news (recent hire, promotion, post)","- Their product (a specific page, feature, or screenshot)","- Press mentions (an article they were quoted in)",'The observation must be specific enough that it could only have come from looking at them. "You work in SaaS" is not an observation. "Your pricing page added a Team tier in March" is.',"Pull these in bulk. EnrichAI does this with one prompt across your full list. If you're doing it manually, expect 90 seconds per prospect.","## Step 3 â Write a templated frame","The frame is the email skeleton. It stays constant across the whole campaign. Subject, opener, value prop, CTA. The opener is the only piece that varies per prospect.","Example frame:","Subject: [LOWERCASE OBSERVATION TEASE]","Hey {{firstName}},","[OBSERVATION-DRIVEN OPENER LINE â this is the AI-generated bit]","We help [SIMILAR COMPANIES] cut [SPECIFIC METRIC] from [BEFORE] to [AFTER]. Acme did this in [TIMEF
486RAME].","Worth a 10-min look next week?","Best,","[YOUR NAME]","Notice: 4 sentences. ~70 words. One specific number. One named customer. One soft CTA. That's it.","## Step 4 â Generate openers from observations","This is where AI saves you a week. Drop the observation in, get a one-line opener that sounds human.",'Bad AI prompt: "Write a cold-email opener for this company."',`Good AI prompt: "Write a single casual one-line opener (max 20 words) that references this specific observation: [observation]. No 'I hope this finds you well.' No 'I came across.' Sound like you'd text a friend."`,"Then â and this is the critical part â don't accept the first generation. Generate 3â5 per prospect. Pick the most natural one. If none feel human, regenerate. The 30 seconds you spend reading 5 options is the difference between a reply and a delete.","EnrichAI does this in a single batch â upload list, pick prompt, get personalised openers ready to send.","## Step 5 â QA every email manually","Yes, every one. It takes 10 seconds per lead. It catches 100% of the cringe.","Things you're QAing for:","- Did the opener actually reference the right observation?","- Does it sound like a human wrote it?",`- Is there any "AI tell" (the word "delve," "furthermore," "in today's landscape")?`,'- Did merge tags resolve correctly? ({{firstName}} should be "Jake," not "Jake " or "{{firstName}}")',"- Is the company name correct?","Reject ~20% of generated openers. That's normal. The remaining 80% are gold.","If you can't QA every email, you're sending too many. Cut the list.","## Step 6 â Send in waves","Don't blast 1,000 in a day. You'll torch your domain.","- Days 1â3: 50/day from each sender","- Days 4â10: 80/day","- Day 11+: 100â150/day max per inbox","Use multiple sender inboxes if you need higher volume. Three inboxes à 100/day = 300/day, all from warmed-up senders, all under spam-trap thresholds.","## Step 7 â Reply within 5 minutes when someone bites","Reply latency is the second-most-correlated factor with closed deals (after fit). When someone replies, hit them back within minutes if you can. Speed wins.",`Have a few "if they say X" templates pre-written so you're not staring at a blank reply box.`,"## What this stack costs","- List building: $50â200/month (Apollo, Clay, Hunter)","- Sender warmup: $30â80/month (Instantly, Smartlead, Mailreach)","- AI personalisation: $0â50/month (EnrichAI starts free)","- Domain + inbox setup: $30/month for 3 sending domains","Total: $150â400/month for a 1,000-email-a-week sustainable cold-outbound machine. The shortcut for most teams is Lemlist or Smartlead for sending + EnrichAI for the openers.","## Why this works in 2026","Inboxes can spot generic AI cold email a mile away. They cannot easily distinguish observation-driven AI personalisation from a hand-written email. The only thing that matters is whether the opener proves you looked.","If it does, you're a real human writing a thoughtful email. The fact that AI helped you write 1,000 of them in a day is invisible to the reader. That's the whole game.","## TL;DR shortcut","EnrichAI does steps 2â4 in one pass. Upload your list, pick a prompt, get personalised openers ready to send. 30 free credits to try it. From there, paste into your sending tool and you're done."],relatedToolSlugs:["cold-email-opener-generator","website-summariser","cold-email-analyzer"]},{slug:"cold-email-cta-mistakes",title:"5 Cold Email CTAs That Kill Replies (And the Exact Swap That Works)",metaTitle:"5 Cold Email CTAs That Kill Replies â Free Checker Inside",metaDescription:"The 5 worst cold-email call-to-actions of 2026, why they fail, and what to write instead. Free CTA checker.",excerpt:"Five CTAs that quietly tank your reply rate â and the one-line swap that gets people to actually respond.",date:"2026-03-14",readTime:"7 min",keywords:["cold email CTA","call to action cold email","best cold email cta","cta examples"],tag:"Cold Email",body:["Your CTA is the part of your cold email that does the work. The personalised opener hooked them. The value prop earned the read. The CTA is the moment of decision: reply, or close.","Most CTAs are bad. Predictably bad. The same five patterns show up in 80% of cold emails I review. Each one tanks reply rate by 30â60% compared to the strong version.","Here are the five most common, why they fail, and the specific swap that works.",`## 1. "Let me know if you're interested"`,`Why it fails: passive, vague, puts the burden on the prospect to figure out the next step. "Interested" in what? Replying? Buying? Booking a call? You've made them do the framing, and they won't.`,'Swap with: "Worth a 10-min look next week?" â Specific time commitment. Easy yes/no. Implies the next step is a short call without making them book it.',"Variants that work:",'- "Want me to send a 90-second Loom?"','- "Curious â is X still a priority for Q2?"','- "Should I send the case study?"',"All of them are answerable in one word.",'## 2. "When are you free for a quick call?"',"Why it fails: makes them do the work of finding time. The cognitive load of opening their calendar, finding a slot, and proposing it is enormous. They'll do it later. Later never comes.",'Swap with: "Tuesday 2pm or Thursday 10am â either work?" â You proposed two specific slots. They pick one or counter-propose. Friction collapses to
486seconds.',`Even better: "Reply 'yes' and I'll send a 2-min Loom â no calendar dance needed." If your product can be demoed async, this beats every meeting CTA.`,`## 3. "I'd love to learn more about your business"`,"Why it fails: the entire CTA is about you and what you want. It's a request for them to give you their time so you can extract information. From their POV: why?",'Swap with: "Curious â is [observation] still a priority for you?" â A question they want to answer. About them. Acknowledges you already did the homework.',`Or: "What's your current approach to [problem]? â happy to share what we've seen work for others." â Trades information for information.`,'## 4. "Click here to book a demo"',`Why it fails: feels marketing-y and high-commitment in a 1:1 email. Calendar links shout "this is sales," which the entire rest of your email was trying to disguise. The friction of opening a calendar tool, picking a time, filling a form, and confirming is a 5-step funnel for a stranger who's just been pitched.`,`Swap with: "Reply 'send' and I'll share a 2-min Loom that explains it." â Async. One-word reply. They get value before any commitment.`,'Or: "Open to a 15-min call next week? Happy to suggest a few times." â Promises low time commitment, suggests YOU do the calendar work.',"Calendar links DO work later in the conversation, after they've replied with intent. Just not in the first email.",'## 5. "Looking forward to hearing back"',"Why it fails: it's not a CTA at all. It's a sign-off pretending to be a CTA. There's no question, no ask, no specific next step. The reader gets to the bottom of the email, finds nothing to act on, and closes.","Swap with: any specific question.",'- "Want me to send the comparison doc?"','- "Open to a 10-min look next Tuesday?"','- "Is X still on your roadmap?"',"Anything that ends in a question mark, ideally answerable in one word.","## The structural rule",`Every cold email needs exactly one ask. One. Not three options. Not "or if that doesn't work, here's my calendar." One specific, low-friction question. The clearer the ask, the higher the reply rate.`,"If you have multiple things to ask about, that's two emails. Send the first one. If they reply, ask the second.","## How to check yours","Run your CTA through our free CTA Strength Checker. It scores clarity, friction and specificity. Aim for 80+. If it's lower, try the patterns above.","Then test it: send the same email with two different CTAs to two halves of a list. The winner is usually obvious by 50 sends.","## TL;DR","- One ask per email","- Question form (ends in ?)","- Answerable in one word","- Specific (proposes a time, a format, a thing)","- Low friction (no calendar tool in email #1)","Get those right and your reply rate will climb without changing anything else in the email."],relatedToolSlugs:["cta-strength-checker","cold-email-analyzer","subject-line-tester"]},{slug:"saas-cold-outbound-2026",title:"SaaS Cold Outbound in 2026: The Honest Playbook of What Actually Works",metaTitle:"SaaS Cold Outbound in 2026 â What Actually Works",metaDescription:"Honest playbook for SaaS cold outbound in 2026 â what's working, what's dead, and the tools to use.",excerpt:"What's still working in SaaS cold outbound in 2026 â and what to stop doing immediately.",date:"2026-03-10",readTime:"12 min",keywords:["saas cold outbound","saas sales 2026","b2b cold email","outbound playbook"],tag:"SaaS",body:["Cold outbound isn't dead. Generic, untargeted, AI-spammy outbound is dead. The difference matters, because the second one trained the entire ecosystem to assume the first one is too â leaving an enormous opportunity for teams who do it right.","Here's what's actually working in SaaS cold outbound in 2026, what's officially dead, and the exact stack we'd use if we were starting from scratch tomorrow.","## The new baseline","If you're not doing all of these, your floor is too low to win:","- Tighter lists (100 great > 10,000 OK)","- One specific observation per email","- Plain text only â no HTML, no images, no logos in signature","- No tracking pixels (Gmail downranks the sender now)","- No click-tracking that rewrites your domain (looks like phishing)","- Reply-bait CTAs, not booking links","- Warmed-up domain with proper SPF/DKIM/DMARC","- â¤100 sends per inbox per day","- Multiple sender domains for higher volume",'Each one of those is a single fix. Together they triple deliverability and double reply rate vs. "normal" outbound.',"## What's officially dead","Stop doing these. Each one is actively harmful in 2026.","- Spray-and-pray sequences. The list quality matters more than the message quality.","- 9-touch automated cadences with no human input. The fifth automated follow-up just trains the recipient that you're a bot.",'- "Hope this finds you well." Auto-delete trigger.','- Pixel-tracked open-rate reporting. Gmail strips/breaks pixels for most users now. Your "open rate" is mostly noise.',"- Buying massive lists. The deliverability damage is permanent.","- Calendar links in email #1. Save them for after a positive reply.",'- Generic AI personalisation ("I noticed you work at [Company]"). Worse than no personalisation.',"- HTML emails with company logos and footers. Plain text wins by 2â3à in cold context.","- Image attachments / banners. Looks like marketing, gets filtered.","## The 2026 stack","If we were rebuilding tomorrow, here's exactly what we'd use:","- Lead source: Apollo + Clay for enrichment, then manual filtering","- Personalisation: EnrichAI for AI-generated openers from real observations","- Sender: Smartlead or Lemlist (multi-inbox, plain text)","- Inbox warmup: built into Smartlead/Lemlist, or Mailreach if separate","- Reply handling: human, in real time, fast","- CRM: HubSpot free tier or Notion (don't overbuild this until you need it)","- Analytics: reply rate, positive-reply rate, meetings booked. Not opens.","Total monthly cost for a 5-person team sending 5,000 emails a week: $400â800/month. The ROI is enormous if you have product-market fit. Don't do cold outbound before PMF â it amplifies whatever you have, including failure.","## The list is 80% of the result","Repeat after me: list quality is the entire game.","A 100-prospect list of perfect-fit, decision-maker, recently-funded targets will outperform a 10,000-prospect blast list at every metric that matters: reply rate, meeting rate, close rate, deal size, time-to-close.","How to build the right list:","1. Define ICP precisely. Industry, headcount band, tech stack, geography, revenue band, role.","2. Pull a wide net (5,000+).","3. Filter to 500 by enrichment data quality.","4. Manually review to 200. Yes, manually.","5. Add a recent-signal filter (funding, launch, hire, news) â drop to 100.","Those 100 are your week's outbound. Then repeat next week.","## The message","We've covered this in detail elsewhere, but the formula:","- Subject: lowercase, â¤8 words, specific to them","- Opener: one observed thing, â¤20 words","- Value prop: one named outcome with a number","- CTA: one question, answerable in one word","- Total: under 90 words","If you can't fit it in 90 words, you don't yet know your value prop well enough.","## Cadence (the controversial bit)","We use 3-touch cadences. That's it. After 3 emails, no reply = silence.","Email 1: the pitch (90 words)",'Email 2 (day 4): a one-line bump â "hey, gentle nudge â worth a look?"','Email 3 (day 10): the breakup â "closing the loop, will let you go in peace. Open to anything in Q3?"',"Why 3 and not 9? Because emails 4â9 are the ones that train inboxes you're a bot. The marginal reply from email #5 is dwarfed by the marginal damage to your sender reputation.",'## What "working" looks like in 2026',"Realistic ranges for a
486well-run SaaS outbound program:","- Open rate: 50â70% (but stop measuring this â it's noisy)","- Reply rate: 6â12%","- Positive reply rate: 1.5â3%","- Meeting rate: 1â2%","- Close rate from cold meetings: 10â20% (varies hugely by ACV)",`If you're below those, the issue is almost always the list (60% of cases) or the offer (30%) or the message (10%). It's almost never "the volume."`,"## What's emerging","Trends to watch in 2026:","- Voice notes in cold outbound (still niche, working surprisingly well)",`- Loom-first outreach ("reply yes, I'll send a 90-second Loom")`,"- LinkedIn DM + email combo (when both messages reference the same observation)","- AI for response classification (auto-categorise replies into hot/warm/not-now)","- Domain rotation at scale (more domains, fewer sends per domain)","- Direct mail revival for high-ACV (yes, real paper)","## How to start tomorrow","1. Pull 50 perfect-fit prospects.","2. Run them through EnrichAI for personalised openers (30 free credits).","3. Send 10 a day from a warmed-up inbox.","4. Reply within 5 minutes when someone bites.","5. After two weeks, look at reply rate. Adjust list, then message, then offer (in that order).","Boring? Yes. Works? Also yes.","## The honest truth","There's no shortcut and there's no secret. Cold outbound in 2026 rewards the same discipline it always has: tight lists, real personalisation, plain text, a clear ask, and fast replies. The teams winning right now are the ones doing the boring work consistently while their competitors chase the next AI gimmick.","Be the boring team."],relatedToolSlugs:["cold-email-opener-generator","website-summariser","cold-email-analyzer","spam-trigger-word-checker"]},{slug:"validate-sitemap-online-free",title:"How to Validate a Sitemap Online (Free, 30 Seconds)",metaTitle:"Validate Sitemap Online Free â Catch Errors Before Google Does",metaDescription:"Validate your sitemap.xml online in seconds. Catch malformed XML, oversized files, and broken URLs before Google flags them.",excerpt:"A 30-second free check that catches the sitemap errors silently killing your indexing.",date:"2026-04-22",readTime:"7 min",keywords:["validate sitemap online","sitemap validator free","check sitemap xml","sitemap errors"],tag:"SEO",body:["Most sitemap problems are silent. Google fetches your sitemap, finds something wrong, drops the bad URLs, and moves on. You never get an email. You just notice, weeks later, that pages aren't being indexed.","This guide walks through the five sitemap mistakes that quietly hurt your rankings, plus a free 30-second check that catches all of them.","## What a sitemap actually does","A sitemap is a list of URLs you want search engines to crawl. Google still finds pages without one, but a clean sitemap speeds up indexing and tells crawlers which pages matter.","It is most useful for sites with deep content, fresh blog posts, dynamic pages, or weak internal linking. If a page is not linked from anywhere except the sitemap, the sitemap is the only way Google will find it.","## The five mistakes that hurt indexing","## 1. Malformed XML","One missing closing tag and the entire sitemap is rejected. Google does not partially parse a broken XML file. It throws the whole thing out.","Most often this happens after a manual edit or a buggy plugin. The XML looks fine in a browser but breaks the spec.","## 2. Oversized files","A single sitemap is capped at 50,000 URLs and 50MB uncompressed. Above that, Google ignores it. Big sites get past this with a sitemap index file that points to multiple smaller sitemaps.","## 3. URLs that 404, 301 or noindex","Your sitemap should only list URLs that return 200 and are indexable. If a URL redirects, Google follows once but treats it as wasted crawl budget. If it returns 404 or has a noindex tag, Google penalises sitemap quality over time.","## 4. Mixed protocols and hosts",'Listing a URL as http when the page lives on https, or apex when the canonical is www, is one of the most common reasons for the Search Console error "Page with redirect."',"## 5. Stale lastmod dates","Listing 2019 dates on every URL tells Google the sitemap is not maintained. Either update lastmod when content changes or omit it entirely. Lying with stale dates is worse than no date at all.","## The 30-second check","Drop your sitemap URL into the Free Sitemap Validator. It runs all five checks and returns a clear pass or fail per URL. No signup, no card, no logs.","Fix the errors, resubmit in Search Console, and watch indexing recover within 1 to 3 weeks.","## What to do after validation","1. Submit the cleaned sitemap in Search Console.","2. Use URL Inspection on five sample URLs and click Request Indexing.","3. Wait 7 to 14 days and re-check Coverage report.","4. Re-run the validator monthly. Sitemaps drift.","Most teams skip step 4 and lose 10 to 30 percent of indexing within a year. A 30-second monthly check prevents the slow bleed."],relatedToolSlugs:["sitemap-validator","sitemap-finder-checker","sitemap-url-extractor"]},{slug:"convert-pdf-to-markdown-for-chatgpt",title:"Convert PDF to Markdown for ChatGPT (Free, Browser-Only)",metaTitle:"Convert PDF to Markdown for ChatGPT â Free Browser Tool",metaDescription:"Turn any PDF into clean Markdown for ChatGPT, Claude, or Gemini prompts. Free, runs entirely in your browser, no upload.",excerpt:"The cleanest way to feed PDFs into AI prompts. Free, no upload, your file never leaves your machine.",date:"2026-04-19",readTime:"6 min",keywords:["convert pdf to markdown","pdf to markdown chatgpt","free pdf converter","pdf to text for ai"],tag:"Tools",body:["PDFs are terrible AI input. Pasted raw, they bring page numbers, headers, footnotes, and broken line wraps. The model wastes tokens parsing layout instead of answering your question.","Markdown fixes this. A 40-page PDF becomes a clean, structured text block the AI can actually reason about. Headings stay headings. Lists stay lists. Tables stay tables. The token count drops by 30 to 60 percent and the answer quality goes up.","## Why browser-only matters here","Most PDFs you would convert contain something private. A contract. A brief. A research report. Internal notes. Uploading those to a server, even one with a friendly privacy policy, is a small but real exposure.","Browser-only conversion means the file never leaves your machine. The JavaScript parses it locally, builds the Markdown, and hands it back. Open DevTools and watch the Network tab. There is no outbound request.","## How to use it","1. Open the Free PDF to Markdown tool.","2. Drop in your PDF.","3. Click Copy. Paste into ChatGPT, Claude, Gemini, or your prompt of choice.","That is the whole flow. Conversion takes one to three seconds for most documents.","## What converts well","- Reports and whitepapers","- Long-form articles saved as PDF","- Scanned-but-OCR'd documents","- Slide decks exported as PDF","- Most government and SaaS contracts","## What converts poorly","- Image-only PDFs without OCR (no text to extract)","- Complex multi-column scientific papers","- Heavily designed brochures with text inside images","For those, run the PDF through OCR first, then convert.","## When to use Markdown vs plain text","Plain text is fine for short, simple PDFs. Markdown wins for anything with structure, because the AI uses heading hierarchy to navigate context. If you want the model to summarise section 3 specifically, Markdown headings make that trivial.","## Token savings","On a typical 20-page PDF, raw paste is 18,000 to 25,000 tokens. Clean Markdown drops that to 11,000 to 15,000. That is half a dollar saved per query at GPT-5 prices, and faster responses across the board."],relatedToolSlugs:["pdf-to-markdown","html-to-markdown","webpage-to-markdown"]},{slug:"extract-emails-from-html-free",title:"Extract Emails From HTML Source (Free, No Signup, No Upload)",metaTitle:"Extract Emails From HTML Free â No Signup, Browser-Only",metaDescription:"Pull every email address out of any HTML in seconds. Free, browser-only, no upload, no signup. Handles obfuscation.",excerpt:"The cleanest way to pull every email out of an HTML blob. Browser-only, instant, no signup.",date:"2026-04-16",readTime:"6 min",keywords:["extract emails from html","html email scraper free","pull emails from source code"],tag:"Tools",body:["Sometimes you have HTML and you need the emails out. A scraped page. An export. A view-source dump. The browser's Find function helps for one or tw
486o, but anything more and you need a real extractor.","This guide explains what to look for in an HTML email extractor, why most paid ones are overkill, and how to do it free in your browser.","## The minimum a good extractor must do","1. Find every standard email address in the HTML.","2. Find emails inside mailto: links and href attributes.","3. Handle common obfuscation: at, AT, [at], (at), and HTML-entity-encoded characters.","4. Dedupe case-insensitively.","5. Run locally, not on a server you do not control.","Most free tools fail at points 3 and 5. Paid tools handle 3 but fail point 5.","## Why obfuscation matters",'If a contact page renders "hello at example dot com" instead of a clickable link, a basic regex misses it. Good extractors normalise common obfuscation patterns before running the match.',"Our free tool handles eight common obfuscation styles plus HTML-entity encoding. You will catch 95 percent of emails the page is hiding from naive scrapers.","## Why browser-only is non-negotiable","If you upload HTML to a server, you have given that server a copy of the emails inside. Even if the server promises to delete them, they had them. For lead-gen work this might be acceptable. For anything with internal contacts, it is not.","Browser-only extraction means the HTML never leaves your machine. The pattern matching runs in your tab. Open DevTools, check Network, see zero outbound requests.","## How to use it","1. Open the Free HTML Email Extractor.","2. Paste your HTML.","3. Get the deduped list. Copy or download.","## After extraction: validate before sending","Extraction does not equal validation. The list will contain expired addresses, role accounts, and at least a few honeypots if the source was scraped. Always run the output through:","- Format validation","- Disposable detection","- Optional MX check for higher-volume sends","Spend the 30 seconds. The cost of sending to a honeypot is your sender reputation for a week."],relatedToolSlugs:["html-email-extractor","html-contact-info-extractor","email-extractor","duplicate-email-remover"]},{slug:"csv-column-cleaner-workflow",title:"How to Clean a CSV Column Without Excel (Free, 60 Seconds)",metaTitle:"Clean CSV Column Free â Trim, Dedupe, Lowercase In Seconds",metaDescription:"Trim, lowercase, and dedupe any CSV column without opening Excel. Free, browser-only, runs on huge files.",excerpt:"Trim, lowercase, dedupe. The three boring CSV jobs that cost hours in Excel and 60 seconds
486in your browser.",date:"2026-04-14",readTime:"6 min",keywords:["clean csv column","free csv cleaner","trim lowercase dedupe csv"],tag:"Tools",body:["Almost every messy lead list has the same three problems: leading or trailing whitespace, mixed case, and duplicates. In Excel each one is a separate gymnastics routine of formulas and sort-and-filter. On a list with 10,000 rows it takes 20 minutes. On 100,000 rows Excel often crashes.","There is a faster way. A browser-based CSV column cleaner does all three in one pass and never asks you to remember TRIM(LOWER(A1)) again.","## The three rules of clean lead data","1. Trim whitespace. Leading or trailing spaces break dedupe and email validation.","2. Normalise case for emails and domains. [email protected] and [email protected] are the same address but Excel will treat them as different.","3. Dedupe last, after trimming and casing. Otherwise you keep duplicates that only differ by whitespace or case.",'Doing these in the wrong order is the most common reason "deduped" lists still send to the same person twice.',"## How the free tool works","1. Drop a CSV in.","2. Pick the column to clean.","3. Toggle trim, lowercase, dedupe.","4. Download.","It runs entirely in your browser. There is no upload and no row limit beyond what your laptop can hold in memory. 100k rows is fine on any modern machine.","## When to clean","Always before:","- Importing into a CRM","- Sending an outbound campaign","- Running enrichment that charges per row","- Loading into Postgres or BigQuery","Cleaning before enrichment is the highest ROI. A 12,000-row list deduped to 9,500 saves 20 percent of your enrichment credits, every time.","## After cleaning: validate","Cleaning makes the list tidy. Validation makes it deliverable. Run the cleaned column through the Free Email Format Checker and Free Disposable Email Detector before sending.","Clean, validate, send. In that order. Every time."],relatedToolSlugs:["csv-column-cleaner","csv-column-extractor","duplicate-email-remover","email-format-checker"]},{slug:"cold-email-cta-that-gets-replies",title:"Cold Email CTAs That Actually Get Replies (Real Examples)",metaTitle:"Cold Email CTA Examples That Get Replies â 2026 Guide",metaDescription:"The CTA at the end of your cold email decides if you get a reply. 18 examples that work in 2026, plus the patterns behind them.",excerpt:"Your CTA decides whether the prospect replies or closes the tab. Here are 18 that actually work in 2026.",date:"2026-04-11",readTime:"8 min",keywords:["cold email cta","best cold email call to action","cta examples that get replies"],tag:"Cold Email",body:[`The CTA is the most under-thought sentence in most cold emails. People obsess over the subject line, polish the opener, sweat the value prop, and then close with whatever first sentence comes to mind. Usually "let me know if you're interested" or "happy to jump on a quick call."`,"Both lose. Here is what wins, with examples and the reasoning behind them.","## The two failure modes","Bad CTAs fail in opposite directions: too vague or too demanding.",'Too vague: "Let me know if interested." The prospect has to figure out what to do, and they will not.','Too demanding: "Are you free Tuesday at 2pm Pacific or Wednesday at 11am for a 30-minute discovery call to see if we are a mutual fit?" That is a lot of commitment from someone who has not heard of you.',"The sweet spot is a low-friction question they can answer in one word.","## Pattern 1: One-word reply",'- "Worth a 10-minute look next week?"','- "Want me to send the case study?"','- "Should I send a 90-second Loom?"',`- "Reply 'send' and I'll share it."`,"Why they work: the action is tiny. The prospect types one word and you do the rest. Reply rates are roughly double the generic ask.","## Pattern 2: Open question",'- "How are you handling X right now?"','- "Is X still a priority for Q3?"',`- "Curious what's working for you on this?"`,"Why they work: humans answer questions. Even when they say no, you have started a conversation.","## Pattern 3: Permission",'- "Mind if I send a 1-page breakdown?"','- "OK if I share what we did for Acme?"','- "Cool if I send a quick teardown of your pricing page?"',"Why they work: asking permission lowers defenses. The prospect feels in control. The ask sounds personal, not pushy.","## Pattern 4: Specific time, narrow",'- "Got 12 minutes Thursday?"','- "15 minutes next Tuesday morning?"',"Why they work for warmer leads: removing decision friction. Specific is easier to say yes to than open. Use this pattern only after at least one positive signal.","## What to delete forever",'- "Looking forward to hearing from you."','- "Let me know your thoughts."','- "Happy to chat whenever."','- "Calendar link below." (in cold email)',`- "I'd love to learn more about your business." (no, you would not)`,"## How to test","Drop your draft into the Free CTA Strength Checker. It scores friction, clarity, and specificity, and shows you what to swap."],relatedToolSlugs:["cta-strength-checker","cold-email-analyzer"]},{slug:"find-any-website-sitemap-free",title:"How to Find Any Website's Sitemap (Even Hidden Ones)",metaTitle:"Find Any Website Sitemap Free â Auto-Detect Sitemap URL",metaDescription:"Find any site's sitemap automatically, even when it's not at /sitemap.xml. Free tool, instant, works on hidden and indexed sitemaps.",excerpt:"The free trick to find any site's sitemap, even when it is not at the obvious URL.",date:"2026-04-09",readTime:"6 min",keywords:["find website sitemap","sitemap finder free","how to find sitemap url","hidden sitemap"],tag:"SEO",body:["Most sitemaps live at /sitemap.xml. Some live at /sitemap_index.xml. Others sit in /wp-sitemap.xml, /sitemaps/sitemap1.xml, or some custom path nobody documented. A few are deliberately hidden but still referenced from robots.txt.","If you are doing SEO research, building a lead list from a competitor's content, or auditing your own coverage, you need to find the sitemap regardless of where it lives. Here is the reliable method.","## The three places to check","1. /robots.txt â almost every site lists its sitemap here.","2. /sitemap.xml â the convention.","3. /sitemap_index.xml â used by WordPress, Yoast, and most SEO plugins.","If those three fail, the sitemap is either unusual or absent. Most large sites have one of those three. Smaller sites s
486ometimes do not have one at all.","## How the free finder works","The Free Sitemap Finder checks all three above plus 12 less common paths in parallel. Results come back in under two seconds. If anything responds with valid sitemap XML, you get the URL.","It also reads the response status, so you can tell whether the sitemap exists, is empty, or is being blocked.","## What to do once you have it","- Pipe it into the Free Sitemap URL Extractor to get every URL inside as a clean CSV.","- Compare against your own with the Free Sitemap URLs Comparison Tool to spot competitor pages you do not have.","- Validate it with the Free Sitemap Validator.","## Why this matters for outbound","A sitemap is a free, public list of every page a company has decided is worth indexing. For lead-gen and account research, that is gold. You can see new product launches, recently published blog posts, and content topics they care about, all from one XML file."],relatedToolSlugs:["sitemap-finder-checker","sitemap-url-extractor","sitemap-validator","sitemap-urls-comparison"]},{slug:"dedupe-email-list-before-sending",title:"Why You Should Dedupe Every Email List Before Sending (Free Tool Inside)",metaTitle:"Dedupe Email List Free â Remove Duplicates Before You Send",metaDescription:"Sending to duplicate emails kills your sender reputation. Free, browser-only deduplication for lists of any size.",excerpt:"Sending to duplicates burns your sender reputation. Dedupe takes 5 seconds and saves your inbox placement.",date:"2026-04-06",readTime:"5 min",keywords:["dedupe email list","remove duplicate emails free","deduplicate email list"],tag:"Cold Email",body:["Almost every lead list, no matter how it was built, contains duplicates. Two scrapers caught the same address. A CSV export combined two segments. The CRM sync ran twice. Whatever the cause, duplicates ship straight to send unless someone catches them.","The cost is real. Inbox providers track how often you hit the same address from the same domain. Sending the same person two cold emails on the same day raise
486s spam scores. Sending three doubles your chance of landing in Promotions for the rest of the campaign.","## The two kinds of duplicates","1. Exact duplicates: [email protected] appears twice.","2. Near duplicates: [email protected] and [email protected]. RFC says these are the same address. Excel does not.","Most dedupe scripts catch the first and miss the second. You need case-insensitive deduplication to catch both.","## Why browser-only matters","Email lists are sensitive. Even if you are sending public, opted-in addresses, the list itself is intellectual property. Uploading it to a free server-side tool means giving that server a copy.","Browser-only deduplication means the file stays on your machine. The Free Duplicate Email Remover handles 100,000 rows in your tab without an upload. Open DevTools and verify zero outbound requests.","## When to dedupe","Always, before:","- Sending any outbound campaign","- Importing into your sending tool (Instantly, Smartlead, Lemlist)","- Running paid enrichment","- Loading into a CRM","Order matters. Clean, dedupe, validate, then send. Every step skipped costs deliverability.","## After dedupe: validate","Dedupe makes the list smaller. Validation makes it deliverable. Use the Free Email Format Checker and Free Disposable Email Detector after dedupe to remove syntactically broken or burner addresses before they cost you a hard bounce."],relatedToolSlugs:["duplicate-email-remover","email-list-formatter","email-format-checker","disposable-email-detector"]},{slug:"website-summariser-prospect-research",title:"How to Research Cold Email Prospects in 30 Seconds (Free Tool)",metaTitle:"Free Website Summariser â Research Cold Email Prospects Fast",metaDescription:"A 30-second prospect research workflow. Paste any URL, get 2 sentences on what the company actually does. Free.",excerpt:"The 30-second prospect research workflow that makes every cold email 3x more relevant.",date:"2026-04-04",readTime:"5 min",keywords:["prospect research tool","website summariser free","cold email research","what does this company do"],tag:"Cold Email",body:["Most cold emails fail because the sender did not know what the prospect's company actually does. They guessed from the job title or pulled a generic line from the homepage. The result reads like a mail merge, because it is.","The fix is research. Real research, on every prospect. The problem is time. Reading a homepage, an About page, and a few features takes 5 to 10 minutes per prospect. At that rate, 50 prospects per day is impossible.","## The 30-second method","1. Paste the prospect's URL into the Free Website Summariser.","2. Read the two-sentence summary.","3. Write the opener.","Total time: 30 to 45 seconds. The summary skips marketing fluff and gives you the actual punchline of what the company does.","## What good prospect research looks like",'Bad: "I see Acme is in the SaaS space."','Better: "I see Acme helps freight brokers automate their carrier sourcing."','Best: "Saw Acme just shipped the carrier-rate-monitoring feature, makes sense given how the spot market is moving right now."','Each step takes a little more research and earns disproportionately more replies. The summariser gets you to "better" in 30 seconds. Add 30 more seconds reading their changelog or LinkedIn and you hit "best."',"## Why it scales","At 30 seconds per prospect, you can research 80 to 100 prospects in an hour. That is enough for a full week of personalised outbound at sustainable volume. Compared to 8 prospects per hour with manual reading, the throughput jump pays for itself the first day.","## Combine with personalised openers","After summarising, paste the same URL into the Free Cold Email Opener Generator. You get four personalised opener lines that reference specifics from the site. Pick the best, edit lightly, send.","Two free tools, two minutes per prospect, openers that read like a human wrote them. The whole point of cold outbound is volume that does not feel like volume. This is how you get there."],relatedToolSlugs:["website-summariser","cold-email-opener-generator","page-text-extractor"]},{slug:"extract-domains-from-email-list",title:"Extract Domains From an Email List in One Click (Free)",metaTitle:"Extract Domains From Email List Free â Browser-Only Tool",metaDescription:"Pull clean root domains out of any email or URL list in one click. Free, browser-only, deduped output.",excerpt:"The fastest way to turn a list of emails into a clean list of company domains. Browser-only.",date:"2026-04-02",readTime:"5 min",keywords:["extract domains from emails","email list to domains","free domain extractor"],tag:"Tools",body:["Domain extraction is one of those small tasks that comes up constantly in lead-gen work. You have a list of emails and you need the domains. You have a list of URLs and you need the root domains. Excel can do it but every formula
486is one missing ampersand away from breaking.","A focused tool does it in one click. Here is when you need it and how to use it.","## When you need domains, not emails","- Building an account list from a contact list","- Enriching by company instead of by person","- Filtering out personal email providers (gmail.com, yahoo.com, outlook.com)","- Feeding domains into firmographic enrichment APIs","- Looking up tech stack data on each company",'All of those start with: "first, get me a clean list of domains."',"## What the free tool handles","1. Strips the local part from emails.","2. Strips protocol, www, paths, and query strings from URLs.","3. Lowercases.","4. Dedupes.","5. Returns one domain per line.","It runs in your browser. The list never leaves your machine.","## After extraction","If you are building an account list, filter out personal providers first. About 8 to 15 percent of any B2B lead list is gmail.com or similar. Sending account-level enrichment for those addresses is wasted spend.","Combine with the Free Bulk URL to Domain + Company Extractor for a tidy domain plus best-guess company-name pairing, ready for outreach."],relatedToolSlugs:["domain-extractor","bulk-url-domain-company-extractor","email-extractor"]},{slug:"email-readability-score-cold-email",title:"Why Cold Email Readability Decides Your Reply Rate",metaTitle:"Email Readability Score Free â Cold Email Reply Rate Tool",metaDescription:"Most cold emails are written at college reading level. Drop yours to grade 6 and reply rates roughly double. Free score tool inside.",excerpt:"Most cold emails are written at college reading level. Drop yours to grade 6 and reply rates roughly double.",date:"2026-03-30",readTime:"6 min",keywords:["email readability score","cold email reading level","free email readability checker"],tag:"Cold Email",body:["There is a hidden lever on cold email reply rates almost nobody talks about: reading level. Most outbound is written at college level, which feels professional to the writer and reads like sandpaper to the prospect.","Drop the same content to grade 6 reading level and reply rates climb. Not because the prospect is unintelligent. Because they are reading on a phone, in line for coffee, between meetings, and short sentences win.","## What grade level means","The Flesch-Kincaid grade level estimates the years of education needed to understand a piece of text. Grade 6 means a sixth-grader could read it. Grade 16 means a college senior.","Aim for grade 5 to 7 for cold email. The New York Times writes at about grade 9. Bestselling fiction sits between 4 and 6.","## How to drop your grade level","1. Cut sentences to under 14 words.","2. Replace any word a 12-year-old would not use.",`3. Use contractions: "do not" becomes "don't."`,'4. Remove qualifiers: "I just wanted to reach out" becomes "hey."',"5. Break long paragraphs into one or two sentences.","Compare:",'Before, grade 14: "I wanted to take a moment to reach out and introduce myself, as I noticed your organisation has been making significant strides in the e-commerce vertical."','After, grade 5: "Saw the new checkout flow. Clean. Quick question."',"Same intent. Different reply rate.","## How to score yours","Drop your draft into the Free Email Readability Score. It returns the grade level, average sentence length, and a list of words that pushed the score up. Aim for grade 7 or below.","## When higher reading level is OK","Selling to engineers, lawyers, or academics? Grade 8 to 10 is fine. They read for a living and complex sentences signal you respect their attention.","Selling to foun
486ders, marketers, or operators? Grade 5 to 7. They are skimming.","Selling to executives at large enterprises? Grade 6 or below, full stop. The more senior the reader, the less time they have, and the lower your reading level needs to be to land."],relatedToolSlugs:["email-readability-score","cold-email-analyzer","spam-trigger-word-checker"]}],$S=e=>_i.find(t=>t.slug===e),ID="modulepreload",LD=function(e){return"/"+e},sx={},DD=function(t,r,n){let s=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(r.map(c=>{if(c=LD(c),c in sx)return;sx[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":ID,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((m,f)=>{h.addEventListener("load",m),h.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return s.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})},je=({children:e})=>a.jsx("div",{className:"bg-card border border-border rounded-2xl p-5 sm:p-6 space-y-4",children:e}),Ne=({value:e,filename:t="output.txt"})=>e?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"flex gap-2",children:[a.jsxs(oe,{size:"sm",variant:"outline",onClick:()=>{navigator.clipboard.writeText(e),pl({title:"Copied"})},children:[a.jsx(QN,{className:"w-3.5 h-3.5 mr-1.5"}),"Copy"]}),a.jsxs(oe,{size:"sm",variant:"outline",onClick:()=>{const r=new Blob([e],{type:"text/plain"}),n=URL.createObjectURL(r),s=document.createElement("a");s.href=n,s.download=t,s.click(),URL.revokeObjectURL(n)},children:[a.jsx(jf,{className:"w-3.5 h-3.5 mr-1.5"}),"Download"]})]}),a.jsx("pre",{className:"bg-muted/40 rounded-xl p-4 text-xs whitespace-pre-wrap break-all max-h-96 overflow-auto",children:e})]}):null,Yr=()=>{const[e,t]=p.useState(""),r=p.useCallback(n=>{var i;const s=(i=n.target.files)==null?void 0:i[0];if(!s)return;const o=new FileReader;o.onload=()=>t(String(o.result||"")),o.readAsText(s)},[]);return{text:e,setText:t,onFile:r}},Qr=({onChange:e,accept:t=".csv,.txt,.tsv,.json,.xml,.html"})=>a.jsxs("label",{className:"inline-flex items-center gap-2 px-3 py-2 border border-border rounded-lg cursor-pointer text-sm hover:bg-muted/40",children:[a.jsx(xl,{className:"w-3.5 h-3.5"}),a.jsx("span",{children:"Upload file"}),a.jsx("input",{type:"file",accept:t,className:"hidden",onChange:e})]}),lm=/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,cm=/https?:\/\/[^\s<>"'`]+/g,MD=/(\+?\d{1,3}[\s.-]?)?\(?\d{2,4}\)?[\s.-]?\d{3,4}[\s.-]?\d{3,4}/g,Ci=e=>Array.from(new Set(e.map(t=>t.trim()))).filter(Boolean),US=e=>e.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"").replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim(),FD=async(e,t)=>{const{data:r,error:n}=await W.functions.invoke("ai-tool",{body:{tool:e,input:t}});if(n)throw new Error(n.message);if(r!=null&&r.error)throw new Error(r.error);return r.text},Jp=async e=>{const{data:t,error:r}=await W.functions.invoke("fetch-url",{body:{url:e}});if(r)throw new Error(r.message);if(t!=null&&t.error)throw new Error(t.error);return t},cc=({tool:e,label:t,placeholder:r,urlMode:n=!1})=>{const[s,o]=p.useState(""),[i,l]=p.useState(""),[c,u]=p.useState(!1),d=async()=>{if(s.trim()){u(!0),l("");try{let h=s;if(n){const f=await Jp(s.trim());h=US(f.body).slice(0,8e3)}const m=await FD(e,h);l(m)}catch(h){pl({title:"Error",description:h.message,variant:"destructive"})}finally{u(!1)}}};return a.jsxs(je,{children:[a.jsx(K,{className:"text-sm font-semibold",children:t}),n?a.jsx(be,{placeholder:r,value:s,onChange:h=>o(h.target.value)}):a.jsx(Se,{placeholder:r,value:s,onChange:h=>o(h.target.value),rows:8}),a.jsxs(oe,{onClick:d,disabled:c||!s.trim(),children:[c&&a.jsx(ja,{className:"w-4 h-4 mr-2 animate-spin"}),"Run"]}),a.jsx(Ne,{value:i})]})},$D=()=>{const[e,t]=p.useState(""),r=["free","guaranteed","act now","limited","winner","cash","earn $","buy now","order now","discount","urgent","!!"],n=(()=>
486{if(!e)return null;const s=e.length,o=e.trim().split(/\s+/).length,i=r.filter(d=>e.toLowerCase().includes(d)),l=e===e.toUpperCase()&&/[A-Z]/.test(e),c=(e.match(/[!?]{2,}/g)||[]).length;let u=100;return s>60&&(u-=20),o>8&&(u-=15),l&&(u-=25),i.length&&(u-=i.length*10),c&&(u-=15),{n:Math.max(0,u),len:s,words:o,spam:i,caps:l,punct:c}})();return a.jsxs(je,{children:[a.jsx(K,{children:"Subject line"}),a.jsx(be,{value:e,onChange:s=>t(s.target.value),placeholder:"quick question about your pricing page"}),n&&a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"text-3xl font-display font-bold text-foreground",children:[n.n,a.jsx("span",{className:"text-base text-muted-foreground",children:"/100"})]}),a.jsxs("p",{children:["Length: ",n.len," chars · ",n.words," words"]}),n.caps&&a.jsx("p",{className:"text-destructive",children:"â All caps â kills opens"}),n.punct>0&&a.jsx("p",{className:"text-destructive",children:"â Multiple !? in a row"}),n.spam.length>0&&a.jsxs("p",{className:"text-destructive",children:["â Spam triggers: ",n.spam.join(", ")]}),n.n>=80&&a.jsx("p",{className:"text-primary",children:"â Looks good. Send it."})]})]})},UD=()=>{const[e,t]=p.useState(""),n=["free","guaranteed","act now","limited time","limited offer","winner","cash bonus","earn $","buy now","order now","discount","urgent","click here","100% free","no obligation","risk-free","this is not spam","dear friend","amazing","congratulations","credit","loan","viagra","weight loss"].filter(s=>e.toLowerCase().includes(s));return a.jsxs(je,{children:[a.jsx(K,{children:"Paste your email"}),a.jsx(Se,{rows:8,value:e,onChange:s=>t(s.target.value)}),e&&a.jsx("div",{className:"text-sm",children:n.length===0?a.jsx("p",{className:"text-primary",children:"â No common spam triggers detected."}):a.jsxs("div",{children:[a.jsxs("p",{className:"text-destructive font-semibold mb-2",children:[n.length," spam trigger",n.length>1?"s":"",":"]}),a.jsx("ul",{className:"list-disc pl-5 space-y-1",children:n.map((s,o)=>a.jsx("li",{children:s},o))})]})})]})},BD=()=>{const[e,t]=p.useState(""),r=(()=>{if(!e)return null;const n=e.length,s=/let me know|looking forward|hope to hear|if you're interested/i.test(e),o=/\?/.test(e),i=/(monday|tuesday|wednesday|thursday|friday|tomorrow|next week|\d{1,2}(am|pm))/i.test(e);let l=60;return s&&(l-=25),o&&(l+=15),i&&(l+=20),n>200&&(l-=10),{n:Math.max(0,Math.min(100,l)),passive:s,hasQ:o,specific:i}})();return a.jsxs(je,{children:[a.jsx(K,{children:"Your CTA"}),a.jsx(Se,{rows:4,value:e,onChange:n=>t(n.target.value),placeholder:"Worth a 10-min look next Tuesday at 2pm?"}),r&&a.jsxs("div",{className:"text-sm space-y-1",children:[a.jsxs("div",{className:"text-3xl font-display font-bold",children:[r.n,"/100"]}),r.passive&&a.jsx("p",{className:"text-destructive",children:"â Passive â try a direct ask"}),!r.hasQ&&a.jsx("p",{className:"text-destructive",children:"â No question â make it easy to reply"}),!r.specific&&a.jsx("p",{className:"text-muted-foreground",children:"Tip: name a specific day/time"}),r.n>=80&&a.jsx("p",{className:"text-primary",children:"â Strong, low-friction CTA"})]})]})},WD=()=>{const[e,t]=p.useState(""),r=(()=>{if(!e.trim())return null;const n=e.split(/[.!?]+/).filter(l=>l.trim()).length||1,s=e.trim().split(/\s+/).length,o=e.toLowerCase().split(/\s+/).reduce((l,c)=>{const u=c.match(/[aeiouy]+/g);return l+(u?u.length:1)},0),i=206.835-1.015*(s/n)-84.6*(o/s);return{score:Math.round(i),words:s,sents:n}})();return a.jsxs(je,{children:[a.jsx(K,{children:"Paste your email"}),a.jsx(Se,{rows:8,value:e,onChange:n=>t(n.target.value)}),r&&a.jsxs("div",{className:"text-sm",children:[a.jsx("div",{className:"text-3xl font-display font-bold",children:r.score}),a.jsxs("p",{className:"text-muted-foreground",children:[r.words," words · ",r.sents," sentences"]}),a.jsx("p",{children:r.score>=70?"â Easy to read.":r.score>=50?"OK â could be simpler.":"â Too complex. Shorten sentences."})]})]})},uc=({regex:e,label:t,placeholder:r,post:n})=>{const{text:s,setText:o,onFile:i}=Yr(),l=s?Ci(n?n(s.match(e)||[]):s.match(e)||[]):[];return a.jsxs(je,{children:[a.jsxs("div",{className:"flex items-center justify-between gap-3",children:[a.jsx(K,{children:t}),a.jsx(Qr,{onChange:i})]}),a.jsx(Se,{rows:6,value:s,onChange:c=>o(c.target.value),placeholder:r}),l.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-sm text-muted-foreground",children:[l.length," unique result",l.length>
4861?"s":""]}),a.jsx(Ne,{value:l.join(` 487`),filename:"extracted.txt"})]})]})},zD=()=>{const{text:e,setText:t,onFile:r}=Yr(),n=Ci(e.match(lm)||[]),s=Ci(e.match(MD)||[]),o=Ci((e.match(cm)||[]).filter(l=>/linkedin\.com|twitter\.com|x\.com|github\.com|facebook\.com|instagram\.com/.test(l))),i=`EMAILS (${n.length}): 488${n.join(` 489`)} 490 491PHONES (${s.length}): 492${s.join(` 493`)} 494 495SOCIALS (${o.length}): 496${o.join(` 497`)}`;return a.jsxs(je,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx(K,{children:"Paste HTML"}),a.jsx(Qr,{onChange:r,accept:".html,.htm,.txt"})]}),a.jsx(Se,{rows:8,value:e,onChange:l=>t(l.target.value)}),e&&a.jsx(Ne,{value:i,filename:"contacts.txt"})]})},Wa=({render:e,label:t="Website URL"})=>{const[r,n]=p.useState(""),[s,o]=p.useState(""),[i,l]=p.useState(""),[c,u]=p.useState(!1),d=async()=>{if(r.trim()){u(!0),o("");try{const h=await Jp(r.trim());o(h.body),l(h.contentType)}catch(h){pl({title:"Error",description:h.message,variant:"destructive"})}finally{u(!1)}}};return a.jsxs(je,{children:[a.jsx(K,{children:t}),a.jsx(be,{value:r,onChange:h=>n(h.target.value),placeholder:"https://example.com"}),a.jsxs(oe,{onClick:d,disabled:c||!r.trim(),children:[c&&a.jsx(ja,{className:"w-4 h-4 mr-2 animate-spin"}),"Fetch"]}),s&&e(s,i,r)]})},Na=e=>Array.from(e.matchAll(/<loc>\s*([^<\s]+)\s*<\/loc>/g)).map(t=>t[1]),HD=()=>{const[e,t]=p.useState(""),[r,n]=p.useState([]),[s,o]=p.useState(!1),i=async()=>{o(!0),n([]);const l=e.replace(/^https?:\/\//,"").replace(/\/$/,""),c=[`https://${l}/sitemap.xml`,`https://${l}/sitemap_index.xml`,`https://${l}/sitemap.txt`,`https://${l}/robots.txt`],u=[];for(const d of c)try{const h=await Jp(d);u.push({url:d,status:h.status})}catch{u.push({url:d,status:"error"})}n(u),o(!1)};return a.jsxs(je,{children:[a.jsx(K,{children:"Domain"}),a.jsx(be,{value:e,onChange:l=>t(l.target.value),placeholder:"example.com"}),a.jsxs(oe,{onClick:i,disabled:s||!e,children:[s&&a.jsx(ja,{className:"w-4 h-4 mr-2 animate-spin"}),"Find sitemap"]}),r.length>0&&a.jsx("ul",{className:"text-sm space-y-1",children:r.map((l,c)=>a.jsxs("li",{className:"flex justify-between",children:[a.jsx("span",{className:"break-all",children:l.url}),a.jsx("span",{className:l.status===200?"text-primary font-semibold":"text-muted-foreground",children:l.status})]},c))})]})},VD=()=>a.jsx(Wa,{label:"Sitemap URL",render:e=>{const t=Na(e),r=e.includes("<urlset")||e.includes("<sitemapindex"),n=t.length>5e4,s=Math.round(new Blob([e]).size/1024);return a.jsxs("div",{className:"text-sm space-y-1",children:[a.jsx("p",{children:r?"â Valid XML structure":"â Missing <urlset> or <sitemapindex>"}),a.jsxs("p",{children:["URLs found: ",t.length]}),a.jsxs("p",{children:["Size: ",s," KB"]}),n&&a.jsx("p",{className:"text-destructive",children:"â Over 50,000 URL limit â split it"}),s>5e4&&a.jsx("p",{className:"text-destructive",children:"â Over 50MB limit"})]})}}),qD=()=>a.jsx(Wa,{label:"Sitemap URL",render:e=>a.jsx(Ne,{value:Na(e).join(` 498`),filename:"sitemap-urls.txt"})}),GD=()=>{const[e,t]=p.useState(""),r=e?`User-agent: * 499Allow: / 500 501Sitemap: ${e.trim()} 502`:"";return a.jsxs(je,{children:[a.jsx(K,{children:"Sitemap URL"}),a.jsx(be,{value:e,onChange:n=>t(n.target.value),placeholder:"https://example.com/sitemap.xml"}),r&&a.jsx(Ne,{value:r,filename:"robots.txt"})]})},KD=()=>{const[e,t]=p.useState(""),r=e.split(` 503`).map(s=>s.trim()).filter(Boolean),n=r.length?`<?xml version="1.0" encoding="UTF-8"?> 504<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 505${r.map(s=>` <sitemap><loc>${s}</loc></sitemap>`).join(` 506`)} 507</sitemapindex>`:"";return a.jsxs(je,{children:[a.jsx(K,{children:"Sitemap URLs (one per line)"}),a.jsx(Se,{rows:6,value:e,onChange:s=>t(s.target.value)}),n&&a.jsx(Ne,{value:n,filename:"sitemap-index.xml"})]})},YD=()=>{const[e,t]=p.useState(""),[r,n]=p.useState(5e4),s=Na(e),o=[];for(let l=0;l<s.length;l+=r)o.push(s.slice(l,l+r));const i=o.length?o.map((l,c)=>`=== sitemap-${c+1}.xml === 508<?xml version="1.0" encoding="UTF-8"?> 509<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> 510${l.map(u=>` <url><loc>${u}</loc></url>`).join(` 511`)} 512</urlset>`).join(` 513 514`):"";return a.jsxs(je,{children:[a.jsx(K,{children:"Paste one or more sitemaps (XML)"}
514),a.jsx(Se,{rows:6,value:e,onChange:l=>t(l.target.value)}),a.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[a.jsx(K,{children:"Chunk size"}),a.jsx(be,{type:"number",value:r,onChange:l=>n(Number(l.target.value)||5e4),className:"w-32"})]}),i&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-sm",children:[s.length," URLs â ",o.length," chunk(s)"]}),a.jsx(Ne,{value:i,filename:"sitemap-chunks.txt"})]})]})},QD=()=>{const[e,t]=p.useState(""),[r,n]=p.useState(""),s=new Set(Na(e)),o=new Set(Na(r)),i=[...o].filter(d=>!s.has(d)),l=[...s].filter(d=>!o.has(d)),c=[...s].filter(d=>o.has(d)),u=e&&r?`ADDED (${i.length}): 515${i.join(` 516`)} 517 518REMOVED (${l.length}): 519${l.join(` 520`)} 521 522SHARED (${c.length}): 523${c.join(` 524`)}`:"";return a.jsxs(je,{children:[a.jsx(K,{children:"Sitemap A (XML)"}),a.jsx(Se,{rows:4,value:e,onChange:d=>t(d.target.value)}),a.jsx(K,{children:"Sitemap B (XML)"}),a.jsx(Se,{rows:4,value:r,onChange:d=>n(d.target.value)}),u&&a.jsx(Ne,{value:u,filename:"sitemap-diff.txt"})]})},yd=e=>{const t=[];let r=[],n="",s=!1;for(let o=0;o<e.length;o++){const i=e[o];s?i==='"'&&e[o+1]==='"'?(n+='"',o++):i==='"'?s=!1:n+=i:i==='"'?s=!0:i===","?(r.push(n),n=""):i===` 525`?(r.push(n),t.push(r),r=[],n=""):i==="\r"||(n+=i)}return(n||r.length)&&(r.push(n),t.push(r)),t.filter(o=>o.length&&!(o.length===1&&!o[0]))},Xp=e=>e.map(t=>t.map(r=>/[",\n]/.test(r)?`"${r.replace(/"/g,'""')}"`:r).join(",")).join(` 526`),JD=()=>{const{text:e,setText:t,onFile:r}=Yr(),[n,s]=p.useState(0),[o,i]=p.useState({trim:!0,lower:!0,dedupe:!0}),l=e?yd(e):[],c=(()=>{if(!l.length)return"";const u=l[0],h=l.slice(1).map(f=>{let y=f[n]??"";o.trim&&(y=y.trim()),o.lower&&(y=y.toLowerCase());const b=[...f];return b[n]=y,b}),m=o.dedupe?Array.from(new Map(h.map(f=>[f[n],f])).values()):h;return Xp([u,...m])})();return a.jsxs(je,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx(K,{children:"CSV"}),a.jsx(Qr,{onChange:r})]}),a.jsx(Se,{rows:5,value:e,onChange:u=>t(u.target.value)}),l.length>0&&a.jsxs("div",{className:"space-y-2 text-sm",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(K,{children:"Column"}),a.jsx("select",{value:n,onChange:u=>s(Number(u.target.value)),className:"border border-border rounded px-2 py-1 bg-background",children:l[0].map((u,d)=>a.jsxs("option",{value:d,children:[d,": ",u||`col ${d}`]},d))})]}),a.jsx("div",{className:"flex flex-wrap gap-3",children:["trim","lower","dedupe"].map(u=>a.jsxs("label",{className:"flex items-center gap-1.5",children:[a.jsx("input",{type:"checkbox",checked:o[u],onChange:d=>i({...o,[u]:d.target.checked})}),u]},u))}),a.jsx(Ne,{value:c,filename:"cleaned.csv"})]})]})},XD=()=>{const{text:e,setText:t,onFile:r}=Yr(),n=e?yd(e):[],[s,o]=p.useState([]),i=n.length&&s.length?Xp(n.map(l=>s.map(c=>l[c]??""))):"";return a.jsxs(je,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx(K,{children:"CSV"}),a.jsx(Qr,{onChange:r})]}),a.jsx(Se,{rows:5,value:e,onChange:l=>t(l.target.value)}),n.length>0&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"flex flex-wrap gap-2 text-sm",children:n[0].map((l,c)=>a.jsxs("label",{className:"flex items-center gap-1 border border-border rounded px-2 py-1",children:[a.jsx("input",{type:"checkbox",checked:s.includes(c),onChange:u=>o(u.target.checked?[...s,c]:s.filter(d=>d!==c))}),c,": ",l||`col ${c}`]},c))}),a.jsx(Ne,{value:i,filename:"extracted.csv"})]})]})},ZD=()=>{const[e,t]=p.useState(""),r=s=>{var i;const o={",":0," ":0,";":0,"|":0};for(const l of s)l in o&&o[l]++;return((i=Object.entries(o).sort((l,c)=>c[1]-l[1])[0])==null?void 0:i[0])||","},n=(()=>{if(!e)return"";const s=r(e);return e.split(` 527`).map(o=>o.split(s).map(i=>/[",\n]/.test(i)?`"${i.replace(/"/g,'""')}"`:i).join(",")).join(` 528`)})();return a.jsxs(je,{children:[a.jsx(K,{children:"Paste structured text (auto-detects delimiter)"}),a.jsx(Se,{rows:6,value:e,onChange:s=>t(s.target.value)}),n&&a.jsx(Ne,{value:n,filename:"data.csv"})]})},eM=()=>{const{text:e,setText:t,onFile:r}=Yr(),[n,s]=p.useState(!0),o=e?yd(e):[],i=(()=>{if(o.length<2)return"";const[l,...c]=o,u=c.map(d=>Object.fromEntries(l.map((h,m)=>[h||`col_${m}`,d[m]??""])));return JSON.stringify(u,null,n?2:0)})();return a.jsxs(je,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx(K,{children:"CSV"}),a.jsx(Qr,{onChange:r})]}
528),a.jsx(Se,{rows:6,value:e,onChange:l=>t(l.target.value)}),a.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[a.jsx("input",{type:"checkbox",checked:n,onChange:l=>s(l.target.checked)}),"Pretty-print"]}),i&&a.jsx(Ne,{value:i,filename:"data.json"})]})},tM=()=>{const{text:e,setText:t,onFile:r}=Yr(),n=e?yd(e):[],s=n.length?`| ${n[0].join(" | ")} | 529| ${n[0].map(()=>"---").join(" | ")} | 530${n.slice(1).map(o=>`| ${o.join(" | ")} |`).join(` 531`)}`:"";return a.jsxs(je,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx(K,{children:"CSV"}),a.jsx(Qr,{onChange:r})]}),a.jsx(Se,{rows:6,value:e,onChange:o=>t(o.target.value)}),s&&a.jsx(Ne,{value:s,filename:"table.md"})]})},rM=()=>{const[e,t]=p.useState(""),r=(()=>{if(!e)return"";try{const n=JSON.parse(e);if(Array.isArray(n)&&n.length&&typeof n[0]=="object"){const o=Object.keys(n[0]);return`| ${o.join(" | ")} | 532| ${o.map(()=>"---").join(" | ")} | 533${n.map(i=>`| ${o.map(l=>String(i[l]??"")).join(" | ")} |`).join(` 534`)}`}const s=(o,i=0)=>Array.isArray(o)?o.map(l=>`${" ".repeat(i)}- ${typeof l=="object"?` 535`+s(l,i+1):l}`).join(` 536`):o&&typeof o=="object"?Object.entries(o).map(([l,c])=>`${" ".repeat(i)}- **${l}**: ${typeof c=="object"?` 537`+s(c,i+1):c}`).join(` 538`):String(o);return s(n)}catch(n){return`Invalid JSON: ${n.message}`}})();return a.jsxs(je,{children:[a.jsx(K,{children:"JSON"}),a.jsx(Se,{rows:8,value:e,onChange:n=>t(n.target.value)}),r&&a.jsx(Ne,{value:r,filename:"output.md"})]})},nM=()=>{const[e,t]=p.useState(""),[r,n]=p.useState(!1),s=async o=>{var l;const i=(l=o.target.files)==null?void 0:l[0];if(i){n(!0),t("");try{const c=await DD(()=>import("https://cdn.jsdelivr.net/npm/[email protected]/build/pdf.min.mjs"),[]);c.GlobalWorkerOptions.workerSrc="https://cdn.jsdelivr.net/npm/[email protected]/build/pdf.worker.min.mjs";const u=await i.arrayBuffer(),d=await c.getDocument({data:u}).promise;let h="";for(let m=1;m<=d.numPages;m++){const w=await(await d.getPage(m)).getTextContent();h+=w.items.map(y=>y.str).join(" ")+` 539 540`}t(h.trim())}catch(c){pl({title:"Error",description:c.message,variant:"destructive"})}finally{n(!1)}}};return a.jsxs(je,{children:[a.jsx(K,{children:"PDF file"}),a.jsx("input",{type:"file",accept:".pdf",onChange:s,className:"block text-sm"}),r&&a.jsxs("p",{className:"text-sm flex items-center gap-2",children:[a.jsx(ja,{className:"w-4 h-4 animate-spin"}),"Parsing PDFâ¦"]}),e&&a.jsx(Ne,{value:e,filename:"output.md"})]})},BS=e=>e.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"").replace(/<h1[^>]*>([\s\S]*?)<\/h1>/gi,` 541# $1 542`).replace(/<h2[^>]*>([\s\S]*?)<\/h2>/gi,` 543## $1 544`).replace(/<h3[^>]*>([\s\S]*?)<\/h3>/gi,` 545### $1 546`).replace(/<a [^>]*href="([^"]+)"[^>]*>([\s\S]*?)<\/a>/gi,"[$2]($1)").replace(/<strong[^>]*>([\s\S]*?)<\/strong>/gi,"**$1**").replace(/<b[^>]*>([\s\S]*?)<\/b>/gi,"**$1**").replace(/<em[^>]*>([\s\S]*?)<\/em>/gi,"*$1*").replace(/<li[^>]*>([\s\S]*?)<\/li>/gi,`- $1 547`).replace(/<br\s*\/?>/gi,` 548`).replace(/<\/p>/gi,` 549 550`).replace(/<[^>]+>/g,"").replace(/\n{3,}/g,` 551 552`).replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').trim(),sM=()=>{const{text:e,setText:t,onFile:r}=Yr();return a.jsxs(je,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx(K,{children:"HTML"}),a.jsx(Qr,{onChange:r,accept:".html,.htm,.txt"})]}),a.jsx(Se,{rows:8,value:e,onChange:n=>t(n.target.value)}),e&&a.jsx(Ne,{value:BS(e),filename:"output.md"})]})},oM=()=>a.jsx(Wa,{render:e=>a.jsx(Ne,{value:BS(e),filename:"page.md"})}),aM=()=>{const{text:e,setText:t,onFile:r}=Yr(),n=e?Ci(e.split(/[\s,;]+/).map(s=>s.toLowerCase())):[];return a.jsxs(je,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx(K,{children:"Email list"}),a.jsx(Qr,{onChange:r})]}),a.jsx(Se,{rows:6,value:e,onChange:s=>t(s.target.value)}),n.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-sm",children:[n.length," unique"]}),a.jsx(Ne,{value:n.join(` 553`),filename:"deduped.txt"})]})]})},iM=()=>{const{text:e,setText:t,onFile:r}=Yr(),n=e?Array.from(new Set(e.split(/[\s,;]+/).map(s=>
553s.trim().toLowerCase()).filter(Boolean))).sort():[];return a.jsxs(je,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx(K,{children:"Email list"}),a.jsx(Qr,{onChange:r})]}),a.jsx(Se,{rows:6,value:e,onChange:s=>t(s.target.value)}),n.length>0&&a.jsx(Ne,{value:n.join(` 554`),filename:"formatted.txt"})]})},lM=()=>{const{text:e,setText:t,onFile:r}=Yr(),n=e?Array.from(new Set(e.split(/[\s,;]+/).map(s=>s.trim().toLowerCase()).filter(s=>/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(s)))).sort():[];return a.jsxs(je,{children:[a.jsxs("div",{className:"flex justify-between",children:[a.jsx(K,{children:"Email list (any size)"}),a.jsx(Qr,{onChange:r})]}),a.jsx(Se,{rows:6,value:e,onChange:s=>t(s.target.value)}),e&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-sm",children:[n.length," valid + deduped"]}),a.jsx(Ne,{value:n.join(` 555`),filename:"bulk-cleaned.txt"})]})]})},cM=()=>{const[e,t]=p.useState(""),r=e.split(/[\s,;]+/).filter(Boolean).map(s=>({e:s,ok:/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(s)})),n=r.length?r.map(s=>`${s.ok?"â":"â"} ${s.e}`).join(` 556`):"";return a.jsxs(je,{children:[a.jsx(K,{children:"Emails"}),a.jsx(Se,{rows:6,value:e,onChange:s=>t(s.target.value)}),n&&a.jsx(Ne,{value:n,filename:"checked.txt"})]})},uM=new Set(["mailinator.com","10minutemail.com","guerrillamail.com","tempmail.com","throwaway.email","yopmail.com","trashmail.com","sharklasers.com","getnada.com","temp-mail.org","fakeinbox.com","maildrop.cc","mintemail.com","dispostable.com","mohmal.com","mailnesia.com","spambox.us","tempr.email","tmpmail.org","mailcatch.com","emailondeck.com","getairmail.com","inboxbear.com","fakemail.net"]),dM=()=>{const[e,t]=p.useState(""),r=e.split(/[\s,;]+/).filter(Boolean).filter(n=>{var o;const s=(o=n.split("@")[1])==null?void 0:o.toLowerCase();return s&&uM.has(s)});return a.jsxs(je,{children:[a.jsx(K,{children:"Email list"}),a.jsx(Se,{rows:6,value:e,onChange:n=>t(n.target.value)}),e&&a.jsxs("p",{className:"text-sm font-semibold",children:[r.length," disposable"]}),r.length>0&&a.jsx(Ne,{value:r.join(` 557`),filename:"disposable.txt"})]})},hM=()=>a.jsx(Wa,{render:e=>a.jsx(Ne,{value:US(e),filename:"page-text.txt"})}),fM=()=>a.jsx(Wa,{render:e=>{const t=c=>{var u;return(((u=e.match(c))==null?void 0:u[1])||"").trim()},r=t(/<title[^>]*>([\s\S]*?)<\/title>/i),n=t(/<meta[^>]+name=["']description["'][^>]+content=["']([^"']+)/i),s=t(/<link[^>]+rel=["']canonical["'][^>]+href=["']([^"']+)/i),o={};e.replace(/<meta[^>]+property=["'](og:[^"']+)["'][^>]+content=["']([^"']+)/gi,(c,u,d)=>(o[u]=d,c));const i={};e.replace(/<meta[^>]+name=["'](twitter:[^"']+)["'][^>]+content=["']([^"']+)/gi,(c,u,d)=>(i[u]=d,c));const l=`TITLE: ${r} 558DESCRIPTION: ${n} 559CANONICAL: ${s} 560 561OPEN GRAPH: 562${Object.entries(o).map(([c,u])=>`${c}: ${u}`).join(` 563`)} 564 565TWITTER: 566${Object.entries(i).map(([c,u])=>`${c}: ${u}`).join(` 567`)}`;return a.jsx(Ne,{value:l,filename:"metadata.txt"})}}),mM=()=>a.jsx(Wa,{label:"Sitemap URL",render:e=>{const t=Na(e);return a.jsxs(a.Fragment,{children:[a.jsxs("p",{className:"text-sm",children:[t.length," URLs extracted"]}),a.jsx(Ne,{value:t.join(` 568`),filename:"leads.txt"})]})}}),pM=()=>{const[e,t]=p.useState(""),r=(()=>{if(!e)return"";const n=e.split(` 569`).map(o=>o.trim()).filter(Boolean),s=[["url","domain","company"]];for(const o of n)try{const l=new URL(o.startsWith("http")?o:`https://${o}`).hostname.replace(/^www\./,""),c=l.split(".")[0].replace(/[-_]/g," ").replace(/\b\w/g,u=>u.toUpperCase());s.push([o,l,c])}catch{s.push([o,"",""])}return Xp(s)})();return a.jsxs(je,{children:[a.jsx(K,{children:"URLs (one per line)"}),a.jsx(Se,{rows:8,value:e,onChange:n=>t(n.target.value)}),r&&a.jsx(Ne,{value:r,filename:"domains.csv"})]})},ox={"cold-email-analyzer":()=>a.jsx(cc,{tool:"cold-email-analyzer",label:"Paste your cold email",placeholder:"Subject: ...\\n\\nHi {{firstName}}, ..."}),"cold-email-subject-line-generator":()=>a.jsx(cc,{tool:"cold-email-subject-line-generator",label:"What is your email about?",placeholder:"A 10-min Loom for SaaS founders showing how we cut their support load 40%."}),"subject-line-tester":()=>a.jsx($D,{}),"cold-email-opener-generator":()=>a.jsx(cc,{tool:"cold-email-opener-generator",label:"Prospect website URL",placeholder:"https://example.com",urlMode:!0}),"spam-trigger-word-checker":()=>a.jsx(UD,{}),"cta-strength-checker":()=>a.jsx(BD,{}),"email-readability-score":()=>a.jsx(WD,{}),"website-summariser":()=>a.jsx(cc,{tool:"website-summariser",label:"Website URL",placeholder:"https://example.com",urlMode:!0}),"email-extractor":()=>a.jsx(uc,{regex:lm,label:"Paste text or upload a file",placeholder:"Paste any text containing emailsâ¦"}),"html-email-extractor":()=>a.jsx(uc,{regex:lm,label:"Paste HTML",placeholder:"<html>â¦</html>"}),"html-contact-info-extractor":()=>a.jsx(zD,{}),"domain-extractor":()=>a.jsx(uc,{regex:cm,label:"Paste URLs or emails",placeholder:"One per line, or any textâ¦",post:e=>e.map(t=>{try{return new URL(t.startsWith("http")?t:`https://${t.split("@").pop()}`).hostname.replace(/^www\./,"")}catch{return t.split("@")[1]||t}})}),"bulk-url-domain-company-extractor":()=>a.jsx(pM,{}),"website-url-extractor":()=>a.jsx(uc,{regex:cm,label:"Paste messy text",placeholder:"Anything containing URLsâ¦"}),"page-text-extractor":()=>a.jsx(hM,{}),"website-metadata-extractor":()=>a.jsx(fM,{}),"sitemap-lead-extractor":()=>a.jsx(mM,{}),"sitemap-finder-checker":()=>a.jsx(HD,{}),"sitemap-validator":()=>a.jsx(VD,{}),"sitemap-url-extractor":()=>a.jsx(qD,{}),"sitemap-to-robots-generator":()=>a.jsx(GD,{}),"sitemap-index-generator":()=>a.jsx(KD,{}),"sitemap-split-merger":()=>a.jsx(YD,{}),"sitemap-urls-comparison":()=>a.jsx(QD,{}),"csv-column-cleaner":()=>a.jsx(JD,{}),"csv-column-extractor":()=>a.jsx(XD,{}),"text-to-csv-converter":()=>a.jsx(ZD,{}),"csv-to-json-converter":()=>a.jsx(eM,{}),"csv-to-markdown":()=>a.jsx(tM,{}),"json-to-markdown":()=>a.jsx(rM,{}),"pdf-to-markdown":()=>a.jsx(nM,{}),"webpage-to-markdown":()=>a.jsx(oM,{}),"html-to-markdown":()=>a.jsx(sM,{}),"duplicate-email-remover":()=>a.jsx(aM,{}),"email-list-formatter":()=>a.jsx(iM,{}),"bulk-email-formatter":()=>a.jsx(lM,{}),"email-format-checker":()=>a.jsx(cM,{}),"disposable-email-detector":()=>
569a.jsx(dM,{})},gM=()=>{const{slug:e}=A1(),t=e?FS(e):void 0;if(!t)return a.jsx(od,{to:"/tools",replace:!0});const r=gd.filter(o=>o.category===t.category&&o.slug!==t.slug).slice(0,4),n=t.blogSlug?$S(t.blogSlug):void 0,s=[{q:`Is ${t.shortName} really free?`,a:"Yes. No signup, no card, no limits â free forever."},{q:"Do you store my data?",a:"No. Tools that don't need server-side AI run entirely in your browser. Your data never leaves your machine."},{q:"Can I use this for commercial work?",a:"Yes â go ahead."}];return Sn({title:t.metaTitle,description:t.metaDescription,path:`/tools/${t.slug}`,keywords:t.keywords,noindex:!1,jsonLd:[cd([{name:"Home",path:"/"},{name:"Free AI Tools",path:"/tools"},{name:t.shortName,path:`/tools/${t.slug}`}]),Dp(s),{"@context":"https://schema.org","@type":"SoftwareApplication",name:t.name,applicationCategory:"BusinessApplication",operatingSystem:"Web",description:t.metaDescription,offers:{"@type":"Offer",price:"0",priceCurrency:"USD"}}]}),a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(it,{title:t.metaTitle,description:t.metaDescription,canonical:`/tools/${t.slug}`}),a.jsx(Ua,{}),a.jsxs("main",{className:"max-w-3xl mx-auto px-6 py-12",children:[a.jsxs("nav",{"aria-label":"Breadcrumb",className:"text-xs text-muted-foreground mb-6 flex items-center gap-2",children:[a.jsx(re,{to:"/",className:"hover:text-foreground",children:"Home"}),a.jsx("span",{children:"/"}),a.jsx(re,{to:"/tools",className:"hover:text-foreground",children:"Free AI Tools"}),a.jsx("span",{children:"/"}),a.jsx("span",{className:"text-foreground",children:t.shortName})]}),a.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-highlight/10 text-highlight text-xs font-semibold mb-4",children:[a.jsx(Aa,{className:"w-3.5 h-3.5"})," 100% Free Tool"]}),a.jsx("h1",{className:"font-display text-3xl sm:text-4xl font-bold text-foreground mb-3",children:t.name}),a.jsx("p",{className:"text-lg text-muted-foreground mb-8 leading-relaxed",children:t.intro}),ox[t.slug]?a.jsx("div",{className:"mb-8",children:ox[t.slug]()}):a.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6 sm:p-8 mb-8",children:[a.jsx("h2",{className:"font-display font-bold text-lg text-foreground mb-2",children:"Launching soon"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Try the full EnrichAI engine free in the meantime."}),a.jsxs(re,{to:"/auth?mode=signup",className:"inline-flex items-center gap-2 px-5 py-3 bg-primary text-primary-foreground rounded-xl font-display font-bold text-sm hover:opacity-90 transition",children:["Get Started â 30 Free Credits ",a.jsx(ba,{className:"w-4 h-4"})]})]}),a.jsxs("section",{className:"mb-10",children:[a.jsx("h2",{className:"font-display text-xl font-bold text-foreground mb-3",children:"What it does"}),a.jsx("p",{className:"text-muted-foreground leading-relaxed mb-4",children:t.longDescription}),a.jsx("ul",{className:"space-y-2",children:t.features.map((o,i)=>a.jsxs("li",{className:"flex items-start gap-2 text-sm text-foreground",children:[a.jsx(Ps,{className:"w-4 h-4 text-highlight mt-0.5 flex-shrink-0"}),a.jsx("span",{children:o})]},i))})]}),a.jsxs("section",{className:"mb-10",children:[a.jsx("h2",{className:"font-display text-xl font-bold text-foreground mb-3",children:"FAQ"}),a.jsx("div",{className:"space-y-3",children:s.map((o,i)=>a.jsxs("div",{className:"bg-card border border-border rounded-xl p-4",children:[a.jsx("p",{className:"font-semibold text-foreground text-sm mb-1",children:o.q}),a.jsx("p",{className:"text-sm text-muted-foreground",children:o.a})]},i))})]}),n&&a.jsxs("section",{className:"mb-10 bg-secondary/30 border border-border rounded-2xl p-6",children:[a.jsx("p",{className:"text-xs uppercase tracking-wider font-semibold text-muted-foreground mb-2",children:"Related reading"}),a.jsx(re,{to:`/blog/${n.slug}`,className:"font-display font-bold text-lg text-foreground hover:underline",children:n.title}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:n.excerpt})]}),r.length>0&&a.jsxs("section",{children:[a.jsx("h2",{className:"font-display text-xl font-bold text-foreground mb-4",children:"More free tools"}),a.jsx("div",{className:"grid sm:grid-cols-2 gap-3",children:r.map(o=>a.jsxs(re,{to:`/tools/${o.slug}`,className:"block bg-card border border-border rounded-xl p-4 hover:shadow-md transition",children:[a.jsx("p",{className:"font-display font-bold text-foreground text-sm mb-1",children:o.shortName}),a.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:o.intro})]},o.slug))})]})]}),a.jsx(Ba,{})]})},yM=()=>{const e=_i[0],t=_i.slice(1);Sn({title:"EnrichAI Blog â Cold Email, Outbound & Lead Gen Playbooks",description:"Honest, plain-English playbooks on cold email, outbound, lead generation and the SaaS tools that actually work in 2026.",path:"/blog",keywords:["cold email blog","b2b outbound blog","lead generation tips","cold email playbook"],jsonLd:[cd([{name:"Home",path:"/"},{name:"Blog",path:"/blog"}]),{"@context":"https://schema.org","@type":"Blog",name:"EnrichAI Blog",url:"https://www.enrichai.online/blog",blogPost:_i.map(n=>({"@type":"BlogPosting",headline:n.title,datePublished:n.date,url:`https://www.enrichai.online/blog/${n.slug}`}))}]});const r=n=>new Date(n).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(it,{title:"EnrichAI Blog â Cold Email, Outbound & Lead Gen Playbooks",description:"Honest, plain-English playbooks on cold email, outbound, lead generation and the SaaS tools that actually work in 2026.",canonical:"/blog"}),a.jsx(Ua,{}),a.jsxs("main",{className:"max-w-4xl mx-auto px-6 py-16 sm:py-20",children:[a.jsxs("div",{className:"text-center mb-14",children:[a.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.2em] text-muted-foreground mb-5",children:"Blog"}),a.jsx("h1",{className:"font-display text-5xl sm:text-6xl font-bold text-foreground mb-5 leading-[1.05] tracking-tight",children:"EnrichAI blog"}),a.jsx("p",{className:"text-lg text-muted-foreground max-w-xl mx-auto leading-relaxed",children:"Browse the latest EnrichAI articles on cold email, outbound systems, and the operating habits behind team
569s that actually get replies."})]}),a.jsxs(re,{to:`/blog/${e.slug}`,className:"block bg-card border border-border rounded-3xl p-7 sm:p-10 mb-12 hover:shadow-lg transition-all group",children:[a.jsx("div",{className:"inline-flex items-center px-3 py-1 rounded-full border border-border text-[11px] font-bold uppercase tracking-wider text-foreground mb-4",children:"Featured Post"}),a.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:r(e.date)}),a.jsx("h2",{className:"font-display text-3xl sm:text-4xl font-bold text-foreground mb-4 leading-tight tracking-tight",children:e.title}),a.jsx("p",{className:"text-base text-muted-foreground leading-relaxed mb-6 max-w-2xl",children:e.excerpt}),a.jsxs("span",{className:"inline-flex items-center gap-2 text-sm font-semibold text-foreground group-hover:gap-3 transition-all",children:["Read article ",a.jsx(ba,{className:"w-4 h-4"})]})]}),a.jsx("h2",{className:"font-display text-2xl font-bold text-foreground mb-6",children:"All articles"}),a.jsx("div",{className:"grid sm:grid-cols-2 gap-5",children:t.map(n=>a.jsxs(re,{to:`/blog/${n.slug}`,className:"block bg-card border border-border rounded-2xl p-6 hover:shadow-md hover:-translate-y-0.5 transition-all",children:[a.jsxs("div",{className:"flex items-center gap-3 text-[11px] text-muted-foreground mb-3",children:[a.jsx("span",{className:"font-bold text-foreground uppercase tracking-wider",children:n.tag}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Ku,{className:"w-3 h-3"}),r(n.date)]}),a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(Yu,{className:"w-3 h-3"}),n.readTime]})]}),a.jsx("h3",{className:"font-display font-bold text-lg text-foreground mb-2 leading-snug tracking-tight",children:n.title}),a.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-3",children:n.excerpt})]},n.slug))}),a.jsxs("div",{className:"text-center mt-16 bg-card border border-border rounded-3xl p-10",children:[a.jsx("h2",{className:"font-display text-2xl sm:text-3xl font-bold text-foreground mb-3 tracking-tight",children:"Try EnrichAI free"}),a.jsx("p",{className:"text-muted-foreground mb-6",children:"30 free credits. No card. Personalised cold email openers in seconds."}),a.jsx(re,{to:"/auth?mode=signup",className:"inline-block px-6 py-3 bg-primary text-primary-foreground rounded-xl font-display font-bold text-sm hover:opacity-90 transition",children:"Start Free"})]})]}),a.jsx(Ba,{})]})},vM=(e,t)=>e.startsWith("## ")?a.jsx("h2",{className:"font-display text-2xl sm:text-3xl font-bold text-foreground mt-12 mb-4 tracking-tight",children:e.slice(3)},t):e.startsWith("- ")?a.jsx("li",{className:"text-foreground leading-relaxed",children:e.slice(2)},t):a.jsx("p",{className:"text-foreground/90 leading-[1.8] mb-5 text-[17px]",children:e},t),xM=e=>{const t=[];let r=[];const n=s=>{r.length&&(t.push(a.jsx("ul",{className:"list-disc pl-6 space-y-2 mb-6 text-foreground/90 text-[17px] leading-[1.8]",children:r.map((o,i)=>a.jsx("li",{children:o.slice(2)},i))},s)),r=[])};return e.forEach((s,o)=>{s.startsWith("- ")?r.push(s):(n(`ul-${o}`),t.push(vM(s,o)))}),n("ul-final"),t},wM=()=>{const{slug:e}=A1(),t=e?$S(e):void 0;if(!t)return a.jsx(od,{to:"/blog",replace:!0});const r=_i.filter(n=>n.slug!==t.slug&&n.tag===t.tag).slice(0,3);return Sn({title:t.metaTitle,description:t.metaDescription,path:`/blog/${t.slug}`,keywords:t.keywords,type:"article",jsonLd:[FI({title:t.title,description:t.metaDescription,slug:t.slug,date:t.date}),cd([{name:"Home",path:"/"},{name:"Blog",path:"/blog"},{name:t.title,path:`/blog/${t.slug}`}])]}),a.jsxs("div",{className:"min-h-screen bg-background",children:[a.jsx(it,{title:t.metaTitle,description:t.metaDescription,canonical:`/blog/${t.slug}`}),a.jsx(Ua,{}),a.jsxs("main",{className:"max-w-3xl mx-auto px-6 py-14 sm:py-20",children:[a.jsxs("nav",{"aria-label":"Breadcrumb",className:"text-xs text-muted-foreground mb-8 flex items-center gap-2",children:[a.jsx(re,{to:"/",className:"hover:text-foreground",children:"Home"}),a.jsx("span",{children:"/"}),a.jsx(re,{to:"/blog",className:"hover:text-foreground",children:"Blog"})]}),a.jsxs("article",{children:[a.jsx("p",{className:"text-xs font-bold text-muted-foreground uppercase tracking-[0.2em] mb-4",children:t.tag}),a.jsx("h1",{className:"font-display text-4xl sm:text-5xl font-bold text-foreground mb-6 leading-[1.1] tracking-tight",children:t.title}),a.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground mb-10 pb-8 border-b border-border",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Ku,{className:"w-3.5 h-3.5"}),new Date(t.date).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]}),a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Yu,{className:"w-3.5 h-3.5"}),t.readTime," read"]})]}),a.jsx("div",{className:"prose-content",children:xM(t.body)}),t.relatedToolSlugs&&t.relatedToolSlugs.length>0&&a.jsxs("section",{className:"mt-10 bg-secondary/30 border border-border rounded-2xl p-6",children:[a.jsx("h2",{className:"font-display text-lg font-bold text-foreground mb-3",children:"Free tools mentioned"}),a.jsx("div",{className:"space-y-2",children:t.relatedToolSlugs.map(n=>{const s=FS(n);return s?a.jsxs(re,{to:`/tools/${s.slug}`,className:"flex items-center justify-between bg-card border border-border rounded-xl p-3 hover:shadow-sm transition",children:[a.jsx("span",{className:"font-semibold text-foreground text-sm",children:s.shortName}),a.jsx(ba,{className:"w-4 h-4 text-muted-foreground"})]},n):null})})]}),a.jsxs("div",{className:"mt-10 bg-card border border-border rounded-2xl p-6 text-center",children:[a.jsx("h3",{className:"font-display text-xl font-bold text-foreground mb-2",children:"Try EnrichAI free"}),a.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"30 free credits. No card. Personalised cold email openers in seconds."}),a.jsxs(re,{to:"/auth?mode=signup",className:"inline-flex items-center gap-2 px-5 py-3 bg-primary text-primary-foreground rounded-xl font-display font-bold text-sm hover:opacity-90 transition",children:["Get Started ",a.jsx(ba,{className:"w-4 h-4"})]})]})]}),r.length>0&&a.jsxs("section",{className:"mt-12",children:[a.jsx("h2",{className:"font-display text-xl font-bold text-foreground mb-4",children:"Keep reading"}),a.jsx("div",{className:"space-y-3",children:r.map(n=>a.jsxs(re,{to:`/blog/${n.slug}`,className:"block bg-card border border-border rounded-xl p-4 hover:shadow-md transition",children:[a.jsx("p",{className:"font-display font-bold text-foreground text-sm mb-1",children:n.title}),a.jsx("p",{className:"text-xs text-muted-foreground",children:n.excerpt})]},n.slug))})]})]}),a.jsx(Ba,{})]})},bM=()=>{const e=Kr();return p.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),a.jsxs("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:[a.jsx(it,{title:"Page Not Found â EnrichAI",description:"The page you are looking for does not exist.",canonical:"/404",noindex:!0}),a.jsxs("div",{className:"text-center",children:[a.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),a.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),a.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})]})},kM=new NP,SM=()=>a.jsx(RP,{client:kM,children:a.jsx(SI,{children:a.jsxs(uP,{children:[a.jsx(qE,{}),a.jsx(jT,{}),a.jsx(UA,{children:a.jsxs(RA,{children:[a.jsx(qe,{path:"/",element:a.jsx($I,{})}),a.jsx(qe,{path:"/auth",element:a.jsx(KI,{})}),a.jsx(qe,{path:"/check-email",element:a.jsx(cL,{})}),a.jsx(qe,{path:"/reset-password",element:a.jsx(uL,{})}),a.jsx(qe,{path:"/update",element:a.jsx(dL,{})}),a.jsx(qe,{path:"/dashboard",element:a.jsx(mD,{})}),a.jsx(qe,{path:"/checkout/success",element:a.jsx(pD,{})}),a.jsx(qe,{path:"/private",element:a.jsx(gD,{})}),a.jsx(qe,{path:"/private/dashboard",element:a.jsx(ND,{})}),a.jsx(qe,{path:"/terms",element:a.jsx(ED,{})}),a.jsx(qe,{path:"/privacy",element:a.jsx(TD,{})}),a.jsx(qe,{path:"/refund",element:a.jsx(PD,{})}),a.jsx(qe,{path:"/docs",element:a.jsx(AD,{})}),a.jsx(qe,{path:"/tools",element:a.jsx(OD,{})}),a.jsx(qe,{path:"/tools/:slug",element:a.jsx(gM,{})}),a.jsx(qe,{path:"/blog",element:a.jsx(yM,{})}),a.jsx(qe,{path:"/blog/:slug",element:a.jsx(wM,{})}),a.jsx(qe,{path:"*",element:a.jsx(bM,{})})]})})]})})});T0(document.getElementById("root")).render(a.jsx(D0,{children:a.jsx(SM,{})}));
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.