PageSourceSearch

https://www.communityweek.nyc/assets/index-BAgPNwAN.js

js communityweek.nyc collected 2026-10-04 13:25:29 UTC 780,163 bytes, 287 lines download raw bytes

vendor: 5,607 bytes, lines 1-9
1var Hv=t=>{throw TypeError(t)};var Od=(t,e,r)=>e.has(t)||Hv("Cannot "+r);var R=(t,e,r)=>(Od(t,e,"read from private field"),r?r.call(t):e.get(t)),de=(t,e,r)=>e.has(t)?Hv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ne=(t,e,r,n)=>(Od(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),lt=(t,e,r)=>(Od(t,e,"access private method"),r);var $l=(t,e,r,n)=>({set _(s){ne(t,e,s,r)},get _(){return R(t,e,n)}});function Fk(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in t)){const i=Object.getOwnPropertyDescriptor(n,s);i&&Object.defineProperty(t,s,i.get?i:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(s){if(s.ep)return;s.ep=!0;const i=r(s);fetch(s.href,i)}})();function I_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $_={exports:{}},Du={},L_={exports:{}},oe={};/**
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 xl=Symbol.for("react.element"),Uk=Symbol.for("react.portal"),Bk=Symbol.for("react.fragment"),zk=Symbol.for("react.strict_mode"),Wk=Symbol.for("react.profiler"),Hk=Symbol.for("react.provider"),Vk=Symbol.for("react.context"),qk=Symbol.for("react.forward_ref"),Kk=Symbol.for("react.suspense"),Gk=Symbol.for("react.memo"),Yk=Symbol.for("react.lazy"),Vv=Symbol.iterator;function Jk(t){return t===null||typeof t!="object"?null:(t=Vv&&t[Vv]||t["@@iterator"],typeof t=="function"?t:null)}var M_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D_=Object.assign,F_={};function Co(t,e,r){this.props=t,this.context=e,this.refs=F_,this.updater=r||M_}Co.prototype.isReactComponent={};Co.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Co.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function U_(){}U_.prototype=Co.prototype;function Hp(t,e,r){this.props=t,this.context=e,this.refs=F_,this.updater=r||M_}var Vp=Hp.prototype=new U_;Vp.constructor=Hp;D_(Vp,Co.prototype);Vp.isPureReactComponent=!0;var qv=Array.isArray,B_=Object.prototype.hasOwnProperty,qp={current:null},z_={key:!0,ref:!0,__self:!0,__source:!0};function W_(t,e,r){var n,s={},i=null,o=null;if(e!=null)for(n in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(i=""+e.key),e)B_.call(e,n)&&!z_.hasOwnProperty(n)&&(s[n]=e[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(t&&t.defaultProps)for(n in a=t.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:xl,type:t,key:i,ref:o,props:s,_owner:qp.current}}function Qk(t,e){return{$$typeof:xl,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Kp(t){return typeof t=="object"&&t!==null&&t.$$typeof===xl}function Xk(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var Kv=/\/+/g;function Ad(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Xk(""+t.key):e.toString(36)}function bc(t,e,r,n,s){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case xl:case Uk:o=!0}}if(o)return o=t,s=s(o),t=n===""?"."+Ad(o,0):n,qv(s)?(r="",t!=null&&(r=t.replace(Kv,"$&/")+"/"),bc(s,e,r,"",function(c){return c})):s!=null&&(Kp(s)&&(s=Qk(s,r+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Kv,"$&/")+"/")+t)),e.push(s)),1;if(o=0,n=n===""?".":n+":",qv(t))for(var a=0;a<t.length;a++){i=t[a];var l=n+Ad(i,a);o+=bc(i,e,r,l,s)}else if(l=Jk(t),typeof l=="function")for(t=l.call(t),a=0;!(i=t.next()).done;)i=i.value,l=n+Ad(i,a++),o+=bc(i,e,r,l,s);else if(i==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function Ll(t,e,r){if(t==null)return t;var n=[],s=0;return bc(t,n,"","",function(i){return e.call(r,i,s++)}),n}function Zk(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(r){(t._status===0||t._status===-1)&&(t._status=1,t._result=r)},function(r){(t._status===0||t._status===-1)&&(t._status=2,t._result=r)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var wt={current:null},xc={transition:null},eC={ReactCurrentDispatcher:wt,ReactCurrentBatchConfig:xc,ReactCurrentOwner:qp}
vendor: 5,265 bytes, lines 9-25
9;function H_(){throw Error("act(...) is not supported in production builds of React.")}oe.Children={map:Ll,forEach:function(t,e,r){Ll(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Ll(t,function(){e++}),e},toArray:function(t){return Ll(t,function(e){return e})||[]},only:function(t){if(!Kp(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};oe.Component=Co;oe.Fragment=Bk;oe.Profiler=Wk;oe.PureComponent=Hp;oe.StrictMode=zk;oe.Suspense=Kk;oe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=eC;oe.act=H_;oe.cloneElement=function(t,e,r){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var n=D_({},t.props),s=t.key,i=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(i=e.ref,o=qp.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)B_.call(e,l)&&!z_.hasOwnProperty(l)&&(n[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];n.children=a}return{$$typeof:xl,type:t.type,key:s,ref:i,props:n,_owner:o}};oe.createContext=function(t){return t={$$typeof:Vk,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:Hk,_context:t},t.Consumer=t};oe.createElement=W_;oe.createFactory=function(t){var e=W_.bind(null,t);return e.type=t,e};oe.createRef=function(){return{current:null}};oe.forwardRef=function(t){return{$$typeof:qk,render:t}};oe.isValidElement=Kp;oe.lazy=function(t){return{$$typeof:Yk,_payload:{_status:-1,_result:t},_init:Zk}};oe.memo=function(t,e){return{$$typeof:Gk,type:t,compare:e===void 0?null:e}};oe.startTransition=function(t){var e=xc.transition;xc.transition={};try{t()}finally{xc.transition=e}};oe.unstable_act=H_;oe.useCallback=function(t,e){return wt.current.useCallback(t,e)};oe.useContext=function(t){return wt.current.useContext(t)};oe.useDebugValue=function(){};oe.useDeferredValue=function(t){return wt.current.useDeferredValue(t)};oe.useEffect=function(t,e){return wt.current.useEffect(t,e)};oe.useId=function(){return wt.current.useId()};oe.useImperativeHandle=function(t,e,r){return wt.current.useImperativeHandle(t,e,r)};oe.useInsertionEffect=function(t,e){return wt.current.useInsertionEffect(t,e)};oe.useLayoutEffect=function(t,e){return wt.current.useLayoutEffect(t,e)};oe.useMemo=function(t,e){return wt.current.useMemo(t,e)};oe.useReducer=function(t,e,r){return wt.current.useReducer(t,e,r)};oe.useRef=function(t){return wt.current.useRef(t)};oe.useState=function(t){return wt.current.useState(t)};oe.useSyncExternalStore=function(t,e,r){return wt.current.useSyncExternalStore(t,e,r)};oe.useTransition=function(){return wt.current.useTransition()};oe.version="18.3.1";L_.exports=oe;var b=L_.exports;const j=I_(b),Gp=Fk({__proto__:null,default:j},[b]);/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var tC=b,rC=Symbol.for("react.element"),nC=Symbol.for("react.fragment"),sC=Object.prototype.hasOwnProperty,iC=tC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,oC={key:!0,ref:!0,__self:!0,__source:!0};function V_(t,e,r){var n,s={},i=null,o=null;r!==void 0&&(i=""+r),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(o=e.ref);for(n in e)sC.call(e,n)&&!oC.hasOwnProperty(n)&&(s[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)s[n]===void 0&&(s[n]=e[n]);return{$$typeof:rC,type:t,key:i,ref:o,props:s,_owner:iC.current}}Du.Fragment=nC;Du.jsx=V_;Du.jsxs=V_;$_.exports=Du;var p=$_.exports,q_={exports:{}},zt={},K_={exports:{}},G_={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */(function(t){function e(P,O){var D=P.length;P.push(O);e:for(;0<D;){var te=D-1>>>1,z=P[te];if(0<s(z,O))P[te]=O,P[D]=z,D=te;else break e}}function r(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var O=P[0],D=P.pop();if(D!==O){P[0]=D;e:for(var te=0,z=P.length,X=z>>>1;te<X;){var Z=2*(te+1)-1,me=P[Z],xe=Z+1,ue=P[xe];if(0>s(me,D))xe<z&&0>s(ue,me)?(P[te]=ue,P[xe]=D,te=xe):(P[te]=me,P[Z]=D,te=Z);else if(xe<z&&0>s(ue,D))P[te]=ue,P[xe]=D,te=xe;else break e}}return O}function s(P,O){var D=P.sortIndex-O.sortIndex;return D!==0?D:P.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,d=null,f=3,h=!1,y=!1,g=!1,w=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(P){for(var O=r(c);O!==null;){if(O.callback===null)n(c);
vendor: 9,483 bytes, lines 25-34
25else if(O.startTime<=P)n(c),O.sortIndex=O.expirationTime,e(l,O);else break;O=r(c)}}function x(P){if(g=!1,_(P),!y)if(r(l)!==null)y=!0,q(E);else{var O=r(c);O!==null&&J(x,O.startTime-P)}}function E(P,O){y=!1,g&&(g=!1,m(C),C=-1),h=!0;var D=f;try{for(_(O),d=r(l);d!==null&&(!(d.expirationTime>O)||P&&!H());){var te=d.callback;if(typeof te=="function"){d.callback=null,f=d.priorityLevel;var z=te(d.expirationTime<=O);O=t.unstable_now(),typeof z=="function"?d.callback=z:d===r(l)&&n(l),_(O)}else n(l);d=r(l)}if(d!==null)var X=!0;else{var Z=r(c);Z!==null&&J(x,Z.startTime-O),X=!1}return X}finally{d=null,f=D,h=!1}}var k=!1,S=null,C=-1,N=5,A=-1;function H(){return!(t.unstable_now()-A<N)}function L(){if(S!==null){var P=t.unstable_now();A=P;var O=!0;try{O=S(!0,P)}finally{O?Y():(k=!1,S=null)}}else k=!1}var Y;if(typeof v=="function")Y=function(){v(L)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,ee=$.port2;$.port1.onmessage=L,Y=function(){ee.postMessage(null)}}else Y=function(){w(L,0)};function q(P){S=P,k||(k=!0,Y())}function J(P,O){C=w(function(){P(t.unstable_now())},O)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(P){P.callback=null},t.unstable_continueExecution=function(){y||h||(y=!0,q(E))},t.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):N=0<P?Math.floor(1e3/P):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(P){switch(f){case 1:case 2:case 3:var O=3;break;default:O=f}var D=f;f=O;try{return P()}finally{f=D}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(P,O){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var D=f;f=P;try{return O()}finally{f=D}},t.unstable_scheduleCallback=function(P,O,D){var te=t.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?te+D:te):D=te,P){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=D+z,P={id:u++,callback:O,priorityLevel:P,startTime:D,expirationTime:z,sortIndex:-1},D>te?(P.sortIndex=D,e(c,P),r(l)===null&&P===r(c)&&(g?(m(C),C=-1):g=!0,J(x,D-te))):(P.sortIndex=z,e(l,P),y||h||(y=!0,q(E))),P},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(P){var O=f;return function(){var D=f;f=O;try{return P.apply(this,arguments)}finally{f=D}}}})(G_);K_.exports=G_;var aC=K_.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 lC=b,Bt=aC;function I(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;r<arguments.length;r++)e+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Y_=new Set,Ma={};function ti(t,e){co(t,e),co(t+"Capture",e)}function co(t,e){for(Ma[t]=e,t=0;t<e.length;t++)Y_.add(e[t])}var pn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qh=Object.prototype.hasOwnProperty,cC=/^[: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]*$/,Gv={},Yv={};function uC(t){return qh.call(Yv,t)?!0:qh.call(Gv,t)?!1:cC.test(t)?Yv[t]=!0:(Gv[t]=!0,!1)}function dC(t,e,r,n){if(r!==null&&r.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function hC(t,e,r,n){if(e===null||typeof e>"u"||dC(t,e,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function bt(t,e,r,n,s,i,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=o}var ot={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ot[t]=new bt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ot[e]=new bt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ot[t]=new bt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ot[t]=new bt(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){ot[t]=new bt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ot[t]=new bt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ot[t]=new bt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ot[t]=new bt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ot[t]=new bt(t,5,!1,t.toLowerCase(),null,!1,!1)});var Yp=/[\-:]([a-z])/g;function Jp(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Yp,Jp);ot[e]=new bt(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Yp,Jp);ot[e]=new bt(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Yp,Jp);ot[e]=new bt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ot[t]=new bt(t,1,!1,t.toLowerCase(),null,!1,!1)});ot.xlinkHref=new bt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ot[t]=new bt(t,1,!1,t.toLowerCase(),null,!0,!0)});function Qp(t,e,r,n){var s=ot.hasOwnProperty(e)?ot[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(hC(e,r,s,n)&&(r=null),n||s===null?uC(e)&&(r===null?t.removeAttribute(e):t.setAttribute(e,""+r)):s.mustUseProperty?t[s.propertyName]=r===null?s.type===3?!1:"":r:(e=s.attributeName,n=s.attributeNamespace,r===null?t.removeAttribute(e):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?t.setAttributeNS(n,e,r):t.setAttribute(e,r))))}var wn=lC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ml=Symbol.for("react.element"),Pi=Symbol.for("react.portal"),Ri=Symbol.for("react.fragment"),Xp=Symbol.for("react.strict_mode"),Kh=Symbol.for("react.profiler"),J_=Symbol.for("react.provider"),Q_=Symbol.for("react.context"),Zp=Symbol.for("react.forward_ref"),Gh=Symbol.for("react.suspense"),Yh=Symbol.for("react.suspense_list"),eg=Symbol.for("react.memo"),$n=Symbol.for("react.lazy"),X_=Symbol.for("react.offscreen"),Jv=Symbol.iterator;function Do(t){return t===null||typeof t!="object"?null:(t=Jv&&t[Jv]||t["@@iterator"],typeof t=="function"?t:null)}var Ae=Object.assign,jd;function ia(t){if(jd===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);jd=e&&e[1]||""}return`
34`+jd+t}var Id=!1;function $d(t,e){if(!t||Id)return"";Id=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var n=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){n=c}t.call(e.prototype)}else{try{throw Error()}catch(c){n=c}t()}}
vendor: 16,737 bytes, lines 34-37
34catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(`
35`),i=n.stack.split(`
36`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
37`+s[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{Id=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?ia(t):""}function fC(t){switch(t.tag){case 5:return ia(t.type);case 16:return ia("Lazy");case 13:return ia("Suspense");case 19:return ia("SuspenseList");case 0:case 2:case 15:return t=$d(t.type,!1),t;case 11:return t=$d(t.type.render,!1),t;case 1:return t=$d(t.type,!0),t;default:return""}}function Jh(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ri:return"Fragment";case Pi:return"Portal";case Kh:return"Profiler";case Xp:return"StrictMode";case Gh:return"Suspense";case Yh:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Q_:return(t.displayName||"Context")+".Consumer";case J_:return(t._context.displayName||"Context")+".Provider";case Zp:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case eg:return e=t.displayName||null,e!==null?e:Jh(t.type)||"Memo";case $n:e=t._payload,t=t._init;try{return Jh(t(e))}catch{}}return null}function pC(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Jh(e);case 8:return e===Xp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function as(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Z_(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function gC(t){var e=Z_(t)?"checked":"value",r=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),n=""+t[e];if(!t.hasOwnProperty(e)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,i=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Dl(t){t._valueTracker||(t._valueTracker=gC(t))}function ew(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=Z_(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function Uc(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Qh(t,e){var r=e.checked;return Ae({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function Qv(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=as(e.value!=null?e.value:r),t._wrapperState={initialChecked:n,initialValue:r,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function tw(t,e){e=e.checked,e!=null&&Qp(t,"checked",e,!1)}function Xh(t,e){tw(t,e);var r=as(e.value),n=e.type;if(r!=null)n==="number"?(r===0&&t.value===""||t.value!=r)&&(t.value=""+r):t.value!==""+r&&(t.value=""+r);else if(n==="submit"||n==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Zh(t,e.type,r):e.hasOwnProperty("defaultValue")&&Zh(t,e.type,as(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Xv(t,e,r){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var n=e.type;if(!(n!=="submit"&&n!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,r||e===t.value||(t.value=e),t.defaultValue=e}r=t.name,r!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,r!==""&&(t.name=r)}function Zh(t,e,r){(e!=="number"||Uc(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var oa=Array.isArray;function Wi(t,e,r,n){if(t=t.options,e){e={};for(var s=0;s<r.length;s++)e["$"+r[s]]=!0;for(r=0;r<t.length;r++)s=e.hasOwnProperty("$"+t[r].value),t[r].selected!==s&&(t[r].selected=s),s&&n&&(t[r].defaultSelected=!0)}else{for(r=""+as(r),e=null,s=0;s<t.length;s++){if(t[s].value===r){t[s].selected=!0,n&&(t[s].defaultSelected=!0);return}e!==null||t[s].disabled||(e=t[s])}e!==null&&(e.selected=!0)}}function ef(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(I(91));return Ae({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Zv(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(I(92));if(oa(r)){if(1<r.length)throw Error(I(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:as(r)}}function rw(t,e){var r=as(e.value),n=as(e.defaultValue);r!=null&&(r=""+r,r!==t.value&&(t.value=r),e.defaultValue==null&&t.defaultValue!==r&&(t.defaultValue=r)),n!=null&&(t.defaultValue=""+n)}function em(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function nw(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function tf(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?nw(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Fl,sw=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,r,n,s){MSApp.execUnsafeLocalFunction(function(){return t(e,r,n,s)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Fl=Fl||document.createElement("div"),Fl.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Fl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Da(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var xa={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},vC=["Webkit","ms","Moz","O"];Object.keys(xa).forEach(function(t){vC.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),xa[e]=xa[t]})});function iw(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||xa.hasOwnProperty(t)&&xa[t]?(""+e).trim():e+"px"}function ow(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=iw(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var mC=Ae({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 rf(t,e){if(e){if(mC[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(I(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(I(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(I(61))}if(e.style!=null&&typeof e.style!="object")throw Error(I(62))}}function nf(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sf=null;function tg(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var of=null,Hi=null,Vi=null;function tm(t){if(t=kl(t)){if(typeof of!="function")throw Error(I(280));var e=t.stateNode;e&&(e=Wu(e),of(t.stateNode,t.type,e))}}function aw(t){Hi?Vi?Vi.push(t):Vi=[t]:Hi=t}function lw(){if(Hi){var t=Hi,e=Vi;if(Vi=Hi=null,tm(t),e)for(t=0;t<e.length;t++)tm(e[t])}}function cw(t,e){return t(e)}function uw(){}var Ld=!1;function dw(t,e,r){if(Ld)return t(e,r);Ld=!0;try{return cw(t,e,r)}finally{Ld=!1,(Hi!==null||Vi!==null)&&(uw(),lw())}}function Fa(t,e){var r=t.stateNode;if(r===null)return null;var n=Wu(r);if(n===null)return null;r=n[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break e;default:t=!1}if(t)return null;if(r&&typeof r!="function")throw Error(I(231,e,typeof r));return r}var af=!1;if(pn)try{var Fo={};Object.defineProperty(Fo,"passive",{get:function(){af=!0}}),window.addEventListener("test",Fo,Fo),window.removeEventListener("test",Fo,Fo)}catch{af=!1}function yC(t,e,r,n,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(u){this.onError(u)}}var Ea=!1,Bc=null,zc=!1,lf=null,_C={onError:function(t){Ea=!0,Bc=t}};function wC(t,e,r,n,s,i,o,a,l){Ea=!1,Bc=null,yC.apply(_C,arguments)}function bC(t,e,r,n,s,i,o,a,l){if(wC.apply(this,arguments),Ea){if(Ea){var c=Bc;Ea=!1,Bc=null}else throw Error(I(198));zc||(zc=!0,lf=c)}}function ri(t){var e=t,r=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(r=e.return),t=e.return;while(t)}return e.tag===3?r:null}function hw(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function rm(t){if(ri(t)!==t)throw Error(I(188))}function xC(t){var e=t.alternate;if(!e){if(e=ri(t),e===null)throw Error(I(188));return e!==t?null:t}for(var r=t,n=e;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return rm(s),t;if(i===n)return rm(s),e;i=i.sibling}throw Error(I(188))}if(r.return!==n.return)r=s,n=i;else{for(var o=!1,a=s.child;a;){if(a===r){o=!0,r=s,n=i;break}if(a===n){o=!0,n=s,r=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===r){o=!0,r=i,n=s;break}if(a===n){o=!0,n=i,r=s;break}a=a.sibling}if(!o)throw Error(I(189))}}if(r.alternate!==n)throw Error(I(190))}if(r.tag!==3)throw Error(I(188));return r.stateNode.current===r?t:e}function fw(t){return t=xC(t),t!==null?pw(t):null}function pw(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=pw(t);if(e!==null)return e;t=t.sibling}return null}var gw=Bt.unstable_scheduleCallback,nm=Bt.unstable_cancelCallback,EC=Bt.unstable_shouldYield,SC=Bt.unstable_requestPaint,Fe=Bt.unstable_now,kC=Bt.unstable_getCurrentPriorityLevel,rg=Bt.unstable_ImmediatePriority,vw=Bt.unstable_UserBlockingPriority,Wc=Bt.unstable_NormalPriority,CC=Bt.unstable_LowPriority,mw=Bt.unstable_IdlePriority,Fu=null,Br=null;function TC(t){if(Br&&typeof Br.onCommitFiberRoot=="function")try{Br.onCommitFiberRoot(Fu,t,void 0,(t.current.flags&128)===128)}catch{}}var vr=Math.clz32?Math.clz32:NC,PC=Math.log,RC=Math.LN2;function NC(t){return t>>>=0,t===0?32:31-(PC(t)/RC|0)|0}var Ul=64,Bl=4194304;function aa(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Hc(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,i=t.pingedLanes,o=r&268435455;if(o!==0){var a=o&~s;a!==0?n=aa(a):(i&=o,i!==0&&(n=aa(i)))}else o=r&~s,o!==0?n=aa(o):i!==0&&(n=aa(i));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(n&4&&(n|=r&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=n;0<e;)r=31-vr(e),s=1<<r,n|=t[r],e&=~s;return n}function OC(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function AC(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,i=t.pendingLanes;0<i;){var o=31-vr(i),a=1<<o,l=s[o];l===-1?(!(a&r)||a&n)&&(s[o]=OC(a,e)):l<=e&&(t.expiredLanes|=a),i&=~a}}function cf(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function yw(){var t=Ul;return Ul<<=1,!(Ul&4194240)&&(Ul=64),t}function Md(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function El(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-vr(e),t[e]=r}function jC(t,e){var r=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var n=t.eventTimes;for(t=t.expirationTimes;0<r;){var s=31-vr(r),i=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~i}}function ng(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-vr(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var ge=0;function _w(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var ww,sg,bw,xw,Ew,uf=!1,zl=[],Jn=null,Qn=null,Xn=null,Ua=new Map,Ba=new Map,Dn=[],IC="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 sm(t,e){switch(t){case"focusin":case"focusout":Jn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Xn=null;break;case"pointerover":case"pointerout":Ua.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ba.delete(e.pointerId)}}function Uo(t,e,r,n,s,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[s]},e!==null&&(e=kl(e),e!==null&&sg(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function $C(t,e,r,n,s){switch(e){case"focusin":return Jn=Uo(Jn,t,e,r,n,s),!0;case"dragenter":return Qn=Uo(Qn,t,e,r,n,s),!0;case"mouseover":return Xn=Uo(Xn,t,e,r,n,s),!0;case"pointerover":var i=s.pointerId;return Ua.set(i,Uo(Ua.get(i)||null,t,e,r,n,s)),!0;case"gotpointercapture":return i=s.pointerId,Ba.set(i,Uo(Ba.get(i)||null,t,e,r,n,s)),!0}return!1}function Sw(t){var e=Os(t.target);if(e!==null){var r=ri(e);if(r!==null){if(e=r.tag,e===13){if(e=hw(r),e!==null){t.blockedOn=e,Ew(t.priority,function(){bw(r)});return}}else if(e===3&&r.stateNode.current.memoizedState.isDehydrated){t.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Ec(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=df(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);sf=n,r.target.dispatchEvent(n),sf=null}else return e=kl(r),e!==null&&sg(e),t.blockedOn=r,!1;e.shift()}return!0}function im(t,e,r){Ec(t)&&r.delete(e)}function LC(){uf=!1,Jn!==null&&Ec(Jn)&&(Jn=null),Qn!==null&&Ec(Qn)&&(Qn=null),Xn!==null&&Ec(Xn)&&(Xn=null),Ua.forEac
vendor: 11,841 bytes, line 37
37h(im),Ba.forEach(im)}function Bo(t,e){t.blockedOn===e&&(t.blockedOn=null,uf||(uf=!0,Bt.unstable_scheduleCallback(Bt.unstable_NormalPriority,LC)))}function za(t){function e(s){return Bo(s,t)}if(0<zl.length){Bo(zl[0],t);for(var r=1;r<zl.length;r++){var n=zl[r];n.blockedOn===t&&(n.blockedOn=null)}}for(Jn!==null&&Bo(Jn,t),Qn!==null&&Bo(Qn,t),Xn!==null&&Bo(Xn,t),Ua.forEach(e),Ba.forEach(e),r=0;r<Dn.length;r++)n=Dn[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<Dn.length&&(r=Dn[0],r.blockedOn===null);)Sw(r),r.blockedOn===null&&Dn.shift()}var qi=wn.ReactCurrentBatchConfig,Vc=!0;function MC(t,e,r,n){var s=ge,i=qi.transition;qi.transition=null;try{ge=1,ig(t,e,r,n)}finally{ge=s,qi.transition=i}}function DC(t,e,r,n){var s=ge,i=qi.transition;qi.transition=null;try{ge=4,ig(t,e,r,n)}finally{ge=s,qi.transition=i}}function ig(t,e,r,n){if(Vc){var s=df(t,e,r,n);if(s===null)Kd(t,e,n,qc,r),sm(t,n);else if($C(s,t,e,r,n))n.stopPropagation();else if(sm(t,n),e&4&&-1<IC.indexOf(t)){for(;s!==null;){var i=kl(s);if(i!==null&&ww(i),i=df(t,e,r,n),i===null&&Kd(t,e,n,qc,r),i===s)break;s=i}s!==null&&n.stopPropagation()}else Kd(t,e,n,null,r)}}var qc=null;function df(t,e,r,n){if(qc=null,t=tg(n),t=Os(t),t!==null)if(e=ri(t),e===null)t=null;else if(r=e.tag,r===13){if(t=hw(e),t!==null)return t;t=null}else if(r===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return qc=t,null}function kw(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(kC()){case rg:return 1;case vw:return 4;case Wc:case CC:return 16;case mw:return 536870912;default:return 16}default:return 16}}var qn=null,og=null,Sc=null;function Cw(){if(Sc)return Sc;var t,e=og,r=e.length,n,s="value"in qn?qn.value:qn.textContent,i=s.length;for(t=0;t<r&&e[t]===s[t];t++);var o=r-t;for(n=1;n<=o&&e[r-n]===s[i-n];n++);return Sc=s.slice(t,1<n?1-n:void 0)}function kc(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Wl(){return!0}function om(){return!1}function Wt(t){function e(r,n,s,i,o){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Wl:om,this.isPropagationStopped=om,this}return Ae(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Wl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Wl)},persist:function(){},isPersistent:Wl}),e}var To={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ag=Wt(To),Sl=Ae({},To,{view:0,detail:0}),FC=Wt(Sl),Dd,Fd,zo,Uu=Ae({},Sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lg,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==zo&&(zo&&t.type==="mousemove"?(Dd=t.screenX-zo.screenX,Fd=t.screenY-zo.screenY):Fd=Dd=0,zo=t),Dd)},movementY:function(t){return"movementY"in t?t.movementY:Fd}}),am=Wt(Uu),UC=Ae({},Uu,{dataTransfer:0}),BC=Wt(UC),zC=Ae({},Sl,{relatedTarget:0}),Ud=Wt(zC),WC=Ae({},To,{animationName:0,elapsedTime:0,pseudoElement:0}),HC=Wt(WC),VC=Ae({},To,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),qC=Wt(VC),KC=Ae({},To,{data:0}),lm=Wt(KC),GC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},YC={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"},JC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function QC(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=JC[t])?!!e[t]:!1}function lg(){return QC}var XC=Ae({},Sl,{key:function(t){if(t.key){var e=GC[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=kc(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?YC[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lg,charCode:function(t){return t.type==="keypress"?kc(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?kc(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),ZC=Wt(XC),eT=Ae({},Uu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cm=Wt(eT),tT=Ae({},Sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lg}),rT=Wt(tT),nT=Ae({},To,{propertyName:0,elapsedTime:0,pseudoElement:0}),sT=Wt(nT),iT=Ae({},Uu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),oT=Wt(iT),aT=[9,13,27,32],cg=pn&&"CompositionEvent"in window,Sa=null;pn&&"documentMode"in document&&(Sa=document.documentMode);var lT=pn&&"TextEvent"in window&&!Sa,Tw=pn&&(!cg||Sa&&8<Sa&&11>=Sa),um=" ",dm=!1;function Pw(t,e){switch(t){case"keyup":return aT.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rw(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ni=!1;function cT(t,e){switch(t){case"compositionend":return Rw(e);case"keypress":return e.which!==32?null:(dm=!0,um);case"textInput":return t=e.data,t===um&&dm?null:t;default:return null}}function uT(t,e){if(Ni)return t==="compositionend"||!cg&&Pw(t,e)?(t=Cw(),Sc=og=qn=null,Ni=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Tw&&e.locale!=="ko"?null:e.data;default:return null}}var dT={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 hm(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!dT[t.type]:e==="textarea"}function Nw(t,e,r,n){aw(n),e=Kc(e,"onChange"),0<e.length&&(r=new ag("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var ka=null,Wa=null;function hT(t){Bw(t,0)}function Bu(t){var e=ji(t);if(ew(e))return t}function fT(t,e){if(t==="change")return e}var Ow=!1;if(pn){var Bd;if(pn){var zd="oninput"in document;if(!zd){var fm=document.createElement("div");fm.setAttribute("oninput","return;"),zd=typeof fm.oninput=="function"}Bd=zd}else Bd=!1;Ow=Bd&&(!document.documentMode||9<document.documentMode)}function pm(){ka&&(ka.detachEvent("onpropertychange",Aw),Wa=ka=null)}function Aw(t){if(t.propertyName==="value"&&Bu(Wa)){var e=[];Nw(e,Wa,t,tg(t)),dw(hT,e)}}function pT(t,e,r){t==="focusin"?(pm(),ka=e,Wa=r,ka.attachEvent("onpropertychange",Aw)):t==="focusout"&&pm()}function gT(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Bu(Wa)}function vT(t,e){if(t==="click")return Bu(e)}function mT(t,e){if(t==="input"||t==="change")return Bu(e)}function yT(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var yr=typeof Object.is=="function"?Object.is:yT;function Ha(t,e){if(yr(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!qh.call(e,s)||!yr(t[s],e[s]))return!1}return!0}function gm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function vm(t,e){var r=gm(t);t=0;for(var n;r;){if(r.nodeType===3){if(n=t+r.textContent.length,t<=e&&n>=e)return{node:r,offset:e-t};t=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=gm(r)}}function jw(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?jw(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Iw(){for(var t=window,e=Uc();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=Uc(t.document)}return e}function ug(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function _T(t){var e=Iw(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&jw(r.ownerDocument.documentElement,r)){if(n!==null&&ug(r)){if(e=n.start,t=n.end,t===void 0&&(t=e),"selectionStart"in r)r.selectionStart=e,r.selectionEnd=Math.min(t,r.value.length);else if(t=(e=r.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=r.textContent.length,i=Math.min(n.start,s);n=n.end===void 0?i:Math.min(n.end,s),!t.extend&&i>n&&(s=n,n=i,i=s),s=vm(r,i);var o=vm(r,n);s&&o&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>n?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=r;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<e.length;r++)t=e[r],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var wT=pn&&"documentMode"in document&&11>=document.documentMode,Oi=null,hf=null,Ca=null,ff=!1;function mm(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;ff||Oi==null||Oi!==Uc(n)||(n=Oi,"selectionStart"in n&&ug(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,383 bytes, line 37
37sNode:n.focusNode,focusOffset:n.focusOffset}),Ca&&Ha(Ca,n)||(Ca=n,n=Kc(hf,"onSelect"),0<n.length&&(e=new ag("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Oi)))}function Hl(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Ai={animationend:Hl("Animation","AnimationEnd"),animationiteration:Hl("Animation","AnimationIteration"),animationstart:Hl("Animation","AnimationStart"),transitionend:Hl("Transition","TransitionEnd")},Wd={},$w={};pn&&($w=document.createElement("div").style,"AnimationEvent"in window||(delete Ai.animationend.animation,delete Ai.animationiteration.animation,delete Ai.animationstart.animation),"TransitionEvent"in window||delete Ai.transitionend.transition);function zu(t){if(Wd[t])return Wd[t];if(!Ai[t])return t;var e=Ai[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in $w)return Wd[t]=e[r];return t}var Lw=zu("animationend"),Mw=zu("animationiteration"),Dw=zu("animationstart"),Fw=zu("transitionend"),Uw=new Map,ym="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 ds(t,e){Uw.set(t,e),ti(e,[t])}for(var Hd=0;Hd<ym.length;Hd++){var Vd=ym[Hd],bT=Vd.toLowerCase(),xT=Vd[0].toUpperCase()+Vd.slice(1);ds(bT,"on"+xT)}ds(Lw,"onAnimationEnd");ds(Mw,"onAnimationIteration");ds(Dw,"onAnimationStart");ds("dblclick","onDoubleClick");ds("focusin","onFocus");ds("focusout","onBlur");ds(Fw,"onTransitionEnd");co("onMouseEnter",["mouseout","mouseover"]);co("onMouseLeave",["mouseout","mouseover"]);co("onPointerEnter",["pointerout","pointerover"]);co("onPointerLeave",["pointerout","pointerover"]);ti("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ti("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ti("onBeforeInput",["compositionend","keypress","textInput","paste"]);ti("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ti("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ti("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var la="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(" "),ET=new Set("cancel close invalid load scroll toggle".split(" ").concat(la));function _m(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,bC(n,e,void 0,t),t.currentTarget=null}function Bw(t,e){e=(e&4)!==0;for(var r=0;r<t.length;r++){var n=t[r],s=n.event;n=n.listeners;e:{var i=void 0;if(e)for(var o=n.length-1;0<=o;o--){var a=n[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;_m(s,a,c),i=l}else for(o=0;o<n.length;o++){if(a=n[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;_m(s,a,c),i=l}}}if(zc)throw t=lf,zc=!1,lf=null,t}function Se(t,e){var r=e[yf];r===void 0&&(r=e[yf]=new Set);var n=t+"__bubble";r.has(n)||(zw(e,t,2,!1),r.add(n))}function qd(t,e,r){var n=0;e&&(n|=4),zw(r,t,n,e)}var Vl="_reactListening"+Math.random().toString(36).slice(2);function Va(t){if(!t[Vl]){t[Vl]=!0,Y_.forEach(function(r){r!=="selectionchange"&&(ET.has(r)||qd(r,!1,t),qd(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Vl]||(e[Vl]=!0,qd("selectionchange",!1,e))}}function zw(t,e,r,n){switch(kw(e)){case 1:var s=MC;break;case 4:s=DC;break;default:s=ig}r=s.bind(null,e,r,t),s=void 0,!af||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(s=!0),n?s!==void 0?t.addEventListener(e,r,{capture:!0,passive:s}):t.addEventListener(e,r,!0):s!==void 0?t.addEventListener(e,r,{passive:s}):t.addEventListener(e,r,!1)}function Kd(t,e,r,n,s){var i=n;
vendor: 2,645 bytes, line 37
37if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var o=n.tag;if(o===3||o===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=n.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=Os(a),o===null)return;if(l=o.tag,l===5||l===6){n=i=o;continue e}a=a.parentNode}}n=n.return}dw(function(){var c=i,u=tg(r),d=[];e:{var f=Uw.get(t);if(f!==void 0){var h=ag,y=t;switch(t){case"keypress":if(kc(r)===0)break e;case"keydown":case"keyup":h=ZC;break;case"focusin":y="focus",h=Ud;break;case"focusout":y="blur",h=Ud;break;case"beforeblur":case"afterblur":h=Ud;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":h=am;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=BC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=rT;break;case Lw:case Mw:case Dw:h=HC;break;case Fw:h=sT;break;case"scroll":h=FC;break;case"wheel":h=oT;break;case"copy":case"cut":case"paste":h=qC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=cm}var g=(e&4)!==0,w=!g&&t==="scroll",m=g?f!==null?f+"Capture":null:f;g=[];for(var v=c,_;v!==null;){_=v;var x=_.stateNode;if(_.tag===5&&x!==null&&(_=x,m!==null&&(x=Fa(v,m),x!=null&&g.push(qa(v,x,_)))),w)break;v=v.return}0<g.length&&(f=new h(f,y,null,r,u),d.push({event:f,listeners:g}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&r!==sf&&(y=r.relatedTarget||r.fromElement)&&(Os(y)||y[gn]))break e;if((h||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=r.relatedTarget||r.toElement,h=c,y=y?Os(y):null,y!==null&&(w=ri(y),y!==w||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=c),h!==y)){if(g=am,x="onMouseLeave",m="onMouseEnter",v="mouse",(t==="pointerout"||t==="pointerover")&&(g=cm,x="onPointerLeave",m="onPointerEnter",v="pointer"),w=h==null?f:ji(h),_=y==null?f:ji(y),f=new g(x,v+"leave",h,r,u),f.target=w,f.relatedTarget=_,x=null,Os(u)===c&&(g=new g(m,v+"enter",y,r,u),g.target=_,g.relatedTarget=w,x=g),w=x,h&&y)t:{for(g=h,m=y,v=0,_=g;_;_=hi(_))v++;for(_=0,x=m;x;x=hi(x))_++;for(;0<v-_;)g=hi(g),v--;for(;0<_-v;)m=hi(m),_--;for(;v--;){if(g===m||m!==null&&g===m.alternate)break t;g=hi(g),m=hi(m)}g=null}else g=null;h!==null&&wm(d,f,h,g,!1),y!==null&&w!==null&&wm(d,w,y,g,!0)}}
vendor: 7,582 bytes, lines 37-38
37e:{if(f=c?ji(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var E=fT;else if(hm(f))if(Ow)E=mT;else{E=gT;var k=pT}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=vT);if(E&&(E=E(t,c))){Nw(d,E,r,u);break e}k&&k(t,f,c),t==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&Zh(f,"number",f.value)}switch(k=c?ji(c):window,t){case"focusin":(hm(k)||k.contentEditable==="true")&&(Oi=k,hf=c,Ca=null);break;case"focusout":Ca=hf=Oi=null;break;case"mousedown":ff=!0;break;case"contextmenu":case"mouseup":case"dragend":ff=!1,mm(d,r,u);break;case"selectionchange":if(wT)break;case"keydown":case"keyup":mm(d,r,u)}var S;if(cg)e:{switch(t){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Ni?Pw(t,r)&&(C="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(Tw&&r.locale!=="ko"&&(Ni||C!=="onCompositionStart"?C==="onCompositionEnd"&&Ni&&(S=Cw()):(qn=u,og="value"in qn?qn.value:qn.textContent,Ni=!0)),k=Kc(c,C),0<k.length&&(C=new lm(C,t,null,r,u),d.push({event:C,listeners:k}),S?C.data=S:(S=Rw(r),S!==null&&(C.data=S)))),(S=lT?cT(t,r):uT(t,r))&&(c=Kc(c,"onBeforeInput"),0<c.length&&(u=new lm("onBeforeInput","beforeinput",null,r,u),d.push({event:u,listeners:c}),u.data=S))}Bw(d,e)})}function qa(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Kc(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Fa(t,r),i!=null&&n.unshift(qa(t,i,s)),i=Fa(t,e),i!=null&&n.push(qa(t,i,s))),t=t.return}return n}function hi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function wm(t,e,r,n,s){for(var i=e._reactName,o=[];r!==null&&r!==n;){var a=r,l=a.alternate,c=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&c!==null&&(a=c,s?(l=Fa(r,i),l!=null&&o.unshift(qa(r,l,a))):s||(l=Fa(r,i),l!=null&&o.push(qa(r,l,a)))),r=r.return}o.length!==0&&t.push({event:e,listeners:o})}var ST=/\r\n?/g,kT=/\u0000|\uFFFD/g;function bm(t){return(typeof t=="string"?t:""+t).replace(ST,`
38`).replace(kT,"")}function ql(t,e,r){if(e=bm(e),bm(t)!==e&&r)throw Error(I(425))}function Gc(){}var pf=null,gf=null;function vf(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var mf=typeof setTimeout=="function"?setTimeout:void 0,CT=typeof clearTimeout=="function"?clearTimeout:void 0,xm=typeof Promise=="function"?Promise:void 0,TT=typeof queueMicrotask=="function"?queueMicrotask:typeof xm<"u"?function(t){return xm.resolve(null).then(t).catch(PT)}:mf;function PT(t){setTimeout(function(){throw t})}function Gd(t,e){var r=e,n=0;do{var s=r.nextSibling;if(t.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){t.removeChild(s),za(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);za(e)}function Zn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function Em(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="$"||r==="$!"||r==="$?"){if(e===0)return t;e--}else r==="/$"&&e++}t=t.previousSibling}return null}var Po=Math.random().toString(36).slice(2),$r="__reactFiber$"+Po,Ka="__reactProps$"+Po,gn="__reactContainer$"+Po,yf="__reactEvents$"+Po,RT="__reactListeners$"+Po,NT="__reactHandles$"+Po;function Os(t){var e=t[$r];if(e)return e;for(var r=t.parentNode;r;){if(e=r[gn]||r[$r]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=Em(t);t!==null;){if(r=t[$r])return r;t=Em(t)}return e}t=r,r=t.parentNode}return null}function kl(t){return t=t[$r]||t[gn],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ji(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(I(33))}function Wu(t){return t[Ka]||null}var _f=[],Ii=-1;function hs(t){return{current:t}}function Ce(t){0>Ii||(t.current=_f[Ii],_f[Ii]=null,Ii--)}function be(t,e){Ii++,_f[Ii]=t.current,t.current=e}var ls={},pt=hs(ls),Rt=hs(!1),Vs=ls;function uo(t,e){var r=t.type.contextTypes;if(!r)return ls;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=e[i];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Nt(t){return t=t.childContextTypes,t!=null}function Yc(){Ce(Rt),Ce(pt)}function Sm(t,e,r){if(pt.current!==ls)throw Error(I(168));be(pt,e),be(Rt,r)}function Ww(t,e,r){var n=t.stateNode;if(e=e.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in e))throw Error(I(108,pC(t)||"Unknown",s));return Ae({},r,n)}function Jc(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||ls,Vs=pt.current,be(pt,t),be(Rt,Rt.current),!0}function km(t,e,r){var n=t.stateNode;if(!n)throw Error(I(169));r?(t=Ww(t,e,Vs),n.__reactInternalMemoizedMergedChildContext=t,Ce(Rt),Ce(pt),be(pt,t)):Ce(Rt),be(Rt,r)}var nn=null,Hu=!1,Yd=!1;function Hw(t){nn===null?nn=[t]:nn.push(t)}function OT(t){Hu=!0,Hw(t)}function fs(){if(!Yd&&nn!==null){Yd=!0;var t=0,e=ge;try{var r=nn;for(ge=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}nn=null,Hu=!1}catch(s){throw nn!==null&&(nn=nn.slice(t+1)),gw(rg,fs),s}finally{ge=e,Yd=!1}}return null}var $i=[],Li=0,Qc=null,Xc=0,Yt=[],Jt=0,qs=null,an=1,ln="";function ks(t,e){$i[Li++]=Xc,$i[Li++]=Qc,Qc=t,Xc=e}function Vw(t,e,r){Yt[Jt++]=an,Yt[Jt++]=ln,Yt[Jt++]=qs,qs=t;var n=an;t=ln;var s=32-vr(n)-1;n&=~(1<<s),r+=1;var i=32-vr(e)+s;if(30<i){var o=s-s%5;i=(n&(1<<o)-1).toString(32),n>>=o,s-=o,an=1<<32-vr(e)+s|r<<s|n,ln=i+t}else an=1<<i|r<<s|n,ln=t}function dg(t){t.return!==null&&(ks(t,1),Vw(t,1,0))}function hg(t){for(;t===Qc;)Qc=$i[--Li],$i[Li]=null,Xc=$i[--Li],$i[Li]=null;for(;t===qs;)qs=Yt[--Jt],Yt[Jt]=null,ln=Yt[--Jt],Yt[Jt]=null,an=Yt[--Jt],Yt[Jt]=null}var Dt=null,Lt=null,Pe=!1,gr=null;function qw(t,e){var r=Qt(5,null,null,0);r.elementType="DELETED",r.stateNode=e,r.return=t,e=t.deletions,e===null?(t.deletions=[r],t.flags|=16):e.push(r)}function Cm(t,e){switch(t.tag){case 5:var r=t.type;return e=e.nodeType!==1||r.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Dt=t,Lt=Zn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Dt=t,Lt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=qs!==null?{id:an,overflow:ln}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=Qt(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,Dt=t,Lt=null,!0):!1;default:return!1}}function wf(t){return(t.mode&1)!==0&&(t.flags&128)===0}function bf(t){if(Pe){var e=Lt;if(e){var r=e;if(!Cm(t,e)){if(wf(t))throw Error(I(418));e=Zn(r.nextSibling);var n=Dt;e&&Cm(t,e)?qw(n,r):(t.flags=t.flags&-4097|2,Pe=!1,Dt=t)}}else{if(wf(t))throw Error(I(418));t.flags=t.flags&-4097|2,Pe=!1,Dt=t}}}function Tm(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Dt=t}function Kl(t){if(t!==Dt)return!1;if(!Pe)return Tm(t),Pe=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!vf(t.type,t.memoizedProps)),e&&(e=Lt)){if(wf(t))throw Kw(),Error(I(418));for(;e;)qw(t,e),e=Zn(e.nextSibling)}if(Tm(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(I(317)
vendor: 12,508 bytes, line 38
38);e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){Lt=Zn(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}Lt=null}}else Lt=Dt?Zn(t.stateNode.nextSibling):null;return!0}function Kw(){for(var t=Lt;t;)t=Zn(t.nextSibling)}function ho(){Lt=Dt=null,Pe=!1}function fg(t){gr===null?gr=[t]:gr.push(t)}var AT=wn.ReactCurrentBatchConfig;function Wo(t,e,r){if(t=r.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(I(309));var n=r.stateNode}if(!n)throw Error(I(147,t));var s=n,i=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===i?e.ref:(e=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},e._stringRef=i,e)}if(typeof t!="string")throw Error(I(284));if(!r._owner)throw Error(I(290,t))}return t}function Gl(t,e){throw t=Object.prototype.toString.call(e),Error(I(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Pm(t){var e=t._init;return e(t._payload)}function Gw(t){function e(m,v){if(t){var _=m.deletions;_===null?(m.deletions=[v],m.flags|=16):_.push(v)}}function r(m,v){if(!t)return null;for(;v!==null;)e(m,v),v=v.sibling;return null}function n(m,v){for(m=new Map;v!==null;)v.key!==null?m.set(v.key,v):m.set(v.index,v),v=v.sibling;return m}function s(m,v){return m=ns(m,v),m.index=0,m.sibling=null,m}function i(m,v,_){return m.index=_,t?(_=m.alternate,_!==null?(_=_.index,_<v?(m.flags|=2,v):_):(m.flags|=2,v)):(m.flags|=1048576,v)}function o(m){return t&&m.alternate===null&&(m.flags|=2),m}function a(m,v,_,x){return v===null||v.tag!==6?(v=rh(_,m.mode,x),v.return=m,v):(v=s(v,_),v.return=m,v)}function l(m,v,_,x){var E=_.type;return E===Ri?u(m,v,_.props.children,x,_.key):v!==null&&(v.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===$n&&Pm(E)===v.type)?(x=s(v,_.props),x.ref=Wo(m,v,_),x.return=m,x):(x=Ac(_.type,_.key,_.props,null,m.mode,x),x.ref=Wo(m,v,_),x.return=m,x)}function c(m,v,_,x){return v===null||v.tag!==4||v.stateNode.containerInfo!==_.containerInfo||v.stateNode.implementation!==_.implementation?(v=nh(_,m.mode,x),v.return=m,v):(v=s(v,_.children||[]),v.return=m,v)}function u(m,v,_,x,E){return v===null||v.tag!==7?(v=zs(_,m.mode,x,E),v.return=m,v):(v=s(v,_),v.return=m,v)}function d(m,v,_){if(typeof v=="string"&&v!==""||typeof v=="number")return v=rh(""+v,m.mode,_),v.return=m,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ml:return _=Ac(v.type,v.key,v.props,null,m.mode,_),_.ref=Wo(m,null,v),_.return=m,_;case Pi:return v=nh(v,m.mode,_),v.return=m,v;case $n:var x=v._init;return d(m,x(v._payload),_)}if(oa(v)||Do(v))return v=zs(v,m.mode,_,null),v.return=m,v;Gl(m,v)}return null}function f(m,v,_,x){var E=v!==null?v.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return E!==null?null:a(m,v,""+_,x);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ml:return _.key===E?l(m,v,_,x):null;case Pi:return _.key===E?c(m,v,_,x):null;case $n:return E=_._init,f(m,v,E(_._payload),x)}if(oa(_)||Do(_))return E!==null?null:u(m,v,_,x,null);Gl(m,_)}return null}function h(m,v,_,x,E){if(typeof x=="string"&&x!==""||typeof x=="number")return m=m.get(_)||null,a(v,m,""+x,E);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ml:return m=m.get(x.key===null?_:x.key)||null,l(v,m,x,E);case Pi:return m=m.get(x.key===null?_:x.key)||null,c(v,m,x,E);case $n:var k=x._init;return h(m,v,_,k(x._payload),E)}if(oa(x)||Do(x))return m=m.get(_)||null,u(v,m,x,E,null);Gl(v,x)}return null}function y(m,v,_,x){for(var E=null,k=null,S=v,C=v=0,N=null;S!==null&&C<_.length;C++){S.index>C?(N=S,S=null):N=S.sibling;var A=f(m,S,_[C],x);if(A===null){S===null&&(S=N);break}t&&S&&A.alternate===null&&e(m,S),v=i(A,v,C),k===null?E=A:k.sibling=A,k=A,S=N}if(C===_.length)return r(m,S),Pe&&ks(m,C),E;if(S===null){for(;C<_.length;C++)S=d(m,_[C],x),S!==null&&(v=i(S,v,C),k===null?E=S:k.sibling=S,k=S);return Pe&&ks(m,C),E}for(S=n(m,S);C<_.length;C++)N=h(S,m,C,_[C],x),N!==null&&(t&&N.alternate!==null&&S.delete(N.key===null?C:N.key),v=i(N,v,C),k===null?E=N:k.sibling=N,k=N);return t&&S.forEach(function(H){return e(m,H)}),Pe&&ks(m,C),E}function g(m,v,_,x){var E=Do(_);if(typeof E!="function")throw Error(I(150));if(_=E.call(_),_==null)throw Error(I(151));for(var k=E=null,S=v,C=v=0,N=null,A=_.next();S!==null&&!A.done;C++,A=_.next()){S.index>C?(N=S,S=null):N=S.sibling;var H=f(m,S,A.value,x);if(H===null){S===null&&(S=N);break}t&&S&&H.alternate===null&&e(m,S),v=i(H,v,C),k===null?E=H:k.sibling=H,k=H,S=N}if(A.done)return r(m,S),Pe&&ks(m,C),E;if(S===null){for(;!A.done;C++,A=_.next())A=d(m,A.value,x),A!==null&&(v=i(A,v,C),k===null?E=A:k.sibling=A,k=A);return Pe&&ks(m,C),E}for(S=n(m,S);!A.done;C++,A=_.next())A=h(S,m,C,A.value,x),A!==null&&(t&&A.alternate!==null&&S.delete(A.key===null?C:A.key),v=i(A,v,C),k===null?E=A:k.sibling=A,k=A);return t&&S.forEach(function(L){return e(m,L)}),Pe&&ks(m,C),E}function w(m,v,_,x){if(typeof _=="object"&&_!==null&&_.type===Ri&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Ml:e:{for(var E=_.key,k=v;k!==null;){if(k.key===E){if(E=_.type,E===Ri){if(k.tag===7){r(m,k.sibling),v=s(k,_.props.children),v.return=m,m=v;break e}}else if(k.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===$n&&Pm(E)===k.type){r(m,k.sibling),v=s(k,_.props),v.ref=Wo(m,k,_),v.return=m,m=v;break e}r(m,k);break}else e(m,k);k=k.sibling}_.type===Ri?(v=zs(_.props.children,m.mode,x,_.key),v.return=m,m=v):(x=Ac(_.type,_.key,_.props,null,m.mode,x),x.ref=Wo(m,v,_),x.return=m,m=x)}return o(m);case Pi:e:{for(k=_.key;v!==null;){if(v.key===k)if(v.tag===4&&v.stateNode.containerInfo===_.containerInfo&&v.stateNode.implementation===_.implementation){r(m,v.sibling),v=s(v,_.children||[]),v.return=m,m=v;break e}else{r(m,v);break}else e(m,v);v=v.sibling}v=nh(_,m.mode,x),v.return=m,m=v}return o(m);case $n:return k=_._init,w(m,v,k(_._payload),x)}if(oa(_))return y(m,v,_,x);if(Do(_))return g(m,v,_,x);Gl(m,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,v!==null&&v.tag===6?(r(m,v.sibling),v=s(v,_),v.return=m,m=v):(r(m,v),v=rh(_,m.mode,x),v.return=m,m=v),o(m)):r(m,v)}return w}var fo=Gw(!0),Yw=Gw(!1),Zc=hs(null),eu=null,Mi=null,pg=null;function gg(){pg=Mi=eu=null}function vg(t){var e=Zc.current;Ce(Zc),t._currentValue=e}function xf(t,e,r){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===r)break;t=t.return}}function Ki(t,e){eu=t,pg=Mi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(Tt=!0),t.firstContext=null)}function er(t){var e=t._currentValue;if(pg!==t)if(t={context:t,memoizedValue:e,next:null},Mi===null){if(eu===null)throw Error(I(308));Mi=t,eu.dependencies={lanes:0,firstContext:t}}else Mi=Mi.next=t;return e}var As=null;function mg(t){As===null?As=[t]:As.push(t)}function Jw(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,mg(e)):(r.next=s.next,s.next=r),e.interleaved=r,vn(t,n)}function vn(t,e){t.lanes|=e;var r=t.alternate;for(r!==null&&(r.lanes|=e),r=t,t=t.return;t!==null;)t.childLanes|=e,r=t.alternate,r!==null&&(r.childLanes|=e),r=t,t=t.return;return r.tag===3?r.stateNode:null}var Ln=!1;function yg(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qw(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function hn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function es(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ce&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,vn(t,r)}return s=n.interleaved,s===null?(e.next=e,mg(n)):(e.next=s.next,s.next=e),n.interleaved=e,vn(t,r)}function Cc(t,e,r){if(e=e.updateQueue,e!==null&&(e=e.shared,(r&4194240)!==0)){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,ng(t,r)}}function Rm(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var o={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=o:i=i.next=o,r=r.next}while(r!==null);i===null?s=i=e:i=i.next=e}else s=i=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},t.updateQueue=r;return}t=r.lastBaseUpdate,t===null?r.firstBaseUpdate=e:t.next=e,r.lastBaseUpdate=e}function tu(t,e,r,n){var s=t.updateQueue;Ln=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==o&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,u=c=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((n&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=t,g=a;switch(f=e,h=r,g.tag){case 1:if(y=g.payload,typeof y=="function"){d=y.call(h,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=g.payload,f=typeof y=="function"?y.call(h,d,f):y,f==null)break e;d=Ae({},d,f);break e;case 2:Ln=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,o|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(u===null&&(l=d),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do o|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Gs|=o,t.lanes=o,t.memoizedState=d}}function Nm(t,e,r){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var n=t[e],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(I(191,s));s.call(n)}}}var Cl={},zr=hs(Cl),Ga=hs(Cl),Ya=hs(Cl);function js(t){if(t===Cl)throw Error(I(174));return t}function _g(t,e){switch(be(Ya,e),be(Ga,t),be(zr,Cl),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:tf(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=tf(e,t)}Ce(zr),be(zr,e)}function po(){Ce(zr),Ce(Ga),Ce(Ya)}function Xw(t){js(Ya.current);var e=js(zr.current),r=tf(e,t.type);e!==r&&(be(Ga,t),be(zr,r))}function wg(t){Ga.current===t&&(Ce(zr),Ce(Ga))}var Re=hs(0);function ru(t){for(var e=t;e!==null;){if(e.tag===13){var r=e.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Jd=[];function bg(){for(var t=0;t<Jd.length;t++)Jd[t]._workInProgressVersionPrimary=null;Jd.length=0}var Tc=wn.ReactCurrentDispatcher,Qd=wn.ReactCurrentBatchConfig,Ks=0,Oe=null,Ge=null,Je=null,nu=!1,Ta=!1,Ja=0,jT=0;function ct(){throw Error(I(321))}function xg(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!yr(t[r],e[r]))return!1;return!0}function Eg(t,e,r,n,s,i){if(Ks=i,Oe=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Tc.current=t===null||t.memoizedState===null?MT:DT,t=r(n,s),Ta){i=0;do{if(Ta=!1,Ja=0,25<=i)throw Error(I(301));i+=1,Je=Ge=null,e.updateQueue=null,Tc.current=FT,t=r(n,s)}while(Ta)}if(Tc.current=su,e=Ge!==null&&Ge.next!==null,Ks=0,Je=Ge=Oe=null,nu=!1,e)throw Error(I(300));return t}function Sg(){var t=Ja!==0;return Ja=0,t}function Rr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Je===null?Oe.memoizedState=Je=t:Je=Je.next=t,Je}function tr(){if(Ge===null){var t=Oe.alternate;t=t!==null?t.memoizedState:null}else t=Ge.next;var e=Je===null?Oe.memoizedState:Je.next;if(e!==null)Je=e,Ge=t;else{if(t===null)throw Error(I(310));Ge=t,t={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},Je===null?Oe.memoizedState=Je=t:Je=Je.next=t}return Je}function Qa(t,e){return typeof e=="function"?e(t):e}function Xd(t){var e=tr(),r=e.queue;if(r===null)throw Error(I(311));r.lastRenderedReducer=t;
vendor: 6,708 bytes, line 38
38var n=Ge,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var a=o=null,l=null,c=i;do{var u=c.lane;if((Ks&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),n=c.hasEagerState?c.eagerState:t(n,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=d,o=n):l=l.next=d,Oe.lanes|=u,Gs|=u}c=c.next}while(c!==null&&c!==i);l===null?o=n:l.next=a,yr(n,e.memoizedState)||(Tt=!0),e.memoizedState=n,e.baseState=o,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do i=s.lane,Oe.lanes|=i,Gs|=i,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);return[e.memoizedState,r.dispatch]}function Zd(t){var e=tr(),r=e.queue;if(r===null)throw Error(I(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,i=e.memoizedState;if(s!==null){r.pending=null;var o=s=s.next;do i=t(i,o.action),o=o.next;while(o!==s);yr(i,e.memoizedState)||(Tt=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),r.lastRenderedState=i}return[i,n]}function Zw(){}function eb(t,e){var r=Oe,n=tr(),s=e(),i=!yr(n.memoizedState,s);if(i&&(n.memoizedState=s,Tt=!0),n=n.queue,kg(nb.bind(null,r,n,t),[t]),n.getSnapshot!==e||i||Je!==null&&Je.memoizedState.tag&1){if(r.flags|=2048,Xa(9,rb.bind(null,r,n,s,e),void 0,null),Qe===null)throw Error(I(349));Ks&30||tb(r,e,s)}return s}function tb(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Oe.updateQueue,e===null?(e={lastEffect:null,stores:null},Oe.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function rb(t,e,r,n){e.value=r,e.getSnapshot=n,sb(e)&&ib(t)}function nb(t,e,r){return r(function(){sb(e)&&ib(t)})}function sb(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!yr(t,r)}catch{return!0}}function ib(t){var e=vn(t,1);e!==null&&mr(e,t,1,-1)}function Om(t){var e=Rr();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qa,lastRenderedState:t},e.queue=t,t=t.dispatch=LT.bind(null,Oe,t),[e.memoizedState,t]}function Xa(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Oe.updateQueue,e===null?(e={lastEffect:null,stores:null},Oe.updateQueue=e,e.lastEffect=t.next=t):(r=e.lastEffect,r===null?e.lastEffect=t.next=t:(n=r.next,r.next=t,t.next=n,e.lastEffect=t)),t}function ob(){return tr().memoizedState}function Pc(t,e,r,n){var s=Rr();Oe.flags|=t,s.memoizedState=Xa(1|e,r,void 0,n===void 0?null:n)}function Vu(t,e,r,n){var s=tr();n=n===void 0?null:n;var i=void 0;if(Ge!==null){var o=Ge.memoizedState;if(i=o.destroy,n!==null&&xg(n,o.deps)){s.memoizedState=Xa(e,r,i,n);return}}Oe.flags|=t,s.memoizedState=Xa(1|e,r,i,n)}function Am(t,e){return Pc(8390656,8,t,e)}function kg(t,e){return Vu(2048,8,t,e)}function ab(t,e){return Vu(4,2,t,e)}function lb(t,e){return Vu(4,4,t,e)}function cb(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function ub(t,e,r){return r=r!=null?r.concat([t]):null,Vu(4,4,cb.bind(null,e,t),r)}function Cg(){}function db(t,e){var r=tr();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&xg(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function hb(t,e){var r=tr();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&xg(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function fb(t,e,r){return Ks&21?(yr(r,e)||(r=yw(),Oe.lanes|=r,Gs|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,Tt=!0),t.memoizedState=r)}function IT(t,e){var r=ge;ge=r!==0&&4>r?r:4,t(!0);var n=Qd.transition;Qd.transition={};try{t(!1),e()}finally{ge=r,Qd.transition=n}}function pb(){return tr().memoizedState}function $T(t,e,r){var n=rs(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},gb(t))vb(e,r);else if(r=Jw(t,e,r,n),r!==null){var s=_t();mr(r,t,n,s),mb(r,e,n)}}function LT(t,e,r){var n=rs(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(gb(t))vb(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,a=i(o,r);if(s.hasEagerState=!0,s.eagerState=a,yr(a,o)){var l=e.interleaved;l===null?(s.next=s,mg(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=Jw(t,e,s,n),r!==null&&(s=_t(),mr(r,t,n,s),mb(r,e,n))}}function gb(t){var e=t.alternate;return t===Oe||e!==null&&e===Oe}function vb(t,e){Ta=nu=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function mb(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,ng(t,r)}}var su={readContext:er,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useInsertionEffect:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useDeferredValue:ct,useTransition:ct,useMutableSource:ct,useSyncExternalStore:ct,useId:ct,unstable_isNewReconciler:!1},MT={readContext:er,useCallback:function(t,e){return Rr().memoizedState=[t,e===void 0?null:e],t},useContext:er,useEffect:Am,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,Pc(4194308,4,cb.bind(null,e,t),r)},useLayoutEffect:function(t,e){return Pc(4194308,4,t,e)},useInsertionEffect:function(t,e){return Pc(4,2,t,e)},useMemo:function(t,e){var r=Rr();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=Rr();return e=r!==void 0?r(e):e,n.memoizedState=n.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},n.queue=t,t=t.dispatch=$T.bind(null,Oe,t),[n.memoizedState,t]},useRef:function(t){var e=Rr();return t={current:t},e.memoizedState=t},useState:Om,useDebugValue:Cg,useDeferredValue:function(t){return Rr().memoizedState=t},useTransition:function(){var t=Om(!1),e=t[0];return t=IT.bind(null,t[1]),Rr().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Oe,s=Rr();if(Pe){if(r===void 0)throw Error(I(407));r=r()}else{if(r=e(),Qe===null)throw Error(I(349));Ks&30||tb(n,e,r)}s.memoizedState=r;var i={value:r,getSnapshot:e};return s.queue=i,Am(nb.bind(null,n,i,t),[t]),n.flags|=2048,Xa(9,rb.bind(null,n,i,r,e),void 0,null),r},useId:function(){var t=Rr(),e=Qe.identifierPrefix;if(Pe){var r=ln,n=an;r=(n&~(1<<32-vr(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Ja++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=jT++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},DT={readContext:er,useCallback:db,useContext:er,useEffect:kg,useImperativeHandle:ub,useInsertionEffect:ab,useLayoutEffect:lb,useMemo:hb,useReducer:Xd,useRef
vendor: 4,902 bytes, lines 38-40
38:ob,useState:function(){return Xd(Qa)},useDebugValue:Cg,useDeferredValue:function(t){var e=tr();return fb(e,Ge.memoizedState,t)},useTransition:function(){var t=Xd(Qa)[0],e=tr().memoizedState;return[t,e]},useMutableSource:Zw,useSyncExternalStore:eb,useId:pb,unstable_isNewReconciler:!1},FT={readContext:er,useCallback:db,useContext:er,useEffect:kg,useImperativeHandle:ub,useInsertionEffect:ab,useLayoutEffect:lb,useMemo:hb,useReducer:Zd,useRef:ob,useState:function(){return Zd(Qa)},useDebugValue:Cg,useDeferredValue:function(t){var e=tr();return Ge===null?e.memoizedState=t:fb(e,Ge.memoizedState,t)},useTransition:function(){var t=Zd(Qa)[0],e=tr().memoizedState;return[t,e]},useMutableSource:Zw,useSyncExternalStore:eb,useId:pb,unstable_isNewReconciler:!1};function lr(t,e){if(t&&t.defaultProps){e=Ae({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Ef(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:Ae({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var qu={isMounted:function(t){return(t=t._reactInternals)?ri(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=_t(),s=rs(t),i=hn(n,s);i.payload=e,r!=null&&(i.callback=r),e=es(t,i,s),e!==null&&(mr(e,t,s,n),Cc(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=_t(),s=rs(t),i=hn(n,s);i.tag=1,i.payload=e,r!=null&&(i.callback=r),e=es(t,i,s),e!==null&&(mr(e,t,s,n),Cc(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=_t(),n=rs(t),s=hn(r,n);s.tag=2,e!=null&&(s.callback=e),e=es(t,s,n),e!==null&&(mr(e,t,n,r),Cc(e,t,n))}};function jm(t,e,r,n,s,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,o):e.prototype&&e.prototype.isPureReactComponent?!Ha(r,n)||!Ha(s,i):!0}function yb(t,e,r){var n=!1,s=ls,i=e.contextType;return typeof i=="object"&&i!==null?i=er(i):(s=Nt(e)?Vs:pt.current,n=e.contextTypes,i=(n=n!=null)?uo(t,s):ls),e=new e(r,i),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=qu,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=i),e}function Im(t,e,r,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(r,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(r,n),e.state!==t&&qu.enqueueReplaceState(e,e.state,null)}function Sf(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},yg(t);var i=e.contextType;typeof i=="object"&&i!==null?s.context=er(i):(i=Nt(e)?Vs:pt.current,s.context=uo(t,i)),s.state=t.memoizedState,i=e.getDerivedStateFromProps,typeof i=="function"&&(Ef(t,e,i,r),s.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(e=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),e!==s.state&&qu.enqueueReplaceState(s,s.state,null),tu(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function go(t,e){try{var r="",n=e;do r+=fC(n),n=n.return;while(n);var s=r}catch(i){s=`
39Error generating stack: `+i.message+`
40`+i.stack}return{value:t,source:e,stack:s,digest:null}}function eh(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function kf(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var UT=typeof WeakMap=="function"?WeakMap:Map;function _b(t,e,r){r=hn(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){ou||(ou=!0,$f=n),kf(t,e)},r}function wb(t,e,r){r=hn(-1,r),r.tag=3;var n=t.type.getDerivedStateFromError;if(typeof n=="function"){var s=e.value;r.payload=function(){return n(s)},r.callback=function(){kf(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){kf(t,e),typeof n!="function"&&(ts===null?ts=new Set([this]):ts.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),r}function $m(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new UT;var s=new Set;n.set(e,s)}else s=n.get(e),s===void 0&&(s=new Set,n.set(e,s));s.has(r)||(s.add(r),t=eP.bind(null,t,e,r),e.then(t,t))}function Lm(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Mm(t,e,r,n,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(e=hn(-1,1),e.tag=2,es(r,e,1))),r.lanes|=1),t)}var BT=wn.ReactCurrentOwner,Tt=!1;function mt(t,e,r,n){e.child=t===null?Yw(e,null,r,n):fo(e,t.child,r,n)}function Dm(t,e,r,n,s){r=r.render;var i=e.ref;
vendor: 6,220 bytes, line 40
40return Ki(e,s),n=Eg(t,e,r,n,i,s),r=Sg(),t!==null&&!Tt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,mn(t,e,s)):(Pe&&r&&dg(e),e.flags|=1,mt(t,e,n,s),e.child)}function Fm(t,e,r,n,s){if(t===null){var i=r.type;return typeof i=="function"&&!Ig(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=i,bb(t,e,i,n,s)):(t=Ac(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var o=i.memoizedProps;if(r=r.compare,r=r!==null?r:Ha,r(o,n)&&t.ref===e.ref)return mn(t,e,s)}return e.flags|=1,t=ns(i,n),t.ref=e.ref,t.return=e,e.child=t}function bb(t,e,r,n,s){if(t!==null){var i=t.memoizedProps;if(Ha(i,n)&&t.ref===e.ref)if(Tt=!1,e.pendingProps=n=i,(t.lanes&s)!==0)t.flags&131072&&(Tt=!0);else return e.lanes=t.lanes,mn(t,e,s)}return Cf(t,e,r,n,s)}function xb(t,e,r){var n=e.pendingProps,s=n.children,i=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},be(Fi,jt),jt|=r;else{if(!(r&1073741824))return t=i!==null?i.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,be(Fi,jt),jt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,be(Fi,jt),jt|=n}else i!==null?(n=i.baseLanes|r,e.memoizedState=null):n=r,be(Fi,jt),jt|=n;return mt(t,e,s,r),e.child}function Eb(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function Cf(t,e,r,n,s){var i=Nt(r)?Vs:pt.current;return i=uo(e,i),Ki(e,s),r=Eg(t,e,r,n,i,s),n=Sg(),t!==null&&!Tt?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,mn(t,e,s)):(Pe&&n&&dg(e),e.flags|=1,mt(t,e,r,s),e.child)}function Um(t,e,r,n,s){if(Nt(r)){var i=!0;Jc(e)}else i=!1;if(Ki(e,s),e.stateNode===null)Rc(t,e),yb(e,r,n),Sf(e,r,n,s),n=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,c=r.contextType;typeof c=="object"&&c!==null?c=er(c):(c=Nt(r)?Vs:pt.current,c=uo(e,c));var u=r.getDerivedStateFromProps,d=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==n||l!==c)&&Im(e,o,n,c),Ln=!1;var f=e.memoizedState;o.state=f,tu(e,n,o,s),l=e.memoizedState,a!==n||f!==l||Rt.current||Ln?(typeof u=="function"&&(Ef(e,r,u,n),l=e.memoizedState),(a=Ln||jm(e,r,a,n,f,l,c))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),o.props=n,o.state=l,o.context=c,n=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{o=e.stateNode,Qw(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:lr(e.type,a),o.props=c,d=e.pendingProps,f=o.context,l=r.contextType,typeof l=="object"&&l!==null?l=er(l):(l=Nt(r)?Vs:pt.current,l=uo(e,l));var h=r.getDerivedStateFromProps;(u=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Im(e,o,n,l),Ln=!1,f=e.memoizedState,o.state=f,tu(e,n,o,s);var y=e.memoizedState;a!==d||f!==y||Rt.current||Ln?(typeof h=="function"&&(Ef(e,r,h,n),y=e.memoizedState),(c=Ln||jm(e,r,c,n,f,y,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(n,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(n,y,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=y),o.props=n,o.state=y,o.context=l,n=c):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),n=!1)}return Tf(t,e,r,n,i,s)}function Tf(t,e,r,n,s,i){Eb(t,e);var o=(e.flags&128)!==0;if(!n&&!o)return s&&km(e,r,!1),mn(t,e,i);n=e.stateNode,BT.current=e;var a=o&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&o?(e.child=fo(e,t.child,null,i),e.child=fo(e,null,a,i)):mt(t,e,a,i),e.memoizedState=n.state,s&&km(e,r,!0),e.child}function Sb(t){var e=t.stateNode;e.pendingContext?Sm(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Sm(t,e.context,!1),_g(t,e.containerInfo)}function Bm(t,e,r,n,s){return ho(),fg(s),e.flags|=256,mt(t,e,r,n),e.child}var Pf={dehydrated:null,treeContext:null,retryLane:0};function Rf(t){return{baseLanes:t,cachePool:null,transitions:null}}function kb(t,e,r){var n=e.pendingProps,s=Re.current,i=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),be(Re,s&1),t===null)return bf(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=n.children,t=n.fallback,i?(n=e.mode,i=e.child,o={mode:"hidden",children:o},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Yu(o,n,0,null),t=zs(t,n,r,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=Rf(r),e.memoizedState=Pf,t):Tg(e,o));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return zT(t,e,o,n,a,s,r);if(i){i=n.fallback,o=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(o&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=ns(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=ns(a,i):(i=zs(i,o,r,null),i.flags|=2),i.return=e,n.return=e,n.sibling=i,e.child=n,n=i,i=e.child,o=t.child.memoizedState,o=o===null?Rf(r):{base
vendor: 7,716 bytes, line 40
40Lanes:o.baseLanes|r,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=t.childLanes&~r,e.memoizedState=Pf,n}return i=t.child,t=i.sibling,n=ns(i,{mode:"visible",children:n.children}),!(e.mode&1)&&(n.lanes=r),n.return=e,n.sibling=null,t!==null&&(r=e.deletions,r===null?(e.deletions=[t],e.flags|=16):r.push(t)),e.child=n,e.memoizedState=null,n}function Tg(t,e){return e=Yu({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Yl(t,e,r,n){return n!==null&&fg(n),fo(e,t.child,null,r),t=Tg(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function zT(t,e,r,n,s,i,o){if(r)return e.flags&256?(e.flags&=-257,n=eh(Error(I(422))),Yl(t,e,o,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=n.fallback,s=e.mode,n=Yu({mode:"visible",children:n.children},s,0,null),i=zs(i,s,o,null),i.flags|=2,n.return=e,i.return=e,n.sibling=i,e.child=n,e.mode&1&&fo(e,t.child,null,o),e.child.memoizedState=Rf(o),e.memoizedState=Pf,i);if(!(e.mode&1))return Yl(t,e,o,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,i=Error(I(419)),n=eh(i,n,void 0),Yl(t,e,o,n)}if(a=(o&t.childLanes)!==0,Tt||a){if(n=Qe,n!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,vn(t,s),mr(n,t,s,-1))}return jg(),n=eh(Error(I(421))),Yl(t,e,o,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=tP.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,Lt=Zn(s.nextSibling),Dt=e,Pe=!0,gr=null,t!==null&&(Yt[Jt++]=an,Yt[Jt++]=ln,Yt[Jt++]=qs,an=t.id,ln=t.overflow,qs=e),e=Tg(e,n.children),e.flags|=4096,e)}function zm(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),xf(t.return,e,r)}function th(t,e,r,n,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function Cb(t,e,r){var n=e.pendingProps,s=n.revealOrder,i=n.tail;if(mt(t,e,n.children,r),n=Re.current,n&2)n=n&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&zm(t,r,e);else if(t.tag===19)zm(t,r,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}n&=1}if(be(Re,n),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(r=e.child,s=null;r!==null;)t=r.alternate,t!==null&&ru(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),th(e,!1,s,r,i);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&ru(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}th(e,!0,r,null,i);break;case"together":th(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Rc(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function mn(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),Gs|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(I(153));if(e.child!==null){for(t=e.child,r=ns(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=ns(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function WT(t,e,r){switch(e.tag){case 3:Sb(e),ho();break;case 5:Xw(e);break;case 1:Nt(e.type)&&Jc(e);break;case 4:_g(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;be(Zc,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(be(Re,Re.current&1),e.flags|=128,null):r&e.child.childLanes?kb(t,e,r):(be(Re,Re.current&1),t=mn(t,e,r),t!==null?t.sibling:null);be(Re,Re.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return Cb(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),be(Re,Re.current),n)break;return null;case 22:case 23:return e.lanes=0,xb(t,e,r)}return mn(t,e,r)}var Tb,Nf,Pb,Rb;Tb=function(t,e){for(var r=e.child;r!==null;){if(r.tag===5||r.tag===6)t.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break;for(;r.sibling===null;){if(r.return===null||r.return===e)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Nf=function(){};Pb=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,js(zr.current);var i=null;switch(r){case"input":s=Qh(t,s),n=Qh(t,n),i=[];break;case"select":s=Ae({},s,{value:void 0}),n=Ae({},n,{value:void 0}),i=[];break;case"textarea":s=ef(t,s),n=ef(t,n),i=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=Gc)}rf(r,n);var o;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(r||(r={}),r[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ma.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in n){var l=n[c];if(a=s!=null?s[c]:void 0,n.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(r||(r={}),r[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(r||(r={}),r[o]=l[o])}else r||(i||(i=[]),i.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ma.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Se("scroll",t),i||a===l||(i=[])):(i=i||[]).push(c,l))}r&&(i=i||[]).push("style",r);var c=i;(e.updateQueue=c)&&(e.flags|=4)}};Rb=function(t,e,r,n){r!==n&&(e.flags|=4)};function Ho(t,e){if(!Pe)switch(t.tailMode){case"hidden":e=t.tail;for(var r=null;e!==null;)e.alternate!==null&&(r=e),e=e.sibling;r===null?t.tail=null:r.sibling=null;break;case"collapsed":r=t.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function ut(t){var e=t.alternate!==null&&t.alternate.child===t.child,r=0,n=0;if(e)for(var s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=n,t.childLanes=r,e}function HT(t,e,r){var n=e.pendingProps;switch(hg(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(e),null;case 1:return Nt(e.type)&&Yc(),ut(e),null;case 3:return n=e.stateNode,po(),Ce(Rt),Ce(pt),bg(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Kl(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,gr!==null&&(Df(gr),gr=null))),Nf(t,e),ut(e),null;case 5:wg(e);var s=js(Ya.current);if(r=e.type,t!==null&&e.stateNode!=null)Pb(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(I(166));return ut(e),null}if(t=js(zr.current),Kl(e)){n=e.stateNode,r=e.type;var i=e.memoizedProps;switch(n[$r]=e,n[Ka]=i,t=(e.mode&1)!==0,r){case"dialog":Se("cancel",n),Se("
40close",n);break;case"iframe":case"object":case"embed":Se("load",n);break;case"video":case"audio":for(s=0;s<la.length;s++)Se(la[s],n);break;case"source":Se("error",n);break;case"img":case"image":case"link":Se("error",n),Se("load",n);break;case"details":Se("toggle",n);break;case"input":Qv(n,i),Se("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},Se("invalid",n);break;case"textarea":Zv(n,i),Se("invalid",n)}rf(r,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?n.textContent!==a&&(i.suppressHydrationWarning!==!0&&ql(n.textContent,a,t),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ql(n.textContent,a,t),s=["children",""+a]):Ma.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Se("scroll",n)}switch(r){case"input":Dl(n),Xv(n,i,!0);break;case"textarea":Dl(n),em(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Gc)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=nw(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=o.createElement(r,{is:n.is}):(t=o.createElement(r),r==="select"&&(o=t,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):t=o.createElementNS(t,r),t[$r]=e,t[Ka]=n,Tb(t,e,!1,!1),e.stateNode=t;e:{switch(o=nf(r,n),r){case"dialog":Se("cancel",t),Se("close",t),s=n;break;case"iframe":case"object":case"embed":Se("load",t),s=n;break;case"video":case"audio":for(s=0;s<la.length;s++)Se(la[s],t);s=n;break;case"source":Se("error",t),s=n;break;case"img":case"image":case"link":Se("error",t),Se("load",t),s=n;break;case"details":Se("toggle",t),s=n;break;case"input":Qv(t,n),s=Qh(t,n),Se("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=Ae({},n,{value:void 0}),Se("invalid",t);break;case"textarea":Zv(t,n),s=ef(t,n),Se("invalid",t);break;default:s=n}rf(r,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?ow(t,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&sw(t,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Da(t,l):typeof l=="number"&&Da(t,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ma.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Se("scroll",t):l!=null&&Qp(t,i,l,o))}switch(r){case"input":Dl(t),Xv(t,n,!1);break;case"textarea":Dl(t),em(t);break;case"option":n.value!=null&&t.setAttribute("value",""+as(n.value));break;case"select":t.multiple=!!n.multiple,i=n.value,i!=null?Wi(t,!!n.multiple,i,!1):n.defaultValue!=null&&Wi(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=Gc)}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&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return ut(e),null;case 6:if(t&&e.stateNode!=null)Rb(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(I(166));if(r=js(Ya.current),js(zr.current),Kl(e)){if(n=e.stateNode,r=e.memoizedProps,n[$r]=e,(i=n.nodeValue!==r)&&(t=Dt,t!==null))switch(t.tag){case 3:ql(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ql(n.nodeValue,r,(t.mode&1)!==0)}i&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[$r]=e,e.stateNode=n}return ut(e),null;case 13:if(Ce(Re),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(Pe&&Lt!==null&&e.mode&1&&!(e.flags&128))Kw(),ho(),e.flags|=98560,i=!1;else if(i=Kl(e),n!==null&&n.dehydrated!==null){if(t===null){if(!i)throw Error(I(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(I(317)
vendor: 26,758 bytes, line 40
40);i[$r]=e}else ho(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;ut(e),i=!1}else gr!==null&&(Df(gr),gr=null),i=!0;if(!i)return e.flags&65536?e:null}return e.flags&128?(e.lanes=r,e):(n=n!==null,n!==(t!==null&&t.memoizedState!==null)&&n&&(e.child.flags|=8192,e.mode&1&&(t===null||Re.current&1?Ye===0&&(Ye=3):jg())),e.updateQueue!==null&&(e.flags|=4),ut(e),null);case 4:return po(),Nf(t,e),t===null&&Va(e.stateNode.containerInfo),ut(e),null;case 10:return vg(e.type._context),ut(e),null;case 17:return Nt(e.type)&&Yc(),ut(e),null;case 19:if(Ce(Re),i=e.memoizedState,i===null)return ut(e),null;if(n=(e.flags&128)!==0,o=i.rendering,o===null)if(n)Ho(i,!1);else{if(Ye!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=ru(t),o!==null){for(e.flags|=128,Ho(i,!1),n=o.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)i=r,t=n,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=t,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,t=o.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return be(Re,Re.current&1|2),e.child}t=t.sibling}i.tail!==null&&Fe()>vo&&(e.flags|=128,n=!0,Ho(i,!1),e.lanes=4194304)}else{if(!n)if(t=ru(o),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),Ho(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Pe)return ut(e),null}else 2*Fe()-i.renderingStartTime>vo&&r!==1073741824&&(e.flags|=128,n=!0,Ho(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(r=i.last,r!==null?r.sibling=o:e.child=o,i.last=o)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Fe(),e.sibling=null,r=Re.current,be(Re,n?r&1|2:r&1),e):(ut(e),null);case 22:case 23:return Ag(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?jt&1073741824&&(ut(e),e.subtreeFlags&6&&(e.flags|=8192)):ut(e),null;case 24:return null;case 25:return null}throw Error(I(156,e.tag))}function VT(t,e){switch(hg(e),e.tag){case 1:return Nt(e.type)&&Yc(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return po(),Ce(Rt),Ce(pt),bg(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return wg(e),null;case 13:if(Ce(Re),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(I(340));ho()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Ce(Re),null;case 4:return po(),null;case 10:return vg(e.type._context),null;case 22:case 23:return Ag(),null;case 24:return null;default:return null}}var Jl=!1,ft=!1,qT=typeof WeakSet=="function"?WeakSet:Set,W=null;function Di(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Le(t,e,n)}else r.current=null}function Of(t,e,r){try{r()}catch(n){Le(t,e,n)}}var Wm=!1;function KT(t,e){if(pf=Vc,t=Iw(),ug(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,a=-1,l=-1,c=0,u=0,d=t,f=null;t:for(;;){for(var h;d!==r||s!==0&&d.nodeType!==3||(a=o+s),d!==i||n!==0&&d.nodeType!==3||(l=o+n),d.nodeType===3&&(o+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===r&&++c===s&&(a=o),f===i&&++u===n&&(l=o),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(gf={focusedElem:t,selectionRange:r},Vc=!1,W=e;W!==null;)if(e=W,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,W=t;else for(;W!==null;){e=W;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var g=y.memoizedProps,w=y.memoizedState,m=e.stateNode,v=m.getSnapshotBeforeUpdate(e.elementType===e.type?g:lr(e.type,g),w);m.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(I(163))}}catch(x){Le(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,W=t;break}W=e.return}return y=Wm,Wm=!1,y}function Pa(t,e,r){var n=e.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&Of(e,r,i)}s=s.next}while(s!==n)}}function Ku(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var r=e=e.next;do{if((r.tag&t)===t){var n=r.create;r.destroy=n()}r=r.next}while(r!==e)}}function Af(t){var e=t.ref;if(e!==null){var r=t.stateNode;switch(t.tag){case 5:t=r;break;default:t=r}typeof e=="function"?e(t):e.current=t}}function Nb(t){var e=t.alternate;e!==null&&(t.alternate=null,Nb(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[$r],delete e[Ka],delete e[yf],delete e[RT],delete e[NT])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Ob(t){return t.tag===5||t.tag===3||t.tag===4}function Hm(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ob(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function jf(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.nodeType===8?r.parentNode.insertBefore(t,e):r.insertBefore(t,e):(r.nodeType===8?(e=r.parentNode,e.insertBefore(t,r)):(e=r,e.appendChild(t)),r=r._reactRootContainer,r!=null||e.onclick!==null||(e.onclick=Gc));else if(n!==4&&(t=t.child,t!==null))for(jf(t,e,r),t=t.sibling;t!==null;)jf(t,e,r),t=t.sibling}function If(t,e,r){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?r.insertBefore(t,e):r.appendChild(t);else if(n!==4&&(t=t.child,t!==null))for(If(t,e,r),t=t.sibling;t!==null;)If(t,e,r),t=t.sibling}var tt=null,fr=!1;function Tn(t,e,r){for(r=r.child;r!==null;)Ab(t,e,r),r=r.sibling}function Ab(t,e,r){if(Br&&typeof Br.onCommitFiberUnmount=="function")try{Br.onCommitFiberUnmount(Fu,r)}catch{}switch(r.tag){case 5:ft||Di(r,e);case 6:var n=tt,s=fr;tt=null,Tn(t,e,r),tt=n,fr=s,tt!==null&&(fr?(t=tt,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):tt.removeChild(r.stateNode));break;case 18:tt!==null&&(fr?(t=tt,r=r.stateNode,t.nodeType===8?Gd(t.parentNode,r):t.nodeType===1&&Gd(t,r),za(t)):Gd(tt,r.stateNode));break;case 4:n=tt,s=fr,tt=r.stateNode.containerInfo,fr=!0,Tn(t,e,r),tt=n,fr=s;break;case 0:case 11:case 14:case 15:if(!ft&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Of(r,e,o),s=s.next}while(s!==n)}Tn(t,e,r);break;case 1:if(!ft&&(Di(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Le(r,e,a)}Tn(t,e,r);break;case 21:Tn(t,e,r);break;case 22:r.mode&1?(ft=(n=ft)||r.memoizedState!==null,Tn(t,e,r),ft=n):Tn(t,e,r);break;default:Tn(t,e,r)}}function Vm(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new qT),e.forEach(function(n){var s=rP.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function ir(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:tt=a.stateNode,fr=!1;break e;case 3:tt=a.stateNode.containerInfo,fr=!0;break e;case 4:tt=a.stateNode.containerInfo,fr=!0;break e}a=a.return}if(tt===null)throw Error(I(160));Ab(i,o,s),tt=null,fr=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Le(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)jb(e,t),e=e.sibling}function jb(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(ir(e,t),Tr(t),n&4){try{Pa(3,t,t.return),Ku(3,t)}catch(g){Le(t,t.return,g)}try{Pa(5,t,t.return)}catch(g){Le(t,t.return,g)}}break;case 1:ir(e,t),Tr(t),n&512&&r!==null&&Di(r,r.return);break;case 5:if(ir(e,t),Tr(t),n&512&&r!==null&&Di(r,r.return),t.flags&32){var s=t.stateNode;try{Da(s,"")}catch(g){Le(t,t.return,g)}}if(n&4&&(s=t.stateNode,s!=null)){var i=t.memoizedProps,o=r!==null?r.memoizedProps:i,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&tw(s,i),nf(a,o);var c=nf(a,i);for(o=0;o<l.length;o+=2){var u=l[o],d=l[o+1];u==="style"?ow(s,d):u==="dangerouslySetInnerHTML"?sw(s,d):u==="children"?Da(s,d):Qp(s,u,d,c)}switch(a){case"input":Xh(s,i);break;case"textarea":rw(s,i);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Wi(s,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?Wi(s,!!i.multiple,i.defaultValue,!0):Wi(s,!!i.multiple,i.multiple?[]:"",!1))}s[Ka]=i}catch(g){Le(t,t.return,g)}}break;case 6:if(ir(e,t),Tr(t),n&4){if(t.stateNode===null)throw Error(I(162));s=t.stateNode,i=t.memoizedProps;try{s.nodeValue=i}catch(g){Le(t,t.return,g)}}break;case 3:if(ir(e,t),Tr(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{za(e.containerInfo)}catch(g){Le(t,t.return,g)}break;case 4:ir(e,t),Tr(t);break;case 13:ir(e,t),Tr(t),s=t.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Ng=Fe())),n&4&&Vm(t);break;case 22:if(u=r!==null&&r.memoizedState!==null,t.mode&1?(ft=(c=ft)||u,ir(e,t),ft=c):ir(e,t),Tr(t),n&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(W=t,u=t.child;u!==null;){for(d=W=u;W!==null;){switch(f=W,h=f.child,f.tag){case 0:case 11:case 14:case 15:Pa(4,f,f.return);break;case 1:Di(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){n=f,r=f.return;try{e=n,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(g){Le(n,r,g)}}break;case 5:Di(f,f.return);break;case 22:if(f.memoizedState!==null){Km(d);continue}}h!==null?(h.return=f,W=h):Km(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{s=d.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=iw("display",o))}catch(g){Le(t,t.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){Le(t,t.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ir(e,t),Tr(t),n&4&&Vm(t);break;case 21:break;default:ir(e,t),Tr(t)}}function Tr(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(Ob(r)){var n=r;break e}r=r.return}throw Error(I(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Da(s,""),n.flags&=-33);var i=Hm(t);If(t,i,s);break;case 3:case 4:var o=n.stateNode.containerInfo,a=Hm(t);jf(t,a,o);break;default:throw Error(I(161))}}catch(l){Le(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function GT(t,e,r){W=t,Ib(t)}function Ib(t,e,r){for(var n=(t.mode&1)!==0;W!==null;){var s=W,i=s.child;if(s.tag===22&&n){var o=s.memoizedState!==null||Jl;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||ft;a=Jl;var c=ft;if(Jl=o,(ft=l)&&!c)for(W=s;W!==null;)o=W,l=o.child,o.tag===22&&o.memoizedState!==null?Gm(s):l!==null?(l.return=o,W=l):Gm(s);for(;i!==null;)W=i,Ib(i),i=i.sibling;W=s,Jl=a,ft=c}qm(t)}else s.subtreeFlags&8772&&i!==null?(i.return=s,W=i):qm(t)}}function qm(t){for(;W!==null;){var e=W;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:ft||Ku(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!ft)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:lr(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=e.updateQueue;i!==null&&Nm(e,i,n);break;case 3:var o=e.updateQueue;if(o!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Nm(e,o,r)}break;case 5:var a=e.stateNode;if(r===null&&e.flags&4){r=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&za(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(I(163))}ft||e.flags&512&&Af(e)}catch(f){Le(e,e.return,f)}}if(e===t){W=null;break}if(r=e.sibling,r!==null){r.return=e.return,W=r;break}W=e.return}}function Km(t){for(;W!==null;){var e=W;if(e===t){W=null;break}var r=e.sibling;if(r!==null){r.return=e.return,W=r;break}W=e.return}}function Gm(t){for(;W!==null;){var e=W;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{Ku(4,e)}catch(l){Le(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(l){Le(e,s,l)}}var i=e.return;try{Af(e)}catch(l){Le(e,i,l)}break;case 5:var o=e.return;try{Af(e)}catch(l){Le(e,o,l)}}}catch(l){Le(e,e.return,l)}if(e===t){W=null;break}var a=e.sibling;if(a!==null){a.return=e.return,W=a;break}W=e.return}}var YT=Math.ceil,iu=wn.ReactCurrentDispatcher,Pg=wn.ReactCurrentOwner,Xt=wn.ReactCurrentBatchConfig,ce=0,Qe=null,He=null,it=0,jt=0,Fi=hs(0),Ye=0,Za=null,Gs=0,Gu=0,Rg=0,Ra=null,kt=null,Ng=0,vo=1/0,Zr=null,ou=!1,$f=null,ts=null,Ql=!1,Kn=null,au=0,Na=0,Lf=null,Nc=-1,Oc=0;function _t(){return ce&6?Fe():Nc!==-1?Nc:Nc=Fe()}function rs(t){return t.mode&1?ce&2&&it!==0?it&-it:AT.transition!==null?(Oc===0&&(Oc=yw()),Oc):(t=ge,t!==0||(t=window.event,t=t===void 0?16:kw(t.type)),t):1}function mr(t,e,r,n){if(50<Na)throw Na=0,Lf=null,Error(I(185));El(t,r,n),(!(ce&2)||t!==Qe)&&(t===Qe&&(!(ce&2)&&(Gu|=r),Ye===4&&Fn(t,it)),Ot(t,n),r===1&&ce===0&&!(e.mode&1)&&(vo=Fe()+500,Hu&&fs()))}function Ot(t,e){var r=t.callbackNode;AC(t,e);var n=Hc(t,t===Qe?it:0);if(n===0)r!==null&&nm(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&nm(r),e===1)t.tag===0?OT(Ym.bind(null,t)):Hw(Ym.bind(null,t)),TT(function(){!(ce&6)&&fs()}),r=null;else{switch(_w(n)){case 1:r=rg;break;case 4:r=vw;break;case 16:r=Wc;break;case 536870912:r=mw;break;default:r=Wc}r=zb(r,$b.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function $b(t,e){if(Nc=-1,Oc=0,ce&6)throw Error(I(327));var r=t.callbackNode;if(Gi()&&t.callbackNode!==r)return null;var n=Hc(t,t===Qe?it:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=lu(t,n);else{e=n;var s=ce;ce|=2;var i=Mb();(Qe!==t||it!==e)&&(Zr=null,vo=Fe()+500,Bs(t,e));do try{XT();break}catch(a){Lb(t,a)}while(!0);gg(),iu.current=i,ce=s,He!==null?e=0:(Qe=null,it=0,e=Ye)}if(e!==0){if(e===2&&(s=cf(t),s!==0&&(n=s,e=Mf(t,s))),e===1)throw r=Za,Bs(t,0),Fn(t,n),Ot(t,Fe()),r;if(e===6)Fn(t,n);else{if(s=t.current.alternate,!(n&30)&&!JT(s)&&(e=lu(t,n),e===2&&(i=cf(t),i!==0&&(n=i,e=Mf(t,i))),e===1))throw r=Za,Bs(t,0),Fn(t,n),Ot(t,Fe()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error(I(345));case 2:Cs(t,kt,Zr);break;case 3:if(Fn(t,n),(n&130023424)===n&&(e=Ng+500-Fe(),10<e)){if(Hc(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){_t(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=mf(Cs.bind(null,t,kt,Zr),e);break}Cs(t,kt,Zr);break;case 4:if(Fn(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var o=31-vr(n);i=1<<o,o=e[o],o>s&&(s=o),n&=~i}if(n=s,n=Fe()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*YT(n/1960))-n,10<n){t.timeoutHandle=mf(Cs.bind(null,t,kt,Zr),n);break}Cs(t,kt,Zr);break;case 5:Cs(t,kt,Zr);break;default:throw Error(I(329))}}}return Ot(t,Fe()),t.callbackNode===r?$b.bind(null,t):null}function Mf(t,e){var r=Ra;return t.current.memoizedState.isDehydrated&&(Bs(t,e).flags|=256),t=lu(t,e),t!==2&&(e=kt,kt=r,e!==null&&Df(e)),t}function Df(t){kt===null?kt=t:kt.push.apply(kt,t)}function JT(t){for(var e=t;;){if(e.flags&16384){var r=e.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!yr(i(),s))return!1}catch{return!1}}}if(r=e.child,e.subtreeFlags&16384&&r!==null)r.return=e,e=r;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Fn(t,e){for(e&=~Rg,e&=~Gu,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-vr(e),n=1<<r;t[r]=-1,e&=~n}}function Ym(t){if(ce&6)throw Error(I(327));Gi();var e=Hc(t,0);if(!(e&1))return Ot(t,Fe()),null;var r=lu(t,e);if(t.tag!==0&&r===2){var n=cf(t);n!==0&&(e=n,r=Mf(t,n))}if(r===1)throw r=Za,Bs(t,0),Fn(t,e),Ot(t,Fe()),r;if(r===6)throw Error(I(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Cs(t,kt,Zr),Ot(t,Fe()),null}function Og(t,e){var r=ce;ce|=1;try{return t(e)}finally{ce=r,ce===0&&(vo=Fe()+500,Hu&&fs())}}function Ys(t){Kn!==null&&Kn.tag===0&&!(ce&6)&&Gi();var e=ce;ce|=1;var r=Xt.transition,n=ge;try{if(Xt.transition=null,ge=1,t)return t()}finally{ge=n,Xt.transition=r,ce=e,!(ce&6)&&fs()}}function Ag(){jt=Fi.current,Ce(Fi)}function Bs(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,CT(r)),He!==null)for(r=He.return;r!==null;){var n=r;switch(hg(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Yc();break;case 3:po(),Ce(Rt),Ce(pt),bg();break;case 5:wg(n);break;case 4:po();break;case 13:Ce(Re);break;case 19:Ce(Re);break;case 10:vg(n.type._context);break;case 22:case 23:Ag()}r=r.return}if(Qe=t,He=t=ns(t.current,null),it=jt=e,Ye=0,Za=null,Rg=Gu=Gs=0,kt=Ra=null,As!==null){for(e=0;e<As.length;e++)if(r=As[e],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var o=i.next;i.next=s,n.next=o}r.pending=n}As=null}return t}function Lb(t,e){do{var r=He;try{if(gg(),Tc.current=su,nu){for(var n=Oe.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}nu=!1}if(Ks=0,Je=Ge=Oe=null,Ta=!1,Ja=0,Pg.current=null,r===null||r.return===null){Ye=1,Za=e,He=null;break}e:{var i=t,o=r.return,a=r,l=e;if(e=it,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=Lm(o);if(h!==null){h.flags&=-257,Mm(h,o,a,i,e),h.mode&1&&$m(i,c,e),e=h,l=c;var y=e.updateQueue;if(y===null){var g=new Set;g.add(l),e.updateQueue=g}else y.add(l);break e}else{if(!(e&1)){$m(i,c,e),jg();break e}l=Error(I(426))}}else if(Pe&&a.mode&1){var w=Lm(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Mm(w,o,a,i,e),fg(go(l,a));break e}}i=l=go(l,a),Ye!==4&&(Ye=2),Ra===null?Ra=[i]:Ra.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,e&=-e,i.lanes|=e;var m=_b(i,l,e);Rm(i,m);break e;case 1:a=l;var v=i.type,_=i.stateNode;if(!(i.flags&128)&&(typeof v.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(ts===null||!ts.has(_)))){i.flags|=65536,e&=-e,i.lanes|=e;var x=wb(i,a,e);Rm(i,x);break e}}i=i.return}while(i!==null)}Fb(r)}catch(E){e=E,He===r&&r!==null&&(He=r=r.return);continue}break}while(!0)}function Mb(){var t=iu.current;return iu.current=su,t===null?su:t}function jg(){(Ye===0||Ye===3||Ye===2)&&(Ye=4),Qe===null||!(Gs&268435455)&&!(Gu&268435455)||Fn(Qe,it)}function lu(t,e){var r=ce;ce|=2;var n=Mb();(Qe!==t||it!==e)&&(Zr=null,Bs(t,e));do try{QT();break}catch(s){Lb(t,s)}while(!0);if(gg(),ce=r,iu.current=n,He!==null)throw Error(I(261));return Qe=null,it=0,Ye}function QT(){for(;He!==null;)Db(He)}function XT(){for(;He!==null&&!EC();)Db(He)}function Db(t){var e=Bb(t.alternate,t,jt);t.memoizedProps=t.pendingProps,e===null?Fb(t):He=e,Pg.current=null}function Fb(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=VT(r,e),r!==null){r.flags&=32767,He=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Ye=6,He=null;return}}else if(r=HT(r,e,jt),r!==null){He=r;return}if(e=e.sibling,e!==null){He=e;return}He=e=t}while(e!==null);Ye===0&&(Ye=5)}function Cs(t,e,r){var n=ge,s=Xt.transition;try{Xt.transition=null,ge=1,ZT(t,e,r,n)}finally{Xt.transition=s,ge=n}return null}function ZT(t,e,r,n){do Gi();while(Kn!==null);if(ce&6)throw Error(I(327));r=t.finishedWork;var s=t.finishedLanes;if(r===null)return null;if(t.finishedWork=null,t.finishedLanes=0,r===t.current)throw Error(I(177));t.callbackNode=null,t.callbackPriority=0;var i=r.lanes|r.childLanes;if(jC(t,i),t===Qe&&(He=Qe=null,it=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ql||(Ql=!0,zb(Wc,function(){return Gi(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Xt.transition,Xt.transition=null;var o=ge;ge=1;var a=ce;ce|=4,Pg.current=null,KT(t,r),jb(r,t),_T(gf),Vc=!!pf,gf=pf=null,t.current=r,GT(r),SC(),ce=a,ge=o,Xt.transition=i}else t.current=r;if(Ql&&(Ql=!1,Kn=t,au=s),i=t.pendingLanes,i===0&&(ts=null),TC(r.stateNode),Ot(t,Fe()),e!==null)for(n=t.onRecoverableError,r=0;r<e.length;r++)s=e[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(ou)throw ou=!1,t=$f,$f=null,t;return au&1&&t.tag!==0&&Gi(),i=t.pendingLanes,i&1?t===Lf?Na++:(Na=0,Lf=t):Na=0,fs(),null}function Gi(){if(Kn!==null){var t=_w(au),e=Xt.transition,r=ge;try{if(Xt.transition=null,ge=16>t?16:t,Kn===null)var n=!1;else{if(t=Kn,Kn=null,au=0,ce&6)throw Error(I(331));var s=ce;for(ce|=4,W=t.current;W!==null;){var i=W,o=i.child;if(W.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(W=c;W!==null;){var u=W;switch(u.tag){case 0:case 11:case 15:Pa(8,u,i)}var d=u.child;if(d!==null)d.return=u,W=d;else for(;W!==null;){u=W;var f=u.sibling,h=u.return;if(Nb(u),u===c){W=null;break}if(f!==null){f.return=h,W=f;break}W=h}}}var y=i.alternate;if(y!==null){var g=y.child;if(g!==null){y.child=null;do{var w=g.sibling;g.sibling=null,g=w}while(g!==null)}}W=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,W=o;else e:for(;W!==null;){if(i=W,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Pa(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,W=m;break e}W=i.return}}var v=t.current;for(W=v;W!==null;){o=W;var _=o.child;if(o.subtreeFlags&2064&&_!==null)_.return=o,W=_;else e:for(o=v;W!==null;){if(a=W,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ku(9,a)}}catch(E){Le(a,a.return,E)}if(a===o){W=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,W=x;break e}W=a.return}}if(ce=s,fs(),Br&&typeof Br.onPostCommitFiberRoot=="function")try{Br.onPostCommitFiberRoot(Fu,t)}catch{}n=!0}return n}finally{ge=r,Xt.transition=e}}return!1}function Jm(t,e,r){e=go(r,e),e=_b(t,e,1),t=es(t,e,1),e=_t(),t!==null&&(El(t,1,e),Ot(t,e))}function Le(t,e,r){if(t.tag===3)Jm(t,t,r);else for(;e!==null;){if(e.tag===3){Jm(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(ts===null||!ts.has(n))){t=go(r,t),t=wb(e,t,1),e=es(e,t,1),t=_t(),e!==null&&(El(e,1,t),Ot(e,t));break}}e=e.return}}function eP(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=_t(),t.pingedLanes|=t.suspendedLanes&r,Qe===t&&(it&r)===r&&(Ye===4||Ye===3&&(it&130023424)===it&&500>Fe()-Ng?Bs(t,0):Rg|=r),Ot(t,e)}function Ub(t,e){e===0&&(t.mode&1?(e=Bl,Bl<<=1,!(Bl&130023424)&&(Bl=4194304)):e=1);var r=_t();t=vn(t,e),t!==null&&(El(t,e,r),Ot(t,r))}function tP(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),Ub(t,r)}function rP(t,e){var r=0;switch(t.tag){case 13:var n=t.stateNode,s=t.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=t.stateNode;break;default:throw Error(I(314))}n!==null&&n.delete(e),Ub(t,r)}var Bb;Bb=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||Rt.current)Tt=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return Tt=!1,WT(t,e,r);Tt=!!(t.flags&131072)}else Tt=!1,Pe&&e.flags&1048576&&Vw(e,Xc,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;Rc(t,e),t=e.pendingProps;var s=uo(e,pt.current);Ki(e,r),s=Eg(null,e,n,t,s,r);var i=Sg();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Nt(n)?(i=!0,Jc(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,yg(e),s.updater=qu,e.stateNode=s,s._reactInternals=e,Sf(e,n,t,r),e=Tf(null,e,n,!0,i,r)):(e.tag=0,Pe&&i&&dg(e),mt(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(Rc(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=sP(n),t=lr(n,t),s){case 0:e=Cf(null,e,n,t,r);break e;case 1:e=Um(null,e,n,t,r);break e;case 11:e=Dm(null,e,n,t,r);break e;case 14:e=Fm(null,e,n,lr(n.type,t),r);break e}throw Error(I(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:lr(n,s),Cf(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:lr(n,s),Um(t,e,n,s,r);case 3:e:{if(Sb(e),t===null)throw Error(I(387));n=e.pendingProps,i=e.memoizedState,s=i.element,Qw(t,e),tu(e,n,null,r);var o=e.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=go(Error(I(423)),e),e=Bm(t,e,n,r,s);break e}else if(n!==s){s=go(Error(I(424)),e),e=Bm(t,e,n,r,s);break e}else for(Lt=Zn(e.stateNode.containerInfo.firstChild),Dt=e,Pe=!0,gr=null,r=Yw(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ho(),n===s){e=mn(t,e,r);break e}mt(t,e,n,r)}e=e.child}return e;case 5:return Xw(e),t===null&&bf(e),n=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,o=s.children,vf(n,s)?o=null:i!==null&&vf(n,i)&&(e.flags|=32),Eb(t,e),mt(t,e,o,r),e.child;case 6:return t===null&&bf(e),null;case 13:return kb(t,e,r);case 4:return _g(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=fo(e,null,n,r):mt(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:lr(n,s),Dm(t,e,n,s,r);case 7:return mt(t,e,e.pendingProps,r),e.child;case 8:return mt(t,e,e.pendingProps.children,r),e.child;case 12:return mt(t,e,e.pendingProps.children,r),e.child;
vendor: 4,549 bytes, line 40
40case 10:e:{if(n=e.type._context,s=e.pendingProps,i=e.memoizedProps,o=s.value,be(Zc,n._currentValue),n._currentValue=o,i!==null)if(yr(i.value,o)){if(i.children===s.children&&!Rt.current){e=mn(t,e,r);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=hn(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),xf(i.return,r,e),a.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===e.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(I(341));o.lanes|=r,a=o.alternate,a!==null&&(a.lanes|=r),xf(o,r,e),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}mt(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,Ki(e,r),s=er(s),n=n(s),e.flags|=1,mt(t,e,n,r),e.child;case 14:return n=e.type,s=lr(n,e.pendingProps),s=lr(n.type,s),Fm(t,e,n,s,r);case 15:return bb(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:lr(n,s),Rc(t,e),e.tag=1,Nt(n)?(t=!0,Jc(e)):t=!1,Ki(e,r),yb(e,n,s),Sf(e,n,s,r),Tf(null,e,n,!0,t,r);case 19:return Cb(t,e,r);case 22:return xb(t,e,r)}throw Error(I(156,e.tag))};function zb(t,e){return gw(t,e)}function nP(t,e,r,n){this.tag=t,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qt(t,e,r,n){return new nP(t,e,r,n)}function Ig(t){return t=t.prototype,!(!t||!t.isReactComponent)}function sP(t){if(typeof t=="function")return Ig(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Zp)return 11;if(t===eg)return 14}return 2}function ns(t,e){var r=t.alternate;return r===null?(r=Qt(t.tag,e,t.key,t.mode),r.elementType=t.elementType,r.type=t.type,r.stateNode=t.stateNode,r.alternate=t,t.alternate=r):(r.pendingProps=e,r.type=t.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=t.flags&14680064,r.childLanes=t.childLanes,r.lanes=t.lanes,r.child=t.child,r.memoizedProps=t.memoizedProps,r.memoizedState=t.memoizedState,r.updateQueue=t.updateQueue,e=t.dependencies,r.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},r.sibling=t.sibling,r.index=t.index,r.ref=t.ref,r}function Ac(t,e,r,n,s,i){var o=2;if(n=t,typeof t=="function")Ig(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case Ri:return zs(r.children,s,i,e);case Xp:o=8,s|=8;break;case Kh:return t=Qt(12,r,e,s|2),t.elementType=Kh,t.lanes=i,t;case Gh:return t=Qt(13,r,e,s),t.elementType=Gh,t.lanes=i,t;case Yh:return t=Qt(19,r,e,s),t.elementType=Yh,t.lanes=i,t;case X_:return Yu(r,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case J_:o=10;break e;case Q_:o=9;break e;case Zp:o=11;break e;case eg:o=14;break e;case $n:o=16,n=null;break e}throw Error(I(130,t==null?t:typeof t,""))}return e=Qt(o,r,e,s),e.elementType=t,e.type=n,e.lanes=i,e}function zs(t,e,r,n){return t=Qt(7,t,n,e),t.lanes=r,t}function Yu(t,e,r,n){return t=Qt(22,t,n,e),t.elementType=X_,t.lanes=r,t.stateNode={isHidden:!1},t}function rh(t,e,r){return t=Qt(6,t,null,e),t.lanes=r,t}function nh(t,e,r){return e=Qt(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function iP(t,e,r,n,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Md(0),this.expirationTimes=Md(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Md(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function $g(t,e,r,n,s,i,o,a,l){return t=new iP(t,e,r,a,l),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Qt(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},yg(i),t}function oP(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;
vendor: 4,591 bytes, line 40
40return{$$typeof:Pi,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function Wb(t){if(!t)return ls;t=t._reactInternals;e:{if(ri(t)!==t||t.tag!==1)throw Error(I(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(Nt(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(I(171))}if(t.tag===1){var r=t.type;if(Nt(r))return Ww(t,r,e)}return e}function Hb(t,e,r,n,s,i,o,a,l){return t=$g(r,n,!0,t,s,i,o,a,l),t.context=Wb(null),r=t.current,n=_t(),s=rs(r),i=hn(n,s),i.callback=e??null,es(r,i,s),t.current.lanes=s,El(t,s,n),Ot(t,n),t}function Ju(t,e,r,n){var s=e.current,i=_t(),o=rs(s);return r=Wb(r),e.context===null?e.context=r:e.pendingContext=r,e=hn(i,o),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=es(s,e,o),t!==null&&(mr(t,s,o,i),Cc(t,s,o)),o}function cu(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function Qm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function Lg(t,e){Qm(t,e),(t=t.alternate)&&Qm(t,e)}function aP(){return null}var Vb=typeof reportError=="function"?reportError:function(t){console.error(t)};function Mg(t){this._internalRoot=t}Qu.prototype.render=Mg.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(I(409));Ju(t,e,null,null)};Qu.prototype.unmount=Mg.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ys(function(){Ju(null,t,null,null)}),e[gn]=null}};function Qu(t){this._internalRoot=t}Qu.prototype.unstable_scheduleHydration=function(t){if(t){var e=xw();t={blockedOn:null,target:t,priority:e};for(var r=0;r<Dn.length&&e!==0&&e<Dn[r].priority;r++);Dn.splice(r,0,t),r===0&&Sw(t)}};function Dg(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Xu(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Xm(){}function lP(t,e,r,n,s){if(s){if(typeof n=="function"){var i=n;n=function(){var c=cu(o);i.call(c)}}var o=Hb(e,n,t,0,null,!1,!1,"",Xm);return t._reactRootContainer=o,t[gn]=o.current,Va(t.nodeType===8?t.parentNode:t),Ys(),o}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=cu(l);a.call(c)}}var l=$g(t,0,!1,null,null,!1,!1,"",Xm);return t._reactRootContainer=l,t[gn]=l.current,Va(t.nodeType===8?t.parentNode:t),Ys(function(){Ju(e,l,r,n)}),l}function Zu(t,e,r,n,s){var i=r._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=cu(o);a.call(l)}}Ju(e,o,t,s)}else o=lP(r,e,t,s,n);return cu(o)}ww=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=aa(e.pendingLanes);r!==0&&(ng(e,r|1),Ot(e,Fe()),!(ce&6)&&(vo=Fe()+500,fs()))}break;case 13:Ys(function(){var n=vn(t,1);if(n!==null){var s=_t();mr(n,t,1,s)}}),Lg(t,1)}};sg=function(t){if(t.tag===13){var e=vn(t,134217728);if(e!==null){var r=_t();mr(e,t,134217728,r)}Lg(t,134217728)}};bw=function(t){if(t.tag===13){var e=rs(t),r=vn(t,e);if(r!==null){var n=_t();mr(r,t,e,n)}Lg(t,e)}};xw=function(){return ge};Ew=function(t,e){var r=ge;try{return ge=t,e()}finally{ge=r}};of=function(t,e,r){switch(e){case"input":if(Xh(t,r),e=r.name,r.type==="radio"&&e!=null){for(r=t;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<r.length;e++){var n=r[e];if(n!==t&&n.form===t.form){var s=Wu(n);if(!s)throw Error(I(90));ew(n),Xh(n,s)}}}break;case"textarea":rw(t,r);break;case"select":e=r.value,e!=null&&Wi(t,!!r.multiple,e,!1)}};cw=Og;uw=Ys;var cP={usingClientEntryPoint:!1,Events:[kl,ji,Wu,aw,lw,Og]},Vo={findFiberByHostInstance:Os,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uP={bundleType:Vo.bundleType,version:Vo.version,rendererPackageName:Vo.rendererPackageName,rendererConfig:Vo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=fw(t),t===null?null:t.stateNode},findFiberByHostInstance:Vo.findFiberByHostInstance||aP,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 Xl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xl.isDisabled&&Xl.supportsFiber)try{Fu=Xl.inject(uP),Br=Xl}catch{}}zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cP;zt.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Dg(e))throw Error(I(200));return oP(t,e,null,r)};zt.createRoot=function(t,e){if(!Dg(t))throw Error(I(299));var r=!1,n="",s=Vb;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=$g(t,1,!1,null,null,r,!1,n,s),t[gn]=e.current,Va(t.nodeType===8?t.parentNode:t),new Mg(e)};zt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(I(188)):(t=Object.keys(t).join(","),Error(I(268,t)));return t=fw(e),t=t===null?null:t.stateNode,t};zt.flushSync=function(t){return Ys(t)};zt.hydrate=function(t,e,r){if(!Xu(e))throw Error(I(200));return Zu(null,t,e,!0,r)};zt.hydrateRoot=function(t,e,r){if(!Dg(t))throw Error(I(405));var n=r!=null&&r.hydratedSources||null,s=!1,i="",o=Vb;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(o=r.onRecoverableError)),e=Hb(e,null,t,1,r??null,s,!1,i,o),t[gn]=e.current,Va(t),n)for(t=0;t<n.length;t++)r=n[t],s=r._getVersion,s=s(r._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[r,s]:e.mutableSourceEagerHydrationData.push(r,s);return new Qu(e)};zt.render=function(t,e,r){if(!Xu(e))throw Error(I(200));return Zu(null,t,e,!1,r)};zt.unmountComponentAtNode=function(t){if(!Xu(t))throw Error(I(40));return t._reactRootContainer?(Ys(function(){Zu(null,null,t,!1,function(){t._reactRootContainer=null,t[gn]=null})}),!0):!1};zt.unstable_batchedUpdates=Og;zt.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Xu(r))throw Error(I(200));if(t==null||t._reactInternals===void 0)throw Error(I(38));return Zu(t,e,r,!1,n)};zt.version="18.3.1-next-f1338f8080-20240426";function qb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qb)}catch(t){console.error(t)}}qb(),q_.exports=zt;var Tl=q_.exports;const Kb=I_(Tl);var Gb,Zm=Tl;Gb=Zm.createRoot,Zm.hydrateRoot;const dP=1,hP=1e6;let sh=0;function fP(){return sh=(sh+1)%Number.MAX_SAFE_INTEGER,sh.toString()}const ih=new Map,ey=t=>{if(ih.has(t))return;const e=setTimeout(()=>{ih.delete(t),Oa({type:"REMOVE_TOAST",toastId:t})},hP);ih.set(t,e)},pP=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,dP)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(r=>r.id===e.toast.id?{...r,...e.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=e;return r?ey(r):t.toasts.forEach(n=>{ey(n.id)}),{...t,toasts:t.toasts.map(n=>
vendor: 10,046 bytes, line 40
40n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(r=>r.id!==e.toastId)}}},jc=[];let Ic={toasts:[]};function Oa(t){Ic=pP(Ic,t),jc.forEach(e=>{e(Ic)})}function gP({...t}){const e=fP(),r=s=>Oa({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>Oa({type:"DISMISS_TOAST",toastId:e});return Oa({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function Fg(){const[t,e]=b.useState(Ic);return b.useEffect(()=>(jc.push(e),()=>{const r=jc.indexOf(e);r>-1&&jc.splice(r,1)}),[t]),{...t,toast:gP,dismiss:r=>Oa({type:"DISMISS_TOAST",toastId:r})}}function le(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t==null||t(s),r===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function ty(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Yb(...t){return e=>{let r=!1;const n=t.map(s=>{const i=ty(s,e);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let s=0;s<n.length;s++){const i=n[s];typeof i=="function"?i():ty(t[s],null)}}}}function Xe(...t){return b.useCallback(Yb(...t),t)}function vP(t,e){const r=b.createContext(e),n=i=>{const{children:o,...a}=i,l=b.useMemo(()=>a,Object.values(a));return p.jsx(r.Provider,{value:l,children:o})};n.displayName=t+"Provider";function s(i){const o=b.useContext(r);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[n,s]}function bn(t,e=[]){let r=[];function n(i,o){const a=b.createContext(o),l=r.length;r=[...r,o];const c=d=>{var m;const{scope:f,children:h,...y}=d,g=((m=f==null?void 0:f[t])==null?void 0:m[l])||a,w=b.useMemo(()=>y,Object.values(y));return p.jsx(g.Provider,{value:w,children:h})};c.displayName=i+"Provider";function u(d,f){var g;const h=((g=f==null?void 0:f[t])==null?void 0:g[l])||a,y=b.useContext(h);if(y)return y;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}const s=()=>{const i=r.map(o=>b.createContext(o));return function(a){const l=(a==null?void 0:a[t])||i;return b.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,mP(s,...e)]}function mP(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const o=n.reduce((a,{useScope:l,scopeName:c})=>{const d=l(i)[`__scope${c}`];return{...a,...d}},{});return b.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return r.scopeName=e.scopeName,r}function el(t){const e=_P(t),r=b.forwardRef((n,s)=>{const{children:i,...o}=n,a=b.Children.toArray(i),l=a.find(bP);if(l){const c=l.props.children,u=a.map(d=>d===l?b.Children.count(c)>1?b.Children.only(null):b.isValidElement(c)?c.props.children:null:d);return p.jsx(e,{...o,ref:s,children:b.isValidElement(c)?b.cloneElement(c,void 0,u):null})}return p.jsx(e,{...o,ref:s,children:i})});return r.displayName=`${t}.Slot`,r}var yP=el("Slot");function _P(t){const e=b.forwardRef((r,n)=>{const{children:s,...i}=r;if(b.isValidElement(s)){const o=EP(s),a=xP(i,s.props);return s.type!==b.Fragment&&(a.ref=n?Yb(n,o):o),b.cloneElement(s,a)}return b.Children.count(s)>1?b.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Jb=Symbol("radix.slottable");function wP(t){const e=({children:r})=>p.jsx(p.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=Jb,e}function bP(t){return b.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Jb}function xP(t,e){const r={...e};for(const n in e){const s=t[n],i=e[n];/^on[A-Z]/.test(n)?s&&i?r[n]=(...a)=>{const l=i(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...i}:n==="className"&&(r[n]=[s,i].filter(Boolean).join(" "))}return{...t,...r}}function EP(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Ug(t){const e=t+"CollectionProvider",[r,n]=bn(e),[s,i]=r(e,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:w,children:m}=g,v=j.useRef(null),_=j.useRef(new Map).current;return p.jsx(s,{scope:w,itemMap:_,collectionRef:v,children:m})};o.displayName=e;const a=t+"CollectionSlot",l=el(a),c=j.forwardRef((g,w)=>{const{scope:m,children:v}=g,_=i(a,m),x=Xe(w,_.collectionRef);return p.jsx(l,{ref:x,children:v})});c.displayName=a;const u=t+"CollectionItemSlot",d="data-radix-collection-item",f=el(u),h=j.forwardRef((g,w)=>{const{scope:m,children:v,..._}=g,x=j.useRef(null),E=Xe(w,x),k=i(u,m);return j.useEffect(()=>(k.itemMap.set(x,{ref:x,..._}),()=>void k.itemMap.delete(x))),p.jsx(f,{[d]:"",ref:E,children:v})});h.displayName=u;function y(g){const w=i(t+"CollectionConsumer",g);return j.useCallback(()=>{const v=w.collectionRef.current;if(!v)return[];const _=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((k,S)=>_.indexOf(k.ref.current)-_.indexOf(S.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:c,ItemSlot:h},y,n]}var SP=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],he=SP.reduce((t,e)=>{const r=el(`Primitive.${e}`),n=b.forwardRef((s,i)=>{const{asChild:o,...a}=s,l=o?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Qb(t,e){t&&Tl.flushSync(()=>t.dispatchEvent(e))}function _r(t){const e=b.useRef(t);return b.useEffect(()=>{e.current=t}),b.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function kP(t,e=globalThis==null?void 0:globalThis.document){const r=_r(t);b.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var CP="DismissableLayer",Ff="dismissableLayer.update",TP="dismissableLayer.pointerDownOutside",PP="dismissableLayer.focusOutside",ry,Xb=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ed=b.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:o,onDismiss:a,...l}=t,c=b.useContext(Xb),[u,d]=b.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=b.useState({}),y=Xe(e,S=>d(S)),g=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=g.indexOf(w),v=u?g.indexOf(u):-1,_=c.layersWithOutsidePointerEventsDisabled.size>0,x=v>=m,E=NP(S=>{const C=S.target,N=[...c.branches].some(A=>A.contains(C));!x||N||(s==null||s(S),o==null||o(S),S.defaultPrevented||a==null||a())},f),k=OP(S=>{const C=S.target;[...c.branches].some(A=>A.contains(C))||(i==null||i(S),o==null||o(S),S.defaultPrevented||a==null||a())},f);return kP(S=>{v===c.layers.size-1&&(n==null||n(S),!S.defaultPrevented&&a&&(S.preventDefault(),a()))},f),b.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ry=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),ny(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=ry)}},[u,f,r,c]),b.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),ny())},[u,c]),b.useEffect(()=>{const S=()=>h({});return document.addEventListener(Ff,S),()=>document.removeEventListener(Ff,S)},[]),p.jsx(he.div,{...l,ref:y,style:{pointerEvents:_?x?"auto":"none":void 0,...t.style},onFocusCapture:le(t.onFocusCapture,k.onFocusCapture),onBlurCapture:le(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:le(t.onPointerDownCapture,E.onPointerDownCapture)})});ed.displayName=CP;var RP="DismissableLayerBranch",Zb=b.forwardRef((t,e)=>{const r=b.useContext(Xb),n=b.useRef(null),s=Xe(e,n);return b.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),p.jsx(he.div,{...t,ref:s})});Zb.displayName=RP;function NP(t,e=globalThis==null?void 0:globalThis.document){const r=_r(t),n=b.useRef(!1),s=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){ex(TP,r,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=l,e.addEventListener("click",s.current,{once:!0})):l()}else e.removeEventListener("click",s.current);n.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function OP(t,e=globalThis==null?void 0:globalThis.document){const r=_r(t),n=b.useRef(!1);return b.useEffect(()=>{const s=i=>{i.target&&!n.current&&ex(PP,r,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ny(){const t=new CustomEvent(Ff);document.dispatchEvent(t)}function ex(t,e,r,{discrete:n}){const s=r.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?Qb(s,i):s.dispatchEvent(i)}var AP=ed,jP=Zb,Hr=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},IP="Portal",Bg=b.forwardRef((t,e)=>{var a;const{container:r,...n}=t,[s,i]=b.useState(!1);Hr(()=>i(!0),[]);const o=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?Kb.createPortal(p.jsx(he.div,{...n,ref:e}),o):null});Bg.displayName=IP;function $P(t,e){return b.useReducer((r,n)=>e[r][n]??r,t)}var ps=t=>{const{present:e,children:r}=t,n=LP(e),s=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),i=Xe(n.ref,MP(s));return typeof r=="function"||n.isPresent?b.cloneElement(s,{ref:i}
40):null};ps.displayName="Presence";function LP(t){const[e,r]=b.useState(),n=b.useRef(null),s=b.useRef(t),i=b.useRef("none"),o=t?"mounted":"unmounted",[a,l]=$P(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const c=Zl(n.current);i.current=a==="mounted"?c:"none"},[a]),Hr(()=>{const c=n.current,u=s.current;if(u!==t){const f=i.current,h=Zl(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Hr(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,d=h=>{const g=Zl(n.current).includes(h.animationName);if(h.target===e&&g&&(l("ANIMATION_END"),!s.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},f=h=>{h.target===e&&(i.current=Zl(n.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Zl(t){return(t==null?void 0:t.animationName)||"none"}function MP(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var DP=Gp[" useInsertionEffect ".trim().toString()]||Hr;function ni({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,i,o]=FP({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:s;{const u=b.useRef(t!==void 0);b.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}const c=b.useCallback(u=>{var d;if(a){const f=UP(u)?u(t):u;f!==t&&((d=o.current)==null||d.call(o,f))}else i(u)},[a,t,i,o]);return[l,c]}function FP({defaultProp:t,onChange:e}){const[r,n]=b.useState(t),s=b.useRef(r),i=b.useRef(e);return DP(()=>{i.current=e},[e]),b.useEffect(()=>{var o;s.current!==r&&((o=i.current)==null||o.call(i,r),s.current=r)},[r,s]),[r,n,i]}function UP(t){return typeof t=="function"}var BP=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"}),zP="VisuallyHidden",td=b.forwardRef((t,e)=>p.jsx(he.span,{...t,ref:e,style:{...BP,...t.style}}));td.displayName=zP;var WP=td,zg="ToastProvider",[Wg,HP,VP]=Ug("Toast"),[tx,k3]=bn("Toast",[VP]),[qP,rd]=tx(zg),rx=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:o}=t,[a,l]=b.useState(null),[c,u]=b.useState(0),d=b.useRef(!1),f=b.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${zg}\`. Expected non-empty \`string\`.`),p.jsx(Wg.Provider,{scope:e,children:p.jsx(qP,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:i,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:b.useCallback(()=>u(h=>h+1),[]),onToastRemove:b.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};rx.displayName=zg;var nx="ToastViewport",KP=["F8"],Uf="toast.viewportPause",Bf="toast.viewportResume",sx=b.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=KP,label:s="Notifications ({hotkey})",...i}=t,o=rd(nx,r),a=HP(r),l=b.useRef(null),c=b.useRef(null),u=b.useRef(null),d=b.useRef(null),f=Xe(e,d,o.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=o.toastCount>0;b.useEffect(()=>{const w=m=>{var _;n.length!==0&&n.every(x=>m[x]||m.code===x)&&((_=d.current)==null||_.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),b.useEffect(()=>{const w=l.current,m=d.current;if(y&&w&&m){const v=()=>{if(!o.isClosePausedRef.current){const k=new CustomEvent(Uf);m.dispatchEvent(k),o.isClosePausedRef.current=!0}},_=()=>{if(o.isClosePausedRef.current){const k=new CustomEvent(Bf);m.dispatchEvent(k),o.isClosePausedRef.current=!1}},x=k=>{!w.contains(k.relatedTarget)&&_()},E=()=>{w.contains(document.activeElement)||_()};return w.addEventListener("focusin",v),w.addEventListener("focusout",x),w.addEventListener("pointermove",v),w.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",_),()=>{w.removeEventListener("focusin",v),w.removeEventListener("focusout",x),w.removeEventListener("pointermove",v),w.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",_)}}},[y,o.isClosePausedRef]);const g=b.useCallback(({tabbingDirection:w})=>{const v=a().map(_=>{const x=_.ref.current,E=[x,...oR(x)];return w==="forwards"?E:E.reverse()});return(w==="forwards"?v.reverse():v).flat()},[a]);return b.useEffect(()=>{const w=d.current;if(w){const m=v=>{var E,k,S;const _=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!_){const C=document.activeElement,N=v.shiftKey;if(v.target===w&&N){(E=c.current)==null||E.focus();return}const L=g({tabbingDirection:N?"backwards":"forwards"}),Y=L.findIndex($=>$===C);oh(L.slice(Y+1))?v.preventDefault():N?(k=c.current)==null||k.focus():(S=u.current)==null||S.focus()}};return w.addEventListener("keydown",m),()=>w.removeEventListener("keydown",m)}},[a,g]),p.jsxs(jP,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&p.jsx(zf,{ref:c,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"forwards"});oh(w)}}),p.jsx(Wg.Slot,{scope:r,children:p.jsx(he.ol,{tabIndex:-1,...i,ref:f})}),y&&p.jsx(zf,{ref:u,onFocusFromOutsideViewport:()=>{const w=g({tabbingDirection:"backwards"});oh(w)}})]})});sx.displayName=nx;var ix="ToastFocusProxy",zf=b.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,i=rd(ix,r);return p.jsx(td,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:o=>{var c;const a=o.relatedTarget;!((c=i.viewport)!=null&&c.contains(a))&&n()}})});zf.displayName=ix;var Pl="Toast",GP="toast.swipeStart",YP="toast.swipeMove",JP="toast.swipeCancel",QP="toast.swipeEnd",ox=b.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:i,...o}=t,[a,l]=ni({prop:n,defaultProp:s??!0,onChange:i,caller:Pl});return p.jsx(ps,{present:r||a,children:p.jsx(eR,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:_r(t.onPause),onResume:_r(t.onResume),onSwipeStart:le(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:le(t.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:le(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:le(t.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});ox.displayName=Pl;var[XP,ZP]=tx(Pl,{onClose(){}}),eR=b.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:i,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...y}=t,g=rd(Pl,r),[w,m]=b.useState(null),v=Xe(e,$=>m($)),_=b.useRef(null),x=b.useRef(null),E=s||g.duration,k=b.useRef(0),S=b.useRef(E),C=b.useRef(0),{onToastAdd:N,onToastRemove:A}=g,H=_r(()=>{var ee;(w==null?void 0:w.contains(document.activeElement))&&((ee=g.viewport)==null||ee.focus()),o()}),L=b.useCallback($=>
40{!$||$===1/0||(window.clearTimeout(C.current),k.current=new Date().getTime(),C.current=window.setTimeout(H,$))},[H]);b.useEffect(()=>{const $=g.viewport;if($){const ee=()=>{L(S.current),c==null||c()},q=()=>{const J=new Date().getTime()-k.current;S.current=S.current-J,window.clearTimeout(C.current),l==null||l()};return $.addEventListener(Uf,q),$.addEventListener(Bf,ee),()=>{$.removeEventListener(Uf,q),$.removeEventListener(Bf,ee)}}},[g.viewport,E,l,c,L]),b.useEffect(()=>{i&&!g.isClosePausedRef.current&&L(E)},[i,E,g.isClosePausedRef,L]),b.useEffect(()=>(N(),()=>A()),[N,A]);const Y=b.useMemo(()=>w?fx(w):null,[w]);return g.viewport?p.jsxs(p.Fragment,{children:[Y&&p.jsx(tR,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:Y}),p.jsx(XP,{scope:r,onClose:H,children:Tl.createPortal(p.jsx(Wg.ItemSlot,{scope:r,children:p.jsx(AP,{asChild:!0,onEscapeKeyDown:le(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||H(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(he.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:le(t.onKeyDown,$=>{$.key==="Escape"&&(a==null||a($.nativeEvent),$.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:le(t.onPointerDown,$=>{$.button===0&&(_.current={x:$.clientX,y:$.clientY})}),onPointerMove:le(t.onPointerMove,$=>{if(!_.current)return;const ee=$.clientX-_.current.x,q=$.clientY-_.current.y,J=!!x.current,P=["left","right"].includes(g.swipeDirection),O=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,D=P?O(0,ee):0,te=P?0:O(0,q),z=$.pointerType==="touch"?10:2,X={x:D,y:te},Z={originalEvent:$,delta:X};J?(x.current=X,ec(YP,d,Z,{discrete:!1})):sy(X,g.swipeDirection,z)?(x.current=X,ec(GP,u,Z,{discrete:!1}),$.target.setPointerCapture($.pointerId)):(Math.abs(ee)>z||Math.abs(q)>z)&&(_.current=null)}),onPointerUp:le(t.onPointerUp,$=>{const ee=x.current,q=$.target;if(q.hasPointerCapture($.pointerId)&&q.releasePointerCapture($.pointerId),x.current=null,_.current=null,ee){const J=$.currentTarget,P={originalEvent:$,delta:ee};sy(ee,g.swipeDirection,g.swipeThreshold)?ec(QP,h,P,{discrete:!0}):ec(JP,f,P,{discrete:!0}),J.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),tR=t=>{const{__scopeToast:e,children:r,...n}=t,s=rd(Pl,e),[i,o]=b.useState(!1),[a,l]=b.useState(!1);return sR(()=>o(!0)),b.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:p.jsx(Bg,{asChild:!0,children:p.jsx(td,{...n,children:i&&p.jsxs(p.Fragment,{children:[s.label," ",r]})})})},rR="ToastTitle",ax=b.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return p.jsx(he.div,{...n,ref:e})});ax.displayName=rR;var nR="ToastDescription",lx=b.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return p.jsx(he.div,{...n,ref:e})});lx.displayName=nR;var cx="ToastAction",ux=b.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?p.jsx(hx,{altText:r,asChild:!0,children:p.jsx(Hg,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${cx}\`. Expected non-empty \`string\`.`),null)});ux.displayName=cx;var dx="ToastClose",Hg=b.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=ZP(dx,r);return p.jsx(hx,{asChild:!0,children:p.jsx(he.button,{type:"button",...n,ref:e,onClick:le(t.onClick,s.onClose)})})});Hg.displayName=dx;var hx=b.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return p.jsx(he.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function fx(t){const e=[];return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),iR(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",i=n.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const o=n.dataset.radixToastAnnounceAlt;o&&e.push(o)}else e.push(...fx(n))}}),e}function ec(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?Qb(s,i):s.dispatchEvent(i)}var sy=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),i=n>s;return e==="left"||e==="right"?i&&n>r:!i&&s>r};function sR(t=()=>{}){const e=_r(t);Hr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function iR(t){return t.nodeType===t.ELEMENT_NODE}function oR(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function oh(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var aR=rx,px=sx,gx=ox,vx=ax,mx=lx,yx=ux,_x=Hg;function wx(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=wx(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function bx(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=wx(t))&&(n&&(n+=" "),n+=e);return n}const iy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,oy=bx,nd=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return oy(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:i}=e,o=Object.keys(s).map(c=>{const u=r==null?void 0:r[c],d=i==null?void 0:i[c];if(u===null)return null;const f=iy(u)||iy(d);return s[c][f]}),a=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(y=>{let[g,w]=y;return Array.isArray(w)?w.includes({...i,...a}[g]):{...i,...a}[g]===w})?[...c,d,f]:c},[]);return oy(t,o,l,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 lR=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xx=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===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 cR={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 uR=b.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:i,iconNode:o,...a},l)=>b.createElement("svg",{ref:l,...cR,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:xx("lucide",s),...a},[...o.map(([c,u])=>b.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
56 * @license lucide-react v0.462.0 - ISC
57 *
58 * This source code is licensed under the ISC license.
59 * See the LICENSE file in the root directory of this source tree.
60 */const Me=(t,e)=>{const r=b.forwardRef(({className:n,...s},i)=>b.createElement(uR,{ref:i,iconNode:e,className:xx(`lucide-${lR(t)}`,n),...s}));return r.displayName=`${t}`,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 ay=Me("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 Wf=Me("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}
70],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
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 dR=Me("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/**
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 Hf=Me("CalendarDays",[["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"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/**
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 hR=Me("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"}]]);/**
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 fR=Me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
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 Ex=Me("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 ly=Me("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"}]]);/**
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 pR=Me("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"}]]);/**
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 Sx=Me("Handshake",[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]]);/**
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 gR=Me("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/**
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 vR=Me("ImageOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/**
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 mR=Me("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/**
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 kx=Me("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/**
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 yR=Me("Lightbulb",[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]]);/**
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 _R=Me("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"}]]);/**
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 wR=Me("Megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);/**
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 bR=Me("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"}]]);/**
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 xR=Me("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"}]]);/**
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 Vf=Me("Ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]]);/**
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 Cx=Me("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"}]]);/**
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 Vg=Me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 9,615 bytes, line 170
170],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),qg="-",ER=t=>{const e=kR(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:o=>{const a=o.split(qg);return a[0]===""&&a.length!==1&&a.shift(),Tx(a,e)||SR(o)},getConflictingClassGroupIds:(o,a)=>{const l=r[o]||[];return a&&n[o]?[...l,...n[o]]:l}}},Tx=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?Tx(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(qg);return(o=e.validators.find(({validator:a})=>a(i)))==null?void 0:o.classGroupId},cy=/^\[(.+)\]$/,SR=t=>{if(cy.test(t)){const e=cy.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},kR=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return TR(Object.entries(t.classGroups),r).forEach(([i,o])=>{qf(o,n,i,e)}),n},qf=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:uy(e,s);i.classGroupId=r;return}if(typeof s=="function"){if(CR(s)){qf(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([i,o])=>{qf(o,uy(e,i),r,n)})})},uy=(t,e)=>{let r=t;return e.split(qg).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},CR=t=>t.isThemeGetter,TR=(t,e)=>e?t.map(([r,n])=>{const s=n.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,a])=>[e+o,a])):i);return[r,s]}):t,PR=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(i,o)=>{r.set(i,o),e++,e>t&&(e=0,n=r,r=new Map)};return{get(i){let o=r.get(i);if(o!==void 0)return o;if((o=n.get(i))!==void 0)return s(i,o),o},set(i,o){r.has(i)?r.set(i,o):s(i,o)}}},Px="!",RR=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],i=e.length,o=a=>{const l=[];let c=0,u=0,d;for(let w=0;w<a.length;w++){let m=a[w];if(c===0){if(m===s&&(n||a.slice(w,w+i)===e)){l.push(a.slice(u,w)),u=w+i;continue}if(m==="/"){d=w;continue}}m==="["?c++:m==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Px),y=h?f.substring(1):f,g=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}};return r?a=>r({className:a,parseClassName:o}):o},NR=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(n=>{n[0]==="["?(e.push(...r.sort(),n),r=[]):r.push(n)}),e.push(...r.sort()),e},OR=t=>({cache:PR(t.cacheSize),parseClassName:RR(t),...ER(t)}),AR=/\s+/,jR=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,i=[],o=t.trim().split(AR);let a="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(c);let y=!!h,g=n(y?f.substring(0,h):f);if(!g){if(!y){a=c+(a.length>0?" "+a:a);continue}if(g=n(f),!g){a=c+(a.length>0?" "+a:a);continue}y=!1}const w=NR(u).join(":"),m=d?w+Px:w,v=m+g;if(i.includes(v))continue;i.push(v);const _=s(g,y);for(let x=0;x<_.length;++x){const E=_[x];i.push(m+E)}a=c+(a.length>0?" "+a:a)}return a};function IR(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=Rx(e))&&(n&&(n+=" "),n+=r);return n}const Rx=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Rx(t[n]))&&(r&&(r+=" "),r+=e);return r};function $R(t,...e){let r,n,s,i=o;function o(l){const c=e.reduce((u,d)=>d(u),t());return r=OR(c),n=r.cache.get,s=r.cache.set,i=a,a(l)}function a(l){const c=n(l);if(c)return c;const u=jR(l,r);return s(l,u),u}return function(){return i(IR.apply(null,arguments))}}const Ee=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Nx=/^\[(?:([a-z-]+):)?(.+)\]$/i,LR=/^\d+\/\d+$/,MR=new Set(["px","full","screen"]),DR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FR=/\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$/,UR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,BR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Yr=t=>Yi(t)||MR.has(t)||LR.test(t),Pn=t=>Ro(t,"length",JR),Yi=t=>!!t&&!Number.isNaN(Number(t)),ah=t=>Ro(t,"number",Yi),qo=t=>!!t&&Number.isInteger(Number(t)),WR=t=>t.endsWith("%")&&Yi(t.slice(0,-1)),se=t=>Nx.test(t),Rn=t=>DR.test(t),HR=new Set(["length","size","percentage"]),VR=t=>Ro(t,HR,Ox),qR=t=>Ro(t,"position",Ox),KR=new Set(["image","url"]),GR=t=>Ro(t,KR,XR),YR=t=>Ro(t,"",QR),Ko=()=>!0,Ro=(t,e,r)=>{const n=Nx.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},JR=t=>FR.test(t)&&!UR.test(t),Ox=()=>!1,QR=t=>BR.test(t),XR=t=>zR.test(t),ZR=()=>{const t=Ee("colors"),e=Ee("spacing"),r=Ee("blur"),n=Ee("brightness"),s=Ee("borderColor"),i=Ee("borderRadius"),o=Ee("borderSpacing"),a=Ee("borderWidth"),l=Ee("contrast"),c=Ee("grayscale"),u=Ee("hueRotate"),d=Ee("invert"),f=Ee("gap"),h=Ee("gradientColorStops"),y=Ee("gradientColorStopPositions"),g=Ee("inset"),w=Ee("margin"),m=Ee("opacity"),v=Ee("padding"),_=Ee("saturate"),x=Ee("scale"),E=Ee("sepia"),k=Ee("skew"),S=Ee("space"),C=Ee("translate"),N=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",se,e],L=()=>[se,e],Y=()=>["",Yr,Pn],$=()=>["auto",Yi,se],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",se],D=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[Yi,se];return{cacheSize:500,separator:":",theme:{colors:[Ko],spacing:[Yr,Pn],blur:["none","",Rn,se],brightness:te(),borderColor:[t],borderRadius:["none","","full",Rn,se],borderSpacing:L(),borderWidth:Y(),contrast:te(),grayscale:O(),hueRotate:te(),invert:O(),gap:L(),gradientColorStops:[t],gradientColorStopPositions:[WR,Pn],inset:H(),margin:H(),opacity:te(),padding:L(),saturate:te(),scale:te(),sepia:O(),skew:te(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",se]}],container:["container"],columns:[{columns:[Rn]}],"break-after":[{"break-after":D()}],"break-before":[{"break-before":D()}],"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:[...ee(),se]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",qo,se]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",se]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",qo,se]}],"grid-cols":[{"grid-cols":[Ko]}],"col-start-end":[{col:["auto",{span:["full",qo,se]},se]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[Ko]}],"row-start-end":[{row:["auto",{span:[qo,se]},se]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",se]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",se]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",se,e]}],"min-w":[{"min-w":[se,e,"min","max","fit"]}],"max-w":[{"max-w":[se,e,"none","full","min","max","fit","prose",{screen:[Rn]}
vendor: 8,300 bytes, line 170
170,Rn]}],h:[{h:[se,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[se,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[se,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[se,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Rn,Pn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ah]}],"font-family":[{font:[Ko]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",se]}],"line-clamp":[{"line-clamp":["none",Yi,ah]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Yr,se]}],"list-image":[{"list-image":["none",se]}],"list-style-type":[{list:["none","disc","decimal",se]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Yr,Pn]}],"underline-offset":[{"underline-offset":["auto",Yr,se]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),qR]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",VR]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},GR]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"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":[Yr,se]}],"outline-w":[{outline:[Yr,Pn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Yr,Pn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Rn,YR]}],"shadow-color":[{shadow:[Ko]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...J(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":J()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Rn,se]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[_]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",se]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",se]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",se]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[qo,se]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",se]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",se]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Yr,Pn,ah]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","
170none"]}]},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"]}}},eN=$R(ZR);function pe(...t){return eN(bx(t))}const tN=aR,Ax=b.forwardRef(({className:t,...e},r)=>p.jsx(px,{ref:r,className:pe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));Ax.displayName=px.displayName;const rN=nd("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"}}),jx=b.forwardRef(({className:t,variant:e,...r},n)=>p.jsx(gx,{ref:n,className:pe(rN({variant:e}),t),...r}));jx.displayName=gx.displayName;const nN=b.forwardRef(({className:t,...e},r)=>p.jsx(yx,{ref:r,className:pe("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",t),...e}));nN.displayName=yx.displayName;const Ix=b.forwardRef(({className:t,...e},r)=>p.jsx(_x,{ref:r,className:pe("absolute right-2 top-2 rounded-md p-1 text-foreground
170/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",t),"toast-close":"",...e,children:p.jsx(Vg,{className:"h-4 w-4"})}));Ix.displayName=_x.displayName;const $x=b.forwardRef(({className:t,...e},r)=>p.jsx(vx,{ref:r,className:pe("text-sm font-semibold",t),...e}));$x.displayName=vx.displayName;const Lx=b.forwardRef(({className:t,...e},r)=>p.jsx(mx,{ref:r,className:pe("text-sm opacity-90",t),...e}));Lx.displayName=mx.displayName;function sN(){const{toasts:t}=Fg();return p.jsxs(tN,{children:[t.map(function({id:e,title:r,description:n,action:s,...i}){return p.jsxs(jx,{...i,children:[p.jsxs("div",{className:"grid gap-1",children:[r&&p.jsx($x,{children:r}),n&&p.jsx(Lx,{children:n})]}),s,p.jsx(Ix,{})]},e)}),p.jsx(Ax,{})]})}var dy=["light","dark"],iN="(prefers-color-scheme: dark)",oN=b.createContext(void 0),aN={setTheme:t=>{},themes:[]},lN=()=>{var t;return(t=b.useContext(oN))!=null?t:aN};b.memo(({forcedTheme:t,storageKey:e,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:i,value:o,attrs:a,nonce:l})=>{let c=i==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=s?dy.includes(i)&&i?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${i}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,g=!1,w=!0)=>{let m=o?o[y]:y,v=g?y+"|| ''":`'${m}'`,_="";return s&&w&&!g&&dy.includes(y)&&(_+=`d.style.colorScheme = '${y}';`),r==="class"?g||m?_+=`c.add(${v})`:_+="null":m&&(_+=`d[s](n,${v})`),_},h=t?`!function(){${u}${f(t)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${iN}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${c?"":"else{"+f(i,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(i,!1,!1)};}${d}}catch(t){}}();`;return b.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var cN=t=>{switch(t){case"success":return hN;case"info":return pN;case"warning":return fN;case"error":return gN;default:return null}},uN=Array(12).fill(0),dN=({visible:t,className:e})=>j.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},j.createElement("div",{className:"sonner-spinner"},uN.map((r,n)=>j.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),hN=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"}
170)),fN=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},j.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"})),pN=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),gN=j.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},j.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"})),vN=j.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"},j.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),j.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),mN=()=>{let[t,e]=j.useState(document.hidden);return j.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},Kf=1,yN=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let r=this.subscribers.indexOf(e);this.subscribers.splice(r,1)}),this.publish=e=>{this.subscribers.forEach(r=>r(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var r;let{message:n,...s}=e,i=typeof(e==null?void 0:e.id)=="number"||((r=e.id)==null?void 0:r.length)>0?e.id:Kf++,o=this.toasts.find(l=>l.id===i),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...e,id:i,title:n}),{...l,...e,id:i,dismissible:a,title:n}):l):this.addToast({title:n,...s,dismissible:a,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),this.subscribers.forEach(r=>r({id:e,dismiss:!0})),e),this.message=(e,r)=>this.create({...r,message:e}),this.error=(e,r)=>this.create({...r,message:e,type:"error"}),this.success=(e,r)=>this.create({...r,type:"success",message:e}),this.info=(e,r)=>this.create({...r,type:"info",message:e}),this.warning=(e,r)=>this.create({...r,type:"warning",message:e}),this.loading=(e,r)=>this.create({...r,type:"loading",message:e}),this.promise=(e,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:e,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));let s=e instanceof Promise?e:e(),i=n!==void 0,o,a=s.then(async c=>{if(o=["resolve",c],j.isValidElement(c))i=!1,this.create({id:n,type:"default",message:c});
170else if(wN(c)&&!c.ok){i=!1;let u=typeof r.error=="function"?await r.error(`HTTP error! status: ${c.status}`):r.error,d=typeof r.description=="function"?await r.description(`HTTP error! status: ${c.status}`):r.description;this.create({id:n,type:"error",message:u,description:d})}else if(r.success!==void 0){i=!1;let u=typeof r.success=="function"?await r.success(c):r.success,d=typeof r.description=="function"?await r.description(c):r.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(o=["reject",c],r.error!==void 0){i=!1;let u=typeof r.error=="function"?await r.error(c):r.error,d=typeof r.description=="function"?await r.description(c):r.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;i&&(this.dismiss(n),n=void 0),(c=r.finally)==null||c.call(r)}),l=()=>new Promise((c,u)=>a.then(()=>o[0]==="reject"?u(o[1]):c(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,r)=>{let n=(r==null?void 0:r.id)||Kf++;return this.create({jsx:e(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Et=new yN,_N=(t,e)=>{let r=(e==null?void 0:e.id)||Kf++;return Et.addToast({title:t,...e,id:r}),r},wN=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",bN=_N,xN=()=>Et.toasts,EN=()=>Et.getActiveToasts();Object.assign(bN,{success:Et.success,info:Et.info,warning:Et.warning,error:Et.error,custom:Et.custom,message:Et.message,promise:Et.promise,dismiss:Et.dismiss,loading:Et.loading},{getHistory:xN,getToasts:EN});function SN(t,{insertAt:e}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}SN(`: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;
170left: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}
170: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%);
170--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%)}
171`);function tc(t){return t.label!==void 0}var kN=3,CN="32px",TN="16px",hy=4e3,PN=356,RN=14,NN=20,ON=200;function or(...t){return t.filter(Boolean).join(" ")}function AN(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var jN=t=>{var e,r,n,s,i,o,a,l,c,u,d;let{invert:f,toast:h,unstyled:y,interacting:g,setHeights:w,visibleToasts:m,heights:v,index:_,toasts:x,expanded:E,removeToast:k,defaultRichColors:S,closeButton:C,style:N,cancelButtonStyle:A,actionButtonStyle:H,className:L="",descriptionClassName:Y="",duration:$,position:ee,gap:q,loadingIcon:J,expandByDefault:P,classNames:O,icons:D,closeButtonAriaLabel:te="Close toast",pauseWhenPageIsHidden:z}=t,[X,Z]=j.useState(null),[me,xe]=j.useState(null),[ue,En]=j.useState(!1),[kr,at]=j.useState(!1),[Cr,Gr]=j.useState(!1),[Ht,gs]=j.useState(!1),[ai,vs]=j.useState(!1),[ms,Lo]=j.useState(0),[li,Dv]=j.useState(0),Mo=j.useRef(h.duration||$||hy),Fv=j.useRef(null),ys=j.useRef(null),Nk=_===0,Ok=_+1<=m,Vt=h.type,ci=h.dism
171issible!==!1,Ak=h.className||"",jk=h.descriptionClassName||"",Il=j.useMemo(()=>v.findIndex(re=>re.toastId===h.id)||0,[v,h.id]),Ik=j.useMemo(()=>{var re;return(re=h.closeButton)!=null?re:C},[h.closeButton,C]),Uv=j.useMemo(()=>h.duration||$||hy,[h.duration,$]),Rd=j.useRef(0),ui=j.useRef(0),Bv=j.useRef(0),di=j.useRef(null),[$k,Lk]=ee.split("-"),zv=j.useMemo(()=>v.reduce((re,ve,Te)=>Te>=Il?re:re+ve.height,0),[v,Il]),Wv=mN(),Mk=h.invert||f,Nd=Vt==="loading";ui.current=j.useMemo(()=>Il*q+zv,[Il,zv]),j.useEffect(()=>{Mo.current=Uv},[Uv]),j.useEffect(()=>{En(!0)},[]),j.useEffect(()=>{let re=ys.current;if(re){let ve=re.getBoundingClientRect().height;return Dv(ve),w(Te=>[{toastId:h.id,height:ve,position:h.position},...Te]),()=>w(Te=>Te.filter(rr=>rr.toastId!==h.id))}},[w,h.id]),j.useLayoutEffect(()=>{if(!ue)return;let re=ys.current,ve=re.style.height;re.style.height="auto";let Te=re.getBoundingClientRect().height;re.style.height=ve,Dv(Te),w(rr=>rr.find(nr=>nr.toastId===h.id)?rr.map(nr=>nr.toastId===h.id?{...nr,height:Te}:nr):[{toastId:h.id,height:Te,position:h.position},...rr])},[ue,h.title,h.description,w,h.id]);let Sn=j.useCallback(()=>{at(!0),Lo(ui.current),w(re=>re.filter(ve=>ve.toastId!==h.id)),setTimeout(()=>{k(h)},ON)},[h,k,w,ui]);j.useEffect(()=>{if(h.promise&&Vt==="loading"||h.duration===1/0||h.type==="loading")return;let re;return E||g||z&&Wv?(()=>{if(Bv.current<Rd.current){let ve=new Date().getTime()-Rd.current;Mo.current=Mo.current-ve}Bv.current=new Date().getTime()})():Mo.current!==1/0&&(Rd.current=new Date().getTime(),re=setTimeout(()=>{var ve;(ve=h.onAutoClose)==null||ve.call(h,h),Sn()},Mo.current)),()=>clearTimeout(re)},[E,g,h,Vt,z,Wv,Sn]),j.useEffect(()=>{h.delete&&Sn()},[Sn,h.delete]);function Dk(){var re,ve,Te;return D!=null&&D.loading?j.createElement("div",{className:or(O==null?void 0:O.loader,(re=h==null?void 0:h.classNames)==null?void 0:re.loader,"sonner-loader"),"data-visible":Vt==="loading"},D.loading):J?j.createElement("div",{className:or(O==null?void 0:O.loader,(ve=h==null?void 0:h.classNames)==null?void 0:ve.loader,"sonner-loader"),"data-visible":Vt==="loading"},J):j.createElement(dN,{className:or(O==null?void 0:O.loader,(Te=h==null?void 0:h.classNames)==null?void 0:Te.loader),visible:Vt==="loading"})}return j.createElement("li",{tabIndex:0,ref:ys,className:or(L,Ak,O==null?void 0:O.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,O==null?void 0:O.default,O==null?void 0:O[Vt],(r=h==null?void 0:h.classNames)==null?void 0:r[Vt]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:S,"data-styled":!(h.jsx||h.unstyled||y),"data-mounted":ue,"data-promise":!!h.promise,"data-swiped":ai,"data-removed":kr,"data-visible":Ok,"data-y-position":$k,"data-x-position":Lk,"data-index":_,"data-front":Nk,"data-swiping":Cr,"data-dismissible":ci,"data-type":Vt,"data-invert":Mk,"data-swipe-out":Ht,"data-swipe-direction":me,"data-expanded":!!(E||P&&ue),style:{"--index":_,"--toasts-before":_,"--z-index":x.length-_,"--offset":`${kr?ms:ui.current}px`,"--initial-height":P?"auto":`${li}px`,...N,...h.style},onDragEnd:()=>{Gr(!1),Z(null),di.current=null},onPointerDown:re=>{Nd||!ci||(Fv.current=new Date,Lo(ui.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(Gr(!0),di.current={x:re.clientX,y:re.clientY}))},onPointerUp:()=>{var re,ve,Te,rr;if(Ht||!ci)return;di.current=null;let nr=Number(((re=ys.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),kn=Number(((ve=ys.current)==null?void 0:ve.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),_s=new Date().getTime()-((Te=Fv.current)==null?void 0:Te.getTime()),sr=X==="x"?nr:kn,Cn=Math.abs(sr)/_s;if(Math.abs(sr)>=NN||Cn>.11){Lo(ui.current),(rr=h.onDismiss)==null||rr.call(h,h),xe(X==="x"?nr>0?"right":"left":kn>0?"down":"up"),Sn(),gs(!0),vs(!1);return}Gr(!1),Z(null)},onPointerMove:re=>{var ve,Te,rr,nr;if(!di.current||!ci||((ve=window.getSelection())==null?void 0:ve.toString().length)>0)return;let kn=re.clientY-di.current.y,_s=re.clientX-di.current.x,sr=(Te=t.swipeDirections)!=null?Te:AN(ee);!X&&(Math.abs(_s)>1||Math.abs(kn)>1)&&Z(Math.abs(_s)>Math.abs(kn)?"x":"y");let Cn={x:0,y:0};X==="y"?(sr.includes("top")||sr.includes("bottom"))&&(sr.includes("top")&&kn<0||sr.includes("bottom")&&kn>0)&&(Cn.y=kn):X==="x"&&(sr.includes("left")||sr.includes("right"))&&(sr.includes("left")&&_s<0||sr.includes("right")&&_s>0)&&(Cn.x=_s),(Math.abs(Cn.x)>0||Math.abs(Cn.y)>
vendor: 4,404 bytes, line 171
1710)&&vs(!0),(rr=ys.current)==null||rr.style.setProperty("--swipe-amount-x",`${Cn.x}px`),(nr=ys.current)==null||nr.style.setProperty("--swipe-amount-y",`${Cn.y}px`)}},Ik&&!h.jsx?j.createElement("button",{"aria-label":te,"data-disabled":Nd,"data-close-button":!0,onClick:Nd||!ci?()=>{}:()=>{var re;Sn(),(re=h.onDismiss)==null||re.call(h,h)},className:or(O==null?void 0:O.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(i=D==null?void 0:D.close)!=null?i:vN):null,h.jsx||b.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:j.createElement(j.Fragment,null,Vt||h.icon||h.promise?j.createElement("div",{"data-icon":"",className:or(O==null?void 0:O.icon,(o=h==null?void 0:h.classNames)==null?void 0:o.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||Dk():null,h.type!=="loading"?h.icon||(D==null?void 0:D[Vt])||cN(Vt):null):null,j.createElement("div",{"data-content":"",className:or(O==null?void 0:O.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},j.createElement("div",{"data-title":"",className:or(O==null?void 0:O.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?j.createElement("div",{"data-description":"",className:or(Y,jk,O==null?void 0:O.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),b.isValidElement(h.cancel)?h.cancel:h.cancel&&tc(h.cancel)?j.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||A,onClick:re=>{var ve,Te;tc(h.cancel)&&ci&&((Te=(ve=h.cancel).onClick)==null||Te.call(ve,re),Sn())},className:or(O==null?void 0:O.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,b.isValidElement(h.action)?h.action:h.action&&tc(h.action)?j.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||H,onClick:re=>{var ve,Te;tc(h.action)&&((Te=(ve=h.action).onClick)==null||Te.call(ve,re),!re.defaultPrevented&&Sn())},className:or(O==null?void 0:O.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function fy(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function IN(t,e){let r={};return[t,e].forEach((n,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",a=i?TN:CN;function l(c){["top","right","bottom","left"].forEach(u=>{r[`${o}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${o}-${c}`]=a:r[`${o}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var $N=b.forwardRef(function(t,e){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:d,duration:f,style:h,visibleToasts:y=kN,toastOptions:g,dir:w=fy(),gap:m=RN,loadingIcon:v,icons:_,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:E}=t,[k,S]=j.useState([]),C=j.useMemo(()=>Array.from(new Set([n].concat(k.filter(z=>z.position).map(z=>z.position)))),[k,n]),[N,A]=j.useState([]),[H,L]=j.useState(!1),[Y,$]=j.useState(!1),[ee,q]=j.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),J=j.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=j.useRef(null),D=j.useRef(!1),te=j.useCallback(z=>{S(X=>{var Z;return(Z=X.find(me=>me.id===z.id))!=null&&Z.delete||Et.dismiss(z.id),X.filter(({id:me})=>me!==z.id)})},[]);return j.useEffect(()=>Et.subscribe(z=>{if(z.dismiss){S(X=>X.map(Z=>Z.id===z.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{Kb.flushSync(()=>{S(X=>{let Z=X.findIndex(me=>me.id===z.id);return Z!==-1?[...X.slice(0,Z),{...X[Z],...z},...X.slice(Z+1)]:[z,...X]})})})}),[]),j.useEffect(()=>{if(u!=="system"){q(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:X})=>{q(X?"dark":"light")})}catch{z.addListener(({matches:Z})=>{try{q(Z?"dark":"light")}catch(me){console.error(me)}
vendor: 5,193 bytes, line 171
171})}},[u]),j.useEffect(()=>{k.length<=1&&L(!1)},[k]),j.useEffect(()=>{let z=X=>{var Z,me;s.every(xe=>X[xe]||X.code===xe)&&(L(!0),(Z=J.current)==null||Z.focus()),X.code==="Escape"&&(document.activeElement===J.current||(me=J.current)!=null&&me.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[s]),j.useEffect(()=>{if(J.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,D.current=!1)}},[J.current]),j.createElement("section",{ref:e,"aria-label":`${x} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((z,X)=>{var Z;let[me,xe]=z.split("-");return k.length?j.createElement("ol",{key:z,dir:w==="auto"?fy():w,tabIndex:-1,ref:J,className:a,"data-sonner-toaster":!0,"data-theme":ee,"data-y-position":me,"data-lifted":H&&k.length>1&&!i,"data-x-position":xe,style:{"--front-toast-height":`${((Z=N[0])==null?void 0:Z.height)||0}px`,"--width":`${PN}px`,"--gap":`${m}px`,...h,...IN(l,c)},onBlur:ue=>{D.current&&!ue.currentTarget.contains(ue.relatedTarget)&&(D.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||D.current||(D.current=!0,O.current=ue.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{Y||L(!1)},onDragEnd:()=>L(!1),onPointerDown:ue=>{ue.target instanceof HTMLElement&&ue.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},k.filter(ue=>!ue.position&&X===0||ue.position===z).map((ue,En)=>{var kr,at;return j.createElement(jN,{key:ue.id,icons:_,index:En,toast:ue,defaultRichColors:d,duration:(kr=g==null?void 0:g.duration)!=null?kr:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:y,closeButton:(at=g==null?void 0:g.closeButton)!=null?at:o,interacting:Y,position:z,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:te,toasts:k.filter(Cr=>Cr.position==ue.position),heights:N.filter(Cr=>Cr.position==ue.position),setHeights:A,expandByDefault:i,gap:m,loadingIcon:v,expanded:H,pauseWhenPageIsHidden:E,swipeDirections:t.swipeDirections})})):null}))});const LN=({...t})=>{const{theme:e="system"}=lN();return p.jsx($N,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};var MN=Gp[" useId ".trim().toString()]||(()=>{}),DN=0;function Ws(t){const[e,r]=b.useState(MN());return Hr(()=>{t||r(n=>n??String(DN++))},[t]),t||(e?`radix-${e}`:"")}const FN=["top","right","bottom","left"],cs=Math.min,It=Math.max,uu=Math.round,rc=Math.floor,Wr=t=>({x:t,y:t}),UN={left:"right",right:"left",bottom:"top",top:"bottom"},BN={start:"end",end:"start"};function Gf(t,e,r){return It(t,cs(e,r))}function yn(t,e){return typeof t=="function"?t(e):t}function _n(t){return t.split("-")[0]}function No(t){return t.split("-")[1]}function Kg(t){return t==="x"?"y":"x"}function Gg(t){return t==="y"?"height":"width"}const zN=new Set(["top","bottom"]);function Fr(t){return zN.has(_n(t))?"y":"x"}function Yg(t){return Kg(Fr(t))}function WN(t,e,r){r===void 0&&(r=!1);const n=No(t),s=Yg(t),i=Gg(s);let o=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(o=du(o)),[o,du(o)]}function HN(t){const e=du(t);return[Yf(t),e,Yf(e)]}function Yf(t){return t.replace(/start|end/g,e=>BN[e])}const py=["left","right"],gy=["right","left"],VN=["top","bottom"],qN=["bottom","top"];function KN(t,e,r){switch(t){case"top":case"bottom":return r?e?gy:py:e?py:gy;case"left":case"right":return e?VN:qN;default:return[]}}function GN(t,e,r,n){const s=No(t);let i=KN(_n(t),r==="start",n);return s&&(i=i.map(o=>o+"-"+s),e&&(i=i.concat(i.map(Yf)))),i}function du(t){return t.replace(/left|right|bottom|top/g,e=>UN[e])}function YN(t){return{top:0,right:0,bottom:0,left:0,...t}}function Mx(t){return typeof t!="number"?YN(t):{top:t,right:t,bottom:t,left:t}}function hu(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function vy(t,e,r){let{reference:n,floating:s}=t;const i=Fr(e),o=Yg(e),a=Gg(o),l=_n(e),c=i==="y",u=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:u,y:n.y-s.height};break;case"bottom":h={x:u,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(No(e)){case"start":h[o]-=f*(r&&c?-1:1);break;case"end":h[o]+=f*(r&&c?-1:1);break}return h}const JN=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:i=[],platform:o}
vendor: 9,939 bytes, line 171
171=r,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=vy(c,n,l),f=n,h={},y=0;for(let g=0;g<a.length;g++){const{name:w,fn:m}=a[g],{x:v,y:_,data:x,reset:E}=await m({x:u,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:c,platform:o,elements:{reference:t,floating:e}});u=v??u,d=_??d,h={...h,[w]:{...h[w],...x}},E&&y<=50&&(y++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):E.rects),{x:u,y:d}=vy(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:s,middlewareData:h}};async function tl(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:i,rects:o,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=yn(e,t),y=Mx(h),w=a[f?d==="floating"?"reference":"floating":d],m=hu(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(w)))==null||r?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v=d==="floating"?{x:n,y:s,width:o.floating.width,height:o.floating.height}:o.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(_))?await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1}:{x:1,y:1},E=hu(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:_,strategy:l}):v);return{top:(m.top-E.top+y.top)/x.y,bottom:(E.bottom-m.bottom+y.bottom)/x.y,left:(m.left-E.left+y.left)/x.x,right:(E.right-m.right+y.right)/x.x}}const QN=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=yn(t,e)||{};if(c==null)return{};const d=Mx(u),f={x:r,y:n},h=Yg(s),y=Gg(h),g=await o.getDimensions(c),w=h==="y",m=w?"top":"left",v=w?"bottom":"right",_=w?"clientHeight":"clientWidth",x=i.reference[y]+i.reference[h]-f[h]-i.floating[y],E=f[h]-i.reference[h],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let S=k?k[_]:0;(!S||!await(o.isElement==null?void 0:o.isElement(k)))&&(S=a.floating[_]||i.floating[y]);const C=x/2-E/2,N=S/2-g[y]/2-1,A=cs(d[m],N),H=cs(d[v],N),L=A,Y=S-g[y]-H,$=S/2-g[y]/2+C,ee=Gf(L,$,Y),q=!l.arrow&&No(s)!=null&&$!==ee&&i.reference[y]/2-($<L?A:H)-g[y]/2<0,J=q?$<L?$-L:$-Y:0;return{[h]:f[h]+J,data:{[h]:ee,centerOffset:$-ee-J,...q&&{alignmentOffset:J}},reset:q}}}),XN=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:i,rects:o,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...w}=yn(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const m=_n(s),v=Fr(a),_=_n(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(_||!g?[du(a)]:HN(a)),k=y!=="none";!f&&k&&E.push(...GN(a,g,y,x));const S=[a,...E],C=await tl(e,w),N=[];let A=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&N.push(C[m]),d){const $=WN(s,o,x);N.push(C[$[0]],C[$[1]])}if(A=[...A,{placement:s,overflows:N}],!N.every($=>$<=0)){var H,L;const $=(((H=i.flip)==null?void 0:H.index)||0)+1,ee=S[$];if(ee&&(!(d==="alignment"?v!==Fr(ee):!1)||A.every(P=>P.overflows[0]>0&&Fr(P.placement)===v)))return{data:{index:$,overflows:A},reset:{placement:ee}};let q=(L=A.filter(J=>J.overflows[0]<=0).sort((J,P)=>J.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!q)switch(h){case"bestFit":{var Y;const J=(Y=A.filter(P=>{if(k){const O=Fr(P.placement);return O===v||O==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(O=>O>0).reduce((O,D)=>O+D,0)]).sort((P,O)=>P[1]-O[1])[0])==null?void 0:Y[0];J&&(q=J);break}case"initialPlacement":q=a;break}if(s!==q)return{reset:{placement:q}}}return{}}}};function my(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function yy(t){return FN.some(e=>t[e]>=0)}const ZN=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=yn(t,e);switch(n){case"referenceHidden":{const i=await tl(e,{...s,elementContext:"reference"}),o=my(i,r.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:yy(o)}}}case"escaped":{const i=await tl(e,{...s,altBoundary:!0}),o=my(i,r.floating);return{data:{escapedOffsets:o,escaped:yy(o)}}}default:return{}}}}},Dx=new Set(["left","top"]);async function eO(t,e){const{placement:r,platform:n,elements:s}=t,i=await(n.isRTL==null?void 0:n.isRTL(s.floating)),o=_n(r),a=No(r),l=Fr(r)==="y",c=Dx.has(o)?-1:1,u=i&&l?-1:1,d=yn(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof y=="number"&&(h=a==="end"?y*-1:y),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const tO=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:i,placement:o,middlewareData:a}=e,l=await eO(e,t);return o===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},rO=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:m,y:v}=w;return{x:m,y:v}}},...l}=yn(t,e),c={x:r,y:n},u=await tl(e,l),d=Fr(_n(s)),f=Kg(d);let h=c[f],y=c[d];if(i){const w=f==="y"?"top":"left",m=f==="y"?"bottom":"right",v=h+u[w],_=h-u[m];h=Gf(v,h,_)}if(o){const w=d==="y"?"top":"left",m=d==="y"?"bottom":"right",v=y+u[w],_=y-u[m];y=Gf(v,y,_)}const g=a.fn({...e,[f]:h,[d]:y});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[f]:i,[d]:o}}}}}},nO=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:i,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=yn(t,e),u={x:r,y:n},d=Fr(s),f=Kg(d);let h=u[f],y=u[d];const g=yn(a,e),w=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const _=f==="y"?"height":"width",x=i.reference[f]-i.floating[_]+w.mainAxis,E=i.reference[f]+i.reference[_]-w.mainAxis;h<x?h=x:h>E&&(h=E)}if(c){var m,v;const _=f==="y"?"width":"height",x=Dx.has(_n(s)),E=i.reference[d]-i.floating[_]+(x&&((m=o.offset)==null?void 0:m[d])||0)+(x?0:w.crossAxis),k=i.reference[d]+i.reference[_]+(x?0:((v=o.offset)==null?void 0:v[d])||0)-(x?w.crossAxis:0);y<E?y=E:y>k&&(y=k)}return{[f]:h,[d]:y}}}},sO=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:i,platform:o,elements:a}=e,{apply:l=()=>{},...c}=yn(t,e),u=await tl(e,c),d=_n(s),f=No(s),h=Fr(s)==="y",{width:y,height:g}=i.floating;let w,m;d==="top"||d==="bottom"?(w=d,m=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(m=d,w=f==="end"?"top":"bottom");const v=g-u.top-u.bottom,_=y-u.left-u.right,x=cs(g-u[w],v),E=cs(y-u[m],_),k=!e.middlewareData.shift;let S=x,C=E;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(C=_),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(S=v),k&&!f){const A=It(u.left,0),H=It(u.right,0),L=It(u.top,0),Y=It(u.bottom,0);h?C=y-2*(A!==0||H!==0?A+H:It(u.left,u.right)):S=g-2*(L!==0||Y!==0?L+Y:It(u.top,u.bottom))}await l({...e,availableWidth:C,availableHeight:S});const N=await o.getDimensions(a.floating);return y!==N.width||g!==N.height?{reset:{rects:!0}}:{}}}};function sd(){return typeof window<"u"}function Oo(t){return Fx(t)?(t.nodeName||"").toLowerCase():"#document"}function Ft(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Kr(t){var e;return(e=(Fx(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Fx(t){return sd()?t instanceof Node||t instanceof Ft(t).Node:!1}function wr(t){return sd()?t instanceof Element||t instanceof Ft(t).Element:!1}function Vr(t){return sd()?t instanceof HTMLElement||t instanceof Ft(t).HTMLElement:!1}function _y(t){return!sd()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ft(t).ShadowRoot}const iO=new Set(["inline","contents"]);function Rl(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=br(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!iO.has(s)}const oO=new Set(["table","td","th"]);function aO(t){return oO.has(Oo(t))}const lO=[":popover-open",":modal"];function id(t){return lO.some(e=>{try{return t.matches(e)}catch{return!1}})}const cO=["transform","translate","scale","rotate","perspective"],uO=["transform","translate","scale","rotate","perspective","filter"],dO=["paint","layout","strict","content"];function Jg(t){const e=Qg(),r=wr(t)?br(t):t;return cO.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||uO.some(n=>(r.willChange||"").includes(n))||dO.some(n=>(r.contain||"").includes(n))}function hO(t){let e=us(t);for(;Vr(e)&&!mo(e);){if(Jg(e))return e;if(id(e))return null;e=us(e)}return null}function Qg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fO=new Set(["html","body","#document"]);function mo(t){return fO.has(Oo(t))}function br(t){return Ft(t).getComputedStyle(t)}function od(t){return wr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function us(t){if(Oo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_y(t)&&t.host||Kr(t);return _y(e)?e.host:e}function Ux(t){const e=us(t);return mo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Vr(e)&&Rl(e)?e:Ux(e)}function rl(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=Ux(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Ft(s);if(i){const a=Jf(o);
vendor: 1,887 bytes, line 171
171return e.concat(o,o.visualViewport||[],Rl(s)?s:[],a&&r?rl(a):[])}return e.concat(s,rl(s,[],r))}function Jf(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Bx(t){const e=br(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=Vr(t),i=s?t.offsetWidth:r,o=s?t.offsetHeight:n,a=uu(r)!==i||uu(n)!==o;return a&&(r=i,n=o),{width:r,height:n,$:a}}function Xg(t){return wr(t)?t:t.contextElement}function Ji(t){const e=Xg(t);if(!Vr(e))return Wr(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:i}=Bx(e);let o=(i?uu(r.width):r.width)/n,a=(i?uu(r.height):r.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const pO=Wr(0);function zx(t){const e=Ft(t);return!Qg()||!e.visualViewport?pO:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function gO(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Ft(t)?!1:e}function Js(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),i=Xg(t);let o=Wr(1);e&&(n?wr(n)&&(o=Ji(n)):o=Ji(t));const a=gO(i,r,n)?zx(i):Wr(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(i){const f=Ft(i),h=n&&wr(n)?Ft(n):n;let y=f,g=Jf(y);for(;g&&n&&h!==y;){const w=Ji(g),m=g.getBoundingClientRect(),v=br(g),_=m.left+(g.clientLeft+parseFloat(v.paddingLeft))*w.x,x=m.top+(g.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,c*=w.y,u*=w.x,d*=w.y,l+=_,c+=x,y=Ft(g),g=Jf(y)}}return hu({width:u,height:d,x:l,y:c})}function Zg(t,e){const r=od(t).scrollLeft;return e?e.left+r:Js(Kr(t)).left+r}function Wx(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-(r?0:Zg(t,n)),i=n.top+e.scrollTop;return{x:s,y:i}}function vO(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const i=s==="fixed",o=Kr(n),a=e?id(e.floating):!1;if(n===o||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=Wr(1);const u=Wr(0),d=Vr(n);
vendor: 5,509 bytes, line 171
171if((d||!d&&!i)&&((Oo(n)!=="body"||Rl(o))&&(l=od(n)),Vr(n))){const h=Js(n);c=Ji(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const f=o&&!d&&!i?Wx(o,l,!0):Wr(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function mO(t){return Array.from(t.getClientRects())}function yO(t){const e=Kr(t),r=od(t),n=t.ownerDocument.body,s=It(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=It(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let o=-r.scrollLeft+Zg(t);const a=-r.scrollTop;return br(n).direction==="rtl"&&(o+=It(e.clientWidth,n.clientWidth)-s),{width:s,height:i,x:o,y:a}}function _O(t,e){const r=Ft(t),n=Kr(t),s=r.visualViewport;let i=n.clientWidth,o=n.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=Qg();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}const wO=new Set(["absolute","fixed"]);function bO(t,e){const r=Js(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,i=Vr(t)?Ji(t):Wr(1),o=t.clientWidth*i.x,a=t.clientHeight*i.y,l=s*i.x,c=n*i.y;return{width:o,height:a,x:l,y:c}}function wy(t,e,r){let n;if(e==="viewport")n=_O(t,r);else if(e==="document")n=yO(Kr(t));else if(wr(e))n=bO(e,r);else{const s=zx(t);n={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return hu(n)}function Hx(t,e){const r=us(t);return r===e||!wr(r)||mo(r)?!1:br(r).position==="fixed"||Hx(r,e)}function xO(t,e){const r=e.get(t);if(r)return r;let n=rl(t,[],!1).filter(a=>wr(a)&&Oo(a)!=="body"),s=null;const i=br(t).position==="fixed";let o=i?us(t):t;for(;wr(o)&&!mo(o);){const a=br(o),l=Jg(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&wO.has(s.position)||Rl(o)&&!l&&Hx(t,o))?n=n.filter(u=>u!==o):s=a,o=us(o)}return e.set(t,n),n}function EO(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const o=[...r==="clippingAncestors"?id(e)?[]:xO(e,this._c):[].concat(r),n],a=o[0],l=o.reduce((c,u)=>{const d=wy(e,u,s);return c.top=It(d.top,c.top),c.right=cs(d.right,c.right),c.bottom=cs(d.bottom,c.bottom),c.left=It(d.left,c.left),c},wy(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function SO(t){const{width:e,height:r}=Bx(t);return{width:e,height:r}}function kO(t,e,r){const n=Vr(e),s=Kr(e),i=r==="fixed",o=Js(t,!0,i,e);let a={scrollLeft:0,scrollTop:0};const l=Wr(0);function c(){l.x=Zg(s)}if(n||!n&&!i)if((Oo(e)!=="body"||Rl(s))&&(a=od(e)),n){const h=Js(e,!0,i,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else s&&c();i&&!n&&s&&c();const u=s&&!n&&!i?Wx(s,a):Wr(0),d=o.left+a.scrollLeft-l.x-u.x,f=o.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:o.width,height:o.height}}function lh(t){return br(t).position==="static"}function by(t,e){if(!Vr(t)||br(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Kr(t)===r&&(r=r.ownerDocument.body),r}function Vx(t,e){const r=Ft(t);if(id(t))return r;if(!Vr(t)){let s=us(t);for(;s&&!mo(s);){if(wr(s)&&!lh(s))return s;s=us(s)}return r}let n=by(t,e);for(;n&&aO(n)&&lh(n);)n=by(n,e);return n&&mo(n)&&lh(n)&&!Jg(n)?r:n||hO(t)||r}const CO=async function(t){const e=this.getOffsetParent||Vx,r=this.getDimensions,n=await r(t.floating);return{reference:kO(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function TO(t){return br(t).direction==="rtl"}const PO={convertOffsetParentRelativeRectToViewportRelativeRect:vO,getDocumentElement:Kr,getClippingRect:EO,getOffsetParent:Vx,getElementRects:CO,getClientRects:mO,getDimensions:SO,getScale:Ji,isElement:wr,isRTL:TO};function qx(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function RO(t,e){let r=null,n;const s=Kr(t);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const c=t.getBoundingClientRect(),{left:u,top:d,width:f,height:h}=c;if(a||e(),!f||!h)return;const y=rc(d),g=rc(s.clientWidth-(u+f)),w=rc(s.clientHeight-(d+h)),m=rc(u),_={rootMargin:-y+"px "+-g+"px "+-w+"px "+-m+"px",threshold:It(0,cs(1,l))||1};let x=!0;function E(k){const S=k[0].intersectionRatio;if(S!==l){if(!x)return o();S?o(!1,S):n=setTimeout(()=>{o(!1,1e-7)},1e3)}S===1&&!qx(c,t.getBoundingClientRect())&&o(),x=!1}try{r=new IntersectionObserver(E,{..._,root:s.ownerDocument})}catch{r=new IntersectionObserver(E,_)}r.observe(t)}return o(!0),i}function NO(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=Xg(t),u=s||i?[...c?rl(c):[],...rl(e)]:[];u.forEach(m=>{s&&m.addEventListener("scroll",r,{passive:!0}),i&&m.addEventListener("resize",r)});const d=c&&a?RO(c,r):null;let f=-1,h=null;o&&(h=new ResizeObserver(m=>{let[v]=m;v&&v.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var _;(_=h)==null||_.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let y,g=l?Js(t):null;l&&w();function w(){const m=Js(t);g&&!qx(g,m)&&r(),g=m,y=requestAnimationFrame(w)}return r(),()=>{var m;u.forEach(v=>{s&&v.removeEventListener("scroll",r),i&&v.removeEventListener("resize",r)}),d==null||d(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const OO=tO,AO=rO,jO=XN,IO=sO,$O=ZN,xy=QN,LO=nO,MO=(t,e,r)=>{const n=new Map,s={platform:PO,...r},i={...s.platform,_c:n};return JN(t,e,{...s,platform:i})};var DO=typeof document<"u",FO=function(){},$c=DO?b.useLayoutEffect:FO;function fu(t,e){if(t===e)return!0;
vendor: 4,136 bytes, line 171
171if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!fu(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const i=s[n];if(!(i==="_owner"&&t.$$typeof)&&!fu(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function Kx(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ey(t,e){const r=Kx(t);return Math.round(e*r)/r}function ch(t){const e=b.useRef(t);return $c(()=>{e.current=t}),e}function UO(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,d]=b.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=b.useState(n);fu(f,n)||h(n);const[y,g]=b.useState(null),[w,m]=b.useState(null),v=b.useCallback(P=>{P!==k.current&&(k.current=P,g(P))},[]),_=b.useCallback(P=>{P!==S.current&&(S.current=P,m(P))},[]),x=i||y,E=o||w,k=b.useRef(null),S=b.useRef(null),C=b.useRef(u),N=l!=null,A=ch(l),H=ch(s),L=ch(c),Y=b.useCallback(()=>{if(!k.current||!S.current)return;const P={placement:e,strategy:r,middleware:f};H.current&&(P.platform=H.current),MO(k.current,S.current,P).then(O=>{const D={...O,isPositioned:L.current!==!1};$.current&&!fu(C.current,D)&&(C.current=D,Tl.flushSync(()=>{d(D)}))})},[f,e,r,H,L]);$c(()=>{c===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);const $=b.useRef(!1);$c(()=>($.current=!0,()=>{$.current=!1}),[]),$c(()=>{if(x&&(k.current=x),E&&(S.current=E),x&&E){if(A.current)return A.current(x,E,Y);Y()}},[x,E,Y,A,N]);const ee=b.useMemo(()=>({reference:k,floating:S,setReference:v,setFloating:_}),[v,_]),q=b.useMemo(()=>({reference:x,floating:E}),[x,E]),J=b.useMemo(()=>{const P={position:r,left:0,top:0};if(!q.floating)return P;const O=Ey(q.floating,u.x),D=Ey(q.floating,u.y);return a?{...P,transform:"translate("+O+"px, "+D+"px)",...Kx(q.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:D}},[r,a,q.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:Y,refs:ee,elements:q,floatingStyles:J}),[u,Y,ee,q,J])}const BO=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?xy({element:n.current,padding:s}).fn(r):{}:n?xy({element:n,padding:s}).fn(r):{}}}},zO=(t,e)=>({...OO(t),options:[t,e]}),WO=(t,e)=>({...AO(t),options:[t,e]}),HO=(t,e)=>({...LO(t),options:[t,e]}),VO=(t,e)=>({...jO(t),options:[t,e]}),qO=(t,e)=>({...IO(t),options:[t,e]}),KO=(t,e)=>({...$O(t),options:[t,e]}),GO=(t,e)=>({...BO(t),options:[t,e]});var YO="Arrow",Gx=b.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...i}=t;return p.jsx(he.svg,{...i,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Gx.displayName=YO;var JO=Gx;function QO(t){const[e,r]=b.useState(void 0);return Hr(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let o,a;if("borderBoxSize"in i){const l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,a=c.blockSize}else o=t.offsetWidth,a=t.offsetHeight;r({width:o,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var Yx="Popper",[Jx,Qx]=bn(Yx),[T3,Xx]=Jx(Yx),Zx="PopperAnchor",e1=b.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,i=Xx(Zx,r),o=b.useRef(null),a=Xe(e,o);return b.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||o.current)}),n?null:p.jsx(he.div,{...s,ref:a})});e1.displayName=Zx;var ev="PopperContent",[XO,ZO]=Jx(ev),t1=b.forwardRef((t,e)=>{var ue,En,kr,at,Cr,Gr;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:i="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l
vendor: 8,291 bytes, line 171
171=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=t,w=Xx(ev,r),[m,v]=b.useState(null),_=Xe(e,Ht=>v(Ht)),[x,E]=b.useState(null),k=QO(x),S=(k==null?void 0:k.width)??0,C=(k==null?void 0:k.height)??0,N=n+(i!=="center"?"-"+i:""),A=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},H=Array.isArray(c)?c:[c],L=H.length>0,Y={padding:A,boundary:H.filter(tA),altBoundary:L},{refs:$,floatingStyles:ee,placement:q,isPositioned:J,middlewareData:P}=UO({strategy:"fixed",placement:N,whileElementsMounted:(...Ht)=>NO(...Ht,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[zO({mainAxis:s+C,alignmentAxis:o}),l&&WO({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?HO():void 0,...Y}),l&&VO({...Y}),qO({...Y,apply:({elements:Ht,rects:gs,availableWidth:ai,availableHeight:vs})=>{const{width:ms,height:Lo}=gs.reference,li=Ht.floating.style;li.setProperty("--radix-popper-available-width",`${ai}px`),li.setProperty("--radix-popper-available-height",`${vs}px`),li.setProperty("--radix-popper-anchor-width",`${ms}px`),li.setProperty("--radix-popper-anchor-height",`${Lo}px`)}}),x&&GO({element:x,padding:a}),rA({arrowWidth:S,arrowHeight:C}),f&&KO({strategy:"referenceHidden",...Y})]}),[O,D]=s1(q),te=_r(y);Hr(()=>{J&&(te==null||te())},[J,te]);const z=(ue=P.arrow)==null?void 0:ue.x,X=(En=P.arrow)==null?void 0:En.y,Z=((kr=P.arrow)==null?void 0:kr.centerOffset)!==0,[me,xe]=b.useState();return Hr(()=>{m&&xe(window.getComputedStyle(m).zIndex)},[m]),p.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:J?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(at=P.transformOrigin)==null?void 0:at.x,(Cr=P.transformOrigin)==null?void 0:Cr.y].join(" "),...((Gr=P.hide)==null?void 0:Gr.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:p.jsx(XO,{scope:r,placedSide:O,onArrowChange:E,arrowX:z,arrowY:X,shouldHideArrow:Z,children:p.jsx(he.div,{"data-side":O,"data-align":D,...g,ref:_,style:{...g.style,animation:J?void 0:"none"}})})})});t1.displayName=ev;var r1="PopperArrow",eA={top:"bottom",right:"left",bottom:"top",left:"right"},n1=b.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,i=ZO(r1,n),o=eA[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(JO,{...s,ref:r,style:{...s.style,display:"block"}})})});n1.displayName=r1;function tA(t){return t!==null}var rA=t=>({name:"transformOrigin",options:t,fn(e){var w,m,v;const{placement:r,rects:n,middlewareData:s}=e,o=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[c,u]=s1(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(((m=s.arrow)==null?void 0:m.x)??0)+a/2,h=(((v=s.arrow)==null?void 0:v.y)??0)+l/2;let y="",g="";return c==="bottom"?(y=o?d:`${f}px`,g=`${-l}px`):c==="top"?(y=o?d:`${f}px`,g=`${n.floating.height+l}px`):c==="right"?(y=`${-l}px`,g=o?d:`${h}px`):c==="left"&&(y=`${n.floating.width+l}px`,g=o?d:`${h}px`),{data:{x:y,y:g}}}});function s1(t){const[e,r="center"]=t.split("-");return[e,r]}var nA=e1,sA=t1,iA=n1,[ad,P3]=bn("Tooltip",[Qx]),tv=Qx(),i1="TooltipProvider",oA=700,Sy="tooltip.open",[aA,o1]=ad(i1),a1=t=>{const{__scopeTooltip:e,delayDuration:r=oA,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:i}=t,o=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(aA,{scope:e,isOpenDelayedRef:o,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:i})};a1.displayName=i1;var l1="Tooltip",[R3,ld]=ad(l1),Qf="TooltipTrigger",lA=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=ld(Qf,r),i=o1(Qf,r),o=tv(r),a=b.useRef(null),l=Xe(e,a,s.onTriggerChange),c=b.useRef(!1),u=b.useRef(!1),d=b.useCallback(()=>c.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(nA,{asChild:!0,...o,children:p.jsx(he.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:le(t.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:le(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:le(t.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:le(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:le(t.onBlur,s.onClose),onClick:le(t.onClick,s.onClose)})})});lA.displayName=Qf;var cA="TooltipPortal",[N3,uA]=ad(cA,{forceMount:void 0}),yo="TooltipContent",c1=b.forwardRef((t,e)=>{const r=uA(yo,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...i}=t,o=ld(yo,t.__scopeTooltip);return p.jsx(ps,{present:n||o.open,children:o.disableHoverableContent?p.jsx(u1,{side:s,...i,ref:e}):p.jsx(dA,{side:s,...i,ref:e})})}),dA=b.forwardRef((t,e)=>{const r=ld(yo,t.__scopeTooltip),n=o1(yo,t.__scopeTooltip),s=b.useRef(null),i=Xe(e,s),[o,a]=b.useState(null),{trigger:l,onClose:c}=r,u=s.current,{onPointerInTransitChange:d}=n,f=b.useCallback(()=>{a(null),d(!1)},[d]),h=b.useCallback((y,g)=>{const w=y.currentTarget,m={x:y.clientX,y:y.clientY},v=vA(m,w.getBoundingClientRect()),_=mA(m,v),x=yA(g.getBoundingClientRect()),E=wA([..._,...x]);a(E),d(!0)},[d]);return b.useEffect(()=>()=>f(),[f]),b.useEffect(()=>{if(l&&u){const y=w=>h(w,u),g=w=>h(w,l);return l.addEventListener("pointerleave",y),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",g)}}},[l,u,h,f]),b.useEffect(()=>{if(o){const y=g=>{const w=g.target,m={x:g.clientX,y:g.clientY},v=(l==null?void 0:l.contains(w))||(u==null?void 0:u.contains(w)),_=!_A(m,o);v?f():_&&(f(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,u,o,c,f]),p.jsx(u1,{...t,ref:i})}),[hA,fA]=ad(l1,{isInside:!1}),pA=wP("TooltipContent"),u1=b.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:o,...a}=t,l=ld(yo,r),c=tv(r),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(Sy,u),()=>document.removeEventListener(Sy,u)),[u]),b.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),p.jsx(ed,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:p.jsxs(sA,{"data-state":l.stateAttribute,...c,...a,ref:e,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(pA,{children:n}),p.jsx(hA,{scope:r,isInside:!0,children:p.jsx(WP,{id:l.contentId,role:"tooltip",children:s||n})})]})})});c1.displayName=yo;var d1="TooltipArrow",gA=b.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=tv(r);return fA(d1,r).isInside?null:p.jsx(iA,{...s,...n,ref:e})});gA.displayName=d1;function vA(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(r,n,s,i)){case i:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function mA(t,e,r=5){const n=[];
171switch(e){case"top":n.push({x:t.x-r,y:t.y+r},{x:t.x+r,y:t.y+r});break;case"bottom":n.push({x:t.x-r,y:t.y-r},{x:t.x+r,y:t.y-r});break;case"left":n.push({x:t.x+r,y:t.y-r},{x:t.x+r,y:t.y+r});break;case"right":n.push({x:t.x-r,y:t.y-r},{x:t.x-r,y:t.y+r});break}return n}function yA(t){const{top:e,right:r,bottom:n,left:s}=t;return[{x:s,y:e},{x:r,y:e},{x:r,y:n},{x:s,y:n}]}function _A(t,e){const{x:r,y:n}=t;let s=!1;for(let i=0,o=e.length-1;i<e.length;o=i++){const a=e[i],l=e[o],c=a.x,u=a.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(s=!s)}return s}function wA(t){const e=t.slice();return e.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),bA(e)}function bA(t){if(t.length<=1)return t.slice();const e=[];for(let n=0;n<t.length;n++){const s=t[n];for(;e.length>=2;){const i=e[e.length-1],o=e[e.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))e.pop();else break}e.push(s)}e.pop();const r=[];for(let n=t.length-1;n>=0;n--){const s=t[n];for(;r.length>=2;){const i=r[r.length-1],o=r[r.length-2];if((i.x-o.x)*(s.y-o.y)>=(i.y-o.y)*(s.x-o.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var xA=a1,h1=c1;const EA=xA,SA=b.forwardRef(({className:t,sideOffset:e=4,...r},n)=>p.jsx(h1,{ref:n,sideOffset:e,className:pe("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",t),...r}));SA.displayName=h1.displayName;var cd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ud=typeof window>"u"||"Deno"in globalThis;function cr(){}function kA(t,e){return typeof t=="function"?t(e):t}function CA(t){return typeof t=="number"&&t>=0&&t!==1/0}function TA(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Xf(t,e){return typeof t=="function"?t(e):t}function PA(t,e){return typeof t=="function"?t(e):t}function ky(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:i,queryKey:o,stale:a}=t;if(o){if(n){if(e.queryHash!==rv(o,e.options))return!1}else if(!sl(e.queryKey,o))return!1}if(r!=="all"){const l=e.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||s&&s!==e.state.fetchStatus||i&&!i(e))}function Cy(t,e){const{exact:r,status:n,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(r){if(nl(e.options.mutationKey)!==nl(i))return!1}else if(!sl(e.options.mutationKey,i))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function rv(t,e){return((e==null?void 0:e.queryKeyHashFn)||nl)(t)}function nl(t){return JSON.stringify(t,(e,r)=>Zf(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function sl(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>sl(t[r],e[r])):!1}function f1(t,e){if(t===e)return t;const r=Ty(t)&&Ty(e);if(r||Zf(t)&&Zf(e)){const n=r?t:Object.keys(t),s=n.length,i=r?e:Object.keys(e),o=i.length,a=r?[]:{},l=new Set(n);let c=0;for(let u=0;u<o;u++){const d=r?u:i[u];(!r&&l.has(d)||r)&&t[d]===void 0&&e[d]===void 0?(a[d]=void 0,c++):(a[d]=f1(t[d],e[d]),a[d]===t[d]&&t[d]!==void 0&&c++)}return s===o&&c===s?t:a}return e}function Ty(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Zf(t){if(!Py(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!Py(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Py(t){return Object.prototype.toString.call(t)==="[object Object]"}function RA(t){return new Promise(e=>{setTimeout(e,t)})}function NA(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?f1(t,e):e}function OA(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function AA(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var nv=Symbol();function p1(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===nv?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var $s,Bn,to,C_,jA=(C_=class extends cd{constructor(){super();de(this,$s);de(this,Bn);de(this,to);ne(this,to,e=>{if(!ud&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,Bn)||this.setEventListener(R(this,to))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,Bn))==null||e.call(this),ne(this,Bn,void 0))}setEventListener(e){var r;ne(this,to,e),(r=R(this,Bn))==null||r.call(this),ne(this,Bn,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){R(this,$s)!==e&&(ne(this,$s,e),this.onFocus())}onFocus(){const e=this.isFocused();
vendor: 12,731 bytes, line 171
171this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof R(this,$s)=="boolean"?R(this,$s):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},$s=new WeakMap,Bn=new WeakMap,to=new WeakMap,C_),g1=new jA,ro,zn,no,T_,IA=(T_=class extends cd{constructor(){super();de(this,ro,!0);de(this,zn);de(this,no);ne(this,no,e=>{if(!ud&&window.addEventListener){const r=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){R(this,zn)||this.setEventListener(R(this,no))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,zn))==null||e.call(this),ne(this,zn,void 0))}setEventListener(e){var r;ne(this,no,e),(r=R(this,zn))==null||r.call(this),ne(this,zn,e(this.setOnline.bind(this)))}setOnline(e){R(this,ro)!==e&&(ne(this,ro,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return R(this,ro)}},ro=new WeakMap,zn=new WeakMap,no=new WeakMap,T_),pu=new IA;function $A(){let t,e;const r=new Promise((s,i)=>{t=s,e=i});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}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}function LA(t){return Math.min(1e3*2**t,3e4)}function v1(t){return(t??"online")==="online"?pu.isOnline():!0}var m1=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function uh(t){return t instanceof m1}function y1(t){let e=!1,r=0,n=!1,s;const i=$A(),o=g=>{var w;n||(f(new m1(g)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>g1.isFocused()&&(t.networkMode==="always"||pu.isOnline())&&t.canRun(),u=()=>v1(t.networkMode)&&t.canRun(),d=g=>{var w;n||(n=!0,(w=t.onSuccess)==null||w.call(t,g),s==null||s(),i.resolve(g))},f=g=>{var w;n||(n=!0,(w=t.onError)==null||w.call(t,g),s==null||s(),i.reject(g))},h=()=>new Promise(g=>{var w;s=m=>{(n||c())&&g(m)},(w=t.onPause)==null||w.call(t)}).then(()=>{var g;s=void 0,n||(g=t.onContinue)==null||g.call(t)}),y=()=>{if(n)return;let g;const w=r===0?t.initialPromise:void 0;try{g=w??t.fn()}catch(m){g=Promise.reject(m)}Promise.resolve(g).then(d).catch(m=>{var k;if(n)return;const v=t.retry??(ud?0:3),_=t.retryDelay??LA,x=typeof _=="function"?_(r,m):_,E=v===!0||typeof v=="number"&&r<v||typeof v=="function"&&v(r,m);if(e||!E){f(m);return}r++,(k=t.onFail)==null||k.call(t,r,m),RA(x).then(()=>c()?void 0:h()).then(()=>{e?f(m):y()})})};return{promise:i,cancel:o,continue:()=>(s==null||s(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?y():h().then(y),i)}}var MA=t=>setTimeout(t,0);function DA(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=MA;const i=a=>{e?t.push(a):s(()=>{r(a)})},o=()=>{const a=t;t=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var yt=DA(),Ls,P_,_1=(P_=class{constructor(){de(this,Ls)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),CA(this.gcTime)&&ne(this,Ls,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ud?1/0:5*60*1e3))}clearGcTimeout(){R(this,Ls)&&(clearTimeout(R(this,Ls)),ne(this,Ls,void 0))}},Ls=new WeakMap,P_),so,Ms,Gt,Ds,ht,wl,Fs,dr,Xr,R_,FA=(R_=class extends _1{constructor(e){super();de(this,dr);de(this,so);de(this,Ms);de(this,Gt);de(this,Ds);de(this,ht);de(this,wl);de(this,Fs);ne(this,Fs,!1),ne(this,wl,e.defaultOptions),this.setOptions(e.options),this.observers=[],ne(this,Ds,e.client),ne(this,Gt,R(this,Ds).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ne(this,so,BA(this.options)),this.state=e.state??R(this,so),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=R(this,ht))==null?void 0:e.promise}setOptions(e){this.options={...R(this,wl),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Gt).remove(this)}setData(e,r){const n=NA(this.state.data,e,this.options);return lt(this,dr,Xr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){lt(this,dr,Xr).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,s;const r=(n=R(this,ht))==null?void 0:n.promise;return(s=R(this,ht))==null||s.cancel(e),r?r.then(cr).catch(cr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,so))}isActive(){return this.observers.some(e=>PA(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Xf(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!TA(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,ht))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,ht))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),R(this,Gt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(R(this,ht)&&(R(this,Fs)?R(this,ht).cancel({revert:!0}):R(this,ht).cancelRetry()),this.scheduleGc()),R(this,Gt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||lt(this,dr,Xr).call(this,{type:"invalidate"})}fetch(e,r){var c,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(R(this,ht))return R(this,ht).continueRetry(),R(this,ht).promise}if(e&&this.setOptions(e),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(ne(this,Fs,!0),n.signal)})},i=()=>{const f=p1(this.options,r),y=(()=>{const g={client:R(this,Ds),queryKey:this.queryKey,meta:this.meta};return s(g),g})();return ne(this,Fs,!1),this.options.persister?this.options.persister(f,y,this):f(y)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:R(this,Ds),state:this.state,fetchFn:i};return s(f),f})();(c=this.options.behavior)==null||c.onFetch(a,this),ne(this,Ms,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&lt(this,dr,Xr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,y,g,w;uh(f)&&f.silent||lt(this,dr,Xr).call(this,{type:"error",error:f}),uh(f)||((y=(h=R(this,Gt).config).onError)==null||y.call(h,f,this),(w=(g=R(this,Gt).config).onSettled)==null||w.call(g,this.state.data,f,this)),this.scheduleGc()};return ne(this,ht,y1({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,y,g,w;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(m){l(m);return}(y=(h=R(this,Gt).config).onSuccess)==null||y.call(h,f,this),(w=(g=R(this,Gt).config).onSettled)==null||w.call(g,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{lt(this,dr,Xr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{lt(this,dr,Xr).call(this,{type:"pause"})},onContinue:()=>{lt(this,dr,Xr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),R(this,ht).start()}},so=new WeakMap,Ms=new WeakMap,Gt=new WeakMap,Ds=new WeakMap,ht=new WeakMap,wl=new WeakMap,Fs=new WeakMap,dr=new WeakSet,Xr=function(e){const r=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...UA(n.data,this.options),fetchMeta:e.meta??null};case"success":return ne(this,Ms,void 0),{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return uh(s)&&s.revert&&R(this,Ms)?{...R(this,Ms),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,...e.state}}};this.state=r(this.state),yt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),R(this,Gt).notify({query:this,type:"updated",action:e})})},R_);function UA(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:v1(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function BA(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,n=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 Or,N_,zA=(N_=class extends cd{constructor(e={}){super();de(this,Or);this.config=e,ne(this,Or,new Map)}build(e,r,n){const s=r.queryKey,i=r.queryHash??rv(s,r);let o=this.get(i);return o||(o=new FA({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){R(this,Or).has(e.queryHash)||(R(this,Or).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=R(this,Or).get(e.queryHash);r&&(e.destroy(),r===e&&R(this,Or).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){yt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return R(this,Or).get(e)}getAll(){return[...R(this,Or).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>ky(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>ky(e,n)):r}notify(e){yt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){yt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){yt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Or=new WeakMap,N_),Ar,vt,Us,jr,An,O_,WA=(O_=class extends _1{constructor(e){super();de(this,jr);de(this,Ar);de(this,vt);de(this,Us);this.mutationId=e.mutationId,ne(this,vt,e.mutationCache),ne(this,Ar,[]),this.state=e.state||HA(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){R(this,Ar).includes(e)||(R(this,Ar).push(e),this.clearGcTimeout(),R(this,vt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ne(this,Ar,R(this,Ar).filter(r=>r!==e)),this.scheduleGc(),R(this,vt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){R(this,Ar).length||(this.state.status==="pending"?this.scheduleGc():R(this,vt).remove(this))}continue(){var e;return((e=R(this,Us))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,o,a,l,c,u,d,f,h,y,g,w,m,v,_,x,E,k,S,C;const r=()=>{lt(this,jr,An).call(this,{type:"continue"})};ne(this,Us,y1({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(N,A)=>{lt(this,jr,An).call(this,{type:"failed",failureCount:N,error:A})},onPause:()=>{lt(this,jr,An).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,vt).canRun(this)}));const n=this.state.status==="pending",s=!R(this,Us).canStart();try{if(n)r();else{lt(this,jr,An).call(this,{type:"pending",variables:e,isPaused:s}),await((o=(i=R(this,vt).config).onMutate)==null?void 0:o.call(i,e,this));
171const A=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));A!==this.state.context&&lt(this,jr,An).call(this,{type:"pending",context:A,variables:e,isPaused:s})}const N=await R(this,Us).start();return await((u=(c=R(this,vt).config).onSuccess)==null?void 0:u.call(c,N,e,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,N,e,this.state.context)),await((y=(h=R(this,vt).config).onSettled)==null?void 0:y.call(h,N,null,this.state.variables,this.state.context,this)),await((w=(g=this.options).onSettled)==null?void 0:w.call(g,N,null,e,this.state.context)),lt(this,jr,An).call(this,{type:"success",data:N}),N}catch(N){try{throw await((v=(m=R(this,vt).config).onError)==null?void 0:v.call(m,N,e,this.state.context,this)),await((x=(_=this.options).onError)==null?void 0:x.call(_,N,e,this.state.context)),await((k=(E=R(this,vt).config).onSettled)==null?void 0:k.call(E,void 0,N,this.state.variables,this.state.context,this)),await((C=(S=this.options).onSettled)==null?void 0:C.call(S,void 0,N,e,this.state.context)),N}finally{lt(this,jr,An).call(this,{type:"error",error:N})}}finally{R(this,vt).runNext(this)}}},Ar=new WeakMap,vt=new WeakMap,Us=new WeakMap,jr=new WeakSet,An=function(e){const r=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),yt.batch(()=>{R(this,Ar).forEach(n=>{n.onMutationUpdate(e)}),R(this,vt).notify({mutation:this,type:"updated",action:e})})},O_);function HA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var sn,hr,bl,A_,VA=(A_=class extends cd{constructor(e={}){super();de(this,sn);de(this,hr);de(this,bl);this.config=e,ne(this,sn,new Set),ne(this,hr,new Map),ne(this,bl,0)}build(e,r,n){const s=new WA({mutationCache:this,mutationId:++$l(this,bl)._,options:e.defaultMutationOptions(r),state:n});return this.add(s),s}add(e){R(this,sn).add(e);const r=nc(e);if(typeof r=="string"){const n=R(this,hr).get(r);n?n.push(e):R(this,hr).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(R(this,sn).delete(e)){const r=nc(e);if(typeof r=="string"){const n=R(this,hr).get(r);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&R(this,hr).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=nc(e);if(typeof r=="string"){const n=R(this,hr).get(r),s=n==null?void 0:n.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const r=nc(e);if(typeof r=="string"){const s=(n=R(this,hr).get(r))==null?void 0:n.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){yt.batch(()=>{R(this,sn).forEach(e=>{this.notify({type:"removed",mutation:e})}),R(this,sn).clear(),R(this,hr).clear()})}getAll(){return Array.from(R(this,sn))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>Cy(r,n))}findAll(e={}){return this.getAll().filter(r=>Cy(e,r))}notify(e){yt.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>
vendor: 4,438 bytes, line 171
171r.state.isPaused);return yt.batch(()=>Promise.all(e.map(r=>r.continue().catch(cr))))}},sn=new WeakMap,hr=new WeakMap,bl=new WeakMap,A_);function nc(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Ry(t){return{onFetch:(e,r)=>{var u,d,f,h,y;const n=e.options,s=(f=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=e.state.data)==null?void 0:h.pages)||[],o=((y=e.state.data)==null?void 0:y.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const w=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(e.signal.aborted?g=!0:e.signal.addEventListener("abort",()=>{g=!0}),e.signal)})},m=p1(e.options,e.fetchOptions),v=async(_,x,E)=>{if(g)return Promise.reject();if(x==null&&_.pages.length)return Promise.resolve(_);const S=(()=>{const H={client:e.client,queryKey:e.queryKey,pageParam:x,direction:E?"backward":"forward",meta:e.options.meta};return w(H),H})(),C=await m(S),{maxPages:N}=e.options,A=E?AA:OA;return{pages:A(_.pages,C,N),pageParams:A(_.pageParams,x,N)}};if(s&&i.length){const _=s==="backward",x=_?qA:Ny,E={pages:i,pageParams:o},k=x(n,E);a=await v(E,k,_)}else{const _=t??i.length;do{const x=l===0?o[0]??n.initialPageParam:Ny(n,a);if(l>0&&x==null)break;a=await v(a,x),l++}while(l<_)}return a};e.options.persister?e.fetchFn=()=>{var g,w;return(w=(g=e.options).persister)==null?void 0:w.call(g,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=c}}}function Ny(t,{pages:e,pageParams:r}){const n=e.length-1;return e.length>0?t.getNextPageParam(e[n],e,r[n],r):void 0}function qA(t,{pages:e,pageParams:r}){var n;return e.length>0?(n=t.getPreviousPageParam)==null?void 0:n.call(t,e[0],e,r[0],r):void 0}var Ie,Wn,Hn,io,oo,Vn,ao,lo,j_,KA=(j_=class{constructor(t={}){de(this,Ie);de(this,Wn);de(this,Hn);de(this,io);de(this,oo);de(this,Vn);de(this,ao);de(this,lo);ne(this,Ie,t.queryCache||new zA),ne(this,Wn,t.mutationCache||new VA),ne(this,Hn,t.defaultOptions||{}),ne(this,io,new Map),ne(this,oo,new Map),ne(this,Vn,0)}mount(){$l(this,Vn)._++,R(this,Vn)===1&&(ne(this,ao,g1.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Ie).onFocus())})),ne(this,lo,pu.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Ie).onOnline())})))}unmount(){var t,e;$l(this,Vn)._--,R(this,Vn)===0&&((t=R(this,ao))==null||t.call(this),ne(this,ao,void 0),(e=R(this,lo))==null||e.call(this),ne(this,lo,void 0))}isFetching(t){return R(this,Ie).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,Wn).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,Ie).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=R(this,Ie).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Xf(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return R(this,Ie).findAll(t).map(({queryKey:e,state:r})=>{const n=r.data;return[e,n]})}setQueryData(t,e,r){const n=this.defaultQueryOptions({queryKey:t}),s=R(this,Ie).get(n.queryHash),i=s==null?void 0:s.state.data,o=kA(e,i);if(o!==void 0)return R(this,Ie).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(t,e,r){return yt.batch(()=>R(this,Ie).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,Ie).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=R(this,Ie);yt.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=R(this,Ie);return yt.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=yt.batch(()=>R(this,Ie).findAll(t).map(s=>s.cancel(r)));return Promise.all(n).then(cr).catch(cr)}invalidateQueries(t,e={}){return yt.batch(()=>(R(this,Ie).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},n=yt.batch(()=>R(this,Ie).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,r);return r.throwOnError||(i=i.catch(cr)),s.state.fetchStatus==="paused"?Promise.resolve():i}
171));return Promise.all(n).then(cr)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=R(this,Ie).build(this,e);return r.isStaleByTime(Xf(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(cr).catch(cr)}fetchInfiniteQuery(t){return t.behavior=Ry(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(cr).catch(cr)}ensureInfiniteQueryData(t){return t.behavior=Ry(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return pu.isOnline()?R(this,Wn).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,Ie)}getMutationCache(){return R(this,Wn)}getDefaultOptions(){return R(this,Hn)}setDefaultOptions(t){ne(this,Hn,t)}setQueryDefaults(t,e){R(this,io).set(nl(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...R(this,io).values()],r={};return e.forEach(n=>{sl(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){R(this,oo).set(nl(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...R(this,oo).values()],r={};return e.forEach(n=>{sl(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...R(this,Hn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=rv(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===nv&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,Hn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,Ie).clear(),R(this,Wn).clear()}},Ie=new WeakMap,Wn=new WeakMap,Hn=new WeakMap,io=new WeakMap,oo=new WeakMap,Vn=new WeakMap,ao=new WeakMap,lo=new WeakMap,j_),GA=b.createContext(void 0),YA=({client:t,children:e})=>(b.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),p.jsx(GA.Provider,{value:t,children:e}));/**
172 * @remix-run/router v1.23.0
173 *
174 * Copyright (c) Remix Software Inc.
175 *
176 * This source code is licensed under the MIT license found in the
177 * LICENSE.md file in the root directory of this source tree.
178 *
179 * @license MIT
180 */function il(){return il=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},il.apply(this,arguments)}var Gn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Gn||(Gn={}));const Oy="popstate";function JA(t){t===void 0&&(t={});function e(n,s){let{pathname:i,search:o,hash:a}=n.location;return ep("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:gu(s)}return XA(e,r,null,t)}function Ve(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function w1(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function QA(){return Math.random().toString(36).substr(2,8)}function Ay(t,e){return{usr:t.state,key:t.key,idx:e}}function ep(t,e,r,n){return r===void 0&&(r=null),il({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Ao(e):e,{state:r,key:e&&e.key||n||QA()})}function gu(t){let{pathname:e="/",search:r="",hash:n=""}=t;return r&&r!=="?"&&(e+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ao(t){let e={};if(t){let r=t.indexOf("#");r>=0&&(e.hash=t.substr(r),t=t.substr(0,r));let n=t.indexOf("?");n>=0&&(e.search=t.substr(n),t=t.substr(0,n)),t&&(e.pathname=t)}return e}function XA(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:i=!1}=n,o=s.history,a=Gn.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(il({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function d(){a=Gn.Pop;let w=u(),m=w==null?null:w-c;c=w,l&&l({action:a,location:g.location,delta:m})}function f(w,m){a=Gn.Push;let v=ep(g.location,w,m);c=u()+1;let _=Ay(v,c),x=g.createHref(v);try{o.pushState(_,"",x)}
vendor: 3,324 bytes, line 180
180catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;s.location.assign(x)}i&&l&&l({action:a,location:g.location,delta:1})}function h(w,m){a=Gn.Replace;let v=ep(g.location,w,m);c=u();let _=Ay(v,c),x=g.createHref(v);o.replaceState(_,"",x),i&&l&&l({action:a,location:g.location,delta:0})}function y(w){let m=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof w=="string"?w:gu(w);return v=v.replace(/ $/,"%20"),Ve(m,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,m)}let g={get action(){return a},get location(){return t(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Oy,d),l=w,()=>{s.removeEventListener(Oy,d),l=null}},createHref(w){return e(s,w)},createURL:y,encodeLocation(w){let m=y(w);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:h,go(w){return o.go(w)}};return g}var jy;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(jy||(jy={}));function ZA(t,e,r){return r===void 0&&(r="/"),e2(t,e,r,!1)}function e2(t,e,r,n){let s=typeof e=="string"?Ao(e):e,i=sv(s.pathname||"/",r);if(i==null)return null;let o=b1(t);t2(o);let a=null;for(let l=0;a==null&&l<o.length;++l){let c=h2(i);a=u2(o[l],c,n)}return a}function b1(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Ve(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let c=ss([n,l.relativePath]),u=r.concat(l);i.children&&i.children.length>0&&(Ve(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),b1(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:l2(c,i.index),routesMeta:u})};return t.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of x1(i.path))s(i,o,l)}),e}function x1(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return s?[i,""]:[i];let o=x1(n.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function t2(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:c2(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const r2=/^:[\w-]+$/,n2=3,s2=2,i2=1,o2=10,a2=-2,Iy=t=>t==="*";function l2(t,e){let r=t.split("/"),n=r.length;return r.some(Iy)&&(n+=a2),e&&(n+=s2),r.filter(s=>!Iy(s)).reduce((s,i)=>s+(r2.test(i)?n2:i===""?i2:o2),n)}function c2(t,e){return t.length===e.length&&t.slice(0,-1).every((n,s)=>n===e[s])?t[t.length-1]-e[e.length-1]:0}function u2(t,e,r){let{routesMeta:n}=t,s={},i="/",o=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,u=i==="/"?e:e.slice(i.length)||"/",d=$y({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&r&&!n[n.length-1].route.index&&(d=$y({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 9,180 bytes, lines 180-189
180Object.assign(s,d.params),o.push({params:s,pathname:ss([i,d.pathname]),pathnameBase:v2(ss([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=ss([i,d.pathnameBase]))}return o}function $y(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=d2(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,u,d)=>{let{paramName:f,isOptional:h}=u;if(f==="*"){let g=a[d]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const y=a[d];return h&&!y?c[f]=void 0:c[f]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:t}}function d2(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),w1(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let n=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(n.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),n]}function h2(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return w1(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function sv(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let r=e.endsWith("/")?e.length-1:e.length,n=t.charAt(r);return n&&n!=="/"?null:t.slice(r)||"/"}function f2(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?Ao(t):t;return{pathname:r?r.startsWith("/")?r:p2(r,e):e,search:m2(n),hash:y2(s)}}function p2(t,e){let r=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function dh(t,e,r,n){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function g2(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function E1(t,e){let r=g2(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function S1(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=Ao(t):(s=il({},t),Ve(!s.pathname||!s.pathname.includes("?"),dh("?","pathname","search",s)),Ve(!s.pathname||!s.pathname.includes("#"),dh("#","pathname","hash",s)),Ve(!s.search||!s.search.includes("#"),dh("#","search","hash",s)));let i=t===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=r;else{let d=e.length-1;if(!n&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?e[d]:"/"}let l=f2(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const ss=t=>t.join("/").replace(/\/\/+/g,"/"),v2=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),m2=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,y2=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function _2(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const k1=["post","put","patch","delete"];new Set(k1);const w2=["get",...k1];new Set(w2);/**
181 * React Router v6.30.1
182 *
183 * Copyright (c) Remix Software Inc.
184 *
185 * This source code is licensed under the MIT license found in the
186 * LICENSE.md file in the root directory of this source tree.
187 *
188 * @license MIT
189 */function ol(){return ol=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ol.apply(this,arguments)}const iv=b.createContext(null),b2=b.createContext(null),si=b.createContext(null),dd=b.createContext(null),ii=b.createContext({outlet:null,matches:[],isDataRoute:!1}),C1=b.createContext(null);function x2(t,e){let{relative:r}=e===void 0?{}:e;Nl()||Ve(!1);let{basename:n,navigator:s}=b.useContext(si),{hash:i,pathname:o,search:a}=R1(t,{relative:r}),l=o;return n!=="/"&&(l=o==="/"?n:ss([n,o])),s.createHref({pathname:l,search:a,hash:i})}function Nl(){return b.useContext(dd)!=null}function oi(){return Nl()||Ve(!1),b.useContext(dd).location}function T1(t){b.useContext(si).static||b.useLayoutEffect(t)}function P1(){let{isDataRoute:t}=b.useContext(ii);return t?$2():E2()}function E2(){Nl()||Ve(!1);let t=b.useContext(iv),{basename:e,future:r,navigator:n}=b.useContext(si),{matches:s}=b.useContext(ii),{pathname:i}=oi(),o=JSON.stringify(E1(s,r.v7_relativeSplatPath)),a=b.useRef(!1);return T1(()=>{a.current=!0}),b.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let d=S1(c,JSON.parse(o),i,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:ss([e,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[e,n,o,i,t])}function R1(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=b.useContext(si),{matches:s}=b.useContext(ii),{pathname:i}=oi(),o=JSON.stringify(E1(s,n.v7_relativeSplatPath));return b.useMemo(()=>S1(t,JSON.parse(o),i,r==="path"),[t,o,i,r])}function S2(t,e){return k2(t,e)}function k2(t,e,r,n){Nl()||Ve(!1);let{navigator:s}=b.useContext(si),{matches:i}=b.useContext(ii),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=oi(),u;if(e){var d;let w=typeof e=="string"?Ao(e):e;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||Ve(!1),u=w}else u=c;let f=u.pathname||"/",h=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let y=ZA(t,{pathname:h}),g=N2(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:ss([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:ss([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,r,n);return e&&g?b.createElement(dd.Provider,{value:{location:ol({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Gn.Pop}},g):g}function C2(){let t=I2(),e=_2(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),r=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},e),r?b.createElement("pre",{style:s},r):null,null)}const T2=b.createElement(C2,null);class P2 extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,r){return r.location!==e.location||r.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:r.error,location:r.location,revalidation:e.revalidation||r.revalidation}}componentDidCatch(e,r){console.error("React Router caught the following error during render",e,r)}render(){return this.state.error!==void 0?b.createElement(ii.Provider,{value:this.props.routeContext},b.createElement(C1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function R2(t){let{routeContext:e,match:r,children:n}=t,s=b.useContext(iv);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),b.createElement(ii.Provider,{value:e},n)}function N2(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var i;if(!r)return null;if(r.errors)t=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let o=t,a=(s=r)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);u>=0||Ve(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<o.length;u++){let d=o[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:f,errors:h}=r,y=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||y){l=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,d,f)=>{let h,y=!1,g=null,w=null;r&&(h=a&&d.route.id?a[d.route.id]:void 0,g=d.route.errorElement||T2,l&&(c<0&&f===0?(y=!0,w=null):c===f&&(y=!0,w=d.route.hydrateFallbackElement||null)));let m=e.concat(o.slice(0,f+1)),v=()=>{let _;return h?_=g:y?_=w:d.route.Component?_=b.createElement(d.route.Component,null):d.route.element?_=d.route.element:_=u,b.createElement(R2,{match:d,routeC
189ontext:{outlet:u,matches:m,isDataRoute:r!=null},children:_})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?b.createElement(P2,{location:r.location,revalidation:r.revalidation,component:g,error:h,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):v()},null)}var N1=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(N1||{}),vu=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(vu||{});function O2(t){let e=b.useContext(iv);return e||Ve(!1),e}function A2(t){let e=b.useContext(b2);return e||Ve(!1),e}function j2(t){let e=b.useContext(ii);return e||Ve(!1),e}function O1(t){let e=j2(),r=e.matches[e.matches.length-1];return r.route.id||Ve(!1),r.route.id}function I2(){var t;let e=b.useContext(C1),r=A2(vu.UseRouteError),n=O1(vu.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function $2(){let{router:t}=O2(N1.UseNavigateStable),e=O1(vu.UseNavigateStable),r=b.useRef(!1);return T1(()=>{r.current=!0}),b.useCallback(function(s,i){i===void 0&&(i={}),r.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,ol({fromRouteId:e},i)))},[t,e])}function L2(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function ca(t){Ve(!1)}function M2(t){let{basename:e="/",children:r=null,location:n,navigationType:s=Gn.Pop,navigator:i,static:o=!1,future:a}=t;Nl()&&Ve(!1);let l=e.replace(/^\/*/,"/"),c=b.useMemo(()=>({basename:l,navigator:i,static:o,future:ol({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof n=="string"&&(n=Ao(n));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:y="default"}=n,g=b.useMemo(()=>{let w=sv(u,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:h,key:y},navigationType:s}},[l,u,d,f,h,y,s]);return g==null?null:b.createElement(si.Provider,{value:c},b.createElement(dd.Provider,{children:r,value:g}))}function D2(t){let{children:e,location:r}=t;return S2(tp(e),r)}new Promise(()=>{});function tp(t,e){e===void 0&&(e=[]);let r=[];return b.Children.forEach(t,(n,s)=>{if(!b.isValidElement(n))return;let i=[...e,s];if(n.type===b.Fragment){r.push.apply(r,tp(n.props.children,i));return}n.type!==ca&&Ve(!1),!n.props.index||!n.props.children||Ve(!1);let o={id:n.props.id||i.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&&(o.children=tp(n.props.children,i)),r.push(o)}),r}/**
190 * React Router DOM v6.30.1
191 *
192 * Copyright (c) Remix Software Inc.
193 *
194 * This source code is licensed under the MIT license found in the
195 * LICENSE.md file in the root directory of this source tree.
196 *
197 * @license MIT
198 */function rp(){return rp=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},rp.apply(this,arguments)}function F2(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,i;for(i=0;i<n.length;i++)s=n[i],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function U2(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function B2(t,e){return t.button===0&&(!e||e==="_self")&&!U2(t)}const z2=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],W2="6";try{window.__reactRouterVersion=W2}catch{}const H2="startTransition",Ly=Gp[H2];function V2(t){let{basename:e,children:r,future:n,window:s}=t,i=b.useRef();i.current==null&&(i.current=JA({window:s,v5Compat:!0}));let o=i.current,[a,l]=b.useState({action:o.action,location:o.location}),{v7_startTransition:c}=n||{},u=b.useCallback(d=>{c&&Ly?Ly(()=>l(d)):l(d)},[l,c]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>L2(n),[n]),b.createElement(M2,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:o,future:n})}const q2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",K2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ir=b.forwardRef(function(e,r){let{onClick:n,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:d}=e,f=F2(e,z2),{basename:h}=b.useContext(si),y,g=!1;if(typeof c=="string"&&K2.test(c)&&(y=c,q2))try{let _=new URL(window.location.href),x=c.startsWith("//")?new URL(_.protocol+c):new URL(c),E=sv(x.pathname,h);x.origin===_.origin&&E!=null?c=E+x.search+x.hash:g=!0}catch{}let w=x2(c,{relative:s}),m=G2(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:d});function v(_){n&&n(_),_.defaultPrevented||m(_)}return b.createElement("a",rp({},f,{href:y||w,onClick:g||i?n:v,ref:r,target:l}))});var My;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(My||(My={}));var Dy;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(Dy||(Dy={}));function G2(t,e){let{target:r,replace:n,state:s,preventScrollReset:i,relative:o,viewTransition:a}=e===void 0?{}:e,l=P1(),c=oi(),u=R1(t,{relative:o});return b.useCallback(d=>
vendor: 36,740 bytes, lines 198-199
198{if(B2(d,r)){d.preventDefault();let f=n!==void 0?n:gu(c)===gu(u);l(t,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,n,s,r,t,i,o,a])}var T=typeof window<"u"?window:void 0,st=typeof globalThis<"u"?globalThis:T;typeof self>"u"&&(st.self=st),typeof File>"u"&&(st.File=function(){});var A1=Array.prototype,Fy=A1.forEach,Uy=A1.indexOf,Mt=st==null?void 0:st.navigator,F=st==null?void 0:st.document,nt=st==null?void 0:st.location,np=st==null?void 0:st.fetch,sp=st!=null&&st.XMLHttpRequest&&"withCredentials"in new st.XMLHttpRequest?st.XMLHttpRequest:void 0,By=st==null?void 0:st.AbortController,St=Mt==null?void 0:Mt.userAgent,G=T??{},zy="1.362.0",Kt={DEBUG:!1,LIB_VERSION:zy,LIB_NAME:"web",JS_SDK_VERSION:zy};function Wy(t,e,r,n,s,i,o){try{var a=t[i](o),l=a.value}catch(c){return void r(c)}a.done?e(l):Promise.resolve(l).then(n,s)}function en(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var i=t.apply(e,r);function o(l){Wy(i,n,s,o,a,"next",l)}function a(l){Wy(i,n,s,o,a,"throw",l)}o(void 0)})}}function M(){return M=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},M.apply(null,arguments)}function j1(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}var Y2=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"],J2=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],Hy=function(t,e){if(e===void 0&&(e=[]),!t)return!1;var r=t.toLowerCase();return J2.concat(e).some(n=>{var s=n.toLowerCase();return r.indexOf(s)!==-1})};function ie(t,e){return t.indexOf(e)!==-1}var hd=function(t){return t.trim()},ip=function(t){return t.replace(/^\$/,"")},Q2=Array.isArray,I1=Object.prototype,$1=I1.hasOwnProperty,fd=I1.toString,fe=Q2||function(t){return fd.call(t)==="[object Array]"},cn=t=>typeof t=="function",Ke=t=>t===Object(t)&&!fe(t),Ui=t=>{if(Ke(t)){for(var e in t)if($1.call(t,e))return!1;return!0}return!1},U=t=>t===void 0,We=t=>fd.call(t)=="[object String]",op=t=>We(t)&&t.trim().length===0,xr=t=>t===null,ae=t=>U(t)||xr(t),qr=t=>fd.call(t)=="[object Number]"&&t==t,Ei=t=>qr(t)&&t>0,fn=t=>fd.call(t)==="[object Boolean]",X2=t=>t instanceof FormData,Z2=t=>ie(Y2,t);function L1(t){return t===null||typeof t!="object"}function mu(t,e){return Object.prototype.toString.call(t)==="[object "+e+"]"}function ov(t){return!U(Event)&&function(e,r){try{return e instanceof r}catch{return!1}}(t,Event)}var ej=[!0,"true",1,"1","yes"],hh=t=>ie(ej,t),tj=[!1,"false",0,"0","no"];function Ur(t,e,r,n,s){return e>r&&(n.warn("min cannot be greater than max."),e=r),qr(t)?t>r?(n.warn(" cannot be  greater than max: "+r+". Using max value instead."),r):t<e?(n.warn(" cannot be less than min: "+e+". Using min value instead."),e):t:(n.warn(" must be a number. using max or fallback. max: "+r+", fallback: "+s),Ur(s||r,e,r,n))}class rj{constructor(e){this.t={},this.i=e.i,this.o=Ur(e.bucketSize,0,100,e.h),this.m=Ur(e.refillRate,0,this.o,e.h),this.S=Ur(e.refillInterval,0,864e5,e.h)}$(e,r){var n=r-e.lastAccess,s=Math.floor(n/this.S);if(s>0){var i=s*this.m;e.tokens=Math.min(e.tokens+i,this.o),e.lastAccess=e.lastAccess+s*this.S}}consumeRateLimit(e){var r,n=Date.now(),s=String(e),i=this.t[s];return i?this.$(i,n):(i={tokens:this.o,lastAccess:n},this.t[s]=i),i.tokens===0||(i.tokens--,i.tokens===0&&((r=this.i)==null||r.call(this,e)),i.tokens===0)}stop(){this.t={}}}var Ut="Mobile",yu="iOS",un="Android",_o="Tablet",M1=un+" "+_o,D1="iPad",F1="Apple",U1=F1+" Watch",al="Safari",wo="BlackBerry",B1="Samsung",z1=B1+"Browser",W1=B1+" Internet",Qs="Chrome",nj=Qs+" OS",H1=Qs+" "+yu,av="Internet Explorer",V1=av+" "+Ut,lv="Opera",sj=lv+" Mini",cv="Edge",q1="Microsoft "+cv,Qi="Firefox",K1=Qi+" "+yu,ll="Nintendo",cl="PlayStation",Xi="Xbox",G1=un+" "+Ut,Y1=Ut+" "+al,ua="Windows",ap=ua+" Phone",Vy="Nokia",lp="Ouya",J1="Generic",ij=J1+" "+Ut.toLowerCase(),Q1=J1+" "+_o.toLowerCase(),cp="Konqueror",gt="(\\d+(\\.\\d+)?)",fh=new RegExp("Version/"+gt),oj=new RegExp(Xi,"i"),aj=new RegExp(cl+" \\w+","i"),lj=new RegExp(ll+" \\w+","i"),uv=new RegExp(wo+"|PlayBook|BB10","i"),cj={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},sc,qy,ph,uj=(t,e)=>e&&ie(e,F1)||function(r){return ie(r,al)&&!ie(r,Qs)&&!ie(r,un)}(t),X1=function(t,e){return e=e||"",ie(t," OPR/")&&ie(t,"Mini")?sj:ie(t," OPR/")?lv:uv.test(t)?wo:ie(t,"IE"+Ut)||ie(t,"WPDesktop")?V1:ie(t,z1)?W1:ie(t,cv)||ie(t,"Edg/")?q1:ie(t,"FBIOS")?"Facebook "+Ut:ie(t,"UCWEB")||ie(t,"UCBrowser")?"UC Browser":ie(t,"CriOS")?H1:ie(t,"CrMo")||ie(t,Qs)?Qs:ie(t,un)&&ie(t,al)?G1:ie(t,"FxiOS")?K1:ie(t.toLowerCase(),cp.toLowerCase())?cp:uj(t,e)?ie(t,Ut)?Y1:al:ie(t,Qi)?Qi:ie(t,"MSIE")||ie(t,"Trident/")?av:ie(t,"Gecko")?Qi:""},dj={[V1]:[new RegExp("rv:"+gt)],[q1]:[new RegExp(cv+"?\\/"+gt)],[Qs]:[new RegExp("("+Qs+"|CrMo)\\/"+gt)],[H1]:[new RegExp("CriOS\\/"+gt)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+gt)],[al]:[fh],[Y1]:[fh],[lv]:[new RegExp("(Opera|OPR)\\/"+gt)],[Qi]:[new RegExp(Qi+"\\/"+gt)],[K1]:[new RegExp("FxiOS\\/"+gt)],[cp]:[new RegExp("Konqueror[:/]?"+gt,"i")],[wo]:[new RegExp(wo+" "+gt),fh],[G1]:[new RegExp("android\\s"+gt,"i")],[W1]:[new RegExp(z1+"\\/"+gt)],[av]:[new RegExp("(rv:|MSIE )"+gt)],Mozilla:[new RegExp("rv:"+gt)]},hj=function(t,e){var r=X1(t,e),n=dj[r];if(U(n))return null;for(var s=0;s<n.length;s++){var i=n[s],o=t.match(i);if(o)return parseFloat(o[o.length-2])}return null},Ky=[[new RegExp(Xi+"; "+Xi+" (.*?)[);]","i"),t=>[Xi,t&&t[1]||""]],[new RegExp(ll,"i"),[ll,""]],[new RegExp(cl,"i"),[cl,""]],[uv,[wo,""]],[new RegExp(ua,"i"),(t,e)=>{if(/Phone/.test(e)||/WPDesktop/.test(e))return[ap,""];if(new RegExp(Ut).test(e)&&!/IEMobile\b/.test(e))return[ua+" "+Ut,""];var r=/Windows NT ([0-9.]+)/i.exec(e);if(r&&r[1]){var n=r[1],s=cj[n]||"";return/arm/i.test(e)&&(s="RT"),[ua,s]}return[ua,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,t=>{if(t&&t[3]){var e=[t[3],t[4],t[5]||"0"];return[yu,e.join(".")]}return[yu,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,t=>{var e="";return t&&t.length>=3&&(e=U(t[2])?t[3]:t[2]),["watchOS",e]}],[new RegExp("("+un+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+un+")","i"),t=>{if(t&&t[2]){var e=[t[2],t[3],t[4]||"0"];return[un,e.join(".")]}return[un,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,t=>{var e=["Mac OS X",""];if(t&&t[1]){var r=[t[1],t[2],t[3]||"0"];e[1]=r.join(".")}return e}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[nj,""]],[/Linux|debian/i,["Linux",""]]],Gy=function(t){return lj.test(t)?ll:aj.test(t)?cl:oj.test(t)?Xi:new RegExp(lp,"i").test(t)?lp:new RegExp("("+ap+"|WPDesktop)","i").test(t)?ap:/iPad/.test(t)?D1:/iPod/.test(t)?"iPod Touch":/iPhone/.test(t)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(t)?U1:uv.test(t)?wo:/(kobo)\s(ereader|touch)/i.test(t)?"Kobo":new RegExp(Vy,"i").test(t)?Vy:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(t)||/(kf[a-z]+)( bui|\)).+silk\//i.test(t)?"Kindle Fire":/(Android|ZTE)/i.test(t)?new RegExp(Ut).test(t)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(t)||/pixel[\daxl ]{1,6}/i.test(t)&&!/pixel c/i.test(t)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(t)||/lmy47v/i.test(t)&&!/QTAQZ3/i.test(t)?un:M1:new RegExp("(pda|"+Ut+")","i").test(t)?ij:new RegExp(_o,"i").test(t)&&!new RegExp(_o+" pc","i").test(t)?Q1:""},fj=t=>t instanceof Error;function pj(t){var e=globalThis._posthogChunkIds;if(e){var r=Object.keys(e);return ph&&r.length===qy||(qy=r.length,ph=r.reduce((n,s)=>{sc||(sc={});var i=sc[s];if(i)n[i[0]]=i[1];else for(var o=t(s),a=o.length-1;a>=0;a--){var l=o[a],c=l==null?void 0:l.filename,u=e[s];if(c&&u){n[c]=u,sc[s]=[c,u];break}}return n},{})),ph}}class gj{constructor(e,r,n){n===void 0&&(n=[]),this.coercers=e,this.stackParser=r,this.modifiers=n}buildFromUnknown(e,r){r===void 0&&(r={});var n=r&&r.mechanism||{handled:!0,type:"generic"},s=this.buildCoercingContext(n,r,0).apply(e),i=this.buildParsingContext(r),o=this.parseStacktrace(s,i);return{$exception_list:this.convertToExceptionList(o,n),$exception_level:"error"}}modifyFrames(e){var r=this;return en(function*(){for(var n of e)n.stacktrace&&n.stacktrace.frames&&fe(n.stacktrace.frames)&&(n.stacktrace.frames=yield r.applyModifiers(n.stacktrace.frames));return e})()}coerceFallback(e){var r;return{type:"Error",value:"Unknown error",stack:(r=e.syntheticException)==null?void 0:r.stack,synthetic:!0}}parseStacktrace(e,r){var n,s;return e.cause!=null&&(n=this.parseStacktrace(e.cause,r)),e.stack!=""&&e.stack!=null&&(s=this.applyChunkIds(this.stackParser(e.stack,e.synthetic?r.skipFirstLines:0),r.chunkIdMap)),M({},e,{cause:n,stack:s})}applyChunkIds(e,r){return e.map(n=>(n.filename&&r&&(n.chunk_id=r[n.filename]),n))}applyCoercers(e,r){for(var n of this.coercers)if(n.match(e))return n.coerce(e,r);return this.coerceFallback(r)}applyModifiers(e){var r=this;return en(function*(){var n=e;for(var s of r.modifiers)n=yield s(n);return n})()}convertToExceptionList(e,r){var n,s,i,o={type:e.type,value:e.value,mechanism:{type:(n=r.type)!==null&&n!==void 0?n:"generic",handled:(s=r.handled)===null||s===void 0||s,synthetic:(i=e.synthetic)!==null&&i!==void 0&&i}};e.stack&&(o.stacktrace={type:"raw",frames:e.stack});var a=[o];return e.cause!=null&&a.push(...this.convertToExceptionList(e.cause,M({},r,{handled:!0}))),a}buildParsingContext(e){var r;return{chunkIdMap:pj(this.stackParser),skipFirstLines:(r=e.skipFirstLines)!==null&&r!==void 0?r:1}}buildCoercingContext(e,r,n){n===void 0&&(n=0);var s=(i,o)=>{if(o<=4){var a=this.buildCoercingContext(e,r,o);return this.applyCoercers(i,a)}};return M({},r,{syntheticException:n==0?r.syntheticException:void 0,mechanism:e,apply:i=>s(i,n),next:i=>s(i,n+1)})}}var bo="?";function up(t,e,r,n,s){var i={platform:t,filename:e,function:r==="<anonymous>"?bo:r,in_app:!0};return U(n)||(i.lineno=n),U(s)||(i.colno=s),i}var Z1=(t,e)=>{var r=t.indexOf("safari-extension")!==-1,n=t.indexOf("safari-web-extension")!==-1;return r||n?[t.indexOf("@")!==-1?t.split("@")[0]:bo,r?"safari-extension:"+e:"safari-web-extension:"+e]:[t,e]},vj=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,mj=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,yj=/\((\S*)(?::(\d+))(?::(\d+))\)/,_j=(t,e)=>{var r=vj.exec(t);if(r){var[,n,s,i]=r;return up(e,n,bo,+s,+i)}var o=mj.exec(t);if(o){if(o[2]&&o[2].indexOf("eval")===0){var a=yj.exec(o[2]);a&&(o[2]=a[1],o[3]=a[2],o[4]=a[3])}var[l,c]=Z1(o[1]||bo,o[2]);return up(e,c,l,o[3]?+o[3]:void 0,o[4]?+o[4]:void 0)}},wj=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,bj=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,xj=(t,e)=>{var r=wj.exec(t);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){var n=bj.exec(r[3]);n&&(r[1]=r[1]||"eval",r[3]=n[1],r[4]=n[2],r[5]="")}var s=r[3],i=r[1]||bo;return[i,s]=Z1(i,s),up(e,s,i,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}},Yy=/\(error: (.*)\)/,Jy=50;function Ej(){return function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return function(s,i){i===void 0&&(i=0);for(var o=[],a=s.split(`
199`),l=i;l<a.length;l++){var c=a[l];if(!(c.length>1024)){var u=Yy.test(c)?c.replace(Yy,"$1"):c;if(!u.match(/\S*Error: /)){for(var d of r){var f=d(u,t);if(f){o.push(f);break}}if(o.length>=Jy)break}}}return function(h){if(!h.length)return[];var y=Array.from(h);return y.reverse(),y.slice(0,Jy).map(g=>{return M({},g,{filename:g.filename||(w=y,w[w.length-1]||{}).filename,function:g.function||bo});var w})}(o)}}("web:javascript",_j,xj)}class Sj{match(e){return this.isDOMException(e)||this.isDOMError(e)}coerce(e,r){var n=We(e.stack);return{type:this.getType(e),value:this.getValue(e),stack:n?e.stack:void 0,cause:e.cause?r.next(e.cause):void 0,synthetic:!1}}getType(e){return this.isDOMError(e)?"DOMError":"DOMException"}getValue(e){var r=e.name||(this.isDOMError(e)?"DOMError":"DOMException");return e.message?r+": "+e.message:r}isDOMException(e){return mu(e,"DOMException")}isDOMError(e){return mu(e,"DOMError")}}class kj{match(e){return(r=>r instanceof Error)(e)}coerce(e,r){return{type:this.getType(e),value:this.getMessage(e,r),stack:this.getStack(e),cause:e.cause?r.next(e.cause):void 0,synthetic:!1}}getType(e){return e.name||e.constructor.name}getMessage(e,r){var n=e.message;return n.error&&typeof n.error.message=="string"?String(n.error.message):String(n)}getStack(e){return e.stacktrace||e.stack||void 0}}class Cj{constructor(){}match(e){return mu(e,"ErrorEvent")&&e.error!=null}coerce(e,r){var n,s=r.apply(e.error);return s||{type:"ErrorEvent",value:e.message,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}var Tj=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class Pj{match(e){return typeof e=="string"}coerce(e,r){var n,[s,i]=this.getInfos(e);return{type:s??"Error",value:i??e,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}getInfos(e){var r="Error",n=e,s=e.match(Tj);return s&&(r=s[1],n=s[2]),[r,n]}}var Rj=["fatal","error","warning","log","info","debug"];function eE(t,e){e===void 0&&(e=40);var r=Object.keys(t);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var s=r.slice(0,n).join(", ");if(!(s.length>e))return n===r.length||s.length<=e?s:s.slice(0,e)+"..."}return""}class Nj{match(e){return typeof e=="object"&&e!==null}coerce(e,r){var n,s=this.getErrorPropertyFromObject(e);return s?r.apply(s):{type:this.getType(e),value:this.getValue(e),stack:(n=r.syntheticException)==null?void 0:n.stack,level:this.isSeverityLevel(e.level)?e.level:"error",synthetic:!0}}getType(e){return ov(e)?e.constructor.name:"Error"}getValue(e){if("name"in e&&typeof e.name=="string"){var r="'"+e.name+"' captured as exception";return"message"in e&&typeof e.message=="string"&&(r+=" with message: '"+e.message+"'"),r}if("message"in e&&typeof e.message=="string")return e.message;var n=this.getObjectClassName(e);return(n&&n!=="Object"?"'"+n+"'":"Object")+" captured as exception with keys: "+eE(e)}isSeverityLevel(e){return We(e)&&!op(e)&&Rj.indexOf(e)>=0}getErrorPropertyFromObject(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=e[r];if(fj(n))return n}}getObjectClassName(e){try{var r=Object.getPrototypeOf(e);return r?r.constructor.name:void 0}catch{return}}}class Oj{match(e){return ov(e)}coerce(e,r){var n,s=e.constructor.name;return{type:s,value:s+" captured as exception with keys: "+eE(e),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class Aj{match(e){return L1(e)}coerce(e,r){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(e),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class jj{match(e){return mu(e,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(e)}isCustomEventWrappingRejection(e){if(!ov(e))return!1;try{var r=e.detail;return r!=null&&typeof r=="object"&&"reason"in r}catch{return!1}}coerce(e,r){var n,s=this.getUnhandledRejectionReason(e);return L1(s)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}:r.apply(s)}getUnhandledRejectionReason(e){try{if("reason"in e)return e.reason;if("detail"in e&&e.detail!=null&&typeof e.detail=="object"&&"reason"in e.detail)return e.detail.reason}catch{}return e}}var tE=function(t,e){var{debugEnabled:r}=e===void 0?{}:e,n={k:function(s){if(T&&(Kt.DEBUG||G.POSTHOG_DEBUG||r)&&!U(T.console)&&T.console){for(var i=("__rrweb_original__"in T.console[s])?T.console[s].__rrweb_original__:T.console[s],o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];i(t,...a)}},info:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];n.k("log",...i)},warn:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];n.k("warn",...i)},error:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];n.k("error",...i)},critical:function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];console.error(t,...i)},uninitializedWarning:s=>{n.error("You must initialize PostHog before calling "+s)},createLogger:(s,i)=>tE(t+" "+s,i)};return n},B=tE("[PostHog.js]"),je=B.createLogger,Ij=je("[ExternalScriptsLoader]"),Qy=(t,e,r)=>{if(t.config.disable_external_dependency_loading)return Ij.warn(e+" was requested but loading of external scripts is disabled."),r("Loading of external scripts is disabled");var n=F==null?void 0:F.querySelectorAll("script");if(n){for(var s,i=function(){if(n[o].src===e){var l=n[o];return l.__posthog_loading_callback_fired?{v:r()}:(l.addEventListener("load",c=>{l.__posthog_loading_callback_fired=!0,r(void 0,c)}),l.onerror=c=>r(c),{v:void 0})}},o=0;o<n.length;o++)if(s=i())return s.v}var a=()=>{if(!F)return r("document not found");var l=F.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=e,l.onload=d=>{l.__posthog_loading_callback_fired=!0,r(void 0,d)},l.onerror=d=>r(d),t.config.prepare_external_dependency_script&&(l=t.config.prepare_external_dependency_script(l)),!l)return r("prepare_external_dependency_script returned null");if(t.config.external_scripts_inject_target==="head")F.head.appendChild(l);else{var c,u=F.querySelectorAll("body > script");u.length>0?(c=u[0].parentNode)==null||c.insertBefore(l,u[0]):F.body.appendChild(l)}};F!=null&&F.body?a():F==null||F.addEventListener("DOMContentLoaded",a)};G.__PosthogExtensions__=G.__PosthogExtensions__||{},G.__PosthogExtensions__.loadExternalDependency=(t,e,r)=>{var n="/static/"+e+".js?v="+t.version;if(e==="remote-config"&&(n="/array/"+t.config.token+"/config.js"),e==="toolbar"){var s=3e5;n=n+"&t="+Math.floor(Date.now()/s)*s}var i=t.requestRouter.endpointFor("assets",n);Qy(t,i,r)},G.__PosthogExtensions__.loadSiteApp=(t,e,r)=>{var n=t.requestRouter.endpointFor("api",e);Qy(t,n,r)};var _u={};function is(t,e,r){if(fe(t)){if(Fy&&t.forEach===Fy)t.forEach(e,r);else if("length"in t&&t.length===+t.length){for(var n=0,s=t.length;n<s;n++)if(n in t&&e.call(r,t[n],n)===_u)return}}}function we(t,e,r){if(!ae(t)){if(fe(t))return is(t,e,r);if(X2(t)){for(var n of t.entries())if(e.call(r,n[1],n[0])===_u)return}else for(var s in t)if($1.call(t,s)&&e.call(r,t[s],s)===_u)return}}var De=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return is(r,function(s){for(var i in s)s[i]!==void 0&&(t[i]=s[i])}),t},xo=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return is(r,function(s){is(s,function(i){t.push(i)})}),t};function Lc(t){for(var e=Object.keys(t),r=e.length,n=new Array(r);r--;)n[r]=[e[r],t[e[r]]];return n}var Xy=function(t){try{return t()}catch{return}},$j=function(t){return function(){try{for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return t.apply(this,r)}catch(s){B.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),B.critical(s)}}},dv=function(t){var e={};return we(t,function(r,n){(We(r)&&r.length>0||qr(r))&&(e[n]=r)}),e};function Lj(t,e){return r=t,n=i=>We(i)&&!xr(e)?i.slice(0,e):i,s=new Set,function i(o,a){return o!==Object(o)?n?n(o,a):o:s.has(o)?void 0:(s.add(o),fe(o)?(l=[],is(o,c=>{l.push(i(c))})):(l={},we(o,(c,u)=>{s.has(c)||(l[u]=i(c,u))})),l);var l}(r);var r,n,s}var Mj=["herokuapp.com","vercel.app","netlify.app"];function Dj(t){var e=t==null?void 0:t.hostname;if(!We(e))return!1;var r=e.split(".").slice(-2).join(".");for(var n of Mj)if(r===n)return!1;return!0}function rE(t,e){for(var r=0;r<t.length;r++)if(e(t[r]))return t[r]}function ze(t,e,r,n){var{capture:s=!1,passive:i=!0}=n??{};t==null||t.addEventListener(e,r,{capture:s,passive:i})}function nE(t){return t.name==="ph_toolbar_internal"}var sE="$people_distinct_id",da="__alias",ha="__timers",Zy="$autocapture_disabled_server_side",dp="$heatmaps_enabled_server_side",e0="$exception_capture_enabled_server_side",hp="$error_tracking_suppression_rules",t0="$error_tracking_capture_extension_exceptions",r0="$web_vitals_enabled_server_side",iE="$dead_clicks_enabled_server_side",n0="$product_tours_enabled_server_side",s0="$web_vitals_allowed_metrics",ic="$session_recording_remote_config",wu="$sesid",oE="$session_is_sampled",Bi="$enabled_feature_flags",fa="$early_access_features",fp="$feature_flag_details",pa="$stored_person_properties",Ts="$stored_group_properties",pp="$surveys",Aa="$flag_call_reported",gp="$flag_call_reported_session_id",vp="$feature_flag_errors",bu="$feature_flag_evaluated_at",Nr="$user_state",mp="$client_session_props",yp="$capture_rate_limit",_p="$initial_campaign_params",wp="$initial_referrer_info",xu="$initial_person_info",Eu="$epp",aE="__POSTHOG_TOOLBAR__",Go="$posthog_cookieless",Fj=[sE,da,"__cmpns",ha,"$session_recording_enabled_server_side",dp,wu,Bi,hp,Nr,fa,fp,Ts,pa,pp,Aa,gp,vp,bu,mp,yp,_p,wp,Eu,xu];Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Number.isInteger||(Number.isInteger=function(t){return qr(t)&&isFinite(t)&&Math.floor(t)===t});var i0="0123456789abcdef";class Su{constructor(e){if(this.bytes=e,e.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(e,r,n,s){if(!Number.isInteger(e)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(s)||e<0||r<0||n<0||s<0||e>0xffffffffffff||r>4095||n>1073741823||s>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=e/Math.pow(2,40),i[1]=e/Math.pow(2,32),i[2]=e/Math.pow(2,24),i[3]=e/Math.pow(2,16),i[4]=e/Math.pow(2,8),i[5]=e,i[6]=112|r>>>8,i[7]=r,i[8]=128|n>>>24,i[9]=n>>>16,i[10]=n>>>8,i[11]=n,i[12]=s>>>24,i[13]=s>>>16,i[14]=s>>>8,i[15]=s,new Su(i)}toString(){for(var e="",r=0;r<this.bytes.length;r++)e=e+i0.charAt(this.bytes[r]>>>4)+i0.charAt(15&this.bytes[r]),r!==3&&r!==5&&r!==7&&r!==9||(e+="-");if(e.length!==36)throw new Error("Invalid UUIDv7 was generated");return e}clone(){return new Su(this.bytes.slice(0))}equals(e){return this.compareTo(e)===0}compareTo(e){for(var r=0;r<16;r++){var n=this.bytes[r]-e.bytes[r];if(n!==0)return Math.sign(n)}return 0}}class Uj{constructor(){this.P=0,this.T=0,this.R=new Bj}generate(){var e=this.generateOrAbort();if(U(e)){this.P=0;var r=this.generateOrAbort();if(U(r))throw new Error("Could not generate UUID after timestamp reset");return r}return e}generateOrAbort(){var e=Date.now();if(e>this.P)this.P=e,this.I();else{if(!(e+1e4>this.P))return;this.T++,this.T>4398046511103&&(this.P++,this.I())}return Su.fromFieldsV7(this.P,Math.trunc(this.T/Math.pow(2,30)),this.T&Math.pow(2,30)-1,this.R.nextUint32())}I(){this.T=1024*this.R.nextUint32()+(1023&this.R.nextUint32())}}var o0,lE=t=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var e=0;e<t.length;e++)t[e]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return t};T&&!U(T.crypto)&&crypto.getRandomValues&&(lE=t=>crypto.getRandomValues(t));class Bj{constructor(){this.C=new Uint32Array(8),this.O=1/0}nextUint32(){return this.O>=this.C.length&&(lE(this.C),this.O=0),this.C[this.O++]}}var Yn=()=>zj().toString(),zj=()=>(o0||(o0=new Uj)).generate(),Yo="",Wj=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function Hj(t,e){if(e){var r=function(s,i){if(i===void 0&&(i=F),Yo)return Yo;if(!i||["localhost","127.0.0.1"].includes(s))return"";for(var o=s.split("."),a=Math.min(o.length,8),l="dmn_chk_"+Yn();!Yo&&a--;){var c=o.slice(a).join("."),u=l+"=1;domain=."+c+";path=/";i.cookie=u+";max-age=3",i.cookie.includes(l)&&(i.cookie=u+";max-age=0",Yo=c)}return Yo}(t);if(!r){var n=(s=>{var i=s.match(Wj);return i?i[0]:""})(t);n!==r&&B.info("Warning: cookie subdomain discovery mismatch",n,r),r=n}return r?"; domain=."+r:""}return""}var Lr={F:()=>!!F,M:function(t){B.error("cookieStore error: "+t)},A:function(t){if(F){try{for(var e=t+"=",r=F.cookie.split(";").filter(i=>i.length),n=0;n<r.length;n++){for(var s=r[n];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return decodeURIComponent(s.substring(e.length,s.length))}}catch{}return null}},D:function(t){var e;try{e=JSON.parse(Lr.A(t))||{}}catch{}return e},L:function(t,e,r,n,s){if(F)try{var i="",o="",a=Hj(F.location.hostname,n);if(r){var l=new Date;l.setTime(l.getTime()+24*r*60*60*1e3),i="; expires="+l.toUTCString()}s&&(o="; secure");var c=t+"="+encodeURIComponent(JSON.stringify(e))+i+"; SameSite=Lax; path=/"+a+o;return c.length>3686.4&&B.warn("cookieStore warning: large cookie, len="+c.length),F.cookie=c,c}catch{return}},j:function(t,e){if(F!=null&&F.cookie)try{Lr.L(t,"",-1,e)}catch{return}}},gh=null,Ne={F:function(){if(!xr(gh))return gh;var t=!0;if(U(T))t=!1;else try{var e="__mplssupport__";Ne.L(e,"xyz"),Ne.A(e)!=='"xyz"'&&(t=!1),Ne.j(e)}catch{t=!1}return t||B.error("localStorage unsupported; falling back to cookie store"),gh=t,t},M:function(t){B.error("localStorage error: "+t)},A:function(t){try{return T==null?void 0:T.localStorage.getItem(t)}catch(e){Ne.M(e)}return null},D:function(t){try{return JSON.parse(Ne.A(t))||{}}catch{}return null},L:function(t,e){try{T==null||T.localStorage.setItem(t,JSON.stringify(e))}catch(r){Ne.M(r)}},j:function(t){try{T==null||T.localStorage.removeItem(t)}catch(e){Ne.M(e)}}},Vj=["$device_id","distinct_id",wu,oE,Eu,xu,Nr],oc={},qj={F:function(){return!0},M:function(t){B.error("memoryStorage error: "+t)},A:function(t){return oc[t]||null},D:function(t){return oc[t]||null},L:function(t,e){oc[t]=e},j:function(t){delete oc[t]}},ws=null,rt={F:function(){if(!xr(ws))return ws;if(ws=!0,U(T))ws=!1;else try{var t="__support__";rt.L(t,"xyz"),rt.A(t)!=='"xyz"'&&(ws=!1),rt.j(t)}catch{ws=!1}return ws},M:function(t){B.error("sessionStorage error: ",t)},A:function(t){try{return T==null?void 0:T.sessionStorage.getItem(t)}catch(e){rt.M(e)}return null},D:function(t){try{return JSON.parse(rt.A(t))||null}catch{}return null},L:function(t,e){try{T==null||T.sessionStorage.setItem(t,JSON.stringify(e))}catch(r){rt.M(r)}},j:function(t){try{T==null||T.sessionStorage.removeItem(t)}catch(e){rt.M(e)}}},tn=function(t){return t[t.PENDING=-1]="PENDING",t[t.DENIED=0]="DENIED",t[t.GRANTED=1]="GRANTED",t}({});class Kj{constructor(e){this._instance=e}get N(){return this._instance.config}get consent(){return this.U()?tn.DENIED:this.H}isOptedOut(){return this.N.cookieless_mode==="always"||this.consent===tn.DENIED||this.consent===tn.PENDING&&(this.N.opt_out_capturing_by_default||this.N.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===tn.DENIED}optInOut(e){this.B.L(this.q,e?1:0,this.N.cookie_expiration,this.N.cross_subdomain_cookie,this.N.secure_cookie)}reset(){this.B.j(this.q,this.N.cross_subdomain_cookie)}get q(){var{token:e,opt_out_capturing_cookie_prefix:r,consent_persistence_name:n}=this._instance.config;return n||(r?r+e:"__ph_opt_in_out_"+e)}get H(){var e=this.B.A(this.q);return hh(e)?tn.GRANTED:ie(tj,e)?tn.DENIED:tn.PENDING}get B(){if(!this.V){var e=this.N.opt_out_capturing_persistence_type;this.V=e==="localStorage"?Ne:Lr;var r=e==="localStorage"?Lr:Ne;r.A(this.q)&&(this.V.A(this.q)||this.optInOut(hh(r.A(this.q))),r.j(this.q,this.N.cross_subdomain_cookie))}return this.V}U(){return!!this.N.respect_dnt&&!!rE([Mt==null?void 0:Mt.doNotTrack,Mt==null?void 0:Mt.msDoNotTrack,G.doNotTrack],e=>hh(e))}}var ac=je("[Dead Clicks]"),Gj=()=>!0,Yj=t=>{var e,r=!((e=t.instance.persistence)==null||!e.get_property(iE)),n=t.instance.config.capture_dead_clicks;return fn(n)?n:!!Ke(n)||r};class a0{get lazyLoadedDeadClicksAutocapture(){return this.W}constructor(e,r,n){this.instance=e,this.isEnabled=r,this.onCapture=n,this.startIfEnabledOrStop()}onRemoteConfig(e){"captureDeadClicks"in e&&(this.instance.persistence&&this.instance.persistence.register({[iE]:e.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.G(()=>{this.Y()}):this.stop()}G(e){var r,n;(r=G.__PosthogExtensions__)!=null&&r.initDeadClicksAutocapture&&e(),(n=G.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",s=>{s?ac.error("failed to load script",s):e()})}Y(){var e;if(F){if(!this.W&&(e=G.__PosthogExtensions__)!=null&&e.initDeadClicksAutocapture){var r=Ke(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};r.__onCapture=this.onCapture,this.W=G.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,r),this.W.start(F),ac.info("starting...")}}else ac.error("`document` not found. Cannot start.")}stop(){this.W&&(this.W.stop(),this.W=void 0,ac.info("stopping..."))}}var vh=je("[SegmentIntegration]");function Jj(t,e){var r=t.config.segment;if(!r)return e();(function(n,s){var i=n.config.segment;if(!i)return s();var o=l=>{var c=()=>l.anonymousId()||Yn();n.config.get_device_id=c,l.id()&&(n.register({distinct_id:l.id(),$device_id:c()}),n.persistence.set_property(Nr,"identified")),s()},a=i.user();"then"in a&&cn(a.then)?a.then(o):o(a)})(t,()=>{r.register((n=>{Promise&&Promise.resolve||vh.warn("This browser does not have Promise support, and can not use the segment integration");var s=(i,o)=>{if(!o)return i;i.event.userId||i.event.anonymousId===n.get_distinct_id()||(vh.info("No userId set, resetting PostHog"),n.reset()),i.event.userId&&i.event.userId!==n.get_distinct_id()&&(vh.info("UserId set, identifying with PostHog"),n.identify(i.event.userId));var a=n.calculateEventProperties(o,i.event.properties);return i.event.properties=Object.assign({},a,i.event.properties),i};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:i=>s(i,i.event.event),page:i=>s(i,"$pageview"),identify:i=>s(i,"$identify"),screen:i=>s(i,"$screen")}})(t)).then(()=>{e()})})}var cE="posthog-js";function uE(t,e){var{organization:r,projectId:n,prefix:s,severityAllowList:i=["error"],sendExceptionsToPostHog:o=!0}=e===void 0?{}:e;return a=>{var l,c,u,d,f;if(!(i==="*"||i.includes(a.level))||!t.__loaded)return a;a.tags||(a.tags={});var h=t.requestRouter.endpointFor("ui","/project/"+t.config.token+"/person/"+t.get_distinct_id());a.tags["PostHog Person URL"]=h,t.sessionRecordingStarted()&&(a.tags["PostHog Recording URL"]=t.get_session_replay_url({withTimestamp:!0}));var y,g=((l=a.exception)==null?void 0:l.values)||[],w=g.map(v=>M({},v,{stacktrace:v.stacktrace?M({},v.stacktrace,{type:"raw",frames:(v.stacktrace.frames||[]).map(_=>M({},_,{platform:"web:javascript"}))}):void 0})),m={$exception_message:((c=g[0])==null?void 0:c.value)||a.message,$exception_type:(u=g[0])==null?void 0:u.type,$exception_level:a.level,$exception_list:w,$sentry_event_id:a.event_id,$sentry_exception:a.exception,$sentry_exception_message:((d=g[0])==null?void 0:d.value)||a.message,$sentry_exception_type:(f=g[0])==null?void 0:f.type,$sentry_tags:a.tags};return r&&n&&(m.$sentry_url=(s||"https://sentry.io/organizations/")+r+"/issues/?project="+n+"&query="+a.event_id),o&&((y=t.exceptions)==null||y.sendExceptionEvent(m)),a}}class Qj{constructor(e,r,n,s,i,o){this.name=cE,this.setupOnce=function(a){a(uE(e,{organization:r,projectId:n,prefix:s,severityAllowList:i,sendExceptionsToPostHog:o==null||o}))}}}class l0{constructor(e){this.J=(r,n,s)=>{s&&(s.noSessionId||s.activityTimeout||s.sessionPastMaximumLength)&&(B.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:r,changeReason:s}),this.K=void 0,this._instance.scrollManager.resetContext())},this._instance=e,this.X()}X(){var e;this.Z=(e=this._instance.sessionManager)==null?void 0:e.onSessionId(this.J)}destroy(){var e;(e=this.Z)==null||e.call(this),this.Z=void 0}doPageView(e,r){var n,s=this.tt(e,r);return this.K={pathname:(n=T==null?void 0:T.location.pathname)!==null&&n!==void 0?n:"",pageViewId:r,timestamp:e},this._instance.scrollManager.resetContext(),s}doPageLeave(e){var r;return this.tt(e,(r=this.K)==null?void 0:r.pageViewId)}doEvent(){var e;return{$pageview_id:(e=this.K)==null?void 0:e.pageViewId}}tt(e,r){var n=this.K;if(!n)return{$pageview_id:r};var s={$pageview_id:r,$prev_pageview_id:n.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:o,lastScrollY:a,maxScrollY:l,maxContentHeight:c,lastContentY:u,maxContentY:d}=i;if(!(U(o)||U(a)||U(l)||U(c)||U(u)||U(d))){o=Math.ceil(o),a=Math.ceil(a),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),d=Math.ceil(d);var f=o<=1?1:Ur(a/o,0,1,B),h=o<=1?1:Ur(l/o,0,1,B),y=c<=1?1:Ur(u/c,0,1,B),g=c<=1?1:Ur(d/c,0,1,B);s=De(s,{$prev_pageview_last_scroll:a,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:y,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:g})}}return n.pathname&&(s.$prev_pageview_pathname=n.pathname),n.timestamp&&(s.$prev_pageview_duration=(e.getTime()-n.timestamp.getTime())/1e3),s}}var ku=t=>{var e=F==null?void 0:F.createElement("a");return U(e)?null:(e.href=t,e)},Xj=function(t,e){var r,n;e===void 0&&(e="&");var s=[];return we(t,function(i,o){U(i)||U(o)||o==="undefined"||(r=encodeURIComponent((a=>a instanceof File)(i)?i.name:i.toString()),n=encodeURIComponent(o),s[s.length]=n+"="+r)}),s.join(e)},Cu=function(t,e){for(var r,n=((t.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),s=0;s<n.length;s++){var i=n[s].split("=");if(i[0]===e){r=i;break}}if(!fe(r)||r.length<2)return"";var o=r[1];try{o=decodeURIComponent(o)}catch{B.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},ul=function(t,e,r){if(!t||!e||!e.length)return t;for(var n=t.split("#"),s=n[0]||"",i=n[1],o=s.split("?"),a=o[1],l=o[0],c=(a||"").split("&"),u=[],d=0;d<c.length;d++){var f=c[d].split("=");fe(f)&&(e.includes(f[0])?u.push(f[0]+"="+r):u.push(c[d]))}var h=l;return a!=null&&(h+="?"+u.join("&")),i!=null&&(h+="#"+i),h},Tu=function(t,e){var r=t.match(new RegExp(e+"=([^&]*)"));return r?r[1]:null},lc="https?://(.*)",Eo=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],Zj=xo(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],Eo),dl="<masked>",eI=["li_fat_id"];function dE(t,e,r){if(!F)return{};var n,s=e?xo([],Eo,r||[]):[],i=hE(ul(F.URL,s,dl),t),o=(n={},we(eI,function(a){var l=Lr.A(a);n[a]=l||null}),n);return De(o,i)}function hE(t,e){var r=Zj.concat(e||[]),n={};return we(r,function(s){var i=Cu(t,s);n[s]=i||null}),n}function fE(t){var e=function(i){return i?i.search(lc+"google.([^/?]*)")===0?"google":i.search(lc+"bing.com")===0?"bing":i.search(lc+"yahoo.com")===0?"yahoo":i.search(lc+"duckduckgo.com")===0?"duckduckgo":null:null}(t),r=e!="yahoo"?"q":"p",n={};if(!xr(e)){n.$search_engine=e;var s=F?Cu(F.referrer,r):"";s.length&&(n.ph_keyword=s)}return n}function c0(){return navigator.language||navigator.userLanguage}function pE(){return(F==null?void 0:F.referrer)||"$direct"}function gE(t,e){var r=t?xo([],Eo,e||[]):[],n=nt==null?void 0:nt.href.substring(0,1e3);return{r:pE().substring(0,1e3),u:n?ul(n,r,dl):void 0}}function vE(t){var e,{r,u:n}=t,s={$referrer:r,$referring_domain:r==null?void 0:r=="$direct"?"$direct":(e=ku(r))==null?void 0:e.host};
199if(n){s.$current_url=n;var i=ku(n);s.$host=i==null?void 0:i.host,s.$pathname=i==null?void 0:i.pathname;var o=hE(n);De(s,o)}if(r){var a=fE(r);De(s,a)}return s}function mE(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function tI(){try{return new Date().getTimezoneOffset()}catch{return}}function rI(t,e){var r,n,s,i;if(!St)return{};var o,a,l,c,u,d,f,h,y=t?xo([],Eo,e||[]):[],[g,w]=function(m){for(var v=0;v<Ky.length;v++){var[_,x]=Ky[v],E=_.exec(m),k=E&&(cn(x)?x(E,m):x);if(k)return k}return["",""]}(St);return De(dv({$os:g,$os_version:w,$browser:X1(St,navigator.vendor),$device:Gy(St),$device_type:(a=St,l={userAgentDataPlatform:(r=navigator)==null||(r=r.userAgentData)==null?void 0:r.platform,maxTouchPoints:(n=navigator)==null?void 0:n.maxTouchPoints,screenWidth:T==null||(s=T.screen)==null?void 0:s.width,screenHeight:T==null||(i=T.screen)==null?void 0:i.height,devicePixelRatio:T==null?void 0:T.devicePixelRatio},h=Gy(a),h===D1||h===M1||h==="Kobo"||h==="Kindle Fire"||h===Q1?_o:h===ll||h===Xi||h===cl||h===lp?"Console":h===U1?"Wearable":h?Ut:(l==null?void 0:l.userAgentDataPlatform)==="Android"&&((c=l==null?void 0:l.maxTouchPoints)!==null&&c!==void 0?c:0)>0?Math.min((u=l==null?void 0:l.screenWidth)!==null&&u!==void 0?u:0,(d=l==null?void 0:l.screenHeight)!==null&&d!==void 0?d:0)/((f=l==null?void 0:l.devicePixelRatio)!==null&&f!==void 0?f:1)>=600?_o:Ut:"Desktop"),$timezone:mE(),$timezone_offset:tI()}),{$current_url:ul(nt==null?void 0:nt.href,y,dl),$host:nt==null?void 0:nt.host,$pathname:nt==null?void 0:nt.pathname,$raw_user_agent:St.length>1e3?St.substring(0,997)+"...":St,$browser_version:hj(St,navigator.vendor),$browser_language:c0(),$browser_language_prefix:(o=c0(),typeof o=="string"?o.split("-")[0]:void 0),$screen_height:T==null?void 0:T.screen.height,$screen_width:T==null?void 0:T.screen.width,$viewport_height:T==null?void 0:T.innerHeight,$viewport_width:T==null?void 0:T.innerWidth,$lib:Kt.LIB_NAME,$lib_version:Kt.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var nI=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class mh{constructor(e,r){this.N=e,this.props={},this.it=!1,this.et=(n=>{var s="";return n.token&&(s=n.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),n.persistence_name?"ph_"+n.persistence_name:"ph_"+s+"_posthog"})(e),this.B=this.rt(e),this.load(),e.debug&&B.info("Persistence loaded",e.persistence,M({},this.props)),this.update_config(e,e,r),this.save()}isDisabled(){return!!this.st}rt(e){nI.indexOf(e.persistence.toLowerCase())===-1&&(B.critical("Unknown persistence type "+e.persistence+"; falling back to localStorage+cookie"),e.persistence="localStorage+cookie");var r=function(s){s===void 0&&(s=[]);var i=[...Vj,...s];return M({},Ne,{D:function(o){try{var a={};try{a=Lr.D(o)||{}}catch{}var l=De(a,JSON.parse(Ne.A(o)||"{}"));return Ne.L(o,l),l}catch{}return null},L:function(o,a,l,c,u,d){try{Ne.L(o,a,void 0,void 0,d);var f={};i.forEach(h=>{a[h]&&(f[h]=a[h])}),Object.keys(f).length&&Lr.L(o,f,l,c,u,d)}catch(h){Ne.M(h)}},j:function(o,a){try{T==null||T.localStorage.removeItem(o),Lr.j(o,a)}catch(l){Ne.M(l)}}})}(e.cookie_persisted_properties||[]),n=e.persistence.toLowerCase();return n==="localstorage"&&Ne.F()?Ne:n==="localstorage+cookie"&&r.F()?r:n==="sessionstorage"&&rt.F()?rt:n==="memory"?qj:n==="cookie"?Lr:r.F()?r:Lr}nt(e){var r=e??this.N.feature_flag_cache_ttl_ms;if(!r||r<=0)return!1;var n=this.props[bu];return!n||typeof n!="number"||Date.now()-n>r}properties(){var e={};return we(this.props,(r,n)=>{if(n===Bi&&Ke(r)){if(!this.nt())for(var s=Object.keys(r),i=0;i<s.length;i++)e["$feature/"+s[i]]=r[s[i]]}else a=n,l=!1,(xr(o=Fj)?l:Uy&&o.indexOf===Uy?o.indexOf(a)!=-1:(we(o,function(c){if(l||(l=c===a))return _u}),l))||(e[n]=r);var o,a,l}),e}load(){if(!this.st){var e=this.B.D(this.et);e&&(this.props=De({},e))}}save(){this.st||this.B.L(this.et,this.props,this.ot,this.ut,this.ht,this.N.debug)}remove(){this.B.j(this.et,!1),this.B.j(this.et,!0)}clear(){this.remove(),this.props={}}register_once(e,r,n){if(Ke(e)){U(r)&&(r="None"),this.ot=U(n)?this.dt:n;var s=!1;if(we(e,(i,o)=>{this.props.hasOwnProperty(o)&&this.props[o]!==r||(this.props[o]=i,s=!0)}),s)return this.save(),!0}return!1}register(e,r){if(Ke(e)){this.ot=U(r)?this.dt:r;var n=!1;if(we(e,(s,i)=>{e.hasOwnProperty(i)&&this.props[i]!==s&&(this.props[i]=s,n=!0)}),n)return this.save(),!0}return!1}unregister(e){e in this.props&&(delete this.props[e],this.save())}update_campaign_params(){if(!this.it){var e=dE(this.N.custom_campaign_params,this.N.mask_personal_data_properties,this.N.custom_personal_data_properties);Ui(dv(e))||this.register(e),this.it=!0}}update_search_keyword(){var e;this.register((e=F==null?void 0:F.referrer)?fE(e):{})}update_referrer_info(){var e;this.register_once({$referrer:pE(),$referring_domain:F!=null&&F.referrer&&((e=ku(F.referrer))==null?void 0:e.host)||"$direct"},void 0)}set_initial_person_info(){this.props[_p]||this.props[wp]||this.register_once({[xu]:gE(this.N.mask_personal_data_properties,this.N.custom_personal_data_properties)},void 0)}get_initial_props(){var e={};we([wp,_p],o=>{var a=this.props[o];a&&we(a,function(l,c){e["$initial_"+ip(c)]=l})});var r,n,s=this.props[xu];if(s){var i=(r=vE(s),n={},we(r,function(o,a){n["$initial_"+ip(a)]=o}),n);De(e,i)}return e}
vendor: 33,277 bytes, lines 199-201
199safe_merge(e){return we(this.props,function(r,n){n in e||(e[n]=r)}),e}update_config(e,r,n){if(this.dt=this.ot=e.cookie_expiration,this.set_disabled(e.disable_persistence||!!n),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie),e.persistence!==r.persistence||!((o,a)=>{if(o.length!==a.length)return!1;var l=[...o].sort(),c=[...a].sort();return l.every((u,d)=>u===c[d])})(e.cookie_persisted_properties||[],r.cookie_persisted_properties||[])){var s=this.rt(e),i=this.props;this.clear(),this.B=s,this.props=i,this.save()}}set_disabled(e){this.st=e,this.st?this.remove():this.save()}set_cross_subdomain(e){e!==this.ut&&(this.ut=e,this.remove(),this.save())}set_secure(e){e!==this.ht&&(this.ht=e,this.remove(),this.save())}set_event_timer(e,r){var n=this.props[ha]||{};n[e]=r,this.props[ha]=n,this.save()}remove_event_timer(e){var r=(this.props[ha]||{})[e];return U(r)||(delete this.props[ha][e],this.save()),r}get_property(e){return this.props[e]}set_property(e,r){this.props[e]=r,this.save()}}var Jo={Activation:"events",Cancellation:"cancelEvents"},yh={Popover:"popover",API:"api",Widget:"widget",ExternalSurvey:"external_survey"},ga={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent",ABANDONED:"survey abandoned"},_h={SURVEY_ID:"$survey_id",SURVEY_NAME:"$survey_name",SURVEY_RESPONSE:"$survey_response",SURVEY_ITERATION:"$survey_iteration",SURVEY_ITERATION_START_DATE:"$survey_iteration_start_date",SURVEY_PARTIALLY_COMPLETED:"$survey_partially_completed",SURVEY_SUBMISSION_ID:"$survey_submission_id",SURVEY_QUESTIONS:"$survey_questions",SURVEY_COMPLETED:"$survey_completed",PRODUCT_TOUR_ID:"$product_tour_id",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},bp={Popover:"popover",Inline:"inline"},sI=function(t){return t.SHOWN="product tour shown",t.DISMISSED="product tour dismissed",t.COMPLETED="product tour completed",t.STEP_SHOWN="product tour step shown",t.STEP_COMPLETED="product tour step completed",t.BUTTON_CLICKED="product tour button clicked",t.STEP_SELECTOR_FAILED="product tour step selector failed",t.BANNER_CONTAINER_SELECTOR_FAILED="product tour banner container selector failed",t.BANNER_ACTION_CLICKED="product tour banner action clicked",t}({}),u0=function(t){return t.TOUR_ID="$product_tour_id",t.TOUR_NAME="$product_tour_name",t.TOUR_ITERATION="$product_tour_iteration",t.TOUR_RENDER_REASON="$product_tour_render_reason",t.TOUR_STEP_ID="$product_tour_step_id",t.TOUR_STEP_ORDER="$product_tour_step_order",t.TOUR_STEP_TYPE="$product_tour_step_type",t.TOUR_DISMISS_REASON="$product_tour_dismiss_reason",t.TOUR_BUTTON_TEXT="$product_tour_button_text",t.TOUR_BUTTON_ACTION="$product_tour_button_action",t.TOUR_BUTTON_LINK="$product_tour_button_link",t.TOUR_BUTTON_TOUR_ID="$product_tour_button_tour_id",t.TOUR_STEPS_COUNT="$product_tour_steps_count",t.TOUR_STEP_SELECTOR="$product_tour_step_selector",t.TOUR_STEP_SELECTOR_FOUND="$product_tour_step_selector_found",t.TOUR_STEP_ELEMENT_TAG="$product_tour_step_element_tag",t.TOUR_STEP_ELEMENT_ID="$product_tour_step_element_id",t.TOUR_STEP_ELEMENT_CLASSES="$product_tour_step_element_classes",t.TOUR_STEP_ELEMENT_TEXT="$product_tour_step_element_text",t.TOUR_ERROR="$product_tour_error",t.TOUR_MATCHES_COUNT="$product_tour_matches_count",t.TOUR_FAILURE_PHASE="$product_tour_failure_phase",t.TOUR_WAITED_FOR_ELEMENT="$product_tour_waited_for_element",t.TOUR_WAIT_DURATION_MS="$product_tour_wait_duration_ms",t.TOUR_BANNER_SELECTOR="$product_tour_banner_selector",t.TOUR_LINKED_SURVEY_ID="$product_tour_linked_survey_id",t.USE_MANUAL_SELECTOR="$use_manual_selector",t.INFERENCE_DATA_PRESENT="$inference_data_present",t.TOUR_LAST_SEEN_DATE="$product_tour_last_seen_date",t.TOUR_TYPE="$product_tour_type",t}({}),d0=je("[RateLimiter]");class iI{constructor(e){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=r=>{var n=r.text;if(n&&n.length)try{(JSON.parse(n).quota_limited||[]).forEach(s=>{d0.info((s||"events")+" is quota limited."),this.serverLimits[s]=new Date().getTime()+6e4})}catch(s){return void d0.warn('could not rate limit - continuing. Error: "'+(s==null?void 0:s.message)+'"',{text:n})}},this.instance=e,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var e;return((e=this.instance.config.rate_limiting)==null?void 0:e.events_per_second)||10}get captureEventsBurstLimit(){var e;return Math.max(((e=this.instance.config.rate_limiting)==null?void 0:e.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(e){var r,n,s;e===void 0&&(e=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:o}=this,a=new Date().getTime(),l=(r=(n=this.instance.persistence)==null?void 0:n.get_property(yp))!==null&&r!==void 0?r:{tokens:i,last:a};l.tokens+=(a-l.last)/1e3*o,l.last=a,l.tokens>i&&(l.tokens=i);var c=l.tokens<1;return c||e||(l.tokens=Math.max(0,l.tokens-1)),!c||this.lastEventRateLimited||e||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+o+" events per second and "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=c,(s=this.instance.persistence)==null||s.set_property(yp,l),{isRateLimited:c,remainingTokens:l.tokens}}isServerRateLimited(e){var r=this.serverLimits[e||"events"]||!1;return r!==!1&&new Date().getTime()<r}}var Qo=je("[RemoteConfig]");class yE{constructor(e){this._instance=e}get remoteConfig(){var e;return(e=G._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.config}vt(e){var r,n;(r=G.__PosthogExtensions__)!=null&&r.loadExternalDependency?(n=G.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"remote-config",()=>e(this.remoteConfig)):e()}ct(e){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:r=>{e(r.json)}})}load(){try{if(this.remoteConfig)return Qo.info("Using preloaded remote config",this.remoteConfig),this.ft(this.remoteConfig),void this._t();if(this._instance.bt())return void Qo.warn("Remote config is disabled. Falling back to local config.");this.vt(e=>{if(!e)return Qo.info("No config found after loading remote JS config. Falling back to JSON."),void this.ct(r=>{this.ft(r),this._t()});this.ft(e),this._t()})}catch(e){Qo.error("Error loading remote config",e)}}stop(){this.yt&&(clearInterval(this.yt),this.yt=void 0)}refresh(){this._instance.bt()||(F==null?void 0:F.visibilityState)==="hidden"||this._instance.reloadFeatureFlags()}_t(){var e;if(!this.yt){var r=(e=this._instance.config.remote_config_refresh_interval_ms)!==null&&e!==void 0?e:3e5;r!==0&&(this.yt=setInterval(()=>{this.refresh()},r))}}ft(e){var r;e||Qo.error("Failed to fetch remote config from PostHog."),this._instance.ft(e??{}),(e==null?void 0:e.hasFeatureFlags)!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(r=this._instance.featureFlags)==null||r.ensureFlagsLoaded())}}var on=function(t){return t.GZipJS="gzip-js",t.Base64="base64",t}({}),Zt=Uint8Array,Pt=Uint16Array,So=Uint32Array,hv=new Zt([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fv=new Zt([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),h0=new Zt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_E=function(t,e){for(var r=new Pt(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];var s=new So(r[30]);for(n=1;n<30;++n)for(var i=r[n];i<r[n+1];++i)s[i]=i-r[n]<<5|n;return[r,s]},wE=_E(hv,2),oI=wE[0],xp=wE[1];oI[28]=258,xp[258]=28;for(var f0=_E(fv,0)[1],bE=new Pt(32768),ke=0;ke<32768;++ke){var bs=(43690&ke)>>>1|(21845&ke)<<1;bs=(61680&(bs=(52428&bs)>>>2|(13107&bs)<<2))>>>4|(3855&bs)<<4,bE[ke]=((65280&bs)>>>8|(255&bs)<<8)>>>1}var ja=function(t,e,r){for(var n=t.length,s=0,i=new Pt(e);s<n;++s)++i[t[s]-1];var o,a=new Pt(e);for(s=0;s<e;++s)a[s]=a[s-1]+i[s-1]<<1;for(o=new Pt(n),s=0;s<n;++s)o[s]=bE[a[t[s]-1]++]>>>15-t[s];return o},Xs=new Zt(288);for(ke=0;ke<144;++ke)Xs[ke]=8;for(ke=144;ke<256;++ke)Xs[ke]=9;for(ke=256;ke<280;++ke)Xs[ke]=7;for(ke=280;ke<288;++ke)Xs[ke]=8;var Pu=new Zt(32);for(ke=0;ke<32;++ke)Pu[ke]=5;var aI=ja(Xs,9),lI=ja(Pu,5),xE=function(t){return(t/8>>0)+(7&t&&1)},EE=function(t,e,r){(r==null||r>t.length)&&(r=t.length);var n=new(t instanceof Pt?Pt:t instanceof So?So:Zt)(r-e);return n.set(t.subarray(e,r)),n},Jr=function(t,e,r){r<<=7&e;var n=e/8>>0;t[n]|=r,t[n+1]|=r>>>8},Xo=function(t,e,r){r<<=7&e;var n=e/8>>0;t[n]|=r,t[n+1]|=r>>>8,t[n+2]|=r>>>16},wh=function(t,e){for(var r=[],n=0;n<t.length;++n)t[n]&&r.push({s:n,f:t[n]});var s=r.length,i=r.slice();if(!s)return[new Zt(0),0];if(s==1){var o=new Zt(r[0].s+1);return o[r[0].s]=1,[o,1]}r.sort(function(E,k){return E.f-k.f}),r.push({s:-1,f:25001});var a=r[0],l=r[1],c=0,u=1,d=2;for(r[0]={s:-1,f:a.f+l.f,l:a,r:l};u!=s-1;)a=r[r[c].f<r[d].f?c++:d++],l=r[c!=u&&r[c].f<r[d].f?c++:d++],r[u++]={s:-1,f:a.f+l.f,l:a,r:l};var f=i[0].s;for(n=1;n<s;++n)i[n].s>f&&(f=i[n].s);var h=new Pt(f+1),y=Ep(r[u-1],h,0);if(y>e){n=0;var g=0,w=y-e,m=1<<w;for(i.sort(function(E,k){return h[k.s]-h[E.s]||E.f-k.f});n<s;++n){var v=i[n].s;if(!(h[v]>e))break;g+=m-(1<<y-h[v]),h[v]=e}for(g>>>=w;g>0;){var _=i[n].s;h[_]<e?g-=1<<e-h[_]++-1:++n}for(;n>=0&&g;--n){var x=i[n].s;h[x]==e&&(--h[x],++g)}y=e}return[new Zt(h),y]},Ep=function(t,e,r){return t.s==-1?Math.max(Ep(t.l,e,r+1),Ep(t.r,e,r+1)):e[t.s]=r},p0=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new Pt(++e),n=0,s=t[0],i=1,o=function(l){r[n++]=l},a=1;a<=e;++a)if(t[a]==s&&a!=e)++i;else{if(!s&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(s),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(s);i=1,s=t[a]}return[r.subarray(0,n),e]},Zo=function(t,e){for(var r=0,n=0;n<e.length;++n)r+=t[n]*e[n];return r},Sp=function(t,e,r){var n=r.length,s=xE(e+2);t[s]=255&n,t[s+1]=n>>>8,t[s+2]=255^t[s],t[s+3]=255^t[s+1];for(var i=0;i<n;++i)t[s+i+4]=r[i];return 8*(s+4+n)},g0=function(t,e,r,n,s,i,o,a,l,c,u){Jr(e,u++,r),++s[256];for(var d=wh(s,15),f=d[0],h=d[1],y=wh(i,15),g=y[0],w=y[1],m=p0(f),v=m[0],_=m[1],x=p0(g),E=x[0],k=x[1],S=new Pt(19),C=0;C<v.length;++C)S[31&v[C]]++;for(C=0;C<E.length;++C)S[31&E[C]]++;for(var N=wh(S,7),A=N[0],H=N[1],L=19;L>4&&!A[h0[L-1]];--L);var Y,$,ee,q,J=c+5<<3,P=Zo(s,Xs)+Zo(i,Pu)+o,O=Zo(s,f)+Zo(i,g)+o+14+3*L+Zo(S,A)+(2*S[16]+3*S[17]+7*S[18]);if(J<=P&&J<=O)return Sp(e,u,t.subarray(l,l+c));if(Jr(e,u,1+(O<P)),u+=2,O<P){Y=ja(f,h),$=f,ee=ja(g,w),q=g;var D=ja(A,H);for(Jr(e,u,_-257),Jr(e,u+5,k-1),Jr(e,u+10,L-4),u+=14,C=0;C<L;++C)Jr(e,u+3*C,A[h0[C]]);u+=3*L;for(var te=[v,E],z=0;z<2;++z){var X=te[z];for(C=0;C<X.length;++C){var Z=31&X[C];Jr(e,u,D[Z]),u+=A[Z],Z>15&&(Jr(e,u,X[C]>>>5&127),u+=X[C]>>>12)}}}else Y=aI,$=Xs,ee=lI,q=Pu;for(C=0;C<a;++C)if(n[C]>255){Z=n[C]>>>18&31,Xo(e,u,Y[Z+257]),u+=$[Z+257],Z>7&&(Jr(e,u,n[C]>>>23&31),u+=hv[Z]);var me=31&n[C];Xo(e,u,ee[me]),u+=q[me],me>3&&(Xo(e,u,n[C]>>>5&8191),u+=fv[me])}else Xo(e,u,Y[n[C]]),u+=$[n[C]];return Xo(e,u,Y[256]),u+$[256]},cI=new So([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),uI=function(){for(var t=new So(256),e=0;e<256;++e){for(var r=e,n=9;--n;)r=(1&r&&3988292384)^r>>>1;t[e]=r}return t}(),dI=function(t,e,r,n,s){return function(i,o,a,l,c,u){var d=i.length,f=new Zt(l+d+5*(1+Math.floor(d/7e3))+c),h=f.subarray(l,f.length-c),y=0;if(!o||d<8)for(var g=0;g<=d;g+=65535){var w=g+65535;w<d?y=Sp(h,y,i.subarray(g,w)):(h[g]=u,y=Sp(h,y,i.subarray(g,d)))}else{for(var m=cI[o-1],v=m>>>13,_=8191&m,x=(1<<a)-1,E=new Pt(32768),k=new Pt(x+1),S=Math.ceil(a/3),C=2*S,N=function(ms){return(i[ms]^i[ms+1]<<S^i[ms+2]<<C)&x},A=new So(25e3),H=new Pt(288),L=new Pt(32),Y=0,$=0,ee=(g=0,0),q=0,J=0;g<d;++g){var P=N(g),O=32767&g,D=k[P];if(E[O]=D,k[P]=O,q<=g){var te=d-g;if((Y>7e3||ee>24576)&&te>423){y=g0(i,h,0,A,H,L,$,ee,J,g-J,y),ee=Y=$=0,J=g;for(var z=0;z<286;++z)H[z]=0;for(z=0;z<30;++z)L[z]=0}var X=2,Z=0,me=_,xe=O-D&32767;if(te>2&&P==N(g-xe))for(var ue=Math.min(v,te)-1,En=Math.min(32767,g),kr=Math.min(258,te);xe<=En&&--me&&O!=D;){if(i[g+X]==i[g+X-xe]){for(var at=0;at<kr&&i[g+at]==i[g+at-xe];++at);if(at>X){if(X=at,Z=xe,at>ue)break;var Cr=Math.min(xe,at-2),Gr=0;for(z=0;z<Cr;++z){var Ht=g-xe+z+32768&32767,gs=Ht-E[Ht]+32768&32767;gs>Gr&&(Gr=gs,D=Ht)}}}xe+=(O=D)-(D=E[O])+32768&32767}if(Z){A[ee++]=268435456|xp[X]<<18|f0[Z];var ai=31&xp[X],vs=31&f0[Z];$+=hv[ai]+fv[vs],++H[257+ai],++L[vs],q=g+X,++Y}else A[ee++]=i[g],++H[i[g]]}}y=g0(i,h,u,A,H,L,$,ee,J,g-J,y)}return EE(f,0,l+xE(y)+c)}(t,e.level==null?6:e.level,e.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,n,!0)},bh=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8};function hI(t,e){e===void 0&&(e={});var r=function(){var a=4294967295;return{p:function(l){for(var c=a,u=0;u<l.length;++u)c=uI[255&c^l[u]]^c>>>8;a=c},d:function(){return 4294967295^a}}}(),n=t.length;r.p(t);var s,i=dI(t,e,10+((s=e).filename&&s.filename.length+1||0),8),o=i.length;return function(a,l){var c=l.filename;if(a[0]=31,a[1]=139,a[2]=8,a[8]=l.level<2?4:l.level==9?2:0,a[9]=3,l.mtime!=0&&bh(a,4,Math.floor(new Date(l.mtime||Date.now())/1e3)),c){a[3]=8;for(var u=0;u<=c.length;++u)a[u+10]=c.charCodeAt(u)}}(i,e),bh(i,o-8,r.d()),bh(i,o-4,n),i}var fI=function(t){var e,r,n,s,i="";for(e=r=0,n=(t=(t+"").replace(/\r\n/g,`
200`).replace(/\r/g,`
201`)).length,s=0;s<n;s++){var o=t.charCodeAt(s),a=null;o<128?r++:a=o>127&&o<2048?String.fromCharCode(o>>6|192,63&o|128):String.fromCharCode(o>>12|224,o>>6&63|128,63&o|128),xr(a)||(r>e&&(i+=t.substring(e,r)),i+=a,e=r=s+1)}return r>e&&(i+=t.substring(e,t.length)),i},pI=!!sp||!!np,Ru=function(t,e,r){var n;r===void 0&&(r=!0);var[s,i]=t.split("?"),o=M({},e),a=(n=i==null?void 0:i.split("&").map(c=>{var u,[d,f]=c.split("="),h=r&&(u=o[d])!==null&&u!==void 0?u:f;return delete o[d],d+"="+h}))!==null&&n!==void 0?n:[],l=Xj(o);return l&&a.push(l),s+"?"+a.join("&")},va=(t,e)=>JSON.stringify(t,(r,n)=>typeof n=="bigint"?n.toString():n,e),xh=t=>{var{data:e,compression:r}=t;if(e){if(r===on.GZipJS){var n=hI(function(a,l){var c=a.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(a);for(var u=new Zt(a.length+(a.length>>>1)),d=0,f=function(w){u[d++]=w},h=0;h<c;++h){if(d+5>u.length){var y=new Zt(d+8+(c-h<<1));y.set(u),u=y}var g=a.charCodeAt(h);g<128||l?f(g):g<2048?(f(192|g>>>6),f(128|63&g)):g>55295&&g<57344?(f(240|(g=65536+(1047552&g)|1023&a.charCodeAt(++h))>>>18),f(128|g>>>12&63),f(128|g>>>6&63),f(128|63&g)):(f(224|g>>>12),f(128|g>>>6&63),f(128|63&g))}return EE(u,0,d)}(va(e)),{mtime:0});return{contentType:"text/plain",body:n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength),estimatedSize:n.byteLength}}if(r===on.Base64){var s=function(a){var l,c,u,d,f,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=0,g=0,w="",m=[];if(!a)return a;a=fI(a);do l=(f=a.charCodeAt(y++)<<16|a.charCodeAt(y++)<<8|a.charCodeAt(y++))>>18&63,c=f>>12&63,u=f>>6&63,d=63&f,m[g++]=h.charAt(l)+h.charAt(c)+h.charAt(u)+h.charAt(d);while(y<a.length);switch(w=m.join(""),a.length%3){case 1:w=w.slice(0,-2)+"==";break;case 2:w=w.slice(0,-1)+"="}return w}(va(e)),i=(a=>"data="+encodeURIComponent(typeof a=="string"?a:va(a)))(s);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var o=va(e);return{contentType:"application/json",body:o,estimatedSize:new Blob([o]).size}}},Mc=[];np&&Mc.push({transport:"fetch",method:t=>{var e,r,{contentType:n,body:s,estimatedSize:i}=(e=xh(t))!==null&&e!==void 0?e:{},o=new Headers;we(t.headers,function(u,d){o.append(d,u)}),n&&o.append("Content-Type",n);var a=t.url,l=null;if(By){var c=new By;l={signal:c.signal,timeout:setTimeout(()=>c.abort(),t.timeout)}}np(a,M({method:(t==null?void 0:t.method)||"GET",headers:o,keepalive:t.method==="POST"&&(i||0)<52428.8,body:s,signal:(r=l)==null?void 0:r.signal},t.fetchOptions)).then(u=>u.text().then(d=>{var f={statusCode:u.status,text:d};if(u.status===200)try{f.json=JSON.parse(d)}catch(h){B.error(h)}t.callback==null||t.callback(f)})).catch(u=>{B.error(u),t.callback==null||t.callback({statusCode:0,error:u})}).finally(()=>l?clearTimeout(l.timeout):null)}}),sp&&Mc.push({transport:"XHR",method:t=>{var e,r=new sp;r.open(t.method||"GET",t.url,!0);var{contentType:n,body:s}=(e=xh(t))!==null&&e!==void 0?e:{};we(t.headers,function(i,o){r.setRequestHeader(o,i)}),n&&r.setRequestHeader("Content-Type",n),t.timeout&&(r.timeout=t.timeout),t.disableXHRCredentials||(r.withCredentials=!0),r.onreadystatechange=()=>{if(r.readyState===4){var i={statusCode:r.status,text:r.responseText};if(r.status===200)try{i.json=JSON.parse(r.responseText)}catch{}t.callback==null||t.callback(i)}},r.send(s)}}),Mt!=null&&Mt.sendBeacon&&Mc.push({transport:"sendBeacon",method:t=>{var e=Ru(t.url,{beacon:"1"});try{var r,{contentType:n,body:s}=(r=xh(t))!==null&&r!==void 0?r:{},i=typeof s=="string"?new Blob([s],{type:n}):s;Mt.sendBeacon(e,i)}catch{}}});var kp=3e3;class gI{constructor(e,r){this.wt=!0,this.Et=[],this.St=Ur((r==null?void 0:r.flush_interval_ms)||kp,250,5e3,B.createLogger("flush interval"),kp),this.xt=e}enqueue(e){this.Et.push(e),this.$t||this.kt()}unload(){this.Pt();var e=this.Et.length>0?this.Tt():{},r=Object.values(e);[...r.filter(n=>n.url.indexOf("/e")===0),...r.filter(n=>n.url.indexOf("/e")!==0)].map(n=>{this.xt(M({},n,{transport:"sendBeacon"}))})}enable(){this.wt=!1,this.kt()}kt(){var e=this;this.wt||(this.$t=setTimeout(()=>{if(this.Pt(),this.Et.length>0){var r=this.Tt(),n=function(){var i=r[s],o=new Date().getTime();i.data&&fe(i.data)&&we(i.data,a=>{a.offset=Math.abs(a.timestamp-o),delete a.timestamp}),e.xt(i)};for(var s in r)n()}},this.St))}Pt(){clearTimeout(this.$t),this.$t=void 0}Tt(){var e={};return we(this.Et,r=>{var n,s=r,i=(s?s.batchKey:null)||s.url;U(e[i])&&(e[i]=M({},s,{data:[]})),(n=e[i].data)==null||n.push(s.data)}),this.Et=[],e}}var vI=["retriesPerformedSoFar"];class mI{constructor(e){this.Rt=!1,this.It=3e3,this.Et=[],this._instance=e,this.Et=[],this.Ct=!0,!U(T)&&"onLine"in T.navigator&&(this.Ct=T.navigator.onLine,this.Ot=()=>{this.Ct=!0,this.Ft()},this.Mt=()=>{this.Ct=!1},ze(T,"online",this.Ot),ze(T,"offline",this.Mt))}get length(){return this.Et.length}retriableRequest(e){var{retriesPerformedSoFar:r}=e,n=j1(e,vI);Ei(r)&&(n.url=Ru(n.url,{retry_count:r})),this._instance._send_request(M({},n,{callback:s=>{s.statusCode!==200&&(s.statusCode<400||s.statusCode>=500)&&(r??0)<10?this.At(M({retriesPerformedSoFar:r},n)):n.callback==null||n.callback(s)}}))}At(e){var r=e.retriesPerformedSoFar||0;e.retriesPerformedSoFar=r+1;var n=function(o){var a=3e3*Math.pow(2,o),l=a/2,c=Math.min(18e5,a),u=(Math.random()-.5)*(c-l);return Math.ceil(c+u)}(r),s=Date.now()+n;this.Et.push({retryAt:s,requestOptions:e});var i="Enqueued failed request for retry in "+n;navigator.onLine||(i+=" (Browser is offline)"),B.warn(i),this.Rt||(this.Rt=!0,this.Dt())}Dt(){if(this.Lt&&clearTimeout(this.Lt),this.Et.length===0)return this.Rt=!1,void(this.Lt=void 0);this.Lt=setTimeout(()=>{this.Ct&&this.Et.length>0&&this.Ft(),this.Dt()},this.It)}Ft(){var e=Date.now(),r=[],n=this.Et.filter(i=>i.retryAt<e||(r.push(i),!1));if(this.Et=r,n.length>0)for(var{requestOptions:s}of n)this.retriableRequest(s)}unload(){for(var{requestOptions:e}of(this.Lt&&(clearTimeout(this.Lt),this.Lt=void 0),this.Rt=!1,U(T)||(this.Ot&&(T.removeEventListener("online",this.Ot),this.Ot=void 0),this.Mt&&(T.removeEventListener("offline",this.Mt),this.Mt=void 0)),this.Et))try{this._instance._send_request(M({},e,{transport:"sendBeacon"}))}catch(r){B.error(r)}this.Et=[]}}class yI{constructor(e){this.jt=()=>{var r,n,s,i;this.Nt||(this.Nt={});var o=this.scrollElement(),a=this.scrollY(),l=o?Math.max(0,o.scrollHeight-o.clientHeight):0,c=a+((o==null?void 0:o.clientHeight)||0),u=(o==null?void 0:o.scrollHeight)||0;this.Nt.lastScrollY=Math.ceil(a),this.Nt.maxScrollY=Math.max(a,(r=this.Nt.maxScrollY)!==null&&r!==void 0?r:0),this.Nt.maxScrollHeight=Math.max(l,(n=this.Nt.maxScrollHeight)!==null&&n!==void 0?n:0),this.Nt.lastContentY=c,this.Nt.maxContentY=Math.max(c,(s=this.Nt.maxContentY)!==null&&s!==void 0?s:0),this.Nt.maxContentHeight=Math.max(u,(i=this.Nt.maxContentHeight)!==null&&i!==void 0?i:0)},this._instance=e}getContext(){return this.Nt}resetContext(){var e=this.Nt;return setTimeout(this.jt,0),e}startMeasuringScrollPosition(){ze(T,"scroll",this.jt,{capture:!0}),ze(T,"scrollend",this.jt,{capture:!0}),ze(T,"resize",this.jt)}scrollElement(){if(!this._instance.config.scroll_root_selector)return T==null?void 0:T.document.documentElement;var e=fe(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var r of e){var n=T==null?void 0:T.document.querySelector(r);if(n)return n}}scrollY(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollTop||0}return T&&(T.scrollY||T.pageYOffset||T.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var e=this.scrollElement();return e&&e.scrollLeft||0}return T&&(T.scrollX||T.pageXOffset||T.document.documentElement.scrollLeft)||0}}var _I=t=>gE(t==null?void 0:t.config.mask_personal_data_properties,t==null?void 0:t.config.custom_personal_data_properties);class v0{constructor(e,r,n,s){this.Ut=i=>{var o=this.zt();if(!o||o.sessionId!==i){var a={sessionId:i,props:this.Ht(this._instance)};this.Bt.register({[mp]:a})}},this._instance=e,this.qt=r,this.Bt=n,this.Ht=s||_I,this.qt.onSessionId(this.Ut)}zt(){return this.Bt.props[mp]}getSetOnceProps(){var e,r=(e=this.zt())==null?void 0:e.props;return r?"r"in r?vE(r):{$referring_domain:r.referringDomain,$pathname:r.initialPathName,utm_source:r.utm_source,utm_campaign:r.utm_campaign,utm_medium:r.utm_medium,utm_content:r.utm_content,utm_term:r.utm_term}:{}}getSessionProps(){var e={};return we(dv(this.getSetOnceProps()),(r,n)=>{n==="$current_url"&&(n="url"),e["$session_entry_"+ip(n)]=r}),e}}class pv{constructor(){this.Vt={},this.Vt={}}on(e,r){return this.Vt[e]||(this.Vt[e]=[]),this.Vt[e].push(r),()=>{this.Vt[e]=this.Vt[e].filter(n=>n!==r)}}emit(e,r){for(var n of this.Vt[e]||[])n(r);for(var s of this.Vt["*"]||[])s(e,r)}}var Eh=je("[SessionId]");class m0{on(e,r){return this.Wt.on(e,r)}constructor(e,r,n){var s;if(this.Gt=[],this.Yt=void 0,this.Wt=new pv,this.Jt=(u,d)=>!(!Ei(u)||!Ei(d))&&Math.abs(u-d)>this.sessionTimeoutMs,!e.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(e.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.N=e.config,this.Bt=e.persistence,this.Kt=void 0,this.Xt=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Qt=r||Yn,this.Zt=n||Yn;var i=this.N.persistence_name||this.N.token,o=this.N.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*Ur(o,60,36e3,Eh.createLogger("session_idle_timeout_seconds"),1800),e.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ti(),this.ii="ph_"+i+"_window_id",this.ei="ph_"+i+"_primary_window_exists",this.ri()){var a=rt.D(this.ii),l=rt.D(this.ei);a&&!l?this.Kt=a:rt.j(this.ii),rt.L(this.ei,!0)}if((s=this.N.bootstrap)!=null&&s.sessionID)try{var c=(u=>{var d=u.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.N.bootstrap.sessionID);this.si(this.N.bootstrap.sessionID,new Date().getTime(),c)}catch(u){Eh.error("Invalid sessionID in bootstrap",u)}this.ni()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(e){return U(this.Gt)&&(this.Gt=[]),this.Gt.push(e),this.Xt&&e(this.Xt,this.Kt),()=>{this.Gt=this.Gt.filter(r=>r!==e)}}ri(){return this.N.persistence!=="memory"&&!this.Bt.st&&rt.F()}oi(e){e!==this.Kt&&(this.Kt=e,this.ri()&&rt.L(this.ii,e))}ai(){return this.Kt?this.Kt:this.ri()?rt.D(this.ii):null}si(e,r,n){e===this.Xt&&r===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=r,this.Xt=e,this.Bt.register({[wu]:[r,e,n]}))}li(){var e=this.Bt.props[wu];return fe(e)&&e.length===2&&e.push(e[0]),e||[0,null,0]}resetSessionId(){this.si(null,null,null)}destroy(){clearTimeout(this.ui),this.ui=void 0,this.Yt&&T&&(T.removeEventListener("beforeunload",this.Yt,{capture:!1}),this.Yt=void 0),this.Gt=[]}ni(){this.Yt=()=>{this.ri()&&rt.j(this.ei)},ze(T,"beforeunload",this.Yt,{capture:!1})}checkAndGetSessionAndWindowId(e,r){if(e===void 0&&(e=!1),r===void 0&&(r=null),this.N.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=r||new Date().getTime(),[s,i,o]=this.li(),a=this.ai(),l=Ei(o)&&Math.abs(n-o)>864e5,c=!1,u=!i,d=!u&&!e&&this.Jt(n,s);u||d||l?(i=this.Qt(),a=this.Zt(),Eh.info("new session ID generated",{sessionId:i,windowId:a,changeReason:{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}}),o=n,c=!0):a||(a=this.Zt(),c=!0);var f=Ei(s)&&e&&!l?s:n,h=Ei(o)?o:new Date().getTime();return this.oi(a),this.si(i,f,h),e||this.ti(),c&&this.Gt.forEach(y=>y(i,a,c?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}:void 0)),{sessionId:i,windowId:a,sessionStartTimestamp:h,changeReason:c?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:s}}ti(){clearTimeout(this.ui),this.ui=setTimeout(()=>{var[e]=this.li();if(this.Jt(new Date().getTime(),e)){var r=this.Xt;this.resetSessionId(),this.Wt.emit("forcedIdleReset",{idleSessionId:r})}},1.1*this.sessionTimeoutMs)}}var SE=function(t,e){if(!t)return!1;var r=t.userAgent;if(r&&Hy(r,e))return!0;try{var n=t==null?void 0:t.userAgentData;if(n!=null&&n.brands&&n.brands.some(s=>Hy(s==null?void 0:s.brand,e)))return!0}catch{}return!!t.webdriver},Nu=function(t,e){if(!function(r){try{new RegExp(r)}catch{return!1}return!0}(e))return!1;try{return new RegExp(e).test(t)}catch{return!1}};function y0(t,e,r){return va({distinct_id:t,userPropertiesToSet:e,userPropertiesToSetOnce:r})}var kE={exact:(t,e)=>e.some(r=>t.some(n=>r===n)),is_not:(t,e)=>e.every(r=>t.every(n=>r!==n)),regex:(t,e)=>e.some(r=>t.some(n=>Nu(r,n))),not_regex:(t,e)=>e.every(r=>t.every(n=>!Nu(r,n))),icontains:(t,e)=>e.map(cc).some(r=>t.map(cc).some(n=>r.includes(n))),not_icontains:(t,e)=>e.map(cc).every(r=>t.map(cc).every(n=>!r.includes(n))),gt:(t,e)=>e.some(r=>{var n=parseFloat(r);return!isNaN(n)&&t.some(s=>n>parseFloat(s))}),lt:(t,e)=>e.some(r=>{var n=parseFloat(r);return!isNaN(n)&&t.some(s=>n<parseFloat(s))})},cc=t=>t.toLowerCase();function CE(t,e){return!t||Object.entries(t).every(r=>{var[n,s]=r,i=e==null?void 0:e[n];if(U(i)||xr(i))return!1;var o=[String(i)],a=kE[s.operator];return!!a&&a(s.values,o)})}var ma=function(t){return t.US="us",t.EU="eu",t.CUSTOM="custom",t}({}),_0="i.posthog.com";class wI{constructor(e){this.hi={},this.instance=e}get apiHost(){var e=this.instance.config.api_host.trim().replace(/\/$/,"");return e==="https://app.posthog.com"?"https://us.i.posthog.com":e}get flagsApiHost(){var e=this.instance.config.flags_api_host;return e?e.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var e,r=(e=this.instance.config.ui_host)==null?void 0:e.replace(/\/$/,"");return r||(r=this.apiHost.replace("."+_0,".posthog.com")),r==="https://app.posthog.com"?"https://us.posthog.com":r}get region(){return this.hi[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.hi[this.apiHost]=ma.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.hi[this.apiHost]=ma.EU:this.hi[this.apiHost]=ma.CUSTOM),this.hi[this.apiHost]}endpointFor(e,r){if(r===void 0&&(r=""),r&&(r=r[0]==="/"?r:"/"+r),e==="ui")return this.uiHost+r;if(e==="flags")return this.flagsApiHost+r;if(this.region===ma.CUSTOM)return this.apiHost+r;var n=_0+r;switch(e){case"assets":return"https://"+this.region+"-assets."+n;case"api":return"https://"+this.region+"."+n}}}var ye=je("[Surveys]"),TE="seenSurvey_",bI=(t,e)=>{var r="$survey_"+e+"/"+t.id;return t.current_iteration&&t.current_iteration>0&&(r="$survey_"+e+"/"+t.id+"/"+t.current_iteration),r},w0=t=>((e,r)=>{var n=""+e+r.id;return r.current_iteration&&r.current_iteration>0&&(n=""+e+r.id+"_"+r.current_iteration),n})(TE,t),xI=[yh.Popover,yh.Widget,yh.API],EI={ignoreConditions:!1,ignoreDelay:!1,displayType:bp.Popover},SI=je("[PostHog ExternalIntegrations]"),kI={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class CI{constructor(e){this._instance=e}G(e,r){var n;(n=G.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,e,s=>{if(s)return SI.error("failed to load script",s);r()})}startIfEnabledOrStop(){var e=this,r=function(o){var a,l,c;!s||(a=G.__PosthogExtensions__)!=null&&(a=a.integrations)!=null&&a[o]||e.G(kI[o],()=>{var u;(u=G.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[o])==null||u.start(e._instance)}),!s&&(l=G.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[o]&&((c=G.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[o])==null||c.stop())};for(var[n,s]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;r(n)}}}var Ia={},Sh=0,Cp=()=>{},Si="posthog",PE=!pI&&(St==null?void 0:St.indexOf("MSIE"))===-1&&(St==null?void 0:St.indexOf("Mozilla"))===-1,b0=t=>{var e;return M({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:Dj(F==null?void 0:F.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Cp,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:t??"unset",__preview_deferred_init_extensions:!1,debug:nt&&We(nt==null?void 0:nt.search)&&nt.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(T==null||(e=T.location)==null?void 0:e.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:r=>{var n="Bad HTTP status: "+r.statusCode+" "+r.text;B.error(n)},get_device_id:r=>r,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:kp},error_tracking:{},_onCapture:Cp,__preview_eager_load_replay:!1},(r=>({rageclick:!(r&&r>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(r&&r>="2025-05-24")||"history_change",session_recording:r&&r>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:r&&r>="2026-01-30"?"head":"body",internal_or_test_user_hostname:r&&r>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(t))},x0=t=>{var e={};U(t.process_person)||(e.person_profiles=t.process_person),U(t.xhr_headers)||(e.request_headers=t.xhr_headers),U(t.cookie_name)||(e.persistence_name=t.cookie_name),U(t.disable_cookie)||(e.disable_persistence=t.disable_cookie),U(t.store_google)||(e.save_campaign_params=t.store_google),U(t.verbose)||(e.debug=t.verbose);var r=De({},e,t);return fe(t.property_blacklist)&&(U(t.property_denylist)?r.property_denylist=t.property_blacklist:fe(t.property_denylist)?r.property_denylist=[...t.property_blacklist,...t.property_denylist]:B.error("Invalid value for property_denylist config: "+t.property_denylist)),r};class TI{constructor(){this.__forceAllowLocalhost=!1}get di(){return this.__forceAllowLocalhost}set di(e){B.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=e}}class Mr{vi(e,r){if(e){var n=this.ci.indexOf(e);n!==-1&&this.ci.splice(n,1)}return this.ci.push(r),r.initialize==null||r.initialize(),r}get decideEndpointWasHit(){var e,r;return(e=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&e!==void 0&&e}get flagsEndpointWasHit(){var e,r;return(e=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&e!==void 0&&e}constructor(){var e;this.webPerformance=new TI,this.fi=!1,this.version=Kt.LIB_VERSION,this.pi=new pv,this.ci=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=b0(),this.SentryIntegration=Qj,this.sentryIntegration=n=>
201function(s,i){var o=uE(s,i);return{name:cE,processEvent:a=>o(a)}}(this,n),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.gi=!1,this.mi=null,this.bi=null,this.yi=null,this.scrollManager=new yI(this),this.pageViewManager=new l0(this),this.rateLimiter=new iI(this),this.requestRouter=new wI(this),this.consent=new Kj(this),this.externalIntegrations=new CI(this);var r=(e=Mr.__defaultExtensionClasses)!==null&&e!==void 0?e:{};this.featureFlags=r.featureFlags&&new r.featureFlags(this),this.toolbar=r.toolbar&&new r.toolbar(this),this.surveys=r.surveys&&new r.surveys(this),this.conversations=r.conversations&&new r.conversations(this),this.logs=r.logs&&new r.logs(this),this.experiments=r.experiments&&new r.experiments(this),this.exceptions=r.exceptions&&new r.exceptions(this),this.people={set:(n,s,i)=>{var o=We(n)?{[n]:s}:n;this.setPersonProperties(o),i==null||i({})},set_once:(n,s,i)=>{var o=We(n)?{[n]:s}:n;this.setPersonProperties(void 0,o),i==null||i({})}},this.on("eventCaptured",n=>B.info('send "'+(n==null?void 0:n.event)+'"',n))}init(e,r,n){if(n&&n!==Si){var s,i=(s=Ia[n])!==null&&s!==void 0?s:new Mr;return i._init(e,r,n),Ia[n]=i,Ia[Si][n]=i,i}return this._init(e,r,n)}_init(e,r,n){var s;if(r===void 0&&(r={}),U(e)||op(e))return B.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},r.debug=this.wi(r.debug),this.Ei=r,this.Si=[],r.person_profiles?this.bi=r.person_profiles:r.process_person&&(this.bi=r.process_person),this.set_config(De({},b0(r.defaults),x0(r),{name:n,token:e})),this.config.on_xhr_error&&B.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=r.disable_compression?void 0:on.GZipJS;var i=this.xi();this.persistence=new mh(this.config,i),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new mh(M({},this.config,{persistence:"sessionStorage"}),i);var o=M({},this.persistence.props),a=M({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.$i=new gI(y=>this.ki(y),this.config.request_queue_config),this.Pi=new mI(this),this.__request_queue=[];var l=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(l||(this.sessionManager=new m0(this),this.sessionPropsManager=new v0(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(B.info("Deferring extension initialization to improve startup performance"),setTimeout(()=>{this.Ti(l)},0)):(B.info("Initializing extensions synchronously"),this.Ti(l)),Kt.DEBUG=Kt.DEBUG||this.config.debug,Kt.DEBUG&&B.info("Starting in debug mode",{this:this,config:r,thisC:M({},this.config),p:o,s:a}),((s=r.bootstrap)==null?void 0:s.distinctID)!==void 0){var c,u,d=this.config.get_device_id(Yn()),f=(c=r.bootstrap)!=null&&c.isIdentifiedID?d:r.bootstrap.distinctID;this.persistence.set_property(Nr,(u=r.bootstrap)!=null&&u.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:r.bootstrap.distinctID,$device_id:f})}if(l)this.register_once({distinct_id:Go,$device_id:null},"");else if(!this.get_distinct_id()){var h=this.config.get_device_id(Yn());this.register_once({distinct_id:h,$device_id:h},""),this.persistence.set_property(Nr,"anonymous")}return ze(T,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),r.segment?Jj(this,()=>this.Ri()):this.Ri(),cn(this.config._onCapture)&&this.config._onCapture!==Cp&&(B.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",y=>this.config._onCapture(y.event,y))),this.config.ip&&B.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Ti(e){var r,n,s,i,o,a,l,c=performance.now(),u=M({},Mr.__defaultExtensionClasses,this.config.__extensionClasses),d=[];u.featureFlags&&this.ci.push(this.featureFlags=(r=this.featureFlags)!==null&&r!==void 0?r:new u.featureFlags(this)),u.exceptions&&this.ci.push(this.exceptions=(n=this.exceptions)!==null&&n!==void 0?n:new u.exceptions(this)),u.historyAutocapture&&this.ci.push(this.historyAutocapture=new u.historyAutocapture(this)),u.tracingHeaders&&this.ci.push(new u.tracingHeaders(this)),u.siteApps&&this.ci.push(this.siteApps=new u.
vendor: 4,769 bytes, line 201
201siteApps(this)),u.sessionRecording&&!e&&this.ci.push(this.sessionRecording=new u.sessionRecording(this)),this.config.disable_scroll_properties||d.push(()=>{this.scrollManager.startMeasuringScrollPosition()}),u.autocapture&&this.ci.push(this.autocapture=new u.autocapture(this)),u.surveys&&this.ci.push(this.surveys=(s=this.surveys)!==null&&s!==void 0?s:new u.surveys(this)),u.logs&&this.ci.push(this.logs=(i=this.logs)!==null&&i!==void 0?i:new u.logs(this)),u.conversations&&this.ci.push(this.conversations=(o=this.conversations)!==null&&o!==void 0?o:new u.conversations(this)),u.productTours&&this.ci.push(this.productTours=new u.productTours(this)),u.heatmaps&&this.ci.push(this.heatmaps=new u.heatmaps(this)),u.webVitalsAutocapture&&this.ci.push(this.webVitalsAutocapture=new u.webVitalsAutocapture(this)),u.exceptionObserver&&this.ci.push(this.exceptionObserver=new u.exceptionObserver(this)),u.deadClicksAutocapture&&this.ci.push(this.deadClicksAutocapture=new u.deadClicksAutocapture(this,Yj)),u.toolbar&&this.ci.push(this.toolbar=(a=this.toolbar)!==null&&a!==void 0?a:new u.toolbar(this)),u.experiments&&this.ci.push(this.experiments=(l=this.experiments)!==null&&l!==void 0?l:new u.experiments(this)),this.ci.forEach(f=>{f.initialize&&d.push(()=>{f.initialize==null||f.initialize()})}),d.push(()=>{if(this.Ii){var f=this.Ii;this.Ii=void 0,this.ft(f)}}),this.Ci(d,c)}Ci(e,r){for(;e.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-r>=30&&e.length>0)return void setTimeout(()=>{this.Ci(e,r)},0);var n=e.shift();if(n)try{n()}catch(i){B.error("Error initializing extension:",i)}}var s=Math.round(performance.now()-r);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:s}),this.config.__preview_deferred_init_extensions&&B.info("PostHog extensions initialized ("+s+"ms)")}ft(e){var r;if(!F||!F.body)return B.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(()=>{this.ft(e)},500);this.config.__preview_deferred_init_extensions&&(this.Ii=e),this.compression=void 0,e.supportedCompression&&!this.config.disable_compression&&(this.compression=ie(e.supportedCompression,on.GZipJS)?on.GZipJS:ie(e.supportedCompression,on.Base64)?on.Base64:void 0),(r=e.analytics)!=null&&r.endpoint&&(this.analyticsDefaultEndpoint=e.analytics.endpoint),this.set_config({person_profiles:this.bi?this.bi:"identified_only"}),this.ci.forEach(n=>n.onRemoteConfig==null?void 0:n.onRemoteConfig(e))}Ri(){try{this.config.loaded(this)}catch(n){B.critical("`loaded` function failed",n)}if(this.Oi(),this.config.internal_or_test_user_hostname&&nt!=null&&nt.hostname){var e=nt.hostname,r=this.config.internal_or_test_user_hostname;(typeof r=="string"?e===r:r.test(e))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout(()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Fi()},1),this.Mi=new yE(this),this.Mi.load()}Oi(){var e;this.is_capturing()&&this.config.request_batching&&((e=this.$i)==null||e.enable())}_dom_loaded(){this.is_capturing()&&is(this.__request_queue,e=>this.ki(e)),this.__request_queue=[],this.Oi()}_handle_unload(){var e,r,n;(e=this.surveys)==null||e.handlePageUnload(),this.config.request_batching?(this.Ai()&&this.capture("$pageleave"),(r=this.$i)==null||r.unload(),(n=this.Pi)==null||n.unload()):this.Ai()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}_send_request(e){this.__loaded&&(PE?this.__request_queue.push(e):this.rateLimiter.isServerRateLimited(e.batchKey)||(e.transport=e.transport||this.config.api_transport,e.url=Ru(e.url,{ip:this.config.ip?1:0}),e.headers=M({},this.config.request_headers,e.headers),e.compression=e.compression==="best-available"?this.compression:e.compression,e.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(e.disableTransport=["sendBeacon"]),e.fetchOptions=e.fetchOptions||this.config.fetch_options,(r=>{var n,s,i,o=M({},r);o.timeout=o.timeout||6e4,o.url=Ru(o.url,{_:new Date().getTime().toString(),ver:Kt.JS_SDK_VERSION,compression:o.compression});var a=(n=o.transport)!==null&&n!==void 0?n:"fetch",l=Mc.filter(u=>!o.disableTransport||!u.transport||!o.disableTransport.includes(u.transport)),c=(s=(i=rE(l,u=>u.transport===a))==null?void 0:i.method)!==null&&s!==void 0?s:l[0].method;if(!c)throw new Error("No available transport method");c(o)})(M({},e,{callback:r=>{var n,s;this.rateLimiter.checkForLimiting(r),r.statusCode>=400&&((n=(s=this.config).on_request_error)==null||n.call(s,r)),e.callback==null||e.callback(r)}}))))}ki(e){this.Pi?this.Pi.retriableRequest(e):this._send_request(e)}_execute_array(e){Sh++;try{var r,n=[],s=[],i=[];is(e,a=>
201{a&&(r=a[0],fe(r)?i.push(a):cn(a)?a.call(this):fe(a)&&r==="alias"?n.push(a):fe(a)&&r.indexOf("capture")!==-1&&cn(this[r])?i.push(a):s.push(a))});var o=function(a,l){is(a,function(c){if(fe(c[0])){var u=l;we(c,function(d){u=u[d[0]].apply(u,d.slice(1))})}else this[c[0]].apply(this,c.slice(1))},l)};o(n,this),o(s,this),o(i,this)}finally{Sh--}}push(e){if(Sh>0&&fe(e)&&We(e[0])){var r=Mr.prototype[e[0]];cn(r)&&r.apply(this,e.slice(1))}else this._execute_array([e])}capture(e,r,n){var s;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.$i){if(this.is_capturing())if(!U(e)&&We(e)){var i=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(i&&!this.config.__preview_capture_bot_pageviews)){var o=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(o==null||!o.isRateLimited){r!=null&&r.$current_url&&!We(r==null?void 0:r.$current_url)&&(B.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),r==null||delete r.$current_url),e!=="$exception"||n!=null&&n.Di||B.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var a=new Date,l=(n==null?void 0:n.timestamp)||a,c=Yn(),u={uuid:c,event:e,properties:this.calculateEventProperties(e,r||{},l,c)};e==="$pageview"&&this.config.__preview_capture_bot_pageviews&&i&&(u.event="$bot_pageview",u.properties.$browser_type="bot"),o&&(u.properties.$lib_rate_limit_remaining_tokens=o.remainingTokens),n!=null&&n.$set&&(u.$set=n==null?void 0:n.$set);var d,f=e!=="$groupidentify",h=e==="$identify",y=this.Li(n==null?void 0:n.$set_once,f,h);if(y&&(u.$set_once=y),(u=Lj(u,n!=null&&n._noTruncate?null:this.config.properties_string_max_length)).timestamp=l,U(n==null?void 0:n.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=a),e===ga.DISMISSED||e===ga.SENT){var g=r==null?void 0:r[_h.SURVEY_ID],w=r==null?void 0:r[_h.SURVEY_ITERATION];d={id:g,current_iteration:w},localStorage.getItem(w0(d))||localStorage.setItem(w0(d),"true"),u.$set=M({},u.$set,{[bI({id:g,current_iteration:w},e===ga.SENT?"responded":"dismissed")]:!0})}else e===ga.SHOWN&&(u.$set=M({},u.$set,{[_h.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(e===sI.SHOWN){var m=r==null?void 0:r[u0.TOUR_TYPE];m&&(u.$set=M({},u.$set,{[u0.TOUR_LAST_SEEN_DATE+"/"+m]:new Date().toISOString()}))}var v=M({},u.properties.$set,u.$set);if(Ui(v)||this.setPersonPropertiesForFlags(v),!ae(this.config.before_send)){var _=this.ji(u);if(!_)return;u=_}
201this.pi.emit("eventCaptured",u);var x={method:"POST",url:(s=n==null?void 0:n._url)!==null&&s!==void 0?s:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:n==null?void 0:n._batchKey};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.ki(x):this.$i.enqueue(x),u}B.critical("This capture call is ignored due to client rate limiting.")}}else B.error("No event name provided to posthog.capture")}else B.uninitializedWarning("posthog.capture")}_addCaptureHook(e){return this.on("eventCaptured",r=>e(r.event,r))}calculateEventProperties(e,r,n,s,i){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return r;var o=i?void 0:this.persistence.remove_event_timer(e),a=M({},r);if(a.token=this.config.token,a.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(a.$cookieless_mode=!0),e==="$snapshot"){var l=M({},this.persistence.properties(),this.sessionPersistence.properties());return a.distinct_id=l.distinct_id,(!We(a.distinct_id)&&!qr(a.distinct_id)||op(a.distinct_id))&&B.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),a}var c,u=rI(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(i,n.getTime());a.$session_id=d,a.$window_id=f}this.sessionPropsManager&&De(a,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&De(a,this.sessionRecording.sdkDebugProperties),a.$sdk_debug_retry_queue_size=(h=this.Pi)==null?void 0:h.length}catch(m){a.$sdk_debug_error_capturing_properties=String(m)}if(this.requestRouter.region===ma.CUSTOM&&(a.$lib_custom_api_host=this.config.api_host),c=e!=="$pageview"||i?e!=="$pageleave"||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,s),a=De(a,c),e==="$pageview"&&F&&(a.title=F.title),!U(o)){var y=n.getTime()-o;a.$duration=parseFloat((y/1e3).toFixed(3))}St&&this.config.opt_out_useragent_filter&&(a.$browser_type=this._is_bot()?"bot":"browser"),(a=De({},u,this.persistence.properties(),this.sessionPersistence.properties(),a)).$is_identified=this._isIdentified(),fe(this.config.property_denylist)?we(this.config.property_denylist,function(m){delete a[m]}):B.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var g=this.config.sanitize_properties;g&&(B.error("sanitize_properties is deprecated. Use before_send instead"),a=g(a,e));var w=this.Ni();return a.$process_person_profile=w,w&&!i&&this.Ui("_calculate_event_properties"),a}Li(e,r,n){var s;if(r===void 0&&(r=!0),n===void 0&&(n=!1),!this.persistence||!this.Ni()||this.fi&&!n)return e;var i=this.persistence.get_initial_props(),o=(s=this.sessionPropsManager)==null?void 0:s.getSetOnceProps(),a=De({},i,o||{},e||{}),l=this.config.sanitize_properties;return l&&(B.error("sanitize_properties is deprecated. Use before_send instead"),a=l(a,"$set_once")),r&&(this.fi=!0),Ui(a)?void 0:a}register(e,r){var n;(n=this.persistence)==null||n.register(e,r)}register_once(e,r,n){var s;(s=this.persistence)==null||s.register_once(e,r,n)}register_for_session(e){var r;(r=this.sessionPersistence)==null||r.register(e)}unregister(e){var r;(r=this.persistence)==null||r.unregister(e)}unregister_for_session(e){var r;(r=this.sessionPersistence)==null||r.unregister(e)}zi(e,r){this.register({[e]:r})}getFeatureFlag(e,r){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlag(e,r)}getFeatureFlagPayload(e){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagPayload(e)}getFeatureFlagResult(e,r){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagResult(e,r)}isFeatureEnabled(e,r){var n;return(n=this.featureFlags)==null?void 0:n.isFeatureEnabled(e,r)}reloadFeatureFlags(){var e;(e=this.featureFlags)==null||e.reloadFeatureFlags()}updateFlags(e,r,n){var s;(s=this.featureFlags)==null||s.updateFlags(e,r,n)}updateEarlyAccessFeatureEnrollment(e,r,n){var s;(s=this.featureFlags)==null||s.updateEarlyAccessFeatureEnrollment(e,r,n)}getEarlyAccessFeatures(e,r,n){var s;return r===void 0&&(r=!1),(s=this.featureFlags)==null?void 0:s.getEarlyAccessFeatures(e,r,n)}on(e,r){return this.pi.on(e,r)}onFeatureFlags(e){return this.featureFlags?this.featureFlags.onFeatureFlags(e):(e([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(e){return this.surveys?this.surveys.onSurveysLoaded(e):(e([],{isLoaded:!1,error:"Surveys module not available"}),()=>{})}onSessionId(e){var r,n;return(r=(n=this.sessionManager)==null?void 0:n.onSessionId(e))!==null&&r!==void 0?r:()=>{}}getSurveys(e,r){r===void 0&&(r=!1),this.surveys?this.surveys.getSurveys(e,r):e([],{isLoaded:!1,error:"Surveys module not available"})}getActiveMatchingSurveys(e,r){r===void 0&&(r=!1),this.surveys?this.surveys.getActiveMatchingSurveys(e,r):e([],{isLoaded:!1,error:"Surveys module not available"})}renderSurvey(e,r){var n;(n=this.surveys)==null||n.renderSurvey(e,r)}displaySurvey(e,r){var n;r===void 0&&(r=EI),(n=this.surveys)==null||n.displaySurvey(e,r)}cancelPendingSurvey(e){var r;(r=this.surveys)==null||r.cancelPendingSurvey(e)}canRenderSurvey(e){var r,n;return(r=(n=this.surveys)==null?void 0:n.canRenderSurvey(e))!==null&&r!==void 0?r:{visible:!1,disabledReason:"Surveys module not available"}}canRenderSurveyAsync(e,r){var n,s;return r===void 0&&(r=!1),(n=(s=this.surveys)==null?void 0:s.canRenderSurveyAsync(e,r))!==null&&n!==void 0?n:Promise.resolve({visible:!1,disabledReason:"Surveys module not available"})}identify(e,r,n){if(!this.__loaded||!this.persistence)return B.uninitializedWarning("posthog.identify");if(qr(e)&&(e=e.toString(),B.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),e)if(["distinct_id","distinctid"].includes(e.toLowerCase()))B.critical('The string "'+e+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and n
201ot a hardcoded string.');else if(e!==Go){if(this.Ui("posthog.identify")){var s=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var i=s;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}e!==s&&e!==this.get_property(da)&&(this.unregister(da),this.register({distinct_id:e}));var o,a=(this.persistence.get_property(Nr)||"anonymous")==="anonymous";e!==s&&a?(this.persistence.set_property(Nr,"identified"),this.setPersonPropertiesForFlags(M({},n||{},r||{}),!1),this.capture("$identify",{distinct_id:e,$anon_distinct_id:s},{$set:r||{},$set_once:n||{}}),this.yi=y0(e,r,n),(o=this.featureFlags)==null||o.setAnonymousDistinctId(s)):(r||n)&&this.setPersonProperties(r,n),e!==s&&(this.reloadFeatureFlags(),this.unregister(Aa))}}else B.critical('The string "'+Go+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else B.error("Unique user id has not been set in posthog.identify")}setPersonProperties(e,r){if((e||r)&&this.Ui("posthog.setPersonProperties")){var n=y0(this.get_distinct_id(),e,r);this.yi!==n?(this.setPersonPropertiesForFlags(M({},r||{},e||{})),this.capture("$set",{$set:e||{},$set_once:r||{}}),this.yi=n):B.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(e,r,n){if(e&&r){var s=this.getGroups();s[e]!==r&&this.resetGroupPropertiesForFlags(e),this.register({$groups:M({},s,{[e]:r})}),n&&(this.capture("$groupidentify",{$group_type:e,$group_key:r,$group_set:n}),this.setGroupPropertiesForFlags({[e]:n})),s[e]===r||n||this.reloadFeatureFlags()}else B.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(e,r){var n;r===void 0&&(r=!0),(n=this.featureFlags)==null||n.setPersonPropertiesForFlags(e,r)}resetPersonPropertiesForFlags(){var e;(e=this.featureFlags)==null||e.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(e,r){var n;r===void 0&&(r=!0),this.Ui("posthog.setGroupPropertiesForFlags")&&((n=this.featureFlags)==null||n.setGroupPropertiesForFlags(e,r))}resetGroupPropertiesForFlags(e){var r;(r=this.featureFlags)==null||r.resetGroupPropertiesForFlags(e)}reset(e){var r,n,s,i,o,a,l;if(B.info("reset"),!this.__loaded)return B.uninitializedWarning("posthog.reset");var c=this.get_property("$device_id");if(this.consent.reset(),(r=this.persistence)==null||r.clear(),(n=this.sessionPersistence)==null||n.clear(),(s=this.surveys)==null||s.reset(),(i=this.Mi)==null||i.stop(),(o=this.featureFlags)==null||o.reset(),(a=this.persistence)==null||a.set_property(Nr,"anonymous"),(l=this.sessionManager)==null||l.resetSessionId(),this.yi=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:Go,$device_id:null},"");else{var u=this.config.get_device_id(Yn());this.register_once({distinct_id:u,$device_id:e?u:c},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),this.reloadFeatureFlags()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var e,r;return(e=(r=this.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&e!==void 0?e:""}get_session_replay_url(e){if(!this.sessionManager)return"";var{sessionId:r,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),s=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+r);if(e!=null&&e.withTimestamp&&n){var i,o=(i=e.timestampLookBack)!==null&&i!==void 0?i:10;if(!n)return s;s+="?t="+Math.max(Math.floor((new Date().getTime()-n)/1e3)-o,0)}return s}alias(e,r){return e===this.get_property(sE)?(B.critical("Attempting to create alias for existing People user - aborting."),-2):this.Ui("posthog.alias")?(U(r)&&(r=this.get_distinct_id()),e!==r?(this.zi(da,e),this.capture("$create_alias",{alias:e,distinct_id:r})):(B.warn("alias matches current distinct_id - skipping api call."),this.identify(e),-1)):void 0}set_config(e){var r=M({},this.config);if(Ke(e)){var n,s,i,o,a,l,c,u,d;De(this.config,x0(e));var f=this.xi();(n=this.persistence)==null||n.update_config(this.config,r,f),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new mh(M({},this.config,{persistence:"sessionStorage"}),f);var h=this.wi(this.config.debug);
201fn(h)&&(this.config.debug=h),fn(this.config.debug)&&(this.config.debug?(Kt.DEBUG=!0,Ne.F()&&Ne.L("ph_debug",!0),B.info("set_config",{config:e,oldConfig:r,newConfig:M({},this.config)})):(Kt.DEBUG=!1,Ne.F()&&Ne.j("ph_debug"))),(s=this.exceptionObserver)==null||s.onConfigChange(),(i=this.sessionRecording)==null||i.startIfEnabledOrStop(),(o=this.autocapture)==null||o.startIfEnabled(),(a=this.heatmaps)==null||a.startIfEnabled(),(l=this.exceptionObserver)==null||l.startIfEnabledOrStop(),(c=this.deadClicksAutocapture)==null||c.startIfEnabledOrStop(),(u=this.surveys)==null||u.loadIfEnabled(),this.Hi(),(d=this.externalIntegrations)==null||d.startIfEnabledOrStop()}}_overrideSDKInfo(e,r){Kt.LIB_NAME=e,Kt.LIB_VERSION=r}startSessionRecording(e){var r=e===!0,n={sampling:r||!(e==null||!e.sampling),linked_flag:r||!(e==null||!e.linked_flag),url_trigger:r||!(e==null||!e.url_trigger),event_trigger:r||!(e==null||!e.event_trigger)};if(Object.values(n).some(Boolean)){var s,i,o,a,l;(s=this.sessionManager)==null||s.checkAndGetSessionAndWindowId(),n.sampling&&((i=this.sessionRecording)==null||i.overrideSampling()),n.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),n.url_trigger&&((a=this.sessionRecording)==null||a.overrideTrigger("url")),n.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var e;return!((e=this.sessionRecording)==null||!e.started)}captureException(e,r){if(this.exceptions){var n=new Error("PostHog syntheticException"),s=this.exceptions.buildProperties(e,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(M({},s,r))}}startExceptionAutocapture(e){this.set_config({capture_exceptions:e==null||e})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(e){var r,n;return(r=(n=this.toolbar)==null?void 0:n.loadToolbar(e))!==null&&r!==void 0&&r}get_property(e){var r;return(r=this.persistence)==null?void 0:r.props[e]}getSessionProperty(e){var r;return(r=this.sessionPersistence)==null?void 0:r.props[e]}toString(){var e,r=(e=this.config.name)!==null&&e!==void 0?e:Si;return r!==Si&&(r=Si+"."+r),r}_isIdentified(){var e,r;return((e=this.persistence)==null?void 0:e.get_property(Nr))==="identified"||((r=this.sessionPersistence)==null?void 0:r.get_property(Nr))==="identified"}Ni(){var e,r;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&Ui(this.getGroups())&&((e=this.persistence)==null||(e=e.props)==null||!e[da])&&((r=this.persistence)==null||(r=r.props)==null||!r[Eu]))}Ai(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Ni()||this.Ui("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.Ui("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}Ui(e){return this.config.person_profiles==="never"?(B.error(e+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.zi(Eu,!0),!0)}xi(){if(this.config.cookieless_mode==="always")return!0;var e=this.consent.isOptedOut(),r=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||e&&!!r}Hi(){var e,r,n,s,i=this.xi();return((e=this.persistence)==null?void 0:e.st)!==i&&((n=this.persistence)==null||n.set_disabled(i)),((r=this.sessionPersistence)==null?void 0:r.st)!==i&&((s=this.sessionPersistence)==null||s.set_disabled(i)),i}opt_in_capturing(e){var r;if(this.config.cookieless_mode!=="always"){if(this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()){var n,s,i,o,a;this.reset(!0),(n=this.sessionManager)==null||n.destroy(),(s=this.pageViewManager)==null||s.destroy(),this.sessionManager=new m0(this),this.pageViewManager=new l0(this),this.persistence&&(this.sessionPropsManager=new v0(this,this.sessionManager,this.persistence));var l=(i=(o=this.config.__extensionClasses)==null?void 0:o.sessionRecording)!==null&&i!==void 0?i:(a=Mr.__defaultExtensionClasses)==null?void 0:a.sessionRecording;l&&(this.sessionRecording=this.vi(this.sessionRecording,new l(this)))}var c,u;this.consent.optInOut(!0),this.Hi(),this.Oi(),(r=this.sessionRecording)==null||r.startIfEnabledOrStop(),this.config.cookieless_mode=="on_reject"&&((c=this.surveys)==null||c.loadIfEnabled()),(U(e==null?void 0:e.captureEventName)||e!=null&&e.captureEventName)&&this.capture((u=e==null?void 0:e.captureEventName)!==null&&u!==void 0?u:"$opt_in",e==null?void 0:e.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Fi()}
vendor: 24,061 bytes, line 201
201else B.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var e,r,n;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Hi(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:Go,$device_id:null}),(e=this.sessionManager)==null||e.destroy(),(r=this.pageViewManager)==null||r.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(n=this.sessionRecording)==null||n.stopRecording(),this.sessionRecording=void 0,this.Fi())):B.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var e=this.consent.consent;return e===tn.GRANTED?"granted":e===tn.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Hi()}_is_bot(){return Mt?SE(Mt,this.config.custom_blocked_useragents):void 0}Fi(){F&&(F.visibilityState==="visible"?this.gi||(this.gi=!0,this.capture("$pageview",{title:F.title},{send_instantly:!0}),this.mi&&(F.removeEventListener("visibilitychange",this.mi),this.mi=null)):this.mi||(this.mi=this.Fi.bind(this),ze(F,"visibilitychange",this.mi)))}debug(e){e===!1?(T==null||T.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(T==null||T.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}bt(){var e,r,n,s,i,o,a,l=this.Ei||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(B.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",s=!1,i=B,o=(r="advanced_disable_flags")in(e=l)&&!ae(e[r]),a=n in e&&!ae(e[n]),o?e[r]:a?(i&&i.warn("Config field '"+n+"' is deprecated. Please use '"+r+"' instead. The old field will be removed in a future major version."),e[n]):s)}ji(e){if(ae(this.config.before_send))return e;var r=fe(this.config.before_send)?this.config.before_send:[this.config.before_send],n=e;for(var s of r){if(n=s(n),ae(n)){var i="Event '"+e.event+"' was rejected in beforeSend function";return Z2(e.event)?B.warn(i+". This can cause unexpected behavior."):B.info(i),null}n.properties&&!Ui(n.properties)||B.warn("Event '"+e.event+"' has no properties after beforeSend function, this is likely an error.")}return n}getPageViewId(){var e;return(e=this.pageViewManager.K)==null?void 0:e.pageViewId}captureTraceFeedback(e,r){this.capture("$ai_feedback",{$ai_trace_id:String(e),$ai_feedback_text:r})}captureTraceMetric(e,r,n){this.capture("$ai_metric",{$ai_trace_id:String(e),$ai_metric_name:r,$ai_metric_value:String(n)})}wi(e){var r=fn(e)&&!e,n=Ne.F()&&Ne.A("ph_debug")==="true";return!r&&(!!n||e)}}Mr.__defaultExtensionClasses={},function(t,e){for(var r=0;r<e.length;r++)t.prototype[e[r]]=$j(t.prototype[e[r]])}(Mr,["identify"]);function E0(t){return t instanceof Element&&(t.id===aE||!(t.closest==null||!t.closest(".toolbar-global-fade-container")))}function pd(t){return!!t&&t.nodeType===1}function os(t,e){return!!t&&!!t.tagName&&t.tagName.toLowerCase()===e.toLowerCase()}function RE(t){return!!t&&t.nodeType===3}function NE(t){return!!t&&t.nodeType===11}function gv(t){return t?hd(t).split(/\s+/):[]}function S0(t){var e=T==null?void 0:T.location.href;return!!(e&&t&&t.some(r=>e.match(r)))}function Ou(t){var e="";switch(typeof t.className){case"string":e=t.className;break;case"object":e=(t.className&&"baseVal"in t.className?t.className.baseVal:null)||t.getAttribute("class")||"";break;default:e=""}return gv(e)}function OE(t){return ae(t)?null:hd(t).split(/(\s+)/).filter(e=>hl(e)).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Ol(t){var e="";return Tp(t)&&!$E(t)&&t.childNodes&&t.childNodes.length&&we(t.childNodes,function(r){var n;RE(r)&&r.textContent&&(e+=(n=OE(r.textContent))!==null&&n!==void 0?n:"")}),hd(e)}function k0(t){return U(t.target)?t.srcElement||null:(e=t.target)!=null&&e.shadowRoot?t.composedPath()[0]||null:t.target||null;var e}var vv=["a","button","form","input","select","textarea","label"];function AE(t,e){if(U(e))return!0;var r,n=function(i){if(e.some(o=>i.matches(o)))return{v:!0}};for(var s of t)if(r=n(s))return r.v;return!1}function jE(t){var e=t.parentNode;return!(!e||!pd(e))&&e}var PI=["next","previous","prev",">","<"],C0=10,T0=[".ph-no-rageclick",".ph-no-capture"];function RI(t,e){if(!T||mv(t))return!1;var r,n,s;if(fn(e)?(r=!!e&&T0,n=void 0):(r=(s=e==null?void 0:e.css_selector_ignorelist)!==null&&s!==void 0?s:T0,n=e==null?void 0:e.content_ignorelist),r===!1)return!1;var{targetElementList:i}=IE(t,!1);return!function(o,a){if(o===!1||U(o))return!1;var l;if(o===!0)l=PI;else{if(!fe(o))return!1;if(o.length>C0)return B.error("[PostHog] content_ignorelist array cannot exceed "+C0+" items. Use css_selector_ignorelist for more complex matching."),!1;l=o.map(c=>c.toLowerCase())}return a.some(c=>{var{safeText:u,ariaLabel:d}=c;return l.some(f=>u.includes(f)||d.includes(f))})}(n,i.map(o=>{var a;return{safeText:Ol(o).toLowerCase(),ariaLabel:((a=o.getAttribute("aria-label"))==null?void 0:a.toLowerCase().trim())||""}}))&&!AE(i,r)}var mv=t=>!t||os(t,"html")||!pd(t),IE=(t,e)=>{if(!T||mv(t))return{parentIsUsefulElement:!1,targetElementList:[]};for(var r=!1,n=[t],s=t;s.parentNode&&!os(s,"body");)if(NE(s.parentNode))n.push(s.parentNode.host),s=s.parentNode.host;else{var i=jE(s);if(!i)break;if(e||vv.indexOf(i.tagName.toLowerCase())>-1)r=!0;else{var o=T.getComputedStyle(i);o&&o.getPropertyValue("cursor")==="pointer"&&(r=!0)}n.push(i),s=i}return{parentIsUsefulElement:r,targetElementList:n}};function NI(t,e,r,n,s){var i,o,a,l;if(r===void 0&&(r=void 0),!T||mv(t)||(i=r)!=null&&i.url_allowlist&&!S0(r.url_allowlist)||(o=r)!=null&&o.url_ignorelist&&S0(r.url_ignorelist))return!1;if((a=r)!=null&&a.dom_event_allowlist){var c=r.dom_event_allowlist;if(c&&!c.some(y=>e.type===y))return!1}var{parentIsUsefulElement:u,targetElementList:d}=IE(t,n);if(!function(y,g){var w=g==null?void 0:g.element_allowlist;if(U(w))return!0;var m,v=function(x){if(w.some(E=>x.tagName.toLowerCase()===E))return{v:!0}};for(var _ of y)if(m=v(_))return m.v;return!1}(d,r)||!AE(d,(l=r)==null?void 0:l.css_selector_allowlist))return!1;var f=T.getComputedStyle(t);if(f&&f.getPropertyValue("cursor")==="pointer"&&e.type==="click")return!0;var h=t.tagName.toLowerCase();switch(h){case"html":return!1;case"form":return(s||["submit"]).indexOf(e.type)>=0;case"input":case"select":case"textarea":return(s||["change","click"]).indexOf(e.type)>=0;default:return u?(s||["click"]).indexOf(e.type)>=0:(s||["click"]).indexOf(e.type)>=0&&(vv.indexOf(h)>-1||t.getAttribute("contenteditable")==="true")}}function Tp(t){for(var e=t;e.parentNode&&!os(e,"body");e=e.parentNode){var r=Ou(e);if(ie(r,"ph-sensitive")||ie(r,"ph-no-capture"))return!1}if(ie(Ou(t),"ph-include"))return!0;var n=t.type||"";if(We(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var s=t.name||t.id||"";return!(We(s)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(s.replace(/[^a-zA-Z0-9]/g,"")))}function $E(t){return!!(os(t,"input")&&!["button","checkbox","submit","reset"].includes(t.type)||os(t,"select")||os(t,"textarea")||t.getAttribute("contenteditable")==="true")}var LE="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",OI=new RegExp("^(?:"+LE+")$"),AI=new RegExp(LE),ME="\\d{3}-?\\d{2}-?\\d{4}",jI=new RegExp("^("+ME+")$"),II=new RegExp("("+ME+")");function hl(t,e){return e===void 0&&(e=!0),!(ae(t)||We(t)&&(t=hd(t),(e?OI:AI).test((t||"").replace(/[- ]/g,""))||(e?jI:II).test(t)))}function DE(t){var e=Ol(t);return hl(e=(e+" "+FE(t)).trim())?e:""}function FE(t){var e="";return t&&t.childNodes&&t.childNodes.length&&we(t.childNodes,function(r){var n;if(r&&((n=r.tagName)==null?void 0:n.toLowerCase())==="span")try{var s=Ol(r);e=(e+" "+s).trim(),r.childNodes&&r.childNodes.length&&(e=(e+" "+FE(r)).trim())}catch(i){B.error("[AutoCapture]",i)}}),e}function $I(t){return function(e){var r=e.map(n=>{var s,i,o="";if(n.tag_name&&(o+=n.tag_name),n.attr_class)for(var a of(n.attr_class.sort(),n.attr_class))o+="."+a.replace(/"/g,"");var l=M({},n.text?{text:n.text}:{},{"nth-child":(s=n.nth_child)!==null&&s!==void 0?s:0,"nth-of-type":(i=n.nth_of_type)!==null&&i!==void 0?i:0},n.href?{href:n.href}:{},n.attr_id?{attr_id:n.attr_id}:{},n.attributes),c={};return Lc(l).sort((u,d)=>{var[f]=u,[h]=d;return f.localeCompare(h)}).forEach(u=>{var[d,f]=u;return c[P0(d.toString())]=P0(f.toString())}),o+=":",o+=Lc(c).map(u=>{var[d,f]=u;return d+'="'+f+'"'}).join("")});return r.join(";")}(function(e){return e.map(r=>{var n,s,i={text:(n=r.$el_text)==null?void 0:n.slice(0,400),tag_name:r.tag_name,href:(s=r.attr__href)==null?void 0:s.slice(0,2048),attr_class:LI(r),attr_id:r.attr__id,nth_child:r.nth_child,nth_of_type:r.nth_of_type,attributes:{}};return Lc(r).filter(o=>{var[a]=o;return a.indexOf("attr__")===0}).forEach(o=>{var[a,l]=o;return i.attributes[a]=l}),i})}(t))}function P0(t){return t.replace(/"|\\"/g,'\\"')}function LI(t){var e=t.attr__class;return e?fe(e)?e:gv(e):void 0}class R0{constructor(e){this.disabled=e===!1;var r=Ke(e)?e:{};this.thresholdPx=r.threshold_px||30,this.timeoutMs=r.timeout_ms||1e3,this.clickCount=r.click_count||3,this.clicks=[]}isRageClick(e,r,n){if(this.disabled)return!1;var s=this.clicks[this.clicks.length-1];if(s&&Math.abs(e-s.x)+Math.abs(r-s.y)<this.thresholdPx&&n-s.timestamp<this.timeoutMs){if(this.clicks.push({x:e,y:r,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:e,y:r,timestamp:n}];return!1}}var kh="$copy_autocapture",N0=je("[AutoCapture]");function Ch(t,e){return e.length>t?e.slice(0,t)+"...":e}function MI(t){if(t.previousElementSibling)return t.previousElementSibling;var e=t;do e=e.previousSibling;while(e&&!pd(e));return e}function DI(t,e,r,n){var s=t.tagName.toLowerCase(),i={tag_name:s};vv.indexOf(s)>-1&&!r&&(s.toLowerCase()==="a"||s.toLowerCase()==="button"?i.$el_text=Ch(1024,DE(t)):i.$el_text=Ch(1024,Ol(t)));var o=Ou(t);o.length>0&&(i.classes=o.filter(function(u){return u!==""})),we(t.attributes,function(u){var d;if((!$E(t)||["name","id","class","aria-label"].indexOf(u.name)!==-1)&&(n==null||!n.includes(u.name))&&!e&&hl(u.value)&&(d=u.name,!We(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var f=u.value;u.name==="class"&&(f=gv(f).join(" ")),i["attr__"+u.name]=Ch(1024,f)}});for(var a=1,l=1,c=t;c=MI(c);)a++,c.tagName===t.tagName&&l++;return i.nth_child=a,i.nth_of_type=l,i}function FI(t,e){for(var r,n,{e:s,maskAllElementAttributes:i,maskAllText:o,elementAttributeIgnoreList:a,elementsChainAsString:l}=e,c=[t],u=t;u.parentNode&&!os(u,"body");)NE(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var d,f=[],h={},y=!1,g=!1;if(we(c,x=>{var E=Tp(x);x.tagName.toLowerCase()==="a"&&(y=x.getAttribute("href"),y=E&&y&&hl(y)&&y),ie(Ou(x),"ph-no-capture")&&(g=!0),f.push(DI(x,i,o,a));var k=function(S){if(!Tp(S))return{};var C={};return we(S.attributes,function(N){if(N.name&&N.name.indexOf("data-ph-capture-attribute")===0){var A=N.name.replace("data-ph-capture-attribute-",""),H=N.value;A&&H&&hl(H)&&(C[A]=H)}}),C}(x);De(h,k)}),g)return{props:{},explicitNoCapture:g};if(o||(t.tagName.toLowerCase()==="a"||t.tagName.toLowerCase()==="button"?f[0].$el_text=DE(t):f[0].$el_text=Ol(t)),y){var w,m;f[0].attr__href=y;var v=(w=ku(y))==null?void 0:w.host,_=T==null||(m=T.location)==null?void 0:m.host;v&&_&&v!==_&&(d=y)}return{props:De({$event_type:s.type,$ce_version:1},l?{}:{$elements:f},{$elements_chain:$I(f)},(r=f[0])!=null&&r.$el_text?{$el_text:(n=f[0])==null?void 0:n.$el_text}:{},d&&s.type==="click"?{$external_click_url:d}:{},h)}}var ea=je("[ExceptionAutocapture]");function O0(t,e,r){try{if(!(e in t))return()=>{};var n=t[e],s=r(n);return cn(s)&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__posthog_wrapped__:{enumerable:!1,value:!0}})),t[e]=s,()=>{t[e]=n}}catch{return()=>{}}}var UI=je("[TracingHeaders]"),Nn=je("[Web Vitals]"),A0=9e5,j0="disabled",I0="lazy_loading",ta="awaiting_config",uc="missing_config";je("[SessionRecording]");var Pp="[SessionRecording]",xs=je(Pp),BI=je("[Heatmaps]");function $0(t){return Ke(t)&&"clientX"in t&&"clientY"in t&&qr(t.clientX)&&qr(t.clientY)}var L0=je("[Product Tours]"),Th="ph_product_tours",zI=["$set_once","$set"],On=je("[SiteApps]");function fi(t,e,r){if(ae(t))return!1;switch(r){case"exact":return t===e;case"contains":var n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(n,"i").test(t);case"regex":try{return new RegExp(e).test(t)}catch{return!1}default:return!1}}class WI{constructor(e){this.Bi=new pv,this.qi=(r,n)=>this.Vi(r,n)&&this.Wi(r,n)&&this.Gi(r,n)&&this.Yi(r,n),this.Vi=(r,n)=>n==null||!n.event||(r==null?void 0:r.event)===(n==null?void 0:n.event),this._instance=e,this.Ji=new Set,this.Ki=new Set}init(){var e;if(!U((e=this._instance)==null?void 0:e._addCaptureHook)){var r;(r=this._instance)==null||r._addCaptureHook((n,s)=>{this.on(n,s)})}}register(e){var r,n;if(!U((r=this._instance)==null?void 0:r._addCaptureHook)&&(e.forEach(o=>{var a,l;(a=this.Ki)==null||a.add(o),(l=o.steps)==null||l.forEach(c=>{var u;(u=this.Ji)==null||u.add((c==null?void 0:c.event)||"")})}),(n=this._instance)!=null&&n.autocapture)){var s,i=new Set;e.forEach(o=>{var a;(a=o.steps)==null||a.forEach(l=>{l!=null&&l.selector&&i.add(l==null?void 0:l.selector)})}),(s=this._instance)==null||s.autocapture.setElementSelectors(i)}}on(e,r){var n;r!=null&&e.length!=0&&(this.Ji.has(e)||this.Ji.has(r==null?void 0:r.event))&&this.Ki&&((n=this.Ki)==null?void 0:n.size)>0&&this.Ki.forEach(s=>{this.Xi(r,s)&&this.Bi.emit("actionCaptured",s.name)})}Qi(e){this.onAction("actionCaptured",r=>e(r))}Xi(e,r){if((r==null?void 0:r.steps)==null)return!1;for(var n of r.steps)if(this.qi(e,n))return!0;return!1}onAction(e,r){return this.Bi.on(e,r)}Wi(e,r){if(r!=null&&r.url){var n,s=e==null||(n=e.properties)==null?void 0:n.$current_url;if(!s||typeof s!="string"||!fi(s,r.url,r.url_matching||"contains"))return!1}return!0}Gi(e,r){return!!this.Zi(e,r)&&!!this.te(e,r)&&!!this.ie(e,r)}Zi(e,r){var n;if(r==null||!r.href)return!0;var s=this.ee(e);if(s.length>0)return s.some(a=>fi(a.href,r.href,r.href_matching||"exact"));var i,o=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||"";return!!o&&fi((i=o.match(/(?::|")href="(.*?)"/))?i[1]:"",r.href,r.href_matching||"exact")}te(e,r){var n;if(r==null||!r.text)return!0;var s=this.ee(e);if(s.length>0)return s.some(c=>fi(c.text,r.text,r.text_matching||"exact")||fi(c.$el_text,r.text,r.text_matching||"exact"));var i,o,a,l=(e==null||(n=e.properties)==null?void 0:n.$elements_chain)||"";return!!l&&(i=function(c){for(var u,d=[],f=/(?::|")text="(.*?)"/g;!ae(u=f.exec(c));)d.includes(u[1])||d.push(u[1]);return d}(l),o=r.text,a=r.text_matching||"exact",i.some(c=>fi(c,o,a)))}ie(e,r){var n,s;if(r==null||!r.selector)return!0;var i=e==null||(n=e.properties)==null?void 0:n.$element_selectors;if(i!=null&&i.includes(r.selector))return!0;var o=(e==null||(s=e.properties)==null?void 0:s.$elements_chain)||"";if(r.selector_regex&&o)try{return new RegExp(r.selector_regex).test(o)}catch{return!1}return!1}ee(e){var r;return(e==null||(r=e.properties)==null?void 0:r.$elements)==null?[]:e==null?void 0:e.properties.$elements}Yi(e,r){return r==null||!r.properties||r.properties.length===0||CE(r.properties.reduce((n,s)=>{var i=fe(s.value)?s.value.map(String):s.value!=null?[String(s.value)]:[];return n[s.key]={values:i,operator:s.operator||"exact"},n},{}),e==null?void 0:e.properties)}}class HI{constructor(e){this._instance=e,this.re=new Map,this.se=new Map,this.ne=new Map}oe(e,r){return!!e&&CE(e.propertyFilters,r==null?void 0:r.properties)}ae(e,r){var n=new Map;return e.forEach(s=>{var i;(i=s.conditions)==null||(i=i[r])==null||(i=i.values)==null||i.forEach(o=>{if(o!=null&&o.name){var a=n.get(o.name)||[];a.push(s.id),n.set(o.name,a)}})}),n}le(e,r,n){var s=(n===Jo.Activation?this.re:this.se).get(e),i=[];return this.ue(o=>{i=o.filter(a=>s==null?void 0:s.includes(a.id))}),i.filter(o=>{var a,l=(a=o.conditions)==null||(a=a[n])==null||(a=a.values)==null?void 0:a.find(c=>c.name===e);return this.oe(l,r)})}register(e){var r;U((r=this._instance)==null?void 0:r._addCaptureHook)||(this.he(e),this.de(e))}de(e){var r=e.filter(n=>{var s,i;return((s=n.conditions)==null?void 0:s.actions)&&((i=n.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0});r.length!==0&&(this.ve==null&&(this.ve=new WI(this._instance),this.ve.init(),this.ve.Qi(n=>{this.onAction(n)})),r.forEach(n=>{var s,i,o,a,l;n.conditions&&(s=n.conditions)!=null&&s.actions&&(i=n.conditions)!=null&&(i=i.actions)!=null&&i.values&&((o=n.conditions)==null||(o=o.actions)==null||(o=o.values)==null?void 0:o.length)>0&&((a=this.ve)==null||a.register(n.conditions.actions.values),(l=n.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach(c=>{if(c&&c.name){var u=this.ne.get(c.name);u&&u.push(n.id),this.ne.set(c.name,u||[n.id])}}))}))}he(e){var r,n=e.filter(i=>{var o,a;return((o=i.conditions)==null?void 0:o.events)&&((a=i.conditions)==null||(a=a.events)==null||(a=a.values)==null?void 0:a.length)>0}),s=e.filter(i=>{var o,a;return((o=i.conditions)==null?void 0:o.cancelEvents)&&((a=i.conditions)==null||(a=a.cancelEvents)==null||(a=a.values)==null?void 0:a.length)>0});(n.length!==0||s.length!==0)&&((r=this._instance)==null||r._addCaptureHook((i,o)=>{this.onEvent(i,o)}),this.re=this.ae(e,Jo.Activation),this.se=this.ae(e,Jo.Cancellation))}onEvent(e,r){var n,s=this.ce(),i=this.fe(),o=this.pe(),a=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[i])||[];if(o===e&&r&&a.length>0){var l,c;s.info("event matched, removing item from activated items",{event:e,eventPayload:r,existingActivatedItems:a});var u=(r==null||(l=r.properties)==null?void 0:l.$survey_id)||(r==null||(c=r.properties)==null?void 0:c.$product_tour_id);if(u){var d=a.indexOf(u);d>=0&&(a.splice(d,1),this._e(a))}}else{if(this.se.has(e)){var f=this.le(e,r,Jo.Cancellation);f.length>0&&(s.info("cancel event matched, cancelling items",{event:e,itemsToCancel:f.map(y=>y.id)}),f.forEach(y=>{var g=a.indexOf(y.id);g>=0&&a.splice(g,1),this.ge(y.id)}),this._e(a))}if(this.re.has(e)){s.info("event name matched",{event:e,eventPayload:r,items:this.re.get(e)});var h=this.le(e,r,Jo.Activation);this._e(a.concat(h.map(y=>y.id)||[]))}}}onAction(e){var r,n=this.fe(),s=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[n])||[];this.ne.has(e)&&this._e(s.concat(this.ne.get(e)||[]))}_e(e){var r,n=this.ce(),s=this.fe(),i=[...new Set(e)].filter(o=>!this.me(o));n.info("updating activated items",{activatedItems:i}),(r=this._instance)==null||(r=r.persistence)==null||r.register({[s]:i})}getActivatedIds(){var e,r=this.fe(),n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.props[r];return n||[]}getEventToItemsMap(){return this.re}be(){return this.ve}}class VI extends HI{constructor(e){super(e)}fe(){return"$surveys_activated"}pe(){return ga.SHOWN}ue(e){var r;(r=this._instance)==null||r.getSurveys(e)}ge(e){var r;(r=this._instance)==null||r.cancelPendingSurvey(e)}ce(){return ye}me(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var qI=T!=null&&T.location?Tu(T.location.hash,"__posthog")||Tu(location.hash,"state"):null,M0="_postHogToolbarParams",D0=je("[Toolbar]"),jn=function(t){return t[t.UNINITIALIZED=0]="UNINITIALIZED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED",t}(jn||{}),xt=je("[FeatureFlags]"),ra=je("[FeatureFlags]",{debugEnabled:!0}),KI="errors_while_computing_flags",GI="flag_missing",YI="quota_limited",JI="timeout",QI="connection_error",XI="unknown_error",ZI=t=>"api_error_"+t,Ph="$active_feature_flags",pi="$override_feature_flags",F0="$feature_flag_payloads",na="$override_feature_flag_payloads",U0="$feature_flag_request_id",B0=t=>{var e={};for(var[r,n]of Lc(t||{}))n&&(e[r]=n);return e},e$=t=>{var e=t.flags;return e?(t.featureFlags=Object.fromEntries(Object.keys(e).map(r=>{var n;return[r,(n=e[r].variant)!==null&&n!==void 0?n:e[r].enabled]})),t.featureFlagPayloads=Object.fromEntries(Object.keys(e).filter(r=>e[r].enabled).filter(r=>{var n;return(n=e[r].metadata)==null?void 0:n.payload}).map(r=>{var n;return[r,(n=e[r].metadata)==null?void 0:n.payload]}))):xt.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),t},t$=function(t){return t.FeatureFlags="feature_flags",t.Recordings="recordings",t}({}),Rh=je("[Error tracking]"),r$={icontains:(t,e)=>!!T&&e.href.toLowerCase().indexOf(t.toLowerCase())>-1,not_icontains:(t,e)=>!!T&&e.href.toLowerCase().indexOf(t.toLowerCase())===-1,regex:(t,e)=>!!T&&Nu(e.href,t),not_regex:(t,e)=>!!T&&!Nu(e.href,t),exact:(t,e)=>e.href===t,is_not:(t,e)=>e.href!==t};class dt{constructor(e){var r=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(n){n===void 0&&(n=!1),r.getWebExperiments(s=>{dt.ye("retrieved web experiments from the server"),r.we=new Map,s.forEach(i=>{if(i.feature_flag_key){var o;r.we&&(dt.ye("setting flag key ",i.feature_flag_key," to web experiment ",i),(o=r.we)==null||o.set(i.feature_flag_key,i));var a=r._instance.getFeatureFlag(i.feature_flag_key);We(a)&&i.variants[a]&&r.Ee(i.name,a,i.variants[a].transforms)}else if(i.variants)for(var l in i.variants){var c=i.variants[l];dt.Se(c)&&r.Ee(i.name,l,c.transforms)}})},n)},this._instance=e,this._instance.onFeatureFlags(n=>{this.onFeatureFlags(n)})}initialize(){}onFeatureFlags(e){if(this._is_bot())dt.ye("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(ae(this.we))return this.we=new Map,this.loadIfEnabled(),void this.previewWebExperiment();dt.ye("applying feature flags",e),e.forEach(r=>{var n;if(this.we&&(n=this.we)!=null&&n.has(r)){var s,i=this._instance.getFeatureFlag(r),o=(s=this.we)==null?void 0:s.get(r);i&&o!=null&&o.variants[i]&&this.Ee(o.name,i,o.variants[i].transforms)}})}}previewWebExperiment(){var e=dt.getWindowLocation();if(e!=null&&e.search){var r=Cu(e==null?void 0:e.search,"__experiment_id"),n=Cu(e==null?void 0:e.search,"__experiment_variant");r&&n&&(dt.ye("previewing web experiments "+r+" && "+n),this.getWebExperiments(s=>{this.xe(parseInt(r),n,s)},!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(e,r,n){if(this._instance.config.disable_web_experiments&&!n)return e([]);var s=this._instance.get_property("$web_experiments");if(s&&!r)return e(s);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:i=>{if(i.statusCode!==200||!i.json)return e([]);var o=i.json.experiments||[];return e(o)}})}xe(e,r,n){var s=n.filter(i=>i.id===e);s&&s.length>0&&(dt.ye("Previewing web experiment ["+s[0].name+"] with variant ["+r+"]"),this.Ee(s[0].name,r,s[0].variants[r].transforms))}static Se(e){return!ae(e.conditions)&&dt.$e(e)&&dt.ke(e)}static $e(e){var r;if(ae(e.conditions)||ae((r=e.conditions)==null?void 0:r.url))return!0;var n,s,i,o=dt.getWindowLocation();return!!o&&((n=e.conditions)==null||!n.url||r$[(s=(i=e.conditions)==null?void 0:i.urlMatchType)!==null&&s!==void 0?s:"icontains"](e.conditions.url,o))}
201static getWindowLocation(){return T==null?void 0:T.location}static ke(e){var r;if(ae(e.conditions)||ae((r=e.conditions)==null?void 0:r.utm))return!0;var n=dE();if(n.utm_source){var s,i,o,a,l,c,u,d,f=(s=e.conditions)==null||(s=s.utm)==null||!s.utm_campaign||((i=e.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==n.utm_campaign,h=(o=e.conditions)==null||(o=o.utm)==null||!o.utm_source||((a=e.conditions)==null||(a=a.utm)==null?void 0:a.utm_source)==n.utm_source,y=(l=e.conditions)==null||(l=l.utm)==null||!l.utm_medium||((c=e.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==n.utm_medium,g=(u=e.conditions)==null||(u=u.utm)==null||!u.utm_term||((d=e.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==n.utm_term;return f&&y&&g&&h}return!1}static ye(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),s=1;s<r;s++)n[s-1]=arguments[s];B.info("[WebExperiments] "+e,n)}Ee(e,r,n){this._is_bot()?dt.ye("Refusing to render web experiment since the viewer is a likely bot"):r!=="control"?n.forEach(s=>{if(s.selector){var i;dt.ye("applying transform of variant "+r+" for experiment "+e+" ",s);var o=(i=document)==null?void 0:i.querySelectorAll(s.selector);o==null||o.forEach(a=>{var l=a;s.html&&(l.innerHTML=s.html),s.css&&l.setAttribute("style",s.css)})}}):dt.ye("Control variants leave the page unmodified.")}_is_bot(){return Mt&&this._instance?SE(Mt,this._instance.config.custom_blocked_useragents):void 0}}var qt=je("[Conversations]"),gd={featureFlags:class{constructor(t){this.Pe=!1,this.Te=!1,this.Re=!1,this.Ie=!1,this.Ce=!1,this.Oe=!1,this.Fe=!1,this.Me=!1,this._instance=t,this.featureFlagEventHandlers=[]}Ae(){var t,e;return(t=(e=this._instance.persistence)==null?void 0:e.nt(this._instance.config.feature_flag_cache_ttl_ms))!==null&&t!==void 0&&t}De(){return!!this.Ae()&&(this.Me||this.Re||(this.Me=!0,xt.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}Le(){var t,e=(t=this._instance.config.evaluation_contexts)!==null&&t!==void 0?t:this._instance.config.evaluation_environments;return!this._instance.config.evaluation_environments||this._instance.config.evaluation_contexts||this.Fe||(xt.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.Fe=!0),e!=null&&e.length?e.filter(r=>{var n=r&&typeof r=="string"&&r.trim().length>0;return n||xt.error("Invalid evaluation context found:",r,"Expected non-empty string"),n}):[]}je(){return this.Le().length>0}initialize(){var t,e,{config:r}=this._instance,n=(t=(e=r.bootstrap)==null?void 0:e.featureFlags)!==null&&t!==void 0?t:{};if(Object.keys(n).length){var s,i,o=(s=(i=r.bootstrap)==null?void 0:i.featureFlagPayloads)!==null&&s!==void 0?s:{},a=Object.keys(n).filter(c=>!!n[c]).reduce((c,u)=>(c[u]=n[u]||!1,c),{}),l=Object.keys(o).filter(c=>a[c]).reduce((c,u)=>(o[u]&&(c[u]=o[u]),c),{});this.receivedFeatureFlags({featureFlags:a,featureFlagPayloads:l})}}updateFlags(t,e,r){var n=r!=null&&r.merge?this.getFlagVariants():{},s=r!=null&&r.merge?this.getFlagPayloads():{},i=M({},n,t),o=M({},s,e),a={};for(var[l,c]of Object.entries(i)){var u=typeof c=="string";a[l]={key:l,enabled:!!u||!!c,variant:u?c:void 0,reason:void 0,metadata:U(o==null?void 0:o[l])?void 0:{id:0,version:void 0,description:void 0,payload:o[l]}}}this.receivedFeatureFlags({flags:a})}get hasLoadedFlags(){return this.Te}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this._instance.get_property(fp),e=this._instance.get_property(pi),r=this._instance.get_property(na);if(!r&&!e)return t||{};var n=De({},t||{}),s=[...new Set([...Object.keys(r||{}),...Object.keys(e||{})])];for(var i of s){var o,a,l=n[i],c=e==null?void 0:e[i],u=U(c)?(o=l==null?void 0:l.enabled)!==null&&o!==void 0&&o:!!c,d=U(c)?l.variant:typeof c=="string"?c:void 0,f=r==null?void 0:r[i],h=M({},l,{enabled:u,variant:u?d??(l==null?void 0:l.variant):void 0});u!==(l==null?void 0:l.enabled)&&(h.original_enabled=l==null?void 0:l.enabled),d!==(l==null?void 0:l.variant)&&(h.original_variant=l==null?void 0:l.variant),f&&(h.metadata=M({},l==null?void 0:l.metadata,{payload:f,original_payload:l==null||(a=l.metadata)==null?void 0:a.payload})),n[i]=h}return this.Pe||(xt.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:r,finalDetails:n}),this.Pe=!0),n}getFlagVariants(){var t=this._instance.get_property(Bi),e=this._instance.get_property(pi);if(!e)return t||{};for(var r=De({},t),n=Object.keys(e),s=0;s<n.length;s++)r[n[s]]=e[n[s]];return this.Pe||(xt.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:e,finalFlags:r}),this.Pe=!0),r}getFlagPayloads(){var t=this._instance.get_property(F0),e=this._instance.get_property(na);if(!e)return t||{};for(var r=De({},t||{}),n=Object.keys(e),s=0;s<n.length;s++)r[n[s]]=e[n[s]];return this.Pe||(xt.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:e,finalPayloads:r}),this.Pe=!0),r}reloadFeatureFlags(){this.Ie||this._instance.config.advanced_disable_feature_flags||this.Ne||(this._instance.pi.emit("featureFlagsReloading",!0),this.Ne=setTimeout(()=>{this.Ue()},5))}ze(){clearTimeout(this.Ne),this.Ne=void 0}ensureFlagsLoaded(){this.Te||this.Re||this.Ne||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.Ie=t}Ue(t){var e;if(this.ze(),!this._instance.bt())if(this.Re)this.Ce=!0;else{var r=this._instance.config.token,n=this._instance.get_property("$device_id"),s={token:r,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:M({},((e=this._instance.persistence)==null?void 0:e.get_initial_props())||{},this._instance.get_property(pa)||{}),group_properties:this._instance.get_property(Ts),timezone:mE()};xr(n)||U(n)||(s.$device_id=n),(t!=null&&t.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(s.disable_flags=!0),this.je()&&(s.evaluation_contexts=this.Le());var i=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",o=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+i);this.Re=!0,this._instance._send_request({method:"POST",url:o,data:s,compression:this._instance.config.disable_compression?void 0:on.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:a=>{var l,c,u,d=!0;if(a.statusCode===200&&(this.Ce||(this.$anon_distinct_id=void 0),d=!1),this.Re=!1,!s.disable_flags||this.Ce){this.Oe=!d;var f=[];
vendor: 7,883 bytes, line 201
201a.error?a.error instanceof Error?f.push(a.error.name==="AbortError"?JI:QI):f.push(XI):a.statusCode!==200&&f.push(ZI(a.statusCode)),(l=a.json)!=null&&l.errorsWhileComputingFlags&&f.push(KI);var h=!((c=a.json)==null||(c=c.quotaLimited)==null||!c.includes(t$.FeatureFlags));if(h&&f.push(YI),(u=this._instance.persistence)==null||u.register({[vp]:f}),h)xt.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset.  Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var y;s.disable_flags||this.receivedFeatureFlags((y=a.json)!==null&&y!==void 0?y:{},d),this.Ce&&(this.Ce=!1,this.Ue())}}}})}}getFeatureFlag(t,e){var r;if(e===void 0&&(e={}),!e.fresh||this.Oe)if(this.Te||this.getFlags()&&this.getFlags().length>0){if(!this.De()){var n=this.getFeatureFlagResult(t,e);return(r=n==null?void 0:n.variant)!==null&&r!==void 0?r:n==null?void 0:n.enabled}}else xt.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){var e=this.getFeatureFlagResult(t,{send_event:!1});return e==null?void 0:e.payload}getFeatureFlagResult(t,e){if(e===void 0&&(e={}),!e.fresh||this.Oe)if(this.Te||this.getFlags()&&this.getFlags().length>0){if(!this.De()){var r=this.getFlagVariants(),n=t in r,s=r[t],i=this.getFlagPayloads()[t],o=String(s),a=this._instance.get_property(U0)||void 0,l=this._instance.get_property(bu)||void 0,c=this._instance.get_property(Aa)||{};if(this._instance.config.advanced_feature_flags_dedup_per_session){var u,d=this._instance.get_session_id(),f=this._instance.get_property(gp);d&&d!==f&&(c={},(u=this._instance.persistence)==null||u.register({[Aa]:c,[gp]:d}))}if((e.send_event||!("send_event"in e))&&(!(t in c)||!c[t].includes(o))){var h,y,g,w,m,v,_,x,E,k;fe(c[t])?c[t].push(o):c[t]=[o],(h=this._instance.persistence)==null||h.register({[Aa]:c});var S=this.getFeatureFlagDetails(t),C=[...(y=this._instance.get_property(vp))!==null&&y!==void 0?y:[]];U(s)&&C.push(GI);var N={$feature_flag:t,$feature_flag_response:s,$feature_flag_payload:i||null,$feature_flag_request_id:a,$feature_flag_evaluated_at:l,$feature_flag_bootstrapped_response:((g=this._instance.config.bootstrap)==null||(g=g.featureFlags)==null?void 0:g[t])||null,$feature_flag_bootstrapped_payload:((w=this._instance.config.bootstrap)==null||(w=w.featureFlagPayloads)==null?void 0:w[t])||null,$used_bootstrap_value:!this.Oe};U(S==null||(m=S.metadata)==null?void 0:m.version)||(N.$feature_flag_version=S.metadata.version);var A,H=(v=S==null||(_=S.reason)==null?void 0:_.description)!==null&&v!==void 0?v:S==null||(x=S.reason)==null?void 0:x.code;H&&(N.$feature_flag_reason=H),S!=null&&(E=S.metadata)!=null&&E.id&&(N.$feature_flag_id=S.metadata.id),U(S==null?void 0:S.original_variant)&&U(S==null?void 0:S.original_enabled)||(N.$feature_flag_original_response=U(S.original_variant)?S.original_enabled:S.original_variant),S!=null&&(k=S.metadata)!=null&&k.original_payload&&(N.$feature_flag_original_payload=S==null||(A=S.metadata)==null?void 0:A.original_payload),C.length&&(N.$feature_flag_error=C.join(",")),this._instance.capture("$feature_flag_called",N)}if(n){var L=i;if(!U(i))try{L=JSON.parse(i)}catch{}return{key:t,enabled:!!s,variant:typeof s=="string"?s:void 0,payload:L}}}}else xt.warn('getFeatureFlagResult for key "'+t+`" failed. Feature flags didn't load in time.`)}getRemoteConfigPayload(t,e){var r=this._instance.config.token,n={distinct_id:this._instance.get_distinct_id(),token:r};this.je()&&(n.evaluation_contexts=this.Le()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:n,compression:this._instance.config.disable_compression?void 0:on.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:s=>{var i,o=(i=s.json)==null?void 0:i.featureFlagPayloads;e((o==null?void 0:o[t])||void 0)}})}isFeatureEnabled(t,e){if(e===void 0&&(e={}),!e.fresh||this.Oe){if(this.Te||this.getFlags()&&this.getFlags().length>0){var r=this.getFeatureFlag(t,e);return U(r)?void 0:!!r}xt.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter(e=>e!==t)}receivedFeatureFlags(t,e){if(this._instance.persistence){this.Te=!0;var r=this.getFlagVariants(),n=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(i,o,a,l,c){a===void 0&&(a={}),l===void 0&&(l={}),c===void 0&&(c={});var u=e$(i),d=u.flags,f=u.featureFlags,h=u.featureFlagPayloads;if(f){var y=i.requestId,g=i.evaluatedAt;if(fe(f)){xt.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var w={};if(f)for(var m=0;m<f.length;m++)w[f[m]]=!0;o&&o.register({[Ph]:f,[Bi]:w})}else{var v=f,_=h,x=d;if(i.errorsWhileComputingFlags)if(d){var E=new Set(Object.keys(d).filter(k=>{var S;return!((S=d[k])!=null&&S.failed)}));v=M({},a,Object.fromEntries(Object.entries(v).filter(k=>{var[S]=k;return E.has(S)}))),_=M({},l,Object.fromEntries(Object.entries(_||{}).filter(k=>{var[S]=k;return E.has(S)}))),x=M({},c,Object.fromEntries(Object.entries(x||{}).filter(k=>{var[S]=k;return E.has(S)})))}else v=M({},a,v),_=M({},l,_),x=M({},c,x);o&&o.register(M({[Ph]:Object.keys(B0(v)),[Bi]:v||{},[F0]:_||{},[fp]:x||{}},y?{[U0]:y}:{},g?{[bu]:g}:{}))}}})(t,this._instance.persistence,r,n,s),e||(this.Me=!1),this.He(e)}}override(t,e){e===void 0&&(e=!1),xt.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:e})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this._instance.persistence)return xt.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this._instance.persistence.unregister(pi),this._instance.persistence.unregister(na),this.He(),ra.info("All overrides cleared");if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var e,r=t;if(this.Pe=!!((e=r.suppressWarning)!==null&&e!==void 0&&e),"flags"in r){if(r.flags===!1)this._instance.persistence.unregister(pi),ra.info("Flag overrides cleared");else if(r.flags){if(fe(r.flags)){for(var n={},s=0;s<r.flags.length;s++)n[r.flags[s]]=!0;this._instance.persistence.register({[pi]:n})}else this._instance.persistence.register({[pi]:r.flags});ra.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this._instance.persistence.unregister(na),ra.info("Payload overrides cleared")):r.payloads&&(this._instance.persistence.register({[na]:r.payloads}),ra.info("Payload overrides set",{payloads:r.payloads}))),void this.He()}this.He()}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.Te){var{flags:e,flagVariants:r}=this.Be();t(e,r)}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,e,r){var n,s=(this._instance.get_property(fa)||[]).find(l=>l.flagKey===t),i={["$feature_enrollment/"+t]:e},o={$feature_flag:t,$feature_enrollment:e,$set:i};s&&(o.$early_access_feature_name=s.name),r&&(o.$feature_enrollment_stage=r),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(i,!1);var a=M({},this.getFlagVariants(),{[t]:e});(n=this._instance.persistence)==null||n.register({[Ph]:Object.keys(B0(a)),[Bi]:a}),this.He()}getEarlyAccessFeatures(t,e,r){e===void 0&&(e=!1);var n=this._instance.get_property(fa),s=r?"&"+r.map(i=>"stage="+i).join("&"):"";if(n&&!e)return t(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+s),method:"GET",callback:i=>{var o,a;if(i.json){var l=i.json.earlyAccessFeatures;return(o=this._instance.persistence)==null||o.unregister(fa),(a=this._instance.persistence)==null||a.register({[fa]:l}),t(l)}}})}
201Be(){var t=this.getFlags(),e=this.getFlagVariants();return{flags:t.filter(r=>e[r]),flagVariants:Object.keys(e).filter(r=>e[r]).reduce((r,n)=>(r[n]=e[n],r),{})}}He(t){var{flags:e,flagVariants:r}=this.Be();this.featureFlagEventHandlers.forEach(n=>n(e,r,{errorsLoading:t}))}setPersonPropertiesForFlags(t,e){e===void 0&&(e=!0);var r=this._instance.get_property(pa)||{};this._instance.register({[pa]:M({},r,t)}),e&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(pa)}setGroupPropertiesForFlags(t,e){e===void 0&&(e=!0);var r=this._instance.get_property(Ts)||{};Object.keys(r).length!==0&&Object.keys(r).forEach(n=>{r[n]=M({},r[n],t[n]),delete t[n]}),this._instance.register({[Ts]:M({},r,t)}),e&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var e=this._instance.get_property(Ts)||{};this._instance.register({[Ts]:M({},e,{[t]:{}})})}else this._instance.unregister(Ts)}reset(){this.Te=!1,this.Re=!1,this.Ie=!1,this.Ce=!1,this.Oe=!1,this.$anon_distinct_id=void 0,this.ze(),this.Pe=!1}}},n$={sessionRecording:class{get started(){var t;return!((t=this.qe)==null||!t.isStarted)}get status(){var t,e;return this.Ve===ta||this.Ve===uc?this.Ve:(t=(e=this.qe)==null?void 0:e.status)!==null&&t!==void 0?t:this.Ve}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.Ve=j0,this.We=void 0,this._instance=t,!this._instance.sessionManager)throw xs.error("started without valid sessionManager"),new Error(Pp+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(Pp+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get Ge(){var t,e=!((t=this._instance.get_property(ic))==null||!t.enabled),r=!this._instance.config.disable_session_recording,n=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return T&&e&&r&&!n}startIfEnabledOrStop(t){var e;if(!this.Ge||(e=this.qe)==null||!e.isStarted){var r=!U(Object.assign)&&!U(Array.from);this.Ge&&r?(this.Ye(t),xs.info("starting")):(this.Ve=j0,this.stopRecording())}}Ye(t){var e,r,n;this.Ge&&(this.Ve!==ta&&this.Ve!==uc&&(this.Ve=I0),G!=null&&(e=G.__PosthogExtensions__)!=null&&(e=e.rrweb)!=null&&e.record&&(r=G.__PosthogExtensions__)!=null&&r.initSessionRecording?this.Je(t):(n=G.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.Ke,s=>{if(s)return xs.error("could not load recorder",s);this.Je(t)}))}stopRecording(){var t,e;(t=this.We)==null||t.call(this),this.We=void 0,(e=this.qe)==null||e.stop()}Xe(){var t,e;(t=this.We)==null||t.call(this),this.We=void 0,(e=this.qe)==null||e.discard()}Qe(){var t;(t=this._instance.persistence)==null||t.unregister(oE)}Ze(t,e){if(ae(t))return null;var r,n=qr(t)?t:parseFloat(t);return typeof(r=n)=="number"&&Number.isFinite(r)&&r>=0&&r<=1?n:(xs.warn(e+" must be between 0 and 1. Ignoring invalid value:",t),null)}tr(t){if(this._instance.persistence){var e,r,n=this._instance.persistence,s=()=>{var i,o=t.sessionRecording===!1?void 0:t.sessionRecording,a=this.Ze((i=this._instance.config.session_recording)==null?void 0:i.sampleRate,"session_recording.sampleRate"),l=this.Ze(o==null?void 0:o.sampleRate,"remote config sampleRate"),c=a??l;ae(c)&&this.Qe();var u=o==null?void 0:o.minimumDurationMilliseconds;n.register({[ic]:M({cache_timestamp:Date.now(),enabled:!!o},o,{networkPayloadCapture:M({capturePerformance:t.capturePerformance},o==null?void 0:o.networkPayloadCapture),canvasRecording:{enabled:o==null?void 0:o.recordCanvas,fps:o==null?void 0:o.canvasFps,quality:o==null?void 0:o.canvasQuality},sampleRate:c,minimumDurationMilliseconds:U(u)?null:u,endpoint:o==null?void 0:o.endpoint,triggerMatchType:o==null?void 0:o.triggerMatchType,masking:o==null?void 0:o.masking,urlTriggers:o==null?void 0:o.urlTriggers})})};s(),(e=this.We)==null||e.call(this),this.We=(r=this._instance.sessionManager)==null?void 0:r.onSessionId(s)}}onRemoteConfig(t){return"sessionRecording"in t?t.sessionRecording===!1?(this.tr(t),void this.Xe()):(this.tr(t),void this.startIfEnabledOrStop()):(this.Ve===ta&&(this.Ve=uc,xs.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(t,e){var r;e===void 0&&(e="log"),(r=this.qe)!=null&&r.log?this.qe.log(t,e):xs.warn("log called before recorder was ready")}get Ke(){var t,e,r=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(ic);return(r==null||(e=r.scriptConfig)==null?void 0:e.script)||"lazy-recorder"}ir(){var t,e=this._instance.get_property(ic);if(!e)return!1;var r=(t=(typeof e=="object"?e:JSON.parse(e)).cache_timestamp)!==null&&t!==void 0?t:Date.now();return Date.now()-r<=36e5}Je(t){var e,r;if((e=G.__PosthogExtensions__)==null||!e.initSessionRecording)throw Error("Called on script loaded before session recording is available");if(this.qe||(this.qe=(r=G.__PosthogExtensions__)==null?void 0:r.initSessionRecording(this._instance),this.qe._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.ir())return this.Ve===uc||this.Ve===ta?void 0:(this.Ve=ta,xs.info("persisted remote config is stale, requesting fresh config before starting"),void new yE(this._instance).load());this.Ve=I0,this.qe.start(t)}onRRwebEmit(t){var e;(e=this.qe)==null||e.onRRwebEmit==null||e.onRRwebEmit(t)}overrideLinkedFlag(){var t,e;this.qe||(e=this._instance.persistence)==null||e.register({$replay_override_linked_flag:!0}),(t=this.qe)==null||t.overrideLinkedFlag()}overrideSampling(){var t,e;this.qe||(e=this._instance.persistence)==null||e.register({$replay_override_sampling:!0}),(t=this.qe)==null||t.overrideSampling()}overrideTrigger(t){var e,r;this.qe||(r=this._instance.persistence)==null||r.register({[t==="url"?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}
vendor: 25,344 bytes, line 201
201),(e=this.qe)==null||e.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.qe)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,e){var r;return!((r=this.qe)==null||!r.tryAddCustomEvent(t,e))}}},s$={autocapture:class{constructor(t){this.er=!1,this.rr=null,this.sr=!1,this.instance=t,this.rageclicks=new R0(t.config.rageclick),this.nr=null}initialize(){this.startIfEnabled()}get N(){var t,e,r=Ke(this.instance.config.autocapture)?this.instance.config.autocapture:{};return r.url_allowlist=(t=r.url_allowlist)==null?void 0:t.map(n=>new RegExp(n)),r.url_ignorelist=(e=r.url_ignorelist)==null?void 0:e.map(n=>new RegExp(n)),r}ar(){if(this.isBrowserSupported()){if(T&&F){var t=r=>{r=r||(T==null?void 0:T.event);try{this.lr(r)}catch(n){N0.error("Failed to capture event",n)}};if(ze(F,"submit",t,{capture:!0}),ze(F,"change",t,{capture:!0}),ze(F,"click",t,{capture:!0}),this.N.capture_copied_text){var e=r=>{r=r||(T==null?void 0:T.event),this.lr(r,kh)};ze(F,"copy",e,{capture:!0}),ze(F,"cut",e,{capture:!0})}}}else N0.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.er&&(this.ar(),this.er=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.sr=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[Zy]:!!t.autocapture_opt_out}),this.rr=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.nr=t}getElementSelectors(t){var e,r=[];return(e=this.nr)==null||e.forEach(n=>{var s=F==null?void 0:F.querySelectorAll(n);s==null||s.forEach(i=>{t===i&&r.push(n)})}),r}get isEnabled(){var t,e,r=(t=this.instance.persistence)==null?void 0:t.props[Zy],n=this.rr;if(xr(n)&&!fn(r)&&!this.instance.bt())return!1;var s=(e=this.rr)!==null&&e!==void 0?e:!!r;return!!this.instance.config.autocapture&&!s}lr(t,e){if(e===void 0&&(e="$autocapture"),this.isEnabled){var r,n=k0(t);RE(n)&&(n=n.parentNode||null),e==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(r=this.rageclicks)!=null&&r.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime())&&RI(n,this.instance.config.rageclick)&&this.lr(t,"$rageclick");var s=e===kh;if(n&&NI(n,t,this.N,s,s?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:o}=FI(n,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.N.element_attribute_ignorelist,elementsChainAsString:this.sr});if(o)return!1;var a=this.getElementSelectors(n);if(a&&a.length>0&&(i.$element_selectors=a),e===kh){var l,c=OE(T==null||(l=T.getSelection())==null?void 0:l.toString()),u=t.type||"clipboard";if(!c)return!1;i.$selected_content=c,i.$copy_type=u}return this.instance.capture(e,i),!0}}}isBrowserSupported(){return cn(F==null?void 0:F.querySelectorAll)}},historyAutocapture:class{constructor(t){var e;this._instance=t,this.ur=(T==null||(e=T.location)==null?void 0:e.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(B.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.hr&&this.hr(),this.hr=void 0,B.info("History API monitoring stopped")}monitorHistoryChanges(){var t,e;if(T&&T.history){var r=this;(t=T.history.pushState)!=null&&t.__posthog_wrapped__||O0(T.history,"pushState",n=>function(s,i,o){n.call(this,s,i,o),r.dr("pushState")}),(e=T.history.replaceState)!=null&&e.__posthog_wrapped__||O0(T.history,"replaceState",n=>function(s,i,o){n.call(this,s,i,o),r.dr("replaceState")}),this.vr()}}dr(t){try{var e,r=T==null||(e=T.location)==null?void 0:e.pathname;if(!r)return;r!==this.ur&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:t}),this.ur=r}catch(n){B.error("Error capturing "+t+" pageview",n)}}vr(){if(!this.hr){var t=()=>{this.dr("popstate")};ze(T,"popstate",t),this.hr=()=>{T&&T.removeEventListener("popstate",t)}}}},heatmaps:class{constructor(t){var e;this.cr=!1,this.er=!1,this.pr=null,this.instance=t,this.cr=!((e=this.instance.persistence)==null||!e.props[dp]),this.rageclicks=new R0(t.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var t=5e3;return Ke(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(t=this.instance.config.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return ae(this.instance.config.capture_heatmaps)?ae(this.instance.config.enable_heatmaps)?this.cr:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.er)return;BI.info("starting..."),this._r(),this.gr()}else{var t;clearInterval((t=this.pr)!==null&&t!==void 0?t:void 0),this.mr(),this.getAndClearBuffer()}}onRemoteConfig(t){if("heatmaps"in t){var e=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[dp]:e}),this.cr=e,this.startIfEnabled()}}getAndClearBuffer(){var t=this.C;return this.C=void 0,t}br(t){this.yr(t.originalEvent,"deadclick")}gr(){this.pr&&clearInterval(this.pr),this.pr=function(t){return(t==null?void 0:t.visibilityState)==="visible"}(F)?setInterval(this.Ft.bind(this),this.flushIntervalMilliseconds):null}_r(){T&&F&&(this.wr=this.Ft.bind(this),ze(T,"beforeunload",this.wr),this.Er=t=>this.yr(t||(T==null?void 0:T.event)),ze(F,"click",this.Er,{capture:!0}),this.Sr=t=>this.$r(t||(T==null?void 0:T.event)),ze(F,"mousemove",this.Sr,{capture:!0}),this.kr=new a0(this.instance,Gj,this.br.bind(this)),this.kr.startIfEnabledOrStop(),this.Pr=this.gr.bind(this),ze(F,"visibilitychange",this.Pr),this.er=!0)}mr(){var t;T&&F&&(this.wr&&T.removeEventListener("beforeunload",this.wr),this.Er&&F.removeEventListener("click",this.Er,{capture:!0}),this.Sr&&F.removeEventListener("mousemove",this.Sr,{capture:!0}),this.Pr&&F.removeEventListener("visibilitychange",this.Pr),clearTimeout(this.Tr),(t=this.kr)==null||t.stop(),this.er=!1)}Rr(t,e){var r=this.instance.scrollManager.scrollY(),n=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),i=function(o,a,l){for(var c=o;c&&pd(c)&&!os(c,"body");){if(c===l)return!1;if(ie(a,T==null?void 0:T.getComputedStyle(c).position))return!0;c=jE(c)}return!1}(k0(t),["fixed","sticky"],s);return{x:t.clientX+(i?0:n),y:t.clientY+(i?0:r),target_fixed:i,type:e}}yr(t,e){var r;if(e===void 0&&(e="click"),!E0(t.target)&&$0(t)){var n=this.Rr(t,e);(r=this.rageclicks)!=null&&r.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this.Ir(M({},n,{type:"rageclick"})),this.Ir(n)}}$r(t){!E0(t.target)&&$0(t)&&(clearTimeout(this.Tr),this.Tr=setTimeout(()=>{this.Ir(this.Rr(t,"mousemove"))},500))}Ir(t){if(T){var e=T.location.href,r=this.instance.config.mask_personal_data_properties,n=this.instance.config.custom_personal_data_properties,s=r?xo([],Eo,n||[]):[],i=ul(e,s,dl);this.C=this.C||{},this.C[i]||(this.C[i]=[]),this.C[i].push(t)}}Ft(){this.C&&!Ui(this.C)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:a0,webVitalsAutocapture:class{constructor(t){var e;this.cr=!1,this.er=!1,this.C={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.Cr=()=>{clearTimeout(this.Or),this.C.metrics.length!==0&&(this._instance.capture("$web_vitals",this.C.metrics.reduce((r,n)=>M({},r,{["$web_vitals_"+n.name+"_event"]:M({},n),["$web_vitals_"+n.name+"_value"]:n.value}),{})),this.C={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Fr=r=>{var n,s=(n=this._instance.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0);if(U(s))Nn.error("Could not read session ID. Dropping metrics!");else{this.C=this.C||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=this.Mr();U(i)||(ae(r==null?void 0:r.name)||ae(r==null?void 0:r.value)?Nn.error("Invalid metric received",r):this.Ar&&r.value>=this.Ar?Nn.error("Ignoring metric with value >= "+this.Ar,r):(this.C.url!==i&&(this.Cr(),this.Or=setTimeout(this.Cr,this.flushToCaptureTimeoutMs)),U(this.C.url)&&(this.C.url=i),this.C.firstMetricTimestamp=U(this.C.firstMetricTimestamp)?Date.now():this.C.firstMetricTimestamp,r.attribution&&r.attribution.interactionTargetElement&&(r.attribution.interactionTargetElement=void 0),this.C.metrics.push(M({},r,{$current_url:i,$session_id:s.sessionId,$window_id:s.windowId,timestamp:Date.now()})),this.C.metrics.length===this.allowedMetrics.length&&this.Cr()))}},this.Dr=()=>{if(!this.er){var r,n,s,i,o=G.__PosthogExtensions__;U(o)||U(o.postHogWebVitalsCallbacks)||({onLCP:r,onCLS:n,onFCP:s,onINP:i}=o.postHogWebVitalsCallbacks),r&&n&&s&&i?(this.allowedMetrics.indexOf("LCP")>-1&&r(this.Fr.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&n(this.Fr.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.Fr.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.Fr.bind(this)),this.er=!0):Nn.error("web vitals callbacks not loaded - not starting")}},this._instance=t,this.cr=!((e=this._instance.persistence)==null||!e.props[r0]),this.startIfEnabled()}get allowedMetrics(){var t,e,r=Ke(this._instance.config.capture_performance)?(t=this._instance.config.capture_performance)==null?void 0:t.web_vitals_allowed_metrics:void 0;return ae(r)?((e=this._instance.persistence)==null?void 0:e.props[s0])||["CLS","FCP","INP","LCP"]:r}get flushToCaptureTimeoutMs(){return(Ke(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var t=Ke(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_attribution:void 0;return t!=null&&t}get Ar(){var t=Ke(this._instance.config.capture_performance)&&qr(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:A0;return 0<t&&t<=6e4?A0:t}get isEnabled(){var t=nt==null?void 0:nt.protocol;if(t!=="http:"&&t!=="https:")return Nn.info("Web Vitals are disabled on non-http/https protocols"),!1;var e=Ke(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:fn(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return fn(e)?e:this.cr}startIfEnabled(){this.isEnabled&&!this.er&&(Nn.info("enabled, starting..."),this.G(this.Dr))}onRemoteConfig(t){if("capturePerformance"in t){var e=Ke(t.capturePerformance)&&!!t.capturePerformance.web_vitals,r=Ke(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[r0]:e}),this._instance.persistence.register({[s0]:r})),this.cr=e,this.startIfEnabled()}}G(t){var e,r;if((e=G.__PosthogExtensions__)!=null&&e.postHogWebVitalsCallbacks)t();else{var n=this.useAttribution?"web-vitals-with-attribution":"web-vitals";(r=G.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,n,s=>{s?Nn.error("failed to load script",s):t()})}}Mr(){var t=T?T.location.href:void 0;if(t){var e=this._instance.config.mask_personal_data_properties,r=this._instance.config.custom_personal_data_properties,n=e?xo([],Eo,r||[]):[];return ul(t,n,dl)}Nn.error("Could not determine current URL")}}},i$={exceptionObserver:class{constructor(t){var e,r,n;this.Dr=()=>{var s;if(T&&this.isEnabled&&(s=G.__PosthogExtensions__)!=null&&s.errorWrappingFunctions){var i=G.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,o=G.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,a=G.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.Lr&&this.N.capture_unhandled_errors&&(this.Lr=i(this.captureException.bind(this))),!this.jr&&this.N.capture_unhandled_rejections&&(this.jr=o(this.captureException.bind(this))),!this.Nr&&this.N.capture_console_errors&&(this.Nr=a(this.captureException.bind(this)))}catch(l){ea.error("failed to start",l),this.Ur()}}},this._instance=t,this.zr=!((e=this._instance.persistence)==null||!e.props[e0]),this.Hr=new rj({refillRate:(r=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&r!==void 0?r:1,bucketSize:(n=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&n!==void 0?n:10,refillInterval:1e4,h:ea}),this.N=this.Br(),this.startIfEnabledOrStop()}Br(){var t=this._instance.config.capture_exceptions,e={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return Ke(t)?e=M({},e,t):(U(t)?this.zr:t)&&(e=M({},e,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),e}get isEnabled(){return this.N.capture_console_errors||this.N.capture_unhandled_errors||this.N.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(ea.info("enabled"),this.Ur(),this.G(this.Dr)):this.Ur()}G(t){var e,r;(e=G.__PosthogExtensions__)!=null&&e.errorWrappingFunctions&&t(),(r=G.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"exception-autocapture",n=>{if(n)return ea.error("failed to load script",n);t()})}Ur(){var t,e,r;(t=this.Lr)==null||t.call(this),this.Lr=void 0,(e=this.jr)==null||e.call(this),this.jr=void 0,(r=this.Nr)==null||r.call(this),this.Nr=void 0}onRemoteConfig(t){if("autocaptureExceptions"in t){var e=t.autocaptureExceptions;this.zr=!!e||!1,this._instance.persistence&&this._instance.persistence.register({[e0]:this.zr}),this.N=this.Br(),this.startIfEnabledOrStop()}}onConfigChange(){this.N=this.Br()}captureException(t){var e,r,n,s=(e=t==null||(r=t.$exception_list)==null||(r=r[0])==null?void 0:r.type)!==null&&e!==void 0?e:"Exception";this.Hr.consumeRateLimit(s)?ea.info("Skipping exception capture because of client rate limiting.",{exception:s}):(n=this._instance.exceptions)==null||n.sendExceptionEvent(t)}},exceptions:class{constructor(t){var e,r;this.qr=[],this.Vr=new gj([new Sj,new jj,new Cj,new kj,new Oj,new Nj,new Pj,new Aj],Ej()),this._instance=t,this.qr=(e=(r=this._instance.persistence)==null?void 0:r.get_property(hp))!==null&&e!==void 0?e:[]}onRemoteConfig(t){var e,r,n;if("errorTracking"in t){var s=(e=(r=t.errorTracking)==null?void 0:r.suppressionRules)!==null&&e!==void 0?e:[],i=(n=t.errorTracking)==null?void 0:n.captureExtensionExceptions;this.qr=s,this._instance.persistence&&this._instance.persistence.register({[hp]:this.qr,[t0]:i})}}get Wr(){var t,e=!!this._instance.get_property(t0),r=this._instance.config.error_tracking.captureExtensionExceptions;return(t=r??e)!==null&&t!==void 0&&t}buildProperties(t,e){return this.Vr.buildFromUnknown(t,{syntheticException:e==null?void 0:e.syntheticException,mechanism:{handled:e==null?void 0:e.handled}})}sendExceptionEvent(t){var e=t.$exception_list;if(this.Gr(e)){if(this.Yr(e))return void Rh.info("Skipping exception capture because a suppression rule matched");if(!this.Wr&&this.Jr(e))return void Rh.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.Kr(e))return void Rh.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent",Di:!0})}Yr(t){if(t.length===0)return!1;var e=t.reduce((r,n)=>{var{type:s,value:i}=n;return We(s)&&s.length>0&&r.$exception_types.push(s),We(i)&&i.length>0&&r.$exception_values.push(i),r},{$exception_types:[],$exception_values:[]});return this.qr.some(r=>{var n=r.values.map(s=>{var i,o=kE[s.operator],a=fe(s.value)?s.value:[s.value],l=(i=e[s.key])!==null&&i!==void 0?i:[];return a.length>0&&o(a,l)});return r.type==="OR"?n.some(Boolean):n.every(Boolean)})}Jr(t){return t.flatMap(e=>{var r,n;return(r=(n=e.stacktrace)==null?void 0:n.frames)!==null&&r!==void 0?r:[]}).some(e=>e.filename&&e.filename.startsWith("chrome-extension://"))}Kr(t){if(t.length>0){var e,r,n,s,i=(e=(r=t[0].stacktrace)==null?void 0:r.frames)!==null&&e!==void 0?e:[],o=i[i.length-1];return(n=o==null||(s=o.filename)==null?void 0:s.includes("posthog.com/static"))!==null&&n!==void 0&&n}return!1}Gr(t){return!ae(t)&&fe(t)}}},o$=M({productTours:class{constructor(t){this.Xr=null,this.Qr=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){"productTours"in t&&(this._instance.persistence&&this._instance.persistence.register({[n0]:!!t.productTours}),this.loadIfEnabled())}loadIfEnabled(){var t,e;this.Xr||(t=this._instance).config.disable_product_tours||(e=t.persistence)==null||!e.get_property(n0)||this.G(()=>this.Zr())}G(t){var e,r;(e=G.__PosthogExtensions__)!=null&&e.generateProductTours?t():(r=G.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"product-tours",n=>{n?L0.error("Could not load product tours script",n):t()})}Zr(){var t;!this.Xr&&(t=G.__PosthogExtensions__)!=null&&t.generateProductTours&&(this.Xr=G.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(t,e){if(e===void 0&&(e=!1),!fe(this.Qr)||e){var r=this._instance.persistence;if(r){var n=r.props[Th];if(fe(n)&&!e)return this.Qr=n,void t(n,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:s=>{var i=s.statusCode;if(i!==200||!s.json){var o="Product Tours API could not be loaded, status: "+i;return L0.error(o),void t([],{isLoaded:!1,error:o})}var a=fe(s.json.product_tours)?s.json.product_tours:[];this.Qr=a,r&&r.register({[Th]:a}),t(a,{isLoaded:!0})}})}else t(this.Qr,{isLoaded:!0})}getActiveProductTours(t){ae(this.Xr)?t([],{isLoaded:!1,error:"Product tours not loaded"}):this.Xr.getActiveProductTours(t)}showProductTour(t){var e;(e=this.Xr)==null||e.showTourById(t)}previewTour(t){this.Xr?this.Xr.previewTour(t):this.G(()=>{var e;this.Zr(),(e=this.Xr)==null||e.previewTour(t)})}dismissProductTour(){var t;(t=this.Xr)==null||t.dismissTour("user_clicked_skip")}nextStep(){var t;(t=this.Xr)==null||t.nextStep()}previousStep(){var t;(t=this.Xr)==null||t.previousStep()}clearCache(){var t;this.Qr=null,(t=this._instance.persistence)==null||t.unregister(Th)}resetTour(t){var e;(e=this.Xr)==null||e.resetTour(t)}resetAllTours(){var t;(t=this.Xr)==null||t.resetAllTours()}cancelPendingTour(t){var e;(e=this.Xr)==null||e.cancelPendingTour(t)}}},gd),a$={siteApps:class{constructor(t){this._instance=t,this.ts=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}es(t,e){if(e){var r=this.globalsForEvent(e);this.ts.push(r),this.ts.length>1e3&&(this.ts=this.ts.slice(10))}}get siteAppLoaders(){var t;return(t=G._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.siteApps}initialize(){if(this.isEnabled){var t=this._instance._addCaptureHook(this.es.bind(this));this.rs=()=>{t(),this.ts=[],this.rs=void 0}}}globalsForEvent(t){var e,r,n,s,i,o,a;if(!t)throw new Error("Event payload is required");var l={},c=this._instance.get_property("$groups")||[],u=this._instance.get_property("$stored_group_properties")||{};for(var[d,f]of Object.entries(u))l[d]={id:c[d],type:d,properties:f};var{$set_once:h,$set:y}=t;return{event:M({},j1(t,zI),{properties:M({},t.properties,y?{$set:M({},(e=(r=t.properties)==null?void 0:r.$set)!==null&&e!==void 0?e:{},y)}:{},h?{$set_once:M({},(n=(s=t.properties)==null?void 0:s.$set_once)!==null&&n!==void 0?n:{},h)}:{}),elements_chain:(i=(o=t.properties)==null?void 0:o.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(a=t.properties)==null?void 0:a.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:l}}setupSiteApp(t){var e=this.apps[t.id],r=()=>{var o;!e.errored&&this.ts.length&&(On.info("Processing "+this.ts.length+" events for site app with id "+t.id),this.ts.forEach(a=>e.processEvent==null?void 0:e.processEvent(a)),e.processedBuffer=!0),Object.values(this.apps).every(a=>a.processedBuffer||a.errored)&&((o=this.rs)==null||o.call(this))},n=!1,s=o=>{e.errored=!o,e.loaded=!0,On.info("Site app with id "+t.id+" "+(o?"loaded":"errored")),n&&r()};try{var{processEvent:i}=t.init({posthog:this._instance,callback:o=>{s(o)}});i&&(e.processEvent=i),n=!0}catch(o){On.error("Error while initializing PostHog app with config id "+t.id,o),s(!1)}if(n&&e.loaded)try{r()}catch(o){On.error("Error while processing buffered events PostHog app with config id "+t.id,o),e.errored=!0}}ss(){var t=this.siteAppLoaders||[];for(var e of t)this.apps[e.id]={id:e.id,loaded:!1,errored:!1,processedBuffer:!1};for(var r of t)this.setupSiteApp(r)}ns(t){if(Object.keys(this.apps).length!==0){var e=this.globalsForEvent(t);for(var r of Object.values(this.apps))try{r.processEvent==null||r.processEvent(e)}catch(n){On.error("Error while processing event "+t.event+" for site app "+r.id,n)}}}onRemoteConfig(t){var e,r,n,s=this;if((e=this.siteAppLoaders)!=null&&e.length)return this.isEnabled?(this.ss(),void this._instance.on("eventCaptured",l=>this.ns(l))):void On.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((r=this.rs)==null||r.call(this),(n=t.siteApps)!=null&&n.length)if(this.isEnabled){var i=function(l){var c;G["__$$ph_site_app_"+l]=s._instance,(c=G.__PosthogExtensions__)==null||c.loadSiteApp==null||c.loadSiteApp(s._instance,a,u=>{if(u)return On.error("Error while initializing PostHog app with config id "+l,u)})};for(var{id:o,url:a}of t.siteApps)i(o)}else On.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},l$={tracingHeaders:class{constructor(t){this.os=void 0,this.ls=void 0,this.Dr=()=>{var e,r;U(this.os)&&((e=G.__PosthogExtensions__)==null||(e=e.tracingHeadersPatchFns)==null||e._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),U(this.ls)&&((r=G.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=t}initialize(){this.startIfEnabledOrStop()}G(t){var e,r;(e=G.__PosthogExtensions__)!=null&&e.tracingHeadersPatchFns&&t(),(r=G.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"tracing-headers",n=>{if(n)return UI.error("failed to load script",n);t()})}startIfEnabledOrStop(){var t,e;this._instance.config.__add_tracing_headers?this.G(this.Dr):((t=this.os)==null||t.call(this),(e=this.ls)==null||e.call(this),this.os=void 0,this.ls=void 0)}}},c$=M({surveys:class{constructor(t){this.us=void 0,this._surveyManager=null,this.hs=!1,this.ds=[],this.vs=null,this._instance=t,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this._instance.config.disable_surveys){var e=t.surveys;if(ae(e))return ye.warn("Flags not loaded yet. Not loading surveys.");var r=fe(e);this.us=r?e.length>0:e,ye.info("flags response received, isSurveysEnabled: "+this.us),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var t=[],e=0;e<localStorage.length;e++){var r=localStorage.key(e);(r!=null&&r.startsWith(TE)||r!=null&&r.startsWith("inProgressSurvey_"))&&t.push(r)}t.forEach(n=>localStorage.removeItem(n))}loadIfEnabled(){if(!this._surveyManager)if(this.hs)ye.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)ye.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())ye.info("Not loading surveys in cookieless mode without consent.");else{var t=G==null?void 0:G.__PosthogExtensions__;if(t){if(!U(this.us)||this._instance.config.advanced_enable_surveys){var e=this.us||this._instance.config.advanced_enable_surveys;this.hs=!0;try{var r=t.generateSurveys;if(r)return void this.cs(r,e);var n=t.loadExternalDependency;if(!n)return void this.fs("PostHog loadExternalDependency extension not found.");n(this._instance,"surveys",s=>{s||!t.generateSurveys?this.fs("Could not load surveys script",s):this.cs(t.generateSurveys,e)})}catch(s){throw this.fs("Error initializing surveys",s),s}finally{this.hs=!1}}}else ye.error("PostHog Extensions not found.")}}cs(t,e){this._surveyManager=t(this._instance,e),this._surveyEventReceiver=new VI(this._instance),ye.info("Surveys loaded successfully"),this.ps({isLoaded:!0})}fs(t,e){ye.error(t,e),this.ps({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.ds.push(t),this._surveyManager&&this.ps({isLoaded:!0}),()=>{this.ds=this.ds.filter(e=>e!==t)}}getSurveys(t,e){if(e===void 0&&(e=!1),this._instance.config.disable_surveys)return ye.info("Disabled. Not loading surveys."),t([]);var r,n=this._instance.get_property(pp);if(n&&!e)return t(n,{isLoaded:!0});typeof Promise<"u"&&this.vs?this.vs.then(s=>{var{surveys:i,context:o}=s;return t(i,o)}):(typeof Promise<"u"&&(this.vs=new Promise(s=>{r=s})),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:s=>{var i;this.vs=null;var o=s.statusCode;if(o!==200||!s.json){var a="Surveys API could not be loaded, status: "+o;ye.error(a);var l={isLoaded:!1,error:a};return t([],l),void(r==null||r({surveys:[],context:l}))}var c,u=s.json.surveys||[],d=u.filter(h=>function(y){return!(!y.start_date||y.end_date)}
201(h)&&(function(y){var g;return!((g=y.conditions)==null||(g=g.events)==null||(g=g.values)==null||!g.length)}(h)||function(y){var g;return!((g=y.conditions)==null||(g=g.actions)==null||(g=g.values)==null||!g.length)}(h)));d.length>0&&((c=this._surveyEventReceiver)==null||c.register(d)),(i=this._instance.persistence)==null||i.register({[pp]:u});var f={isLoaded:!0};t(u,f),r==null||r({surveys:u,context:f})}}))}ps(t){for(var e of this.ds)try{if(!t.isLoaded)return e([],t);this.getSurveys(e)}catch(r){ye.error("Error in survey callback",r)}}getActiveMatchingSurveys(t,e){if(e===void 0&&(e=!1),!ae(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,e);ye.warn("init was not called")}_s(t){var e=null;return this.getSurveys(r=>{var n;e=(n=r.find(s=>s.id===t))!==null&&n!==void 0?n:null}),e}gs(t){if(ae(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var e=typeof t=="string"?this._s(t):t;return e?this._surveyManager.checkSurveyEligibility(e):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(ae(this._surveyManager))return ye.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var e=this.gs(t);return{visible:e.eligible,disabledReason:e.reason}}canRenderSurveyAsync(t,e){return ae(this._surveyManager)?(ye.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise(r=>{this.getSurveys(n=>{var s,i=(s=n.find(a=>a.id===t))!==null&&s!==void 0?s:null;if(i){var o=this.gs(i);r({visible:o.eligible,disabledReason:o.reason})}else r({visible:!1,disabledReason:"Survey not found"})},e)})}renderSurvey(t,e,r){var n;if(ae(this._surveyManager))ye.warn("init was not called");else{var s=typeof t=="string"?this._s(t):t;if(s!=null&&s.id)if(xI.includes(s.type)){var i=F==null?void 0:F.querySelector(e);if(i)return(n=s.appearance)!=null&&n.surveyPopupDelaySeconds?(ye.info("Rendering survey "+s.id+" with delay of "+s.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout(()=>{var o,a;ye.info("Rendering survey "+s.id+" with delay of "+((o=s.appearance)==null?void 0:o.surveyPopupDelaySeconds)+" seconds"),(a=this._surveyManager)==null||a.renderSurvey(s,i,r),ye.info("Survey "+s.id+" rendered")},1e3*s.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(s,i,r);ye.warn("Survey element not found")}else ye.warn("Surveys of type "+s.type+" cannot be rendered in the app");else ye.warn("Survey not found")}}displaySurvey(t,e){var r;if(ae(this._surveyManager))ye.warn("init was not called");else{var n=this._s(t);if(n){var s=n;if((r=n.appearance)!=null&&r.surveyPopupDelaySeconds&&e.ignoreDelay&&(s=M({},n,{appearance:M({},n.appearance,{surveyPopupDelaySeconds:0})})),e.displayType!==bp.Popover&&e.initialResponses&&ye.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),e.ignoreConditions===!1){var i=this.canRenderSurvey(n);if(!i.visible)return void ye.warn("Survey is not eligible to be displayed: ",i.disabledReason)}e.displayType!==bp.Inline?this._surveyManager.handlePopoverSurvey(s,e):this.renderSurvey(s,e.selector,e.properties)}else ye.warn("Survey not found")}}cancelPendingSurvey(t){ae(this._surveyManager)?ye.warn("init was not called"):this._surveyManager.cancelSurvey(t)}handlePageUnload(){var t;(t=this._surveyManager)==null||t.handlePageUnload()}}},gd),u$={toolbar:class{constructor(t){this.instance=t}bs(t){G.ph_toolbar_state=t}ys(){var t;return(t=G.ph_toolbar_state)!==null&&t!==void 0?t:jn.UNINITIALIZED}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(t,e,r){if(t===void 0&&(t=void 0),e===void 0&&(e=void 0),r===void 0&&(r=void 0),nE(this.instance.config)||!T||!F)return!1;t=t??T.location,r=r??T.history;try{if(!e){try{T.localStorage.setItem("test","test"),T.localStorage.removeItem("test")}catch{return!1}e=T==null?void 0:T.localStorage}var n,s=qI||Tu(t.hash,"__posthog")||Tu(t.hash,"state"),i=s?Xy(()=>JSON.parse(atob(decodeURIComponent(s))))||Xy(()=>JSON.parse(decodeURIComponent(s))):null;return i&&i.action==="ph_authorize"?((n=i).source="url",n&&Object.keys(n).length>0&&(i.desiredHash?t.hash=i.desiredHash:r?r.replaceState(r.state,"",t.pathname+t.search):t.hash="")):((n=JSON.parse(e.getItem(M0)||"{}")).source="localstorage",delete n.userIntent),!(!n.token||this.instance.config.token!==n.token)&&(this.loadToolbar(n),!0)}catch{return!1}}ws(t){var e=G.ph_load_toolbar||G.ph_load_editor;!ae(e)&&cn(e)?e(t,this.instance):D0.warn("No toolbar load function found")}loadToolbar(t){var e=!(F==null||!F.getElementById(aE));if(!T||e)return!1;var r=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,n=M({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},r?{instrument:!1}:{});if(T.localStorage.setItem(M0,JSON.stringify(M({},n,{source:void 0}))),this.ys()===jn.LOADED)this.ws(n);else if(this.ys()===jn.UNINITIALIZED){var s;this.bs(jn.LOADING),(s=G.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",i=>{if(i)return D0.error("[Toolbar] Failed to load",i),void this.bs(jn.UNINITIALIZED);this.bs(jn.LOADED),this.ws(n)}),ze(T,"turbolinks:load",()=>{this.bs(jn.UNINITIALIZED),this.loadToolbar(n)})}return!0}Es(t){return this.loadToolbar(t)}maybeLoadEditor(t,e,r){return t===void 0&&(t=void 0),e===void 0&&(e=void 0),r===void 0&&(r=void 0),this.maybeLoadToolbar(t,e,r)}}},d$=M({experiments:dt},gd),h$={conversations:class{constructor(t){this.Ss=void 0,this._conversationsManager=null,this.xs=!1,this.$s=null,this._instance=t}initialize(){this.loadIfEnabled()}onRemoteConfig(t){if(!this._instance.config.disable_conversations){var e=t.conversations;ae(e)||(fn(e)?this.Ss=e:(this.Ss=e.enabled,this.$s=e),this.loadIfEnabled())}}reset(){var t;(t=this._conversationsManager)==null||t.reset(),this._conversationsManager=null,this.Ss=void 0,this.$s=null}loadIfEnabled(){if(!(this._conversationsManager||this.xs||this._instance.config.disable_conversations||nE(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var t=G==null?void 0:G.__PosthogExtensions__;if(t&&!U(this.Ss)&&this.Ss)if(this.$s&&this.$s.token){this.xs=!0;try{var e=t.initConversations;if(e)return this.ks(e),void(this.xs=!1);var r=t.loadExternalDependency;if(!r)return void this.Ps("PostHog loadExternalDependency extension not found.");r(this._instance,"conversations",n=>{n||!t.initConversations?this.Ps("Could not load conversations script",n):this.ks(t.initConversations),this.xs=!1})}catch(n){this.Ps("Error initializing conversations",n),this.xs=!1}}else qt.error("Conversations enabled but missing token in remote config.")}}ks(t){if(this.$s)try{this._conversationsManager=t(this.$s,this._instance),qt.info("Conversations loaded successfully")}catch(e){this.Ps("Error completing conversations initialization",e)}else qt.error("Cannot complete initialization: remote config is null")}Ps(t,e){qt.error(t,e),this._conversationsManager=null,this.xs=!1}show(){this._conversationsManager?this._conversationsManager.show():qt.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ss===!0&&!xr(this._conversationsManager)}isVisible(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.isVisible())!==null&&t!==void 0&&t}sendMessage(t,e,r){var n=this;return en(function*(){return n._conversationsManager?n._conversationsManager.sendMessage(t,e,r):(qt.warn("Conversations not available yet."),null)})()}getMessages(t,e){var r=this;return en(function*(){return r._conversationsManager?r._conversationsManager.getMessages(t,e):(qt.warn("Conversations not available yet."),null)})()}markAsRead(t){var e=this;return en(function*(){return e._conversationsManager?e._conversationsManager.markAsRead(t):(qt.warn("Conversations not available yet."),null)})()}getTickets(t){var e=this;return en(function*(){return e._conversationsManager?e._conversationsManager.getTickets(t):(qt.warn("Conversations not available yet."),null)})()}requestRestoreLink(t){var e=this;return en(function*(){return e._conversationsManager?e._conversationsManager.requestRestoreLink(t):(qt.warn("Conversations not available yet."),null)})()}restoreFromToken(t){var e=this;return en(function*(){return e._conversationsManager?e._conversationsManager.restoreFromToken(t):(qt.warn("Conversations not available yet."),null)})()}restoreFromUrlToken(){var t=this;return en(function*(){return t._conversationsManager?t._conversationsManager.restoreFromUrlToken():(qt.warn("Conversations not available yet."),null)})()}getCurrentTicketId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getCurrentTicketId())!==null&&t!==void 0?t:null}getWidgetSessionId(){var t,e;return(t=(e=this._conversationsManager)==null?void 0:e.getWidgetSessionId())!==null&&t!==void 0?t:null}}},f$={logs:class{constructor(t){var e;this.Ts=!1,this.Rs=!1,this._instance=t,this._instance&&(e=this._instance.config.logs)!=null&&e.captureConsoleLogs&&(this.Ts=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(t){var e,r=(e=t.logs)==null?void 0:e.captureConsoleLogs;!ae(r)&&r&&(this.Ts=!0,this.loadIfEnabled())}reset(){}loadIfEnabled(){if(this.Ts&&!this.Rs){var t=je("[logs]"),e=G==null?void 0:G.__PosthogExtensions__;if(e){var r=e.loadExternalDependency;r?r(this._instance,"logs",n=>{var s;n||(s=e.logs)==null||!s.initializeLogs?t.error("Could not load logs script",n):(e.logs.initializeLogs(this._instance),this.Rs=!0)}):t.error("PostHog loadExternalDependency extension not found.")}else t.error("PostHog Extensions not found.")}}}},p$=M({},gd,n$,s$,i$,o$,a$,c$,l$,u$,d$,h$,f$);Mr.__defaultExtensionClasses=M({},p$);var z0,UE=(z0=Ia[Si]=new Mr,function(){function t(){t.done||(t.done=!0,PE=!1,we(Ia,function(e){e._dom_loaded()}))}F!=null&&F.addEventListener?F.readyState==="complete"?t():ze(F,"DOMContentLoaded",t,{capture:!1}):T&&B.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")}(),z0);const g$="phc_oH3TzCAqznX7bC0vg7dlAR4nKiCQpxfZFoaGncXuZnd",v$="https://us.i.posthog.com";function m$(){UE.init(g$,{api_host:v$,capture_pageview:!1,capture_pageleave:!0,persistence:"localStorage"})}function y$(t){UE.capture("$pageview",{path:t,$current_url:window.location.href})}const _$=56,w$={"#join":"#get-involved"},b$=700;let Rp=0;const BE=t=>{try{return decodeURIComponent(t)}catch{return t}},x$=t=>BE(t).trim().toLowerCase().replace(/\/+$/,""),E$=t=>{const e=x$(t);return w$[e]??e},S$=t=>{if(!t)return null;if(t.startsWith("#")){const e=BE(t.slice(1)),r=document.getElementById(e);if(r)return r}try{return document.querySelector(t)}catch{return null}},Np=t=>{const e=document.querySelector("header"),r=(e==null?void 0:e.offsetHeight)??_$,n=t.getBoundingClientRect().top+window.scrollY-r;return Math.max(0,n)},k$=t=>1-(1-t)**3,C$=t=>{const e=++Rp,r=window.scrollY,n=performance.now(),s=i=>{if(e!==Rp||!document.contains(t))return;const o=i-n,a=Math.min(1,o/b$),l=k$(a),c=Np(t),u=r+(c-r)*l;if(window.scrollTo({top:u,behavior:"auto"}),a<1){window.requestAnimationFrame(s);return}const d=Np(t);window.scrollTo({top:d,behavior:"auto"})};window.requestAnimationFrame(s)},ko=(t,e={})=>{Rp+=1;const r=E$(t),{behavior:n="smooth"}=e,s=S$(r);if(!s)return!1;const i=Np(s),o=window.matchMedia("(prefers-reduced-motion: reduce)").matches;return n==="smooth"&&r==="#get-involved"&&!o?(C$(s),!0):(window.scrollTo({top:i,behavior:n}),!0)},T$=nd("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",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary",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"}}),Ue=b.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},i)=>{const o=n?yP:"button";return p.jsx(o,{className:pe(T$({variant:e,size:r,className:t})),ref:i,...s})});Ue.displayName="Button";var Nh="focusScope.autoFocusOnMount",Oh="focusScope.autoFocusOnUnmount",W0={bubbles:!1,cancelable:!0},P$="FocusScope",zE=b.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...o}=t,[a,l]=b.useState(null),c=_r(s),u=_r(i),d=b.useRef(null),f=Xe(e,g=>l(g)),h=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let g=function(_){if(h.paused||!a)return;const x=_.target;a.contains(x)?d.current=x:In(d.current,{select:!0})},w=function(_){if(h.paused||!a)return;const x=_.relatedTarget;x!==null&&(a.contains(x)||In(d.current,{select:!0}))},m=function(_){if(document.activeElement===document.body)for(const E of _)E.removedNodes.length>0&&In(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",w);const v=new MutationObserver(m);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",w),v.disconnect()}}},[n,a,h.paused]),b.useEffect(()=>{if(a){V0.add(h);const g=document.activeElement;if(!a.contains(g)){const m=new CustomEvent(Nh,W0);a.addEventListener(Nh,c),a.dispatchEvent(m),m.defaultPrevented||(R$(I$(WE(a)),{select:!0}),document.activeElement===g&&In(a))}return()=>{a.removeEventListener(Nh,c),setTimeout(()=>{const m=new CustomEvent(Oh,W0);a.addEventListener(Oh,u),a.dispatchEvent(m),m.defaultPrevented||In(g??document.body,{select:!0}),a.removeEventListener(Oh,u),V0.remove(h)}
vendor: 5,177 bytes, line 201
201,0)}}},[a,c,u,h]);const y=b.useCallback(g=>{if(!r&&!n||h.paused)return;const w=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,m=document.activeElement;if(w&&m){const v=g.currentTarget,[_,x]=N$(v);_&&x?!g.shiftKey&&m===x?(g.preventDefault(),r&&In(_,{select:!0})):g.shiftKey&&m===_&&(g.preventDefault(),r&&In(x,{select:!0})):m===v&&g.preventDefault()}},[r,n,h.paused]);return p.jsx(he.div,{tabIndex:-1,...o,ref:f,onKeyDown:y})});zE.displayName=P$;function R$(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(In(n,{select:e}),document.activeElement!==r)return}function N$(t){const e=WE(t),r=H0(e,t),n=H0(e.reverse(),t);return[r,n]}function WE(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function H0(t,e){for(const r of t)if(!O$(r,{upTo:e}))return r}function O$(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function A$(t){return t instanceof HTMLInputElement&&"select"in t}function In(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&A$(t)&&e&&t.select()}}var V0=j$();function j$(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=q0(t,e),t.unshift(e)},remove(e){var r;t=q0(t,e),(r=t[0])==null||r.resume()}}}function q0(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function I$(t){return t.filter(e=>e.tagName!=="A")}var Ah=0;function $$(){b.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??K0()),document.body.insertAdjacentElement("beforeend",t[1]??K0()),Ah++,()=>{Ah===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ah--}},[])}function K0(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Dr=function(){return Dr=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Dr.apply(this,arguments)};function jo(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function L$(t,e,r,n){function s(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function a(u){try{c(n.next(u))}catch(d){o(d)}}function l(u){try{c(n.throw(u))}catch(d){o(d)}}function c(u){u.done?i(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}function M$(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,i;n<s;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var Dc="right-scroll-bar-position",Fc="width-before-scroll-bar",D$="with-scroll-bars-hidden",F$="--removed-body-scroll-bar-size";function jh(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function U$(t,e){var r=b.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}var B$=typeof window<"u"?b.useLayoutEffect:b.useEffect,G0=new WeakMap;function z$(t,e){var r=U$(null,function(n){return t.forEach(function(s){return jh(s,n)})});return B$(function(){var n=G0.get(r);if(n){var s=new Set(n),i=new Set(t),o=r.current;s.forEach(function(a){i.has(a)||jh(a,null)}),i.forEach(function(a){s.has(a)||jh(a,o)})}G0.set(r,t)},[t]),r}function W$(t){return t}function H$(t,e){e===void 0&&(e=W$);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(i){var o=e(i,n);return r.push(o),function(){r=r.filter(function(a){return a!==o})}},assignSyncMedium:function(i){for(n=!0;r.length;){var o=r;r=[],o.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var o=[];if(r.length){var a=r;r=[],a.forEach(i),o=r}var l=function(){var u=o;o=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),r}}}};return s}function V$(t){t===void 0&&(t={});var e=H$(null);return e.options=Dr({async:!0,ssr:!1},t),e}var HE=function(t){var e=t.sideCar,r=jo(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,Dr({},r))};
vendor: 4,525 bytes, lines 201-238
201HE.isSideCarExport=!0;function q$(t,e){return t.useMedium(e),HE}var VE=V$(),Ih=function(){},vd=b.forwardRef(function(t,e){var r=b.useRef(null),n=b.useState({onScrollCapture:Ih,onWheelCapture:Ih,onTouchMoveCapture:Ih}),s=n[0],i=n[1],o=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,d=t.shards,f=t.sideCar,h=t.noRelative,y=t.noIsolation,g=t.inert,w=t.allowPinchZoom,m=t.as,v=m===void 0?"div":m,_=t.gapMode,x=jo(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=f,k=z$([r,e]),S=Dr(Dr({},x),s);return b.createElement(b.Fragment,null,u&&b.createElement(E,{sideCar:VE,removeScrollBar:c,shards:d,noRelative:h,noIsolation:y,inert:g,setCallbacks:i,allowPinchZoom:!!w,lockRef:r,gapMode:_}),o?b.cloneElement(b.Children.only(a),Dr(Dr({},S),{ref:k})):b.createElement(v,Dr({},S,{className:l,ref:k}),a))});vd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};vd.classNames={fullWidth:Fc,zeroRight:Dc};var K$=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function G$(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=K$();return e&&t.setAttribute("nonce",e),t}function Y$(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function J$(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Q$=function(){var t=0,e=null;return{add:function(r){t==0&&(e=G$())&&(Y$(e,r),J$(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},X$=function(){var t=Q$();return function(e,r){b.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},qE=function(){var t=X$(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},Z$={left:0,top:0,right:0,gap:0},$h=function(t){return parseInt(t||"",10)||0},eL=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[$h(r),$h(n),$h(s)]},tL=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Z$;var e=eL(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},rL=qE(),Zi="data-scroll-locked",nL=function(t,e,r,n){var s=t.left,i=t.top,o=t.right,a=t.gap;return r===void 0&&(r="margin"),`
202  .`.concat(D$,` {
203   overflow: hidden `).concat(n,`;
204   padding-right: `).concat(a,"px ").concat(n,`;
205  }
206  body[`).concat(Zi,`] {
207    overflow: hidden `).concat(n,`;
208    overscroll-behavior: contain;
209    `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&`
210    padding-left: `.concat(s,`px;
211    padding-top: `).concat(i,`px;
212    padding-right: `).concat(o,`px;
213    margin-left:0;
214    margin-top:0;
215    margin-right: `).concat(a,"px ").concat(n,`;
216    `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
217  }
218  
219  .`).concat(Dc,` {
220    right: `).concat(a,"px ").concat(n,`;
221  }
222  
223  .`).concat(Fc,` {
224    margin-right: `).concat(a,"px ").concat(n,`;
225  }
226  
227  .`).concat(Dc," .").concat(Dc,` {
228    right: 0 `).concat(n,`;
229  }
230  
231  .`).concat(Fc," .").concat(Fc,` {
232    margin-right: 0 `).concat(n,`;
233  }
234  
235  body[`).concat(Zi,`] {
236    `).concat(F$,": ").concat(a,`px;
237  }
238`)},Y0=function(){var t=parseInt(document.body.getAttribute(Zi)||"0",10);return isFinite(t)?t:0},sL=function(){b.useEffect(function(){return document.body.setAttribute(Zi,(Y0()+1).toString()),function(){var t=Y0()-1;t<=0?document.body.removeAttribute(Zi):document.body.setAttribute(Zi,t.toString())}},[])},iL=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;sL();var i=b.useMemo(function(){return tL(s)},[s]);return b.createElement(rL,{styles:nL(i,!e,s,r?"":"!important")})},Op=!1;if(typeof window<"u")try{var dc=Object.defineProperty({},"passive",{get:function(){return Op=!0,!0}});window.addEventListener("test",dc,dc),window.removeEventListener("test",dc,dc)}catch{Op=!1}var gi=Op?{passive:!1}:!1,oL=function(t){return t.tagName==="TEXTAREA"},KE=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!oL(t)&&r[e]==="visible")},aL=function(t){return KE(t,"overflowY")},lL=function(t){return KE(t,"overflowX")},J0=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);
vendor: 4,775 bytes, lines 238-241
238var s=GE(t,n);if(s){var i=YE(t,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},cL=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},uL=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},GE=function(t,e){return t==="v"?aL(e):lL(e)},YE=function(t,e){return t==="v"?cL(e):uL(e)},dL=function(t,e){return t==="h"&&e==="rtl"?-1:1},hL=function(t,e,r,n,s){var i=dL(t,window.getComputedStyle(e).direction),o=i*n,a=r.target,l=e.contains(a),c=!1,u=o>0,d=0,f=0;do{if(!a)break;var h=YE(t,a),y=h[0],g=h[1],w=h[2],m=g-w-i*y;(y||m)&&GE(t,a)&&(d+=m,f+=y);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(Math.abs(d)<1||!s)||!u&&(Math.abs(f)<1||!s))&&(c=!0),c},hc=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Q0=function(t){return[t.deltaX,t.deltaY]},X0=function(t){return t&&"current"in t?t.current:t},fL=function(t,e){return t[0]===e[0]&&t[1]===e[1]},pL=function(t){return`
239  .block-interactivity-`.concat(t,` {pointer-events: none;}
240  .allow-interactivity-`).concat(t,` {pointer-events: all;}
241`)},gL=0,vi=[];function vL(t){var e=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),s=b.useState(gL++)[0],i=b.useState(qE)[0],o=b.useRef(t);b.useEffect(function(){o.current=t},[t]),b.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var g=M$([t.lockRef.current],(t.shards||[]).map(X0),!0).filter(Boolean);return g.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),g.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=b.useCallback(function(g,w){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var m=hc(g),v=r.current,_="deltaX"in g?g.deltaX:v[0]-m[0],x="deltaY"in g?g.deltaY:v[1]-m[1],E,k=g.target,S=Math.abs(_)>Math.abs(x)?"h":"v";if("touches"in g&&S==="h"&&k.type==="range")return!1;var C=J0(S,k);if(!C)return!0;if(C?E=S:(E=S==="v"?"h":"v",C=J0(S,k)),!C)return!1;if(!n.current&&"changedTouches"in g&&(_||x)&&(n.current=E),!E)return!0;var N=n.current||E;return hL(N,w,g,N==="h"?_:x,!0)},[]),l=b.useCallback(function(g){var w=g;if(!(!vi.length||vi[vi.length-1]!==i)){var m="deltaY"in w?Q0(w):hc(w),v=e.current.filter(function(E){return E.name===w.type&&(E.target===w.target||w.target===E.shadowParent)&&fL(E.delta,m)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var _=(o.current.shards||[]).map(X0).filter(Boolean).filter(function(E){return E.contains(w.target)}),x=_.length>0?a(w,_[0]):!o.current.noIsolation;x&&w.cancelable&&w.preventDefault()}}},[]),c=b.useCallback(function(g,w,m,v){var _={name:g,delta:w,target:m,should:v,shadowParent:mL(m)};e.current.push(_),setTimeout(function(){e.current=e.current.filter(function(x){return x!==_})},1)},[]),u=b.useCallback(function(g){r.current=hc(g),n.current=void 0},[]),d=b.useCallback(function(g){c(g.type,Q0(g),g.target,a(g,t.lockRef.current))},[]),f=b.useCallback(function(g){c(g.type,hc(g),g.target,a(g,t.lockRef.current))},[]);b.useEffect(function(){return vi.push(i),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,gi),document.addEventListener("touchmove",l,gi),document.addEventListener("touchstart",u,gi),function(){vi=vi.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,gi),document.removeEventListener("touchmove",l,gi),document.removeEventListener("touchstart",u,gi)}},[]);var h=t.removeScrollBar,y=t.inert;return b.createElement(b.Fragment,null,y?b.createElement(i,{styles:pL(s)}):null,h?b.createElement(iL,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function mL(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const yL=q$(VE,vL);var JE=b.forwardRef(function(t,e){return b.createElement(vd,Dr({},t,{ref:e,sideCar:yL}))});JE.classNames=vd.classNames;var _L=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},mi=new WeakMap,fc=new WeakMap,pc={},Lh=0,QE=function(t){return t&&(t.host||QE(t.parentNode))},wL=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=QE(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},bL=function(t,e,r,n){var s=wL(e,Array.isArray(t)?t:[t]);pc[r]||(pc[r]=new WeakMap);var i=pc[r],o=[],a=new Set,l=new Set(s),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};
vendor: 7,208 bytes, lines 241-245
241s.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))u(f);else try{var h=f.getAttribute(n),y=h!==null&&h!=="false",g=(mi.get(f)||0)+1,w=(i.get(f)||0)+1;mi.set(f,g),i.set(f,w),o.push(f),g===1&&y&&fc.set(f,!0),w===1&&f.setAttribute(r,"true"),y||f.setAttribute(n,"true")}catch(m){console.error("aria-hidden: cannot operate on ",f,m)}})};return u(e),a.clear(),Lh++,function(){o.forEach(function(d){var f=mi.get(d)-1,h=i.get(d)-1;mi.set(d,f),i.set(d,h),f||(fc.has(d)||d.removeAttribute(n),fc.delete(d)),h||d.removeAttribute(r)}),Lh--,Lh||(mi=new WeakMap,mi=new WeakMap,fc=new WeakMap,pc={})}},xL=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=_L(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),bL(n,s,r,"aria-hidden")):function(){return null}},md="Dialog",[XE,O3]=bn(md),[EL,Er]=XE(md),ZE=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:i,modal:o=!0}=t,a=b.useRef(null),l=b.useRef(null),[c,u]=ni({prop:n,defaultProp:s??!1,onChange:i,caller:md});return p.jsx(EL,{scope:e,triggerRef:a,contentRef:l,contentId:Ws(),titleId:Ws(),descriptionId:Ws(),open:c,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(d=>!d),[u]),modal:o,children:r})};ZE.displayName=md;var eS="DialogTrigger",tS=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Er(eS,r),i=Xe(e,s.triggerRef);return p.jsx(he.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":wv(s.open),...n,ref:i,onClick:le(t.onClick,s.onOpenToggle)})});tS.displayName=eS;var yv="DialogPortal",[SL,rS]=XE(yv,{forceMount:void 0}),nS=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,i=Er(yv,e);return p.jsx(SL,{scope:e,forceMount:r,children:b.Children.map(n,o=>p.jsx(ps,{present:r||i.open,children:p.jsx(Bg,{asChild:!0,container:s,children:o})}))})};nS.displayName=yv;var Au="DialogOverlay",sS=b.forwardRef((t,e)=>{const r=rS(Au,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=Er(Au,t.__scopeDialog);return i.modal?p.jsx(ps,{present:n||i.open,children:p.jsx(CL,{...s,ref:e})}):null});sS.displayName=Au;var kL=el("DialogOverlay.RemoveScroll"),CL=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Er(Au,r);return p.jsx(JE,{as:kL,allowPinchZoom:!0,shards:[s.contentRef],children:p.jsx(he.div,{"data-state":wv(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),Zs="DialogContent",iS=b.forwardRef((t,e)=>{const r=rS(Zs,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,i=Er(Zs,t.__scopeDialog);return p.jsx(ps,{present:n||i.open,children:i.modal?p.jsx(TL,{...s,ref:e}):p.jsx(PL,{...s,ref:e})})});iS.displayName=Zs;var TL=b.forwardRef((t,e)=>{const r=Er(Zs,t.__scopeDialog),n=b.useRef(null),s=Xe(e,r.contentRef,n);return b.useEffect(()=>{const i=n.current;if(i)return xL(i)},[]),p.jsx(oS,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:le(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=r.triggerRef.current)==null||o.focus()}),onPointerDownOutside:le(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&i.preventDefault()}),onFocusOutside:le(t.onFocusOutside,i=>i.preventDefault())})}),PL=b.forwardRef((t,e)=>{const r=Er(Zs,t.__scopeDialog),n=b.useRef(!1),s=b.useRef(!1);return p.jsx(oS,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:i=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const o=i.target;((c=r.triggerRef.current)==null?void 0:c.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),oS=b.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:i,...o}=t,a=Er(Zs,r),l=b.useRef(null),c=Xe(e,l);return $$(),p.jsxs(p.Fragment,{children:[p.jsx(zE,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:i,children:p.jsx(ed,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":wv(a.open),...o,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(RL,{titleId:a.titleId}),p.jsx(OL,{contentRef:l,descriptionId:a.descriptionId})]})]})}),_v="DialogTitle",aS=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Er(_v,r);return p.jsx(he.h2,{id:s.titleId,...n,ref:e})});aS.displayName=_v;var lS="DialogDescription",cS=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Er(lS,r);return p.jsx(he.p,{id:s.descriptionId,...n,ref:e})});cS.displayName=lS;var uS="DialogClose",dS=b.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=Er(uS,r);return p.jsx(he.button,{type:"button",...n,ref:e,onClick:le(t.onClick,()=>s.onOpenChange(!1))})});dS.displayName=uS;function wv(t){return t?"open":"closed"}var hS="DialogTitleWarning",[A3,fS]=vP(hS,{contentName:Zs,titleName:_v,docsSlug:"dialog"}),RL=({titleId:t})=>{const e=fS(hS),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users.
242
243If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component.
244
245For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return b.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},NL="DialogDescriptionWarning",OL=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${fS(NL).contentName}}.`;return b.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},pS=ZE,gS=tS,vS=nS,yd=sS,_d=iS,wd=aS,bd=cS,mS=dS;const AL=pS,jL=gS,IL=vS,yS=b.forwardRef(({className:t,...e},r)=>p.jsx(yd,{className:pe("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",t),...e,ref:r}));yS.displayName=yd.displayName;const $L=nd("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4  border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),_S=b.forwardRef(({side:t="right",className:e,children:r,...n},s)=>p.jsxs(IL,{children:[p.jsx(yS,{}),p.jsxs(_d,{ref:s,className:pe($L({side:t}),e),...n,children:[r,p.jsxs(mS,{className:"absolute right-4 top-4 roun
245ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-secondary hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[p.jsx(Vg,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));_S.displayName=_d.displayName;const LL=b.forwardRef(({className:t,...e},r)=>p.jsx(wd,{ref:r,className:pe("text-lg font-semibold text-foreground",t),...e}));LL.displayName=wd.displayName;const ML=b.forwardRef(({className:t,...e},r)=>p.jsx(bd,{ref:r,className:pe("text-sm text-muted-foreground",t),...e}));ML.displayName=bd.displayName;const ei="https://docs.google.com/forms/d/e/1FAIpQLSdxZv96UQusrtJq4evBZfNHc1jkYgO1Ok0m2J_EdLM2R6Iv9Q/viewform",wS="SUBMIT BY WEDNESDAY, MAY 6",Z0="false".toLowerCase(),Ct=Z0==="true"||Z0==="1";function bv(){const[t,e]=b.useState(!1),r=oi(),n=P1(),s=180,i=c=>{if(r.pathname!=="/"){n("/",{state:{scrollTo:c}});return}ko(c)},o=()=>{i("#calendar")},a=()=>{if(e(!1),r.pathname!=="/"){n("/");return}window.scrollTo({top:0,behavior:"smooth"})},l=c=>{e(!1),window.setTimeout(c,s)};return p.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 bg-background/95 backdrop-blur-sm border-b-2 border-navy",children:p.jsxs("div",{className:"container mx-auto px-4 h-14 flex items-center justify-between",children:[p.jsxs(Ir,{to:"/",onClick:c=>{c.preventDefault(),a()},className:"font-display text-xl md:text-2xl text-navy tracking-wider shrink-0 flex items-center",children:["COMMUNITYWEEK",p.jsx("span",{className:"text-primary",children:".NYC"})]}),p.jsxs("nav",{className:"hidden lg:flex items-center gap-0.5 whitespace-nowrap",children:[p.jsx(Ir,{to:"/sponsors",className:"px-2 py-1.5 text-xs md:text-sm font-display tracking-wider text-foreground/70 hover:text-primary transition-colors",children:"SPONSORS"}),p.jsx(Ir,{to:"/faq",className:"px-2 py-1.5 text-xs md:text-sm font-display tracking-wider text-foreground/70 hover:text-primary transition-colors",children:"FAQ"}),p.jsx(Ue,{size:"sm",variant:"outline",onClick:o,className:"ml-2 rounded-none border-2 border-navy bg-background/70 font-display tracking-wider text-sm hover:translate-x-[1px] hover:translate-y-[1px] transition-all",children:"CALENDAR"}),Ct?p.jsx(Ue,{asChild:!0,size:"sm",className:"ml-2 rounded-none border-2 border-navy font-display tracking-wider text-sm festival-shadow-sm hover:translate-x-[1px] hover:translate-y-[1px] transition-all",children:p.jsx("a",{href:ei,target:"_blank",rel:"noopener noreferrer",children:"HOST AN EVENT"})}):null]}),p.jsxs(AL,{open:t,onOpenChange:e,children:[p.jsx(jL,{asChild:!0,className:"lg:hidden",children:p.jsxs(Ue,{variant:"ghost",size:"icon",className:"rounded-none",children:[p.jsx(bR,{className:"h-6 w-6"}),p.jsx("span",{className:"sr-only",children:"Open menu"})]})}),p.jsx(_S,{side:"right",className:"w-[280px] rounded-none border-l-2 border-navy",children:p.jsxs("nav",{className:"flex flex-col gap-2 mt-8",children:[p.jsx(Ir,{to:"/#calendar",onClick:c=>{c.preventDefault(),l(o)},className:"font-display text-2xl tracking-wider text-foreground hover:text-primary transition-colors py-3 border-b-2 border-navy/10",children:"CALENDAR"}),Ct?p.jsx("a",{href:ei,target:"_blank",rel:"noopener noreferrer",onClick:()=>e(!1),className:"font-display text-2xl tracking-wider text-foreground hover:text-primary transition-colors py-3 border-b-2 border-navy/10",children:"HOST AN EVENT"}):null,p.jsx(Ir,{to:"/sponsors",onClick:c=>{c.preventDefault(),l(()=>n("/sponsors"))},className:"font-display text-2xl tracking-wider text-foreground hover:text-primary transition-colors py-3 border-b-2 border-navy/10",children:"SPONSORS"}),p.jsx(Ir,{to:"/faq",onClick:c=>{c.preventDefault(),l(()=>n("/faq"))},className:"font-display text-2xl tracking-wider text-foreground hover:text-primary transition-colors py-3 border-b-2 border-navy/10",children:"FAQ"})]})})]})]})})}function xv(){return p.jsx("footer",{className:"bg-navy text-primary-foreground py-8 border-t-4 border-primary",children:p.jsx("div",{className:"container mx-auto px-4",children:p.jsx("div",{className:"flex flex-col items-center gap-4 mb-4",children:p.jsx("div",{className:"flex gap-4",children:[{icon:mR,label:"Instagram",href:"https://instagram.com/communityweek.nyc"},{icon:_R,label:"Email",href:"mailto:[email protected]"}].map(t=>{var e,r;return p.jsx("a",{href:t.href||"#",target:(e=t.href)!=null&&e.startsWith("http")?"_blank":void 0,rel:(r=t.href)!=null&&r.startsWith("http")?"noopener noreferrer":void 0,className:"w-10 h-10 border-2 border-primary-foreground
245/30 flex items-center justify-center hover:border-accent hover:text-accent transition-colors","aria-label":t.label,children:p.jsx(t.icon,{className:"h-5 w-5"})},t.label)})})})})})}const bS=pS,xS=gS,DL=vS,ES=b.forwardRef(({className:t,...e},r)=>p.jsx(yd,{ref:r,className:pe("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",t),...e}));ES.displayName=yd.displayName;const Ev=b.forwardRef(({className:t,children:e,...r},n)=>p.jsxs(DL,{children:[p.jsx(ES,{}),p.jsxs(_d,{ref:n,className:pe("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",t),...r,children:[e,p.jsxs(mS,{className:"absolute right-4 top-4 roun
245ded-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:[p.jsx(Vg,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ev.displayName=_d.displayName;const Sv=({className:t,...e})=>p.jsx("div",{className:pe("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Sv.displayName="DialogHeader";const kv=b.forwardRef(({className:t,...e},r)=>p.jsx(wd,{ref:r,className:pe("text-lg font-semibold leading-none tracking-tight",t),...e}));kv.displayName=wd.displayName;const Cv=b.forwardRef(({className:t,...e},r)=>p.jsx(bd,{ref:r,className:pe("text-sm text-muted-foreground",t),...e}));Cv.displayName=bd.displayName;const e_="https://sheltonmercer.com/",FL="/sponsor-photos/sm3-headshot.png",t_=["A 10x Founder, Mercer is a catalyst at the intersection of innovators, investors, and global corporations and institutions. He is the Co-Founder of AI/Blockchain adtech leader Audigent, which was acquired by Experian in a mid-nine figure deal in late 2024, as well as the Founder & Chairman of The Mercer Innovation Group. His MiOS Mercer Innovation Outcomes System has enhanced global organizations, such as Disney, Amazon, GE, Microsoft, and Comcast NBCUniversal, and powered the launches and growth of major innovation hubs, such as the University of Pennsylvania's Pennovation Works & Center and 16 Tech Innovation District.","Mercer's leadership and impact have been recognized by media, business, and policy organizations including Inc. 5000, Deloitte Fast 500, Fast Company, Wired, US Chamber of Commerce and UN Foundation. He is a renowned humanitarian whose efforts have raised hundreds of millions of dollars and mobilized millions of volunteers to address crisis relief for Haiti Earthquake (2010), Hurricane Katrina (2005) and the tsunamis in Japan and Indian Ocean, global poverty, food and housing insecurity, and clean water access. Mercer is a board director and advisor to numerous companies and non-profits. He is a trusted advisor and coach to CEOs, celebrities, professional athletes, and high net families."];function SS({children:t}){return p.jsxs(bS,{children:[p.jsx(xS,{asChild:!0,children:t}),p.jsxs(Ev,{className:"flex h-[80vh] max-h-[700px] max-w-xl flex-col overflow-hidden rounded-none border-2 border-navy",children:[p.jsxs(Sv,{children:[p.jsx(kv,{className:"font-display text-3xl text-navy",children:"Shelton Mercer III"}),p.jsx(Cv,{children:"Award Winning Entrepreneur | Speaker | Humanitarian"})]}),p.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:p.jsxs("div",{className:"grid h-full gap-4 sm:grid-cols-[168px_minmax(0,1fr)] sm:items-start",children:[p.jsx("div",{className:"h-52 w-40 overflow-hidden border-2 border-navy bg-muted festival-shadow-sm",children:p.jsx("img",{src:FL,alt:"SM3 representative headshot",className:"h-full w-full object-contain",loading:"lazy"})}),p.jsxs("div",{className:"min-h-0 max-h-[45vh] space-y-3 overflow-y-scroll pr-2 text-sm leading-relaxed text-muted-foreground [scrollbar-gutter:stable] [scrollbar-width:auto] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-muted/40 [&::-webkit-scrollbar-thumb]:bg-navy/45 [&::-webkit-scrollbar-thumb]:rounded-none sm:h-full sm:max-h-none",children:[p.jsx("p",{children:t_[0]}),p.jsx("p",{children:t_[1]}),p.jsxs("p",{children:["To learn more about Shelton Mercer III, visit"," ",p.jsx("a",{href:e_,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"sheltonmercer.com"}),", or connect on"," ",p.jsx("a",{href:"https://www.linkedin.com/in/sheltonmercer/",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"LinkedIn"})," ","and IG and FB @SheltonMercer."]})]})]})}),p.jsx("div",{className:"pt-2",children:p.jsx(Ue,{asChild:!0,size:"sm",className:"rounded-none border-2 border-navy font-display tracking-wider text-sm festival-shadow-sm hover:translate-x-[1px] hover:translate-y-[1px] transition-all",children:p.jsx("a",{href:e_,target:"_blank",rel:"noopener noreferrer",children:"LEARN MORE"})})})]})]})}const UL=[{name:"SM3",logoSrc:"/sponsor-photos/sm3-logo-light-bg.png",href:"https://activ8.m-ios.com/"}
245,{name:"New York Life",logoSrc:"/sponsor-photos/new-york-life-logo.png",href:"https://www.newyorklife.com/",logoBgClassName:"bg-white p-0 sm:p-0 !w-auto max-w-full mx-auto"}];function BL({className:t}){return p.jsxs("section",{className:pe("mt-4",t),"aria-label":"Sponsors",children:[p.jsx("p",{className:"text-center font-display tracking-[0.14em] text-navy/90 text-xs sm:text-sm mb-2",children:"SPONSORED BY"}),p.jsx("div",{className:"flex flex-nowrap items-center justify-center gap-4 p-2 sm:p-3",children:UL.map(e=>e.name==="SM3"?p.jsx(SS,{children:p.jsx("button",{type:"button","aria-label":`View ${e.name} sponsor details`,className:"flex h-24 sm:h-28 md:h-32 w-40 sm:w-56 md:w-72 shrink-0 items-center justify-center border-2 border-navy bg-background px-0 sm:px-3 md:px-4 festival-shadow-sm hover:translate-x-[1px] hover:translate-y-[1px] transition-all",children:p.jsx("img",{src:e.logoSrc,alt:`${e.name} logo`,className:pe("h-full w-full object-contain object-center p-1 sm:p-1.5",e.logoBgClassName),loading:"lazy"})})},e.name):e.href?p.jsx("a",{href:e.href,target:"_blank",rel:"noopener noreferrer","aria-label":`Visit ${e.name}`,className:"flex h-24 sm:h-28 md:h-32 w-40 sm:w-56 md:w-72 shrink-0 items-center justify-center border-2 border-navy bg-background px-0 sm:px-3 md:px-4 festival-shadow-sm hover:translate-x-[1px] hover:translate-y-[1px] transition-all",children:p.jsx("img",{src:e.logoSrc,alt:`${e.name} logo`,className:pe("h-full w-full object-contain object-center p-1 sm:p-1.5",e.logoBgClassName),loading:"lazy"})},e.name):p.jsx("div",{className:"flex h-24 sm:h-28 md:h-32 w-40 sm:w-56 md:w-72 shrink-0 items-center justify-center border-2 border-navy bg-background px-0 sm:px-3 md:px-4 festival-shadow-sm",children:p.jsx("img",{src:e.logoSrc,alt:`${e.name} logo`,className:pe("h-full w-full object-contain object-center p-1 sm:p-1.5",e.logoBgClassName),loading:"lazy"})},e.name))})]})}function Io({selector:t,className:e,children:r}){return p.jsx("h2",{className:e,children:p.jsx("button",{type:"button",onClick:()=>ko(t),className:"inline cursor-pointer text-inherit transition-opacity hover:opacity-85 focus-visible:outline-none focus-visible:opacity-85",children:r})})}const Hs=b.forwardRef(({className:t,type:e,...r},n)=>p.jsx("input",{type:e,className:pe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:n,...r}));Hs.displayName="Input";const zL=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Tv extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}}class WL extends Tv{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class r_ extends Tv{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class n_ extends Tv{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Ap;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Ap||(Ap={}));class HL{constructor(e,{headers:r={},customFetch:n,region:s=Ap.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=zL(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return L$(this,arguments,void 0,function*(r,n={}){var s;let i,o;try{const{headers:a,method:l,body:c,signal:u,timeout:d}=n;let f={},{region:h}=n;h||(h=this.region);const y=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,y.searchParams.set("forceFunctionRegion",h));let g;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",g=c):typeof c=="string"?(f["Content-Type"]="text/plain",g=c):typeof FormData<"u"&&c instanceof FormData?g=c:(f["Content-Type"]="application/json",g=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?g=JSON.stringify(c):g=c;let w=u;d&&(o=new AbortController,i=setTimeout(()=>
245o.abort(),d),u?(w=o.signal,u.addEventListener("abort",()=>o.abort())):w=o.signal);const m=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:g,signal:w}).catch(E=>{throw new WL(E)}),v=m.headers.get("x-relay-error");if(v&&v==="true")throw new r_(m);if(!m.ok)throw new n_(m);let _=((s=m.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),x;return _==="application/json"?x=yield m.json():_==="application/octet-stream"||_==="application/pdf"?x=yield m.blob():_==="text/event-stream"?x=m:_==="multipart/form-data"?x=yield m.formData():x=yield m.text(),{data:x,error:null,response:m}}catch(a){return{data:null,error:a,response:a instanceof n_||a instanceof r_?a.context:void 0}}finally{i&&clearTimeout(i)}})}}var VL=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}},qL=class{constructor(t){var e,r,n;this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(r=t.isMaybeSingle)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(n=t.urlLengthLimit)!==null&&n!==void 0?n:8e3,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}then(t,e){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 i=>{let o=null,a=null,l=null,c=i.status,u=i.statusText;if(i.ok){var d,f;if(r.method!=="HEAD"){var h;const m=await i.text();m===""||(r.headers.get("Accept")==="text/csv"||r.headers.get("Accept")&&(!((h=r.headers.get("Accept"))===null||h===void 0)&&h.includes("application/vnd.pgrst.plan+text"))?a=m:a=JSON.parse(m))}const g=(d=r.headers.get("Prefer"))===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),w=(f=i.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");g&&w&&w.length>1&&(l=parseInt(w[1])),r.isMaybeSingle&&r.method==="GET"&&Array.isArray(a)&&(a.length>1?(o={code:"PGRST116",details:`Results contain ${a.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},a=null,l=null,c=406,u="Not Acceptable"):a.length===1?a=a[0]:a=null)}else{var y;const g=await i.text();try{o=JSON.parse(g),Array.isArray(o)&&i.status===404&&(a=[],o=null,c=200,u="OK")}catch{i.status===404&&g===""?(c=204,u="No Content"):o={message:g}}if(o&&r.isMaybeSingle&&(!(o==null||(y=o.details)===null||y===void 0)&&y.includes("0 rows"))&&(o=null,c=200,u="OK"),o&&r.shouldThrowOnError)throw new VL(o)}return{error:o,data:a,count:l,status:c,statusText:u}});return this.shouldThrowOnError||(s=s.catch(i=>{var o;let a="",l="",c="";const u=i==null?void 0:i.cause;if(u){var d,f,h,y;const m=(d=u==null?void 0:u.message)!==null&&d!==void 0?d:"",v=(f=u==null?void 0:u.code)!==null&&f!==void 0?f:"";a=`${(h=i==null?void 0:i.name)!==null&&h!==void 0?h:"FetchError"}: ${i==null?void 0:i.message}`,a+=`
246
247Caused by: ${(y=u==null?void 0:u.name)!==null&&y!==void 0?y:"Error"}: ${m}`,v&&(a+=` (${v})`),u!=null&&u.stack&&(a+=`
248${u.stack}`)}else{var g;a=(g=i==null?void 0:i.stack)!==null&&g!==void 0?g:""}const w=this.url.toString().length;return(i==null?void 0:i.name)==="AbortError"||(i==null?void 0:i.code)==="ABORT_ERR"?(c="",l="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${w} 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.`)):((u==null?void 0:u.name)==="HeadersOverflowError"||(u==null?void 0:u.code)==="UND_ERR_HEADERS_OVERFLOW")&&(c="",l="HTTP headers exceeded server limits (typically 16KB)",w>this.urlLengthLimit&&(l+=`. Your request URL is ${w} 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:`${(o=i==null?void 0:i.name)!==null&&o!==void 0?o:"FetchError"}: ${i==null?void 0:i.message}`,details:a,hint:l,code:c},data:null,count:null,status:0,statusText:""}}
248)),s.then(t,e)}returns(){return this}overrideTypes(){return this}},KL=class extends qL{select(t){let e=!1;const r=(t??"*").split("").map(n=>/\s/.test(n)&&!e?"":(n==='"'&&(e=!e),n)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:r,foreignTable:n,referencedTable:s=n}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${e?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:r=e}={}){const n=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(n,`${t}`),this}range(t,e,{foreignTable:r,referencedTable:n=r}={}){const s=typeof n>"u"?"offset":`${n}.offset`,i=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.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}explain({analyze:t=!1,verbose:e=!1,settings:r=!1,buffers:n=!1,wal:s=!1,format:i="text"}={}){var o;const a=[t?"analyze":null,e?"verbose":null,r?"settings":null,n?"buffers":null,s?"wal":null].filter(Boolean).join("|"),l=(o=this.headers.get("Accept"))!==null&&o!==void 0?o:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${a};`),i==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const s_=new RegExp("[,()]");var ki=class extends KL{eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&s_.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),this}notIn(t,e){const r=Array.from(new Set(e)).map(n=>typeof n=="string"&&s_.test(n)?`"${n}"`:`${n}`).join(",");return this.url.searchParams.append(t,`not.in.(${r})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:r,type:n}={}){let s="";n==="plain"?s="pl":n==="phrase"?s="ph":n==="websearch"&&(s="w");const i=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${i}.${e}`),this}match(t){return Object.entries(t).forEach(([e,r])=>{this.url.searchParams.append(e,`eq.${r}`)}),this}not(t,e,r){return this.url.searchParams.append(t,`not.${e}.${r}`),this}or(t,{foreignTable:e,referencedTable:r=e}={}){const n=r?`${r}.or`:"or";return this.url.searchParams.append(n,`(${t})`),this}filter(t,e,r){return this.url.searchParams.append(t,`${e}.${r}`),this}},GL=class{constructor(t,{headers:e={},schema:r,fetch:n,urlLengthLimit:s=8e3}){this.url=t,this.headers=new Headers(e),this.schema=r,this.fetch=n,this.urlLengthLimit=s}
248cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:r=!1,count:n}=e??{},s=r?"HEAD":"GET";let i=!1;const o=(t??"*").split("").map(c=>/\s/.test(c)&&!i?"":(c==='"'&&(i=!i),c)).join(""),{url:a,headers:l}=this.cloneRequestState();return a.searchParams.set("select",o),n&&l.append("Prefer",`count=${n}`),new ki({method:s,url:a,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}insert(t,{count:e,defaultToNull:r=!0}={}){var n;const s="POST",{url:i,headers:o}=this.cloneRequestState();if(e&&o.append("Prefer",`count=${e}`),r||o.append("Prefer","missing=default"),Array.isArray(t)){const a=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(a.length>0){const l=[...new Set(a)].map(c=>`"${c}"`);i.searchParams.set("columns",l.join(","))}}return new ki({method:s,url:i,headers:o,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit})}upsert(t,{onConflict:e,ignoreDuplicates:r=!1,count:n,defaultToNull:s=!0}={}){var i;const o="POST",{url:a,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),e!==void 0&&a.searchParams.set("on_conflict",e),n&&l.append("Prefer",`count=${n}`),s||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);a.searchParams.set("columns",u.join(","))}}return new ki({method:o,url:a,headers:l,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit})}update(t,{count:e}={}){var r;const n="PATCH",{url:s,headers:i}=this.cloneRequestState();return e&&i.append("Prefer",`count=${e}`),new ki({method:n,url:s,headers:i,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit})}delete({count:t}={}){var e;const r="DELETE",{url:n,headers:s}=this.cloneRequestState();return t&&s.append("Prefer",`count=${t}`),new ki({method:r,url:n,headers:s,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit})}};function fl(t){"@babel/helpers - typeof";return fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fl(t)}function YL(t,e){if(fl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(fl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function JL(t){var e=YL(t,"string");return fl(e)=="symbol"?e:e+""}function QL(t,e,r){return(e=JL(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function gc(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?i_(Object(r),!0).forEach(function(n){QL(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var XL=class kS{constructor(e,{headers:r={},schema:n,fetch:s,timeout:i,urlLengthLimit:o=8e3}={}){this.url=e,this.headers=new Headers(r),this.schemaName=n,this.urlLengthLimit=o;const a=s??globalThis.fetch;i!==void 0&&i>0?this.fetch=(l,c)=>{const u=new AbortController,d=setTimeout(()=>u.abort(),i),f=c==null?void 0:c.signal;if(f){if(f.aborted)return clearTimeout(d),a(l,c);const h=()=>{clearTimeout(d),u.abort()};return f.addEventListener("abort",h,{once:!0}),a(l,gc(gc({},c),{},{signal:u.signal})).finally(()=>{clearTimeout(d),f.removeEventListener("abort",h)})}return a(l,gc(gc({},c),{},{signal:u.signal})).finally(()=>clearTimeout(d))}:this.fetch=a}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new GL(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}schema(e){return new kS(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit})}rpc(e,r={},{head:n=!1,get:s=!1,count:i}={}){var o;let a;const l=new URL(`${this.url}/rpc/${e}`);let c;const u=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(u)),d=n&&Object.values(r).some(u);d?(a="POST",c=r):n||s?(a=n?"HEAD":"GET",Object.entries(r).filter(([h,y])=>y!==void 0).map(([h,y])=>[h,Array.isArray(y)?`{${y.join(",")}}`:`${y}
248`]).forEach(([h,y])=>{l.searchParams.append(h,y)})):(a="POST",c=r);const f=new Headers(this.headers);return d?f.set("Prefer",i?`count=${i},return=minimal`:"return=minimal"):i&&f.set("Prefer",`count=${i}`),new ki({method:a,url:l,headers:f,schema:this.schemaName,body:c,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch,urlLengthLimit:this.urlLengthLimit})}};class ZL{constructor(){}static detectEnvironment(){var e;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"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const r=globalThis.process;if(r){const n=r.versions;if(n&&n.node){const s=n.node,i=parseInt(s.replace(/^v/,"").split(".")[0]);return i>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${i} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${i} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option:
249import ws from "ws"
250new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.constructor)return e.constructor;let r=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(r+=`
251
252Suggested solution: ${e.workaround}`),new Error(r)}static createWebSocket(e,r){const n=this.getWebSocketConstructor();return new n(e,r)}static isWebSocketSupported(){try{const e=this.detectEnvironment();return e.type==="native"||e.type==="ws"}catch{return!1}}}const eM="2.99.2",tM=`realtime-js/${eM}`,rM="1.0.0",CS="2.0.0",o_=CS,jp=1e4,nM=1e3,sM=100;var Mn;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(Mn||(Mn={}));var qe;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(qe||(qe={}));var pr;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(pr||(pr={}));var Ip;(function(t){t.websocket="websocket"})(Ip||(Ip={}));var Rs;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(Rs||(Rs={}));class iM{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,r){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(e));let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(e){var r;return this._isArrayBuffer((r=e.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(e){var r,n;const s=(n=(r=e.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},o=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,o)}_encodeUserBroadcastPush(e,r,n){var s,i;const o=e.topic,a=(s=e.ref)!==null&&s!==void 0?s:"",l=(i=e.join_ref)!==null&&i!==void 0?i:"",c=e.payload.event,u=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},d=Object.keys(u).length===0?"":JSON.stringify(u);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(c.length>255)throw new Error(`userEvent length ${c.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+o.length+c.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
252let y=new DataView(h),g=0;y.setUint8(g++,this.KINDS.userBroadcastPush),y.setUint8(g++,l.length),y.setUint8(g++,a.length),y.setUint8(g++,o.length),y.setUint8(g++,c.length),y.setUint8(g++,d.length),y.setUint8(g++,r),Array.from(l,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(a,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(o,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(c,m=>y.setUint8(g++,m.charCodeAt(0))),Array.from(d,m=>y.setUint8(g++,m.charCodeAt(0)));var w=new Uint8Array(h.byteLength+n.byteLength);return w.set(new Uint8Array(h),0),w.set(new Uint8Array(n),h.byteLength),w.buffer}decode(e,r){if(this._isArrayBuffer(e)){let n=this._binaryDecode(e);return r(n)}if(typeof e=="string"){const n=JSON.parse(e),[s,i,o,a,l]=n;return r({join_ref:s,ref:i,topic:o,event:a,payload:l})}return r({})}_binaryDecode(e){const r=new DataView(e),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,s)}}_decodeUserBroadcast(e,r,n){const s=r.getUint8(1),i=r.getUint8(2),o=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const c=n.decode(e.slice(l,l+s));l=l+s;const u=n.decode(e.slice(l,l+i));l=l+i;const d=n.decode(e.slice(l,l+o));l=l+o;const f=e.slice(l,e.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,y={type:this.BROADCAST_EVENT,event:u,payload:h};return o>0&&(y.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(e,r){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([n])=>r.includes(n)))}}class TS{constructor(e,r){this.callback=e,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=e,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),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(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(_e||(_e={}));const a_=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((i,o)=>(i[o]=oM(o,t,e,s),i),{}):{}},oM=(t,e,r,n)=>{const s=e.find(a=>a.name===t),i=s==null?void 0:s.type,o=r[t];return i&&!n.includes(i)?PS(i,o):$p(o)},PS=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return uM(e,r)}switch(t){case _e.bool:return aM(e);case _e.float4:case _e.float8:case _e.int2:case _e.int4:case _e.int8:case _e.numeric:case _e.oid:return lM(e);case _e.json:case _e.jsonb:return cM(e);case _e.timestamp:return dM(e);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 $p(e);default:return $p(e)}},$p=t=>t,aM=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},lM=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},cM=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},uM=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let i;const o=t.slice(1,r);try{i=JSON.parse("["+o+"]")}catch{i=o?o.split(","):[]}return i.map(a=>PS(e,a))}return t},dM=t=>typeof t=="string"?t.replace(" ","T"):t,RS=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};class Mh{constructor(e,r,n={},s=jp){this.channel=e,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHo
vendor: 4,183 bytes, line 252
252oks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,r){var n;return this._hasReceived(e)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:e,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(r))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var l_;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(l_||(l_={}));class $a{constructor(e,r){this.channel=e,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:i,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=$a.syncState(this.state,s,i,o),this.pendingDiffs.forEach(l=>{this.state=$a.syncDiff(this.state,l,i,o)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},s=>{const{onJoin:i,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=$a.syncDiff(this.state,s,i,o),a())}),this.onJoin((s,i,o)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:i,newPresences:o})}),this.onLeave((s,i,o)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:i,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,r,n,s){const i=this.cloneDeep(e),o=this.transformState(r),a={},l={};return this.map(i,(c,u)=>{o[c]||(l[c]=u)}),this.map(o,(c,u)=>{const d=i[c];if(d){const f=u.map(w=>w.presence_ref),h=d.map(w=>w.presence_ref),y=u.filter(w=>h.indexOf(w.presence_ref)<0),g=d.filter(w=>f.indexOf(w.presence_ref)<0);y.length>0&&(a[c]=y),g.length>0&&(l[c]=g)}else a[c]=u}),this.syncDiff(i,{joins:a,leaves:l},n,s)}static syncDiff(e,r,n,s){const{joins:i,leaves:o}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(i,(a,l)=>{var c;const u=(c=e[a])!==null&&c!==void 0?c:[];if(e[a]=this.cloneDeep(l),u.length>0){const d=e[a].map(h=>h.presence_ref),f=u.filter(h=>d.indexOf(h.presence_ref)<0);e[a].unshift(...f)}n(a,u,l)}),this.map(o,(a,l)=>{let c=e[a];if(!c)return;const u=l.map(d=>d.presence_ref);c=c.filter(d=>u.indexOf(d.presence_ref)<0),e[a]=c,s(a,c,l),c.length===0&&delete e[a]}),e}static map(e,r){return Object.getOwnPropertyNames(e).map(n=>r(n,e[n]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((r,n)=>{const s=e[n];return"metas"in s?r[n]=s.metas.map(i=>(i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i)):r[n]=s,r},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var c_;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(c_||(c_={}));var La;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(La||(La={}));
252var rn;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(rn||(rn={}));class zi{constructor(e,r={config:{}},n){var s,i;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.state=qe.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.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 Mh(this,pr.join,this.params,this.timeout),this.rejoinTimer=new TS(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=qe.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(o=>o.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=qe.closed,this.socket._remove(this)}),this._onError(o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=qe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=qe.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",o=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,o),this.state=qe.errored,this.rejoinTimer.scheduleTimeout())}),this._on(pr.reply,{},(o,a)=>{this._trigger(this._replyEventName(a),o)}),this.presence=new $a(this),this.broadcastEndpointURL=RS(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((i=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||i===void 0)&&i.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(e,r=this.timeout){var n,s,i;if(this.socket.isConnected()||this.socket.connect(),this.state==qe.closed){const{config:{broadcast:o,presence:a,private:l}}=this.params,c=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&s!==void 0?s:[],u=!!this.bindings[La.PRESENCE]&&this.bindings[La.PRESENCE].length>0||((i=this.params.config.presence)===null||i===void 0?void 0:i.enabled)===!0,d={},f={broadcast:o,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>e==null?void 0:e(rn.CHANNEL_ERROR,h)),this._onClose(()=>e==null?void 0:e(rn.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var y;if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){e==null||e(rn.SUBSCRIBED);return}else{const g=this.bindings.postgres_changes,w=(y=g==null?void 0:g.length)!==null&&y!==void 0?y:0,m=[];for(let v=0;v<w;v++){const _=g[v],{filter:{event:x,schema:E,table:k,filter:S}}=_,C=h&&h[v];if(C&&C.event===x&&zi.isFilterValueEqual(C.schema,E)&&zi.isFilterValueEqual(C.table,k)&&zi.isFilterValueEqual(C.filter,S))m.push(Object.assign(Object.assign({},_),{id:C.id}));else{this.unsubscribe(),this.state=qe.errored,e==null||e(rn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=m,e&&e(rn.SUBSCRIBED);return}}).receive("error",h=>{this.state=qe.errored,e==null||e(rn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(rn.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(e,r={}){return await this.send({type:"presence",event:"track",payload:e},r.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,r,n){return this.state===qe.joined&&e===La.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(e,r,n)}async httpSend(e,r,n={}){var s;if(r==null)return Promise.reject("Payload is required for httpSend()");const i={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(i.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o={method:"POST",headers:i,body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,o,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
252try{const c=await a.json();l=c.error||c.message||l}catch{}return Promise.reject(new Error(l))}async send(e,r={}){var n,s;if(!this._canPush()&&e.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:i,payload:o}=e,a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:a,body:JSON.stringify({messages:[{topic:this.subTopic,event:i,payload:o,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=c.body)===null||s===void 0?void 0:s.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(i=>{var o,a,l;const c=this._push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&i("ok"),c.receive("ok",()=>i("ok")),c.receive("error",()=>i("error")),c.receive("timeout",()=>i("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=qe.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(pr.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new Mh(this,pr.leave,{},e),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(e=>e.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=qe.closed,this.bindings={}}async _fetchWithTimeout(e,r,n){const s=new AbortController,i=setTimeout(()=>s.abort(),n),o=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(i),o}_push(e,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Mh(this,e,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(e){if(e.startTimeout(),this.pushBuffer.push(e),this.pushBuffer.length>sM){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(e,r,n){return r}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,r,n){var s,i;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=pr;if(n&&[a,l,c,u].indexOf(o)>=0&&n!==this._joinRef())return;let f=this._onMessage(o,r,n);if(r&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(h=>{var y,g,w;return((y=h.filter)===null||y===void 0?void 0:y.event)==="*"||((w=(g=h.filter)===null||g===void 0?void 0:g.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===o}).map(h=>h.callback(f,n)):(i=this.bindings[o])===null||i===void 0||i.filter(h=>{var y,g,w,m,v,_;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in h){const x=h.id,E=(y=h.filter)===null||y===void 0?void 0:y.event;return x&&((g=r.ids)===null||g===void 0?void 0:g.includes(x))&&(E==="*"||(E==null?void 0:E.toLocaleLowerCase())===((w=r.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const x=(v=(m=h==null?void 0:h.filter)===null||m===void 0?void 0:m.event)===null||v===void 0?void 0:v.toLocaleLowerCase();return x==="*"||x===((_=r==null?void 0:r.event)===null||_===void 0?void 0:_.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===o}).map(h=>{if(typeof f=="object"&&"ids"in f){const y=f.data,{schema:g,table:w,commit_timestamp:m,type:v,errors:_}=y;f=Object.assign(Object.assign({},{schema:g,table:w,commit_timestamp:m,eventType:v,new:{},old:{},errors:_}),this._getPayloadRecords(y))}h.callback(f,n)})}_isClosed(){return this.state===qe.closed}_isJoined(){return this.state===qe.joined}_isJoining(){return this.state===qe.joining}_isLeaving(){return this.state===qe.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,r,n){const s=e.toLocaleLowerCase(),i={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(i):this.bindings[s]=[i],this}_off(e,r){const n=e.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var i;return!(((i=s.type)===null||i===void 0?void 0:i.toLocaleLowerCase())===n&&zi.isEqual(s.filter,r))})),this}static isEqual(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}static isFilterValueEqual(e,r){return(e??void 0)===(r??void 0)}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(pr.close,{},e)}_onError(e){this._on(pr.error,{},r=>e(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=qe.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=a_(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=a_(e.columns,e.old_record)),r}}const Dh=()=>{},vc={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},hM=[1e3,2e3,5e3,1e4],fM=1e4,pM=`
253  addEventListener("message", (e) => {
254    if (e.data.event === "start") {
255      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
256    }
257  });`;class gM{constructor(e,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=jp,this.transport=null,this.heartbeatIntervalMs=vc.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Dh,this.ref=0,this.reconnectTimer=null,this.vsn=o_,this.logger=Dh,this.conn=null,this.sendBuffer=[],this.serializer
257=new iM,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?(...i)=>s(...i):(...i)=>fetch(...i),!(!((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=`${e}/${Ip.websocket}`,this.httpEndpoint=RS(e),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=ZL.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const r=e.message;throw r.includes("Node.js")?new Error(`${r}
258
259To use Realtime in Node.js, you need to provide a WebSocket implementation:
260
261Option 1: Use Node.js 22+ which has native WebSocket support
262Option 2: Install and provide the "ws" package:
263
264  npm install ws
265
266  import ws from "ws"
267  const client = new RealtimeClient(url, {
268    ...options,
269    transport: ws
270  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(e,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"&&(e?this.conn.close(e,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(e){const r=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const e=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),e}log(e,r,n){this.logger(e,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Mn.connecting:return Rs.Connecting;case Mn.open:return Rs.Open;case Mn.closing:return Rs.Closing;default:return Rs.Closed}}isConnected(){return this.connectionState()===Rs.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,r={config:{}}){const n=`realtime:${e}`,s=this.getChannels().find(i=>i.topic===n);if(s)return s;{const i=new zi(`realtime:${e}`,r,this);return this.channels.push(i),i}}push(e){const{topic:r,event:n,payload:s,ref:i}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${i})`,s),this.isConnected()?o():this.sendBuffer.push(o)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){var e;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,(e=this.conn)===null||e===void 0||e.close(nM,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
270heduleTimeout()},vc.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(e){this.heartbeatCallback=e}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let r=this.channels.find(n=>n.topic===e&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${e}"`),r.unsubscribe())}_remove(e){this.channels=this.channels.filter(r=>r.topic!==e.topic)}_onConnMessage(e){this.decode(e.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply"&&r.ref&&r.ref===this.pendingHeartbeatRef){const c=this._heartbeatSentAt?Date.now()-this._heartbeatSentAt:void 0;try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error",c)}catch(u){this.log("error","error in heartbeat callback",u)}this._heartbeatSentAt=null,this.pendingHeartbeatRef=null}const{topic:n,event:s,payload:i,ref:o}=r,a=o?`(${o})`:"",l=i.status||"";this.log("receive",`${l} ${n} ${s} ${a}`.trim(),i),this.channels.filter(c=>c._isMember(n)).forEach(c=>c._trigger(s,i,o)),this._triggerStateCallbacks("message",r)})}_clearTimer(e){var r;e==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):e==="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=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e),this.conn.readyState===Mn.open&&this._onConnOpen())}_teardownConnection(){if(this.conn){if(this.conn.readyState===Mn.open||this.conn.readyState===Mn.connecting)try{this.conn.close()}catch(e){this.log("error","Error closing connection",e)}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(e=>e.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.accessTokenValue&&(this.channels.forEach(r=>{r.updateJoinPayload({access_token:this.accessTokenValue})}),this.sendBuffer=[],this.channels.forEach(r=>{r._isJoining()&&(r.joinPush.sent=!1,r.joinPush.send())})),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 e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),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(e){var r;this._setConnectionState("disconnected"),this.log("transport","close",e),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
270heduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e);try{this.heartbeatCallback("error")}catch(r){this.log("error","error in heartbeat callback",r)}}_triggerChanError(){this.channels.forEach(e=>e._trigger(pr.error))}_appendParams(e,r){if(Object.keys(r).length===0)return e;const n=e.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${e}${n}${s}`}_workerObjectUrl(e){let r;if(e)r=e;else{const n=new Blob([pM],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(e,r=!1){this._connectionState=e,e==="connecting"?this._wasManualDisconnect=!1:e==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(e=null){let r,n=!1;if(e)r=e,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 i={access_token:r,version:tM};r&&s.updateJoinPayload(i),s.joinedOnce&&s._isJoined()&&s._push(pr.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(r=>{this.log("error",`Error setting auth in ${e}`,r)})}_triggerStateCallbacks(e,r){try{this.stateChangeCallbacks[e].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${e} callback`,s)}})}catch(n){this.log("error",`error triggering ${e} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new TS(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},vc.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var r,n,s,i,o,a,l,c,u,d,f,h;switch(this.transport=(r=e==null?void 0:e.transport)!==null&&r!==void 0?r:null,this.timeout=(n=e==null?void 0:e.timeout)!==null&&n!==void 0?n:jp,this.heartbeatIntervalMs=(s=e==null?void 0:e.heartbeatIntervalMs)!==null&&s!==void 0?s:vc.HEARTBEAT_INTERVAL,this.worker=(i=e==null?void 0:e.worker)!==null&&i!==void 0?i:!1,this.accessToken=(o=e==null?void 0:e.accessToken)!==null&&o!==void 0?o:null,this.heartbeatCallback=(a=e==null?void 0:e.heartbeatCallback)!==null&&a!==void 0?a:Dh,this.vsn=(l=e==null?void 0:e.vsn)!==null&&l!==void 0?l:o_,e!=null&&e.params&&(this.params=e.params),e!=null&&e.logger&&(this.logger=e.logger),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(c=e==null?void 0:e.reconnectAfterMs)!==null&&c!==void 0?c:y=>hM[y-1]||fM,this.vsn){case rM:this.encode=(u=e==null?void 0:e.encode)!==null&&u!==void 0?u:(y,g)=>g(JSON.stringify(y)),this.decode=(d=e==null?void 0:e.decode)!==null&&d!==void 0?d:(y,g)=>g(JSON.parse(y));break;case CS:this.encode=(f=e==null?void 0:e.encode)!==null&&f!==void 0?f:this.serializer.encode.bind(this.serializer),this.decode=(h=e==null?void 0:e.decode)!==null&&h!==void 0?h: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=e==null?void 0:e.workerUrl}}}var pl=class extends Error{constructor(t,e){var r;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((r=e.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function vM(t,e,r){const n=new URL(e,t);if(r)for(const[s,i]of Object.entries(r))i!==void 0&&n.searchParams.set(s,i);return n.toString()}async function mM(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function yM(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:i,headers:o}){const a=vM(t.baseUrl,n,s),l=await mM(t.auth),c=await e(a,{method:r,headers:{...i?{"Content-Type":"application/json"}:{},...l,...o},body:i?JSON.stringify(i):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),f=d&&u?JSON.parse(u):u;if(!c.ok){const h=d?f:void 0,y=h==null?void 0:h.error;throw new pl((y==null?void 0:y.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:h})}return{status:c.status,headers:c.headers,data:f}}}}function mc(t){return t.join("�")}var _M=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:mc(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(t,e){const r={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${mc(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${mc(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${mc(t.namespace)}`}),!0}catch(e){if(e instanceof pl&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(r){if(r instanceof pl&&r.status===409)return;throw r}}};function yi(t){return t.join("�")}var wM=class{constructor(t,e="",r){this.client=t,this.prefix=e,this.accessDelegation=r}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${yi(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${yi(t.namespace)}/tables`,body:e,headers:r})).data.metadata}async updateTable(t,e){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${yi(t.namespace)}
270/tables/${t.name}`,body:e});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${yi(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${yi(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${yi(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(r){if(r instanceof pl&&r.status===404)return!1;throw r}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(r){if(r instanceof pl&&r.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw r}}},bM=class{constructor(t){var n;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const r=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=yM({baseUrl:r,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(n=t.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new _M(this.client,e),this.tableOps=new wM(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}},xd=class extends Error{constructor(t,e="storage",r,n){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=r,this.statusCode=n}};function Ed(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var ya=class extends xd{constructor(t,e,r,n="storage"){super(t,n,e,r),this.name=n==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}},NS=class extends xd{constructor(t,e,r="storage"){super(t,r),this.name=r==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};const xM=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),EM=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Lp=t=>{if(Array.isArray(t))return t.map(r=>Lp(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,i=>i.toUpperCase().replace(/[-_]/g,""));e[s]=Lp(n)}),e},SM=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t);function gl(t){"@babel/helpers - typeof";return gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gl(t)}function kM(t,e){if(gl(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(gl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function CM(t){var e=kM(t,"string");return gl(e)=="symbol"?e:e+""}function TM(t,e,r){return(e=CM(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function Q(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};
270e%2?u_(Object(r),!0).forEach(function(n){TM(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const d_=t=>{var e;return t.msg||t.message||t.error_description||(typeof t.error=="string"?t.error:(e=t.error)===null||e===void 0?void 0:e.message)||JSON.stringify(t)},PM=async(t,e,r,n)=>{if(t&&typeof t=="object"&&"status"in t&&"ok"in t&&typeof t.status=="number"){const s=t,i=s.status||500;if(typeof s.json=="function")s.json().then(o=>{const a=(o==null?void 0:o.statusCode)||(o==null?void 0:o.code)||i+"";e(new ya(d_(o),i,a,n))}).catch(()=>{if(n==="vectors"){const o=i+"";e(new ya(s.statusText||`HTTP ${i} error`,i,o,n))}else{const o=i+"";e(new ya(s.statusText||`HTTP ${i} error`,i,o,n))}});else{const o=i+"";e(new ya(s.statusText||`HTTP ${i} error`,i,o,n))}}else e(new NS(d_(t),t,n))},RM=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||t==="HEAD"||!n?Q(Q({},s),r):(EM(n)?(s.headers=Q({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(n)):s.body=n,e!=null&&e.duplex&&(s.duplex=e.duplex),Q(Q({},s),r))};async function sa(t,e,r,n,s,i,o){return new Promise((a,l)=>{t(r,RM(e,n,s,i)).then(c=>{if(!c.ok)throw c;if(n!=null&&n.noResolveJson)return c;if(o==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>a(c)).catch(c=>PM(c,l,n,o))})}function OS(t="storage"){return{get:async(e,r,n,s)=>sa(e,"GET",r,n,s,void 0,t),post:async(e,r,n,s,i)=>sa(e,"POST",r,s,i,n,t),put:async(e,r,n,s,i)=>sa(e,"PUT",r,s,i,n,t),head:async(e,r,n,s)=>sa(e,"HEAD",r,Q(Q({},n),{},{noResolveJson:!0}),s,void 0,t),remove:async(e,r,n,s,i)=>sa(e,"DELETE",r,s,i,n,t)}}const NM=OS("storage"),{get:vl,post:ur,put:Mp,head:OM,remove:Pv}=NM,$t=OS("vectors");var $o=class{constructor(t,e={},r,n="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=e,this.fetch=xM(r),this.namespace=n}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Q(Q({},this.headers),{},{[t]:e}),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(r){if(e.shouldThrowOnError)throw r;if(Ed(r))return{data:null,error:r};throw r}}},AM=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e}then(t,e){return this.execute().then(t,e)}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Ed(e))return{data:null,error:e};throw e}}};let AS;AS=Symbol.toStringTag;var jM=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[AS]="BlobDownloadBuilder",this.promise=null}asStream(){return new AM(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Ed(e))return{data:null,error:e};throw e}}};const IM={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},h_={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var $M=class extends $o{constructor(t,e={},r,n){super(t,e,n,"storage"),this.bucketId=r}async uploadOrUpdate(t,e,r,n){var s=this;return s.handleOperation(async()=>{let i;const o=Q(Q({},h_),n);let a=Q(Q({},s.headers),t==="POST"&&{"x-upsert":String(o.upsert)});const l=o.metadata;typeof Blob<"u"&&r instanceof Blob?(i=new FormData,i.append("cacheControl",o.cacheControl),l&&i.append("metadata",s.encodeMetadata(l)),i.append("",r)):typeof FormData<"u"&&r instanceof FormData?(i=r,i.has("cacheControl")||i.append("cacheControl",o.cacheControl),l&&!i.has("metadata")&&i.append("metadata",s.encodeMetadata(l))):(i=r,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType,l&&(a["x-metadata"]=s.toBase64(s.encodeMetadata(l))),(typeof ReadableStream<"u"&&i instanceof ReadableStream||i&&typeof i=="object"&&"pipe"in i&&typeof i.pipe=="function")&&!o.duplex&&(o.duplex="half")),n!=null&&n.headers&&(a=Q(Q({},a),n.headers));const c=s._removeEmptyFolders(e),u=s._getFinalPath(c),d=await(t=="PUT"?Mp:ur)(s.fetch,`${s.url}/object/${u}`,i,Q({headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(t,e,r){return this.uploadOrUpdate("POST",t,e,r)}
270async uploadToSignedUrl(t,e,r,n){var s=this;const i=s._removeEmptyFolders(t),o=s._getFinalPath(i),a=new URL(s.url+`/object/upload/sign/${o}`);return a.searchParams.set("token",e),s.handleOperation(async()=>{let l;const c=Q({upsert:h_.upsert},n),u=Q(Q({},s.headers),{"x-upsert":String(c.upsert)});return typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType),{path:i,fullPath:(await Mp(s.fetch,a.toString(),l,{headers:u})).Key}})}async createSignedUploadUrl(t,e){var r=this;return r.handleOperation(async()=>{let n=r._getFinalPath(t);const s=Q({},r.headers);e!=null&&e.upsert&&(s["x-upsert"]="true");const i=await ur(r.fetch,`${r.url}/object/upload/sign/${n}`,{},{headers:s}),o=new URL(r.url+i.url),a=o.searchParams.get("token");if(!a)throw new xd("No token returned by API");return{signedUrl:o.toString(),path:t,token:a}})}async update(t,e,r){return this.uploadOrUpdate("PUT",t,e,r)}async move(t,e,r){var n=this;return n.handleOperation(async()=>await ur(n.fetch,`${n.url}/object/move`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers}))}async copy(t,e,r){var n=this;return n.handleOperation(async()=>({path:(await ur(n.fetch,`${n.url}/object/copy`,{bucketId:n.bucketId,sourceKey:t,destinationKey:e,destinationBucket:r==null?void 0:r.destinationBucket},{headers:n.headers})).Key}))}async createSignedUrl(t,e,r){var n=this;return n.handleOperation(async()=>{let s=n._getFinalPath(t);const i=typeof(r==null?void 0:r.transform)=="object"&&r.transform!==null&&Object.keys(r.transform).length>0;let o=await ur(n.fetch,`${n.url}/object/sign/${s}`,Q({expiresIn:e},i?{transform:r.transform}:{}),{headers:n.headers});const a=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"",l=i&&o.signedURL.includes("/object/sign/")?o.signedURL.replace("/object/sign/","/render/image/sign/"):o.signedURL;return{signedUrl:encodeURI(`${n.url}${l}${a}`)}})}async createSignedUrls(t,e,r){var n=this;return n.handleOperation(async()=>{const s=await ur(n.fetch,`${n.url}/object/sign/${n.bucketId}`,{expiresIn:e,paths:t},{headers:n.headers}),i=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s.map(o=>Q(Q({},o),{},{signedUrl:o.signedURL?encodeURI(`${n.url}${o.signedURL}${i}`):null}))})}download(t,e,r){const n=typeof(e==null?void 0:e.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((e==null?void 0:e.transform)||{}),i=s?`?${s}`:"",o=this._getFinalPath(t),a=()=>vl(this.fetch,`${this.url}/${n}/${o}${i}`,{headers:this.headers,noResolveJson:!0},r);return new jM(a,this.shouldThrowOnError)}async info(t){var e=this;const r=e._getFinalPath(t);return e.handleOperation(async()=>Lp(await vl(e.fetch,`${e.url}/object/info/${r}`,{headers:e.headers})))}async exists(t){var e=this;const r=e._getFinalPath(t);try{return await OM(e.fetch,`${e.url}/object/${r}`,{headers:e.headers}),{data:!0,error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(Ed(s)){var n;const i=s instanceof ya?s.status:s instanceof NS?(n=s.originalError)===null||n===void 0?void 0:n.status:void 0;if(i!==void 0&&[400,404].includes(i))return{data:!1,error:s}}throw s}}getPublicUrl(t,e){const r=this._getFinalPath(t),n=[],s=e!=null&&e.download?`download=${e.download===!0?"":e.download}`:"";s!==""&&n.push(s);const i=typeof(e==null?void 0:e.transform)<"u"?"render/image":"object",o=this.transformOptsToQueryString((e==null?void 0:e.transform)||{});o!==""&&n.push(o);let a=n.join("&");return a!==""&&(a=`?${a}`),{data:{publicUrl:encodeURI(`${this.url}/${i}/public/${r}${a}`)}}}async remove(t){var e=this;return e.handleOperation(async()=>await Pv(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async list(t,e,r){var n=this;return n.handleOperation(async()=>{const s=Q(Q(Q({},IM),e),{},{prefix:t||""});return await ur(n.fetch,`${n.url}/object/list/${n.bucketId}`,s,{headers:n.headers},r)})}async listV2(t,e){var r=this;return r.handleOperation(async()=>{const n=Q({},t);return await ur(r.fetch,`${r.url}/object/list-v2/${r.bucketId}`,n,{headers:r.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const e=[];return t.width&&e.push(`width=${t.width}`),t.height&&e.push(`height=${t.height}`),t.resize&&e.push(`resize=${t.resize}`),t.format&&e.push(`format=${t.format}`),t.quality&&e.push(`quality=${t.quality}`),e.join("&")}};const LM="2.99.2",Al={"X-Client-Info":`storage-js/${LM}`};var MM=class extends $o{constructor(t,e={},r,n){const s=new URL(t);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 i=s.href.replace(/\/$/,""),o=Q(Q({},Al),e);super(i,o,r,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const r=e.listBucketOptionsToQueryString(t);return await vl(e.fetch,`${e.url}/bucket${r}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await vl(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var r=this;return r.handleOperation(async()=>await ur(r.fetch,`${r.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async updateBucket(t,e){var r=this;return r.handleOperation(async()=>await Mp(r.fetch,`${r.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:r.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await ur(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Pv(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},DM=class extends $o{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Q(Q({},Al),e);super(n,s,r,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await ur(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>
270{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),s=n?`${e.url}/bucket?${n}`:`${e.url}/bucket`;return await vl(e.fetch,s,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Pv(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!SM(t))throw new xd("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 bM({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),n=this.shouldThrowOnError;return new Proxy(r,{get(s,i){const o=s[i];return typeof o!="function"?o:async(...a)=>{try{return{data:await o.apply(s,a),error:null}}catch(l){if(n)throw l;return{data:null,error:l}}}}})}},FM=class extends $o{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Q(Q({},Al),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var r=this;return r.handleOperation(async()=>await $t.post(r.fetch,`${r.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var r=this;return r.handleOperation(async()=>await $t.post(r.fetch,`${r.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:r.headers})||{})}},UM=class extends $o{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Q(Q({},Al),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},BM=class extends $o{constructor(t,e={},r){const n=t.replace(/\/$/,""),s=Q(Q({},Al),{},{"Content-Type":"application/json"},e);super(n,s,r,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await $t.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},zM=class extends BM{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new WM(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,r=this;return e().call(r,t)}async getBucket(t){var e=()=>super.getBucket,r=this;return e().call(r,t)}async listBuckets(t={}){var e=()=>super.listBuckets,r=this;return e().call(r,t)}async deleteBucket(t){var e=()=>super.deleteBucket,r=this;return e().call(r,t)}},WM=class extends FM{constructor(t,e,r,n){super(t,e,n),this.vectorBucketName=r}async createIndex(t){var e=()=>super.createIndex,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,r=this;return e().call(r,r.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,r=this;return e().call(r,r.vectorBucketName,t)}index(t){return new HM(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},HM=class extends UM{constructor(t,e,r,n,s){super(t,e,s),this.vectorBucketName=r,this.indexName=n}async putVectors(t){var e=()=>super.putVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async getVectors(t){var e=()=>super.getVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,r=this;return e().call(r,Q(Q({},t),{},{vectorBucketName:r.vectorBucketName,indexName:r.indexName}))}},VM=class extends MM{constructor(t,e={},r,n){super(t,e,r,n)}from(t){return new $M(this.url,this.headers,t,this.fetch)}get vectors(){return new zM(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new DM(this.url+"/iceberg",this.headers,this.fetch)}};const jS="2.99.2",Ci=30*1e3,Dp=3,Fh=Dp*Ci,qM="http://localhost:9999",KM="supabase.auth.token",GM={"X-Client-Info":`gotrue-js/${jS}`},Fp="X-Supabase-Api-Version",IS={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},YM=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,JM=10*60*1e3;
270class ml extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function V(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class QM extends ml{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function XM(t){return V(t)&&t.name==="AuthApiError"}class Ns extends ml{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class xn extends ml{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}}class At extends xn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Uh(t){return V(t)&&t.name==="AuthSessionMissingError"}class _i extends xn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class yc extends xn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class _c extends xn{constructor(e,r=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function ZM(t){return V(t)&&t.name==="AuthImplicitGrantRedirectError"}class f_ extends xn{constructor(e,r=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class eD extends xn{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 Up extends xn{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function Bh(t){return V(t)&&t.name==="AuthRetryableFetchError"}class p_ extends xn{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Bp extends xn{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const ju="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),g_=` 	
271\r=`.split(""),tD=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<g_.length;
271e+=1)t[g_[e].charCodeAt(0)]=-2;for(let e=0;e<ju.length;e+=1)t[ju[e].charCodeAt(0)]=e;return t})();function v_(t,e,r){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(ju[n]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const n=e.queue>>e.queuedBits-6&63;r(ju[n]),e.queuedBits-=6}}function $S(t,e,r){const n=tD[t];if(n>-1)for(e.queue=e.queue<<6|n,e.queuedBits+=6;e.queuedBits>=8;)r(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function m_(t){const e=[],r=o=>{e.push(String.fromCodePoint(o))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},i=o=>{sD(o,n,r)};for(let o=0;o<t.length;o+=1)$S(t.charCodeAt(o),s,i);return e.join("")}function rD(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function nD(t,e){for(let r=0;r<t.length;r+=1){let n=t.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(t.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}rD(n,e)}}function sD(t,e,r){if(e.utf8seq===0){if(t<=127){r(t);return}for(let n=1;n<6;n+=1)if(!(t>>7-n&1)){e.utf8seq=n;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&r(e.codepoint)}}function eo(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)$S(t.charCodeAt(s),r,n);return new Uint8Array(e)}function iD(t){const e=[];return nD(t,r=>e.push(r)),new Uint8Array(e)}function Is(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>v_(s,r,n)),v_(null,r,n),e.join("")}function oD(t){return Math.round(Date.now()/1e3)+t}function aD(){return Symbol("auth-callback")}const et=()=>typeof window<"u"&&typeof document<"u",Es={tested:!1,writable:!1},LS=()=>{if(!et())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Es.tested)return Es.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Es.tested=!0,Es.writable=!0}catch{Es.tested=!0,Es.writable=!1}return Es.writable};function lD(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,i)=>{e[i]=s})}catch{}return r.searchParams.forEach((n,s)=>{e[s]=n}),e}const MS=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),cD=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Ti=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Ss=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Ze=async(t,e)=>{await t.removeItem(e)};class Sd{constructor(){this.promise=new Sd.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}Sd.promiseConstructor=Promise;function wc(t){const e=t.split(".");if(e.length!==3)throw new Bp("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!YM.test(e[n]))throw new Bp("JWT not in base64url format");return{header:JSON.parse(m_(e[0])),payload:JSON.parse(m_(e[1])),signature:eo(e[2]),raw:{header:e[0],payload:e[1]}}}async function uD(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function dD(t,e){return new Promise((n,s)=>{(async()=>{for(let i=0;i<1/0;i++)try{const o=await t(i);if(!e(i,null,o)){n(o);return}}catch(o){if(!e(i,o)){s(o);return}}})()})}function hD(t){return("0"+t.toString(16)).substr(-2)}function fD(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let i=0;i<56;i++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(e),Array.from(e,hD).join("")}async function pD(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(i=>String.fromCharCode(i)).join("")}async function gD(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code 
271challenge method will default to use plain instead of sha256."),t;const r=await pD(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function wi(t,e,r=!1){const n=fD();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Ti(t,`${e}-code-verifier`,s);const i=await gD(n);return[i,n===i?"plain":"s256"]}const vD=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function mD(t){const e=t.headers.get(Fp);if(!e||!e.match(vD))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function yD(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function _D(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const wD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function bi(t){if(!wD.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function zh(){const t={};return new Proxy(t,{get:(e,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function bD(t,e){return new Proxy(t,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const i=n.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)"||i==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!e.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."),e.value=!0),Reflect.get(r,n,s)}})}function y_(t){return JSON.parse(JSON.stringify(t))}const Ps=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),xD=[502,503,504];async function __(t){var e;if(!cD(t))throw new Up(Ps(t),0);if(xD.includes(t.status))throw new Up(Ps(t),t.status);let r;try{r=await t.json()}catch(i){throw new Ns(Ps(i),i)}let n;const s=mD(t);if(s&&s.getTime()>=IS["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 p_(Ps(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new At}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((i,o)=>i&&typeof o=="string",!0))throw new p_(Ps(r),t.status,r.weak_password.reasons);throw new QM(Ps(r),t.status||500,n)}const ED=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function K(t,e,r,n){var s;const i=Object.assign({},n==null?void 0:n.headers);i[Fp]||(i[Fp]=IS["2024-01-01"].name),n!=null&&n.jwt&&(i.Authorization=`Bearer ${n.jwt}`);const o=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(o.redirect_to=n.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await SD(t,e,r+a,{headers:i,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function SD(t,e,r,n,s,i){const o=ED(e,n,s,i);let a;try{a=await t(r,Object.assign({},o))}catch(l){throw console.error(l),new Up(Ps(l),0)}if(a.ok||await __(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await __(l)}}function ar(t){var e;let r=null;TD(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=oD(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function w_(t){const e=ar(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Un(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function kD(t){return{data:t,error:null}}function CD(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i}=t,o=jo(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:i},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function b_(t){return t}function TD(t){return t.access_token&&t.refresh_token&&t.expires_in}const Wh=["global","local","others"];class PD{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=MS(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)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)}}async signOut(e,r=Wh[0]){if(Wh.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Wh.join(", ")}`);try{return await K(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(V(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await K(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Un})}catch(n){if(V(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=jo(e,["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 K(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:CD,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(V(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await K(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Un})}catch(r){if(V(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await K(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:b_});if(u.error)throw u.error;const d=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
2710&&(h.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);c[`${w}Page`]=g}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(V(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){bi(e);try{return await K(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Un})}catch(r){if(V(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){bi(e);try{return await K(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:Un})}catch(n){if(V(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){bi(e);try{return await K(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:Un})}catch(n){if(V(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){bi(e.userId);try{const{data:r,error:n}=await K(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(V(r))return{data:null,error:r};throw r}}async _deleteFactor(e){bi(e.userId),bi(e.id);try{return{data:await K(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(V(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,s,i,o,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await K(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=e==null?void 0:e.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(i=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:""},xform:b_});if(u.error)throw u.error;const d=await u.json(),f=(o=u.headers.get("x-total-count"))!==null&&o!==void 0?o:0,h=(l=(a=u.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(y=>{const g=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(y.split(";")[1].split("=")[1]);c[`${w}Page`]=g}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(V(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(e){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(V(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await K(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(V(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await K(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(V(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await K(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(V(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(V(r))return{data:null,error:r};throw r}}async _listCustomProviders(e){try{const r={};return e!=null&&e.type&&(r.type=e.type),await K(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:r,xform:n=>{var s;return{data:{providers:(s=n==null?void 0:n.providers)!==null&&s!==void 0?s:[]},error:null}}})}catch(r){if(V(r))return{data:{providers:[]},error:r};throw r}}async _createCustomProvider(e){try{return await K(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(V(r))return{data:null,error:r};throw r}}async _getCustomProvider(e){try{return await K(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(V(r))return{data:null,error:r};throw r}}async _updateCustomProvider(e,r){try{return await K(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(V(n))return{data:null,error:n};throw n}}async _deleteCustomProvider(e){try{return await K(this.fetch,"DELET
271E",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(V(r))return{data:null,error:r};throw r}}}function x_(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const Qr={debug:!!(globalThis&&LS()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class DS extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class RD extends DS{}async function ND(t,e,r){Qr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;e>0&&setTimeout(()=>{n.abort(),Qr.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve();try{return await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){Qr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,s.name);try{return await r()}finally{Qr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,s.name)}}else{if(e===0)throw Qr.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new RD(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Qr.debug)try{const i=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(i,null,"  "))}catch(i){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",i)}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){if((s==null?void 0:s.name)==="AbortError"&&e>0)return Qr.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire timeout, recovering by stealing lock",t),console.warn(`@supabase/gotrue-js: Lock "${t}" was not released within ${e}ms. This may indicate an orphaned lock from a component unmount (e.g., React Strict Mode). Forcefully acquiring the lock to recover.`),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,{mode:"exclusive",steal:!0},async i=>{if(i){Qr.debug&&console.log("@supabase/gotrue-js: navigatorLock: recovered (stolen)",t,i.name);try{return await r()}finally{Qr.debug&&console.log("@supabase/gotrue-js: navigatorLock: released (stolen)",t,i.name)}}else return console.warn("@supabase/gotrue-js: Navigator LockManager returned null lock even with steal: true"),await r()}));throw s}}function OD(){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 FS(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function AD(t){return parseInt(t,16)}function jD(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function ID(t){var e;const{chainId:r,domain:n,expirationTime:s,issuedAt:i=new Date,nonce:o,notBefore:a,requestId:l,resources:c,scheme:u,uri:d,version:f}=t;{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(o&&o.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${o}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`
272`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const h=FS(t.address),y=u?`${u}://${n}`:n,g=t.statement?`${t.statement}
273`:"",w=`${y} wants you to sign in with your Ethereum account:
274${h}
275
276${g}`;let m=`URI: ${d}
277Version: ${f}
278Chain ID: ${r}${o?`
279Nonce: ${o}`:""}
280Issued At: ${i.toISOString()}`;if(s&&(m+=`
281Expiration Time: ${s.toISOString()}`),a&&(m+=`
282Not Before: ${a.toISOString()}`),l&&(m+=`
283Request ID: ${l}`),c){let v=`
284Resources:`;for(const _ of c){if(!_||typeof _!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${_}`);v+=`
285- ${_}`}m+=v}return`${w}
286${m}`}
286class Be extends Error{constructor({message:e,code:r,cause:n,name:s}){var i;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(i=s??(n instanceof Error?n.name:void 0))!==null&&i!==void 0?i:"Unknown Error",this.code=r}}class Iu extends Be{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function $D({error:t,options:e}){var r,n,s;const{publicKey:i}=e;if(!i)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Be({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=i.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Be({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((n=i.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Be({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((s=i.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Be({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Be({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Be({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return i.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Be({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Be({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const o=window.location.hostname;if(US(o)){if(i.rp.id!==o)return new Be({message:`The RP ID "${i.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Be({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(i.user.id.byteLength<1||i.user.id.byteLength>64)return new Be({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Be({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Be({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function LD({error:t,options:e}){const{publicKey:r}=e;if(!r)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Be({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Be({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(US(n)){if(r.rpId!==n)return new Be({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Be({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Be({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Be({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class MD{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const DD=new MD;function FD(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:r,excludeCredentials:n}=t,s=jo(t,["challenge","user","excludeCredentials"]),i=eo(e).buffer,o=Object.assign(Object.assign({},r),{id:eo(r.id).buffer}),a=Object.assign(Object.assign({}
286,s),{challenge:i,user:o});if(n&&n.length>0){a.excludeCredentials=new Array(n.length);for(let l=0;l<n.length;l++){const c=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:eo(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function UD(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:r}=t,n=jo(t,["challenge","allowCredentials"]),s=eo(e).buffer,i=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){i.allowCredentials=new Array(r.length);for(let o=0;o<r.length;o++){const a=r[o];i.allowCredentials[o]=Object.assign(Object.assign({},a),{id:eo(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return i}function BD(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t;return{id:t.id,rawId:t.id,response:{attestationObject:Is(new Uint8Array(t.response.attestationObject)),clientDataJSON:Is(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function zD(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const r=t,n=t.getClientExtensionResults(),s=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Is(new Uint8Array(s.authenticatorData)),clientDataJSON:Is(new Uint8Array(s.clientDataJSON)),signature:Is(new Uint8Array(s.signature)),userHandle:s.userHandle?Is(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function US(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function E_(){var t,e;return!!(et()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function WD(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Iu("Browser returned unexpected credential type",e)}:{data:null,error:new Iu("Empty credential response",e)}}catch(e){return{data:null,error:$D({error:e,options:t})}}}async function HD(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Iu("Browser returned unexpected credential type",e)}:{data:null,error:new Iu("Empty credential response",e)}}catch(e){return{data:null,error:LD({error:e,options:t})}}}const VD={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},qD={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function $u(...t){const e=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of t)if(s)for(const i in s){const o=s[i];if(o!==void 0)if(Array.isArray(o))n[i]=o;else if(r(o))n[i]=o;else if(e(o)){const a=n[i];e(a)?n[i]=$u(a,o):n[i]=$u(o)}else n[i]=o}return n}function KD(t,e){return $u(VD,t,e||{})}function GD(t,e){return $u(qD,t,e||{})}class YD{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:r,friendlyName:n,signal:s},i){var o;try{const{data:a,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!a)return{data:null,error:l};const c=s??DD.createNewAbortSignal();if(a.webauthn.type==="create"){const{user:u}=a.webauthn.credential_options.publicKey;if(!u.name){const d=n;if(d)u.name=`${u.id}:${d}`;else{const h=(await this.client.getUser()).data.user,y=((o=h==null?void 0:h.user_metadata)===null||o===void 0?void 0:o.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";u.name=`${u.id}:${y}`}}u.displayName||(u.displayName=u.name)}
286switch(a.webauthn.type){case"create":{const u=KD(a.webauthn.credential_options.publicKey,i==null?void 0:i.create),{data:d,error:f}=await WD({publicKey:u,signal:c});return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const u=GD(a.webauthn.credential_options.publicKey,i==null?void 0:i.request),{data:d,error:f}=await HD(Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:e,challengeId:a.id,webauthn:{type:a.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(a){return V(a)?{data:null,error:a}:{data:null,error:new Ns("Unexpected error in challenge",a)}}}async _verify({challengeId:e,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:e,webauthn:n})}async _authenticate({factorId:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new ml("rpId is required for WebAuthn authentication")};try{if(!E_())return{data:null,error:new Ns("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:i});if(!o)return{data:null,error:a};const{webauthn:l}=o;return this._verify({factorId:e,challengeId:o.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(o){return V(o)?{data:null,error:o}:{data:null,error:new Ns("Unexpected error in authenticate",o)}}}async _register({friendlyName:e,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},i){if(!r)return{data:null,error:new ml("rpId is required for WebAuthn registration")};try{if(!E_())return{data:null,error:new Ns("Browser does not support WebAuthn",null)};const{data:o,error:a}=await this._enroll({friendlyName:e});if(!o)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===e&&f.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:a};const{data:l,error:c}=await this._challenge({factorId:o.id,friendlyName:o.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:i});return l?this._verify({factorId:o.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(o){return V(o)?{data:null,error:o}:{data:null,error:new Ns("Unexpected error in register",o)}}}}OD();const JD={url:qM,storageKey:KM,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:GM,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1};async function S_(t,e,r){return await r()}const xi={};class yl{get jwks(){var e,r;return(r=(e=xi[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){xi[this.storageKey]=Object.assign(Object.assign({},xi[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=xi[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){xi[this.storageKey]=Object.assign(Object.assign({},xi[this.storageKey]),{cachedAt:e})}constructor(e){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 i=Object.assign(Object.assign({},JD),e);if(this.storageKey=i.storageKey,this.instanceID=(r=yl.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,yl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.instanceID>0&&et()){const o=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(o),this.logDebugMessages&&console.trace(o)}if(this.persistSession=i.persistSession,this.autoRefreshToken=i.autoRefreshToken,this.admin=new PD({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=MS(i.fetch),this.lock=i.lock||S_,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,this.throwOnError=i.throwOnError,this.lockAcquireTimeout=i.lockAcquireTimeout,i.lock?this.lock=i.lock:this.persistSession&&et()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=ND:this.lock=S_,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 YD(this)}
286,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?(i.storage?this.storage=i.storage:LS()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=x_(this.memoryStorage)),i.userStorage&&(this.userStorage=i.userStorage)):(this.memoryStorage={},this.storage=x_(this.memoryStorage)),et()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o);try{await this._notifyAllSubscribers(o.data.event,o.data.session,!1)}catch(a){this._debug("#broadcastChannel","error",a)}})}i.skipAutoInitialize||this.initialize().catch(o=>{this._debug("#initialize()","error",o)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${jS}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r={},n="none";if(et()&&(r=lD(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),et()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:i}=await this._getSessionFromURL(r,n);if(i){if(this._debug("#_initialize()","error detecting session from URL",i),ZM(i)){const l=(e=i.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:i}}return{error:i}}const{session:o,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",o,"redirect type",a),await this._saveSession(o),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",o):await this._notifyAllSubscribers("SIGNED_IN",o)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return V(r)?this._returnResult({error:r}):this._returnResult({error:new Ns("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const i=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=e==null?void 0:e.options)===null||s===void 0?void 0:s.captchaToken}},xform:ar}),{data:o,error:a}=i;if(a||!o)return this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(V(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signUp(e){var r,n,s;try{let i;if("email"in e){const{email:u,password:d,options:f}=e;let h=null,y=null;this.flowType==="pkce"&&([h,y]=await wi(this.storage,this.storageKey)),i=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:y},xform:ar})}else if("phone"in e){const{phone:u,password:d,options:f}=e;i=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:ar})}else throw new yc("You must provide either an email or phone number and a password");const{data:o,error:a}=i;if(a||!o)return await Ze(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:a});const l=o.session,c=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(await Ze(this.storage,`${this.storageKey}-code-verifier`),V(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithPassword(e){try{let r;if("email"in e){const{email:i,password:o,options:a}=e;r=await K(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:w_})}else if("phone"in e){const{phone:i,password:o,options:a}=e;r=await K(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:i,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:w_})}else throw new yc("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 i=new _i;return this._returnResult({data:{user:null,session:null},error:i})}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(V(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,s,i;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(i=e.options)===null||i===void 0?void 0:i.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;switch(r){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(e){var r,n,s,i,o,a,l,c,u,d,f;let h,y;if("message"in e)h=e.message,y=e.signature;else{const{chain:g,wallet:w,statement:m,options:v}=e;let _;if(et())if(typeof w=="object")_=w;else{const N=window;if("ethereum"in N&&typeof N.ethereum=="object"&&"request"in N.ethereum&&typeof N.ethereum.request=="function")_=N.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 w!="object"||!(v!=null&&v.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=w}const x=new URL((r=v==null?void 0:v.url)!==null&&r!==void 0?r:window.location.href),E=await _.request({method:"eth_requestAccounts"}).then(N=>N).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!E||E.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const k=FS(E[0]);let S=(n=v==null?void 0:v.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!S){const N=await _.request({method:"eth_chainId"});S=AD(N)}const C={domain:x.host,address:k,statement:m,uri:x.href,version:"1",chainId:S,nonce:(s=v==null?void 0:v.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(o=(i=v==null?void 0:v.signInWithEthereum)===null||i===void 0?void 0:i.issuedAt)!==null&&o!==void 0?o:new Date,expirationTime:(a=v==null?void 0:v.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=v==null?void 0:v.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=v==null?void 0:v.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=v==null?void 0:v.signInWithEthereum)===null||u===void 0?void 0:u.resources};h=ID(C),y=await _.request({method:"personal_sign",params:[jD(h),k]})}try{const{data:g,error:w}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:y},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:ar});if(w)throw w;if(!g||!g.session||!g.user){const m=new _i;return this._returnResult({data:{user:null,session:null},error:m})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:Object.assign({},g),error:w})}catch(g){if(V(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async signInWithSolana(e){var r,n,s,i,o,a,l,c,u,d,f,h;let y,g;if("message"in e)y=e.message,g=e.signature;else{const{chain:w,wallet:m,statement:v,options:_}=e;let x;if(et())if(typeof m=="object")x=m;
286else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))x=k.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 m!="object"||!(_!=null&&_.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");x=m}const E=new URL((r=_==null?void 0:_.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in x&&x.signIn){const k=await x.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},_==null?void 0:_.signInWithSolana),{version:"1",domain:E.host,uri:E.href}),v?{statement:v}:null));let S;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")S=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)S=k;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in S&&"signature"in S&&(typeof S.signedMessage=="string"||S.signedMessage instanceof Uint8Array)&&S.signature instanceof Uint8Array)y=typeof S.signedMessage=="string"?S.signedMessage:new TextDecoder().decode(S.signedMessage),g=S.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in x)||typeof x.signMessage!="function"||!("publicKey"in x)||typeof x!="object"||!x.publicKey||!("toBase58"in x.publicKey)||typeof x.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${E.host} wants you to sign in with your Solana account:`,x.publicKey.toBase58(),...v?["",v,""]:[""],"Version: 1",`URI: ${E.href}`,`Issued At: ${(s=(n=_==null?void 0:_.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((i=_==null?void 0:_.signInWithSolana)===null||i===void 0)&&i.notBefore?[`Not Before: ${_.signInWithSolana.notBefore}`]:[],...!((o=_==null?void 0:_.signInWithSolana)===null||o===void 0)&&o.expirationTime?[`Expiration Time: ${_.signInWithSolana.expirationTime}`]:[],...!((a=_==null?void 0:_.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${_.signInWithSolana.chainId}`]:[],...!((l=_==null?void 0:_.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${_.signInWithSolana.nonce}`]:[],...!((c=_==null?void 0:_.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${_.signInWithSolana.requestId}`]:[],...!((d=(u=_==null?void 0:_.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",..._.signInWithSolana.resources.map(S=>`- ${S}`)]:[]].join(`
287`);const k=await x.signMessage(new TextEncoder().encode(y),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");g=k}}try{const{data:w,error:m}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:Is(g)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:ar});if(m)throw m;if(!w||!w.session||!w.user){const v=new _i;return this._returnResult({data:{user:null,session:null},error:v})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:m})}catch(w){if(V(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(e){const r=await Ss(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{if(!n&&this.flowType==="pkce")throw new eD;const{data:i,error:o}=await K(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:ar});if(await Ze(this.storage,`${this.storageKey}-code-verifier`),o)throw o;if(!i||!i.session||!i.user){const a=new _i;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign(Object.assign({},i),{redirectType:s??null}),error:o})}catch(i){if(await Ze(this.storage,`${this.storageKey}-code-verifier`),V(i))return this._returnResult({data:{user:null,session:null,redirectType:null},error:i});throw i}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:i,nonce:o}=e,a=await K(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:i,nonce:o,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:ar}),{data:l,error:c}=a;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new _i;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(r){if(V(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,i,o;try{if("email"in e){const{email:a,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await wi(this.storage,this.storageKey));const{error:d}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new yc("You must provide either an email or phone number.")}catch(a){if(await Ze(this.storage,`${this.storageKey}-code-verifier`),V(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var r,n;try{let s,i;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,i=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:o,error:a}=await K(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:i}}),redirectTo:s,xform:ar});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,c=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(V(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,i,o;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await wi(this.storage,this.storageKey));const c=await K(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(n=(r=e.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=e==null?void 0:e.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:kD});return!((i=c.data)===null||i===void 0)&&i.url&&et()&&!(!((o=e.options)===null||o===void 0)&&o.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(await Ze(this.storage,`${this.storageKey}-code-verifier`),V(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new At;const{error:s}=await K(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(e){if(V(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const r=`${this.url}/resend`;if("email"in e){const{email:n,type:s,options:i}=e,{error:o}=await K(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},redirectTo:i==null?void 0:i.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:o})}else if("phone"in e){const{phone:n,type:s,options:i}=e,{data:o,error:a}=await K(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a})}throw new yc("You must provide either an email or phone number and a type")}catch(r){if(V(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(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Ss(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?e=r:(this._debug("#getSession()","session from storage is not val
287id"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<Fh:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const o=await Ss(this.userStorage,this.storageKey+"-user");o!=null&&o.user?e.user=o.user:e.user=zh()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const o={value:this.suppressGetSessionWarning};e.user=bD(e.user,o),o.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{session:null},error:i}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;const r=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser());return r.data.user&&(this.suppressGetSessionWarning=!0),r}async _getUser(e){try{return e?await K(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Un}):await this._useSession(async r=>{var n,s,i;const{data:o,error:a}=r;if(a)throw a;return!(!((n=o.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new At}:await K(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(i=(s=o.session)===null||s===void 0?void 0:s.access_token)!==null&&i!==void 0?i:void 0,xform:Un})})}catch(r){if(V(r))return Uh(r)&&(await this._removeSession(),await Ze(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(e,r={}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:i}=n;if(i)throw i;if(!s.session)throw new At;const o=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await wi(this.storage,this.storageKey));const{data:c,error:u}=await K(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Un});if(u)throw u;return o.user=c.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),this._returnResult({data:{user:o.user},error:null})})}catch(n){if(await Ze(this.storage,`${this.storageKey}-code-verifier`),V(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new At;const r=Date.now()/1e3;let n=r,s=!0,i=null;const{payload:o}=wc(e.access_token);if(o.exp&&(n=o.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!a)return{data:{user:null,session:null},error:null};i=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});i={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:n-r,expires_at:n},await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)}return this._returnResult({data:{user:i.user,session:i},error:null})}catch(r){if(V(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:o,error:a}=r;if(a)throw a;e=(n=o.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new At;const{data:s,error:i}=await this._callRefreshToken(e.refresh_token);return i?this._returnResult({data:{user:null,session:null},error:i}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(V(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){try{if(!et())throw new _c("No browser detected.");
287if(e.error||e.error_description||e.error_code)throw new _c(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new f_("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new _c("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new f_("No code detected.");const{data:v,error:_}=await this._exchangeCodeForSession(e.code);if(_)throw _;const x=new URL(window.location.href);return x.searchParams.delete("code"),window.history.replaceState(window.history.state,"",x.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:i,refresh_token:o,expires_in:a,expires_at:l,token_type:c}=e;if(!i||!a||!o||!c)throw new _c("No session defined in URL");const u=Math.round(Date.now()/1e3),d=parseInt(a);let f=u+d;l&&(f=parseInt(l));const h=f-u;h*1e3<=Ci&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const y=f-d;u-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,f,u):u-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,f,u);const{data:g,error:w}=await this._getUser(i);if(w)throw w;const m={provider_token:n,provider_refresh_token:s,access_token:i,expires_in:d,expires_at:f,refresh_token:o,token_type:c,user:g.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:m,redirectType:e.type},error:null})}catch(n){if(V(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Ss(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i&&!Uh(i))return this._returnResult({error:i});const o=(n=s.session)===null||n===void 0?void 0:n.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(XM(a)&&(a.status===404||a.status===401||a.status===403)||Uh(a)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await Ze(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=aD(),n={id:r,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,s;try{const{data:{session:i},error:o}=r;if(o)throw o;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",i)),this._debug("INITIAL_SESSION","callback id",e,"session",i)}catch(i){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",i),console.error(i)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await wi(this.storage,this.storageKey,!0));try{return await K(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(i){if(await Ze(this.storage,`${this.storageKey}-code-verifier`),V(i))return this._returnResult({data:null,error:i});throw i}}async getUserIdentities(){var e;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(e=r.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var r;try{const{data:n,error:s}=await this._useSession(async i=>{var o,a,l,c,u;const{data:d,error:f}=i;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await K(this.fetch,"GET",h,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return et()&&!(!((r=e.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:e.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(V(n))return this._returnResult({data:{provider:e.provider,url:null},error:n});throw n}}async linkIdentityIdToken(e){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:i}}=r;if(s)throw s;const{options:o,provider:a,token:l,access_token:c,nonce:u}=e,d=await K(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=i==null?void 0:i.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:ar}),{data:f,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new _i}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(await Ze(this.storage,`${this.storageKey}-code-verifier`),V(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)throw o;
287return await K(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(n=i.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(e){const r=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await dD(async s=>(s>0&&await uD(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await K(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:ar})),(s,i)=>{const o=200*Math.pow(2,s);return i&&Bh(i)&&Date.now()+o-n<Ci})}catch(n){if(this._debug(r,"error",n),V(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",r,"url",n),et()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:e,url:n},error:null}}async _recoverAndRefresh(){var e,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Ss(this.storage,this.storageKey);if(s&&this.userStorage){let o=await Ss(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!o&&(o={user:s.user},await Ti(this.userStorage,this.storageKey+"-user",o)),s.user=(e=o==null?void 0:o.user)!==null&&e!==void 0?e:zh()}else if(s&&!s.user&&!s.user){const o=await Ss(this.storage,this.storageKey+"-user");o&&(o!=null&&o.user)?(s.user=o.user,await Ze(this.storage,this.storageKey+"-user"),await Ti(this.storage,this.storageKey,s)):s.user=zh()}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 i=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<Fh;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${Fh}s`),i){if(this.autoRefreshToken&&s.refresh_token){const{error:o}=await this._callRefreshToken(s.refresh_token);o&&(console.error(o),Bh(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:o,error:a}=await this._getUser(s.access_token);!a&&(o!=null&&o.user)?(s.user=o.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(o){console.error("Error getting user data:",o),this._debug(n,"error getting user data, skipping SIGNED_IN notification",o)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new At;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Sd;const{data:i,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!i.session)throw new At;await this._saveSession(i.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",i.session);const a={data:i.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(i){if(this._debug(s,"error",i),V(i)){const o={data:null,error:i};return Bh(i)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(o),o}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(i),i}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const i=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}catch(l){i.push(l)}});if(await Promise.all(o),i.length>0){for(let a=0;a<i.length;a+=1)console.error(i[a]);throw i[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await Ze(this.storage,`${this.storageKey}-code-verifier`);const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Ti(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const i=y_(s);await Ti(this.storage,this.storageKey,i)}else{const s=y_(r);await Ti(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),this.suppressGetSessionWarning=!1,await Ze(this.storage,this.storageKey),await Ze(this.storage,this.storageKey+"-code-verifier"),await Ze(this.storage,this.storageKey+"-user"),this.userStorage&&await Ze(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&et()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
287catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Ci);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);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 e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);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 e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-e)/Ci);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Ci}ms, refresh threshold is ${Dp} ticks`),s<=Dp&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e.isAcquireTimeout||e instanceof DS)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!et()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(r,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[i,o]=await wi(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(i)}`,code_challenge_method:`${encodeURIComponent(o)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const i=new URLSearchParams(n.queryParams);s.push(i.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;return i?this._returnResult({data:null,error:i}):await K(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(e){try{return await this._useSession(async r=>{var n,s;const{data:i,error:o}=r;if(o)return this._returnResult({data:null,error:o});const a=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:c}=await K(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=i==null?void 0:i.session)===null||n===void 0?void 0:n.access_token});return c?this._returnResult({data:null,error:c}):(e.factorType==="totp"&&l.type==="totp"&&(!((s=l==null?void 0:l.totp)===null||s===void 0)&&s.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?BD(e.webauthn.credential_response):zD(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await K(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return l?this._returnResult({data:null,error:l}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+a.expires_in},a)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",a),this._returnResult({data:a,error:l}))})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(this.lockAcquireTimeout,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:i}=r;if(i)return this._returnResult({data:null,error:i});const o=await K(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(o.error)return o;const{data:a}=o;if(a.type!=="webauthn")return{data:a,error:null};switch(a.webauthn.type){case"create":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:FD(a.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},a),{webauthn:Object.assign(Object.assign({},a.webauthn),{credential_options:Object.assign(Object.assign({},a.webauthn.credential_options),{publicKey:UD(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(e){const{data:r,error:n}=await this._challenge({factorId:e.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:e.factorId,challengeId:r.id,code:e.code})}async _listFactors(){var e;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const i of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])s.all.push(i),i.status==="verified"&&s[i.factor_type].push(i);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(e){var r,n,s,i;if(e)try{const{payload:h}=wc(e);let y=null;h.aal&&(y=h.aal);let g=y;const{data:{user:w},error:m}=await this.getUser(e);if(m)return this._returnResult({data:null,error:m});((n=(r=w==null?void 0:w.factors)===null||r===void 0?void 0:r.filter(x=>x.status==="verified"))!==null&&n!==void 0?n:[]).length>0&&(g="aal2");const _=h.amr||[];return{data:{currentLevel:y,nextLevel:g,currentAuthenticationMethods:_},error:null}}catch(h){if(V(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:o},error:a}
287=await this.getSession();if(a)return this._returnResult({data:null,error:a});if(!o)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=wc(o.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((i=(s=o.user.factors)===null||s===void 0?void 0:s.filter(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(u="aal2");const f=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await K(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new At})})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new At});const o=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&et()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(e,r){try{return await this._useSession(async n=>{const{data:{session:s},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new At});const o=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return o.data&&o.data.redirect_url&&et()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(o.data.redirect_url),o})}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;return n?this._returnResult({data:null,error:n}):r?await K(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 At})})}catch(e){if(V(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await K(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new At})})}catch(r){if(V(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(e,r={keys:[]}){let n=r.keys.find(a=>a.kid===e);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===e),n&&this.jwks_cached_at+JM>s)return n;const{data:i,error:o}=await K(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(o)throw o;return!i.keys||i.keys.length===0||(this.jwks=i,this.jwks_cached_at=s,n=i.keys.find(a=>a.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:h,error:y}
287=await this.getSession();if(y||!h.session)return this._returnResult({data:null,error:y});n=h.session.access_token}const{header:s,payload:i,signature:o,raw:{header:a,payload:l}}=wc(n);r!=null&&r.allowExpired||yD(i.exp);const c=!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(!c){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:i,header:s,signature:o},error:null}}const u=_D(s.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,o,iD(`${a}.${l}`)))throw new Bp("Invalid JWT signature");return{data:{claims:i,header:s,signature:o},error:null}}catch(n){if(V(n))return this._returnResult({data:null,error:n});throw n}}}yl.nextInstanceID={};const QD=yl,XD="2.99.2";let _a="";typeof Deno<"u"?_a="deno":typeof document<"u"?_a="web":typeof navigator<"u"&&navigator.product==="ReactNative"?_a="react-native":_a="node";const ZD={"X-Client-Info":`supabase-js-${_a}/${XD}`},eF={headers:ZD},tF={schema:"public"},rF={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},nF={};function _l(t){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_l(t)}function sF(t,e){if(_l(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(_l(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function iF(t){var e=sF(t,"string");return _l(e)=="symbol"?e:e+""}function oF(t,e,r){return(e=iF(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function k_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,n)}return r}function $e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?k_(Object(r),!0).forEach(function(n){oF(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k_(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}const aF=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),lF=()=>Headers,cF=(t,e,r)=>{const n=aF(r),s=lF();return async(i,o)=>{var a;const l=(a=await e())!==null&&a!==void 0?a:t;let c=new s(o==null?void 0:o.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(i,$e($e({},o),{},{headers:c}))}};function uF(t){return t.endsWith("/")?t:t+"/"}function dF(t,e){var r,n;const{db:s,auth:i,realtime:o,global:a}=t,{db:l,auth:c,realtime:u,global:d}=e,f={db:$e($e({},l),s),auth:$e($e({},c),i),realtime:$e($e({},u),o),storage:{},global:$e($e($e({},d),a),{},{headers:$e($e({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return t.accessToken?f.accessToken=t.accessToken:delete f.accessToken,f}function hF(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(uF(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var fF=class extends QD{constructor(t){super(t)}},pF=class{constructor(t,e,r){var n,s;this.supabaseUrl=t,this.supabaseKey=e;const i=hF(t);if(!e)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",i),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",i),this.storageUrl=new URL("storage/v1",i),this.functionsUrl=new URL("functions/v1",i);const o=`sb-${i.hostname.split(".")[0]}-auth-token`,a={db:tF,realtime:nF,auth:$e($e({},rF),{},{storageKey:o}),global:eF},l=dF(r??{},a);if(this.storageKey=(n=l.auth.storageKey)!==null&&n!==void 0?n:"",this.headers=(s=l.global.headers)!==null&&s!==void 0?s:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=cF(e,this._getAccessToken.bind(this),l.global.fetch),this.realtime=this._initRealtimeClient($e({headers:this.headers,accessToken:this._getAccessToken.bind(this)},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new XL(new URL("rest/v1",i).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new VM(this.storageUrl.href,this.headers,this.fetch,r==null?void 0:r.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new HL(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},r={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,r)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t=this,e,r;if(t.accessToken)return await t.accessToken();const{data:n}=await t.auth.getSession();return(e=(r=n.session)===null||r===void 0?void 0:r.access_token)!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,storageKey:i,flowType:o,lock:a,debug:l,throwOnError:c},u,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new fF({url:this.authUrl.href,headers:$e($e({},f),u),storageKey:i,autoRefreshToken:t,persistSession:e,detectSessionInUrl:r,storage:n,userStorage:s,flowType:o,lock:a,debug:l,throwOnError:c,fetch:d,hasCustomAuthorizationHeader:Object.keys(this.headers).some(h=>h.toLowerCase()==="authorization")})}
287_initRealtimeClient(t){return new gM(this.realtimeUrl.href,$e($e({},t),{},{params:$e($e({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.changedAccessToken=r,this.realtime.setAuth(r)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const gF=(t,e,r)=>new pF(t,e,r);function vF(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const r=e.match(/^v(\d+)\./);return r?parseInt(r[1],10)<=18:!1}vF()&&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 mF="https://yoyltoowovmuwrqdsvrx.supabase.co",yF="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlveWx0b293b3ZtdXdycWRzdnJ4Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzM4Njg2NDAsImV4cCI6MjA4OTQ0NDY0MH0.ctPr1nW_1sQHmXoCzMbcp_h52mcWoFJyFQ_WAhEzq5s";let Hh=null;function Rv(){return Hh||(Hh=gF(mF,yF)),Hh}async function _F(t){var i;const e=Rv();if(!e)throw new Error("Supabase is not configured. Set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY.");const r=t.email.trim().toLowerCase(),n=((i=t.name)==null?void 0:i.trim())||null,{error:s}=await e.from("email_signups").insert({email:r,name:n,source:t.source,city:"nyc"});if(s)throw s}function wF(){const n=b.useRef(null),[s,i]=b.useState(720),[o,a]=b.useState(null),[l,c]=b.useState(!0),[u,d]=b.useState(""),[f,h]=b.useState(!1),[y,g]=b.useState(!1),[w,m]=b.useState(!1),[v,_]=b.useState("");b.useEffect(()=>((async()=>{c(!0);{a(null),c(!1);return}})(),()=>{}),[]);const x=async E=>{E.preventDefault();const k=u.trim().toLowerCase();if(!k){_("Please enter your email address.");return}_(""),h(!0);try{await _F({email:k,source:"calendar"}),m(!0),d(""),g(!1)}catch(S){const C=S;(C==null?void 0:C.code)==="23505"?(m(!0),d(""),g(!1)):_("We couldn't save your signup right now. Please try again.")}finally{h(!1)}};return b.useEffect(()=>{let E=0;const k=()=>{E&&window.cancelAnimationFrame(E),E=window.requestAnimationFrame(()=>{const S=n.current;if(!S)return;const C=window.innerHeight-S.getBoundingClientRect().top-16,N=Math.min(720,Math.max(320,Math.round(C)));i(A=>Math.abs(A-N)>1?N:A)})};return k(),window.addEventListener("resize",k),window.addEventListener("scroll",k,{passive:!0}),()=>{E&&window.cancelAnimationFrame(E),window.removeEventListener("resize",k),window.removeEventListener("scroll",k)}},[]),p.jsxs("section",{id:"home",className:"min-h-[100svh] flex items-start justify-center pt-36 md:pt-40 pb-10 md:pb-12 relative overflow-visible",children:[p.jsx("div",{className:"absolute -top-40 md:-top-40 inset-x-0 bottom-0",children:p.jsx("img",{src:"/hero-bg.png",alt:"","aria-hidden":"true",className:"h-full w-full object-cover object-[center_82%]",loading:"eager"})}),p.jsx("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent 0%, hsl(var(--background) / 0.65) 10%, hsl(var(--background)) 100%)"}}),p.jsx("div",{className:"container mx-auto px-4 relative z-10",children:p.jsxs("div",{className:"max-w-5xl mx-auto text-center mt-0",children:[p.jsxs("h1",{className:"font-display text-4xl sm:text-5xl md:text-6xl lg:text-7xl leading-[0.9] text-navy mb-2",children:["Community Week",p.jsx("span",{className:"block text-primary",children:"Where NYC Belongs"})]}),p.jsxs("div",{className:"inline-flex items-center gap-2 bg-accent/60 text-navy px-4 sm:px-6 py-2 sm:py-3 rounded-none border-2 border-navy/70 mb-4 sm:mb-6",children:[p.jsx(hR,{className:"h-4 w-4 sm:h-5 sm:w-5"}),p.jsx("span",{className:"font-display text-base sm:text-xl tracking-wider",children:"MAY 9–17, 2026"})]}),p.jsx("p",{className:"text-sm sm:text-base md:text-lg text-foreground/80 mb-6 max-w-3xl mx-auto font-medium bg-background/45 backdrop-blur-[2px] px-4 py-3 rounded-xl",children:"A citywide celebration of belonging that spotlights the organizers, space
287s, and communities connecting New Yorkers"}),o?p.jsx("a",{href:o.href,target:"_blank",rel:"noopener noreferrer",className:"group block max-w-3xl mx-auto mb-6 md:mb-7 border-2 border-navy bg-secondary/75 text-left festival-shadow p-3 sm:p-4 transition-transform hover:translate-x-[1px] hover:translate-y-[1px]",children:p.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_240px] md:items-center",children:[p.jsxs("div",{children:[p.jsx("p",{className:"font-display tracking-[0.14em] text-primary text-[10px] sm:text-xs mb-1.5",children:"FEATURED EVENT"}),p.jsx("h3",{className:"font-display text-xl sm:text-2xl text-navy mb-1.5",children:o.title}),p.jsxs("span",{className:"mt-3 inline-flex h-9 items-center justify-center gap-2 whitespace-nowrap rounded-none border-2 border-navy bg-primary px-3 font-display font-medium tracking-wider text-sm text-primary-foreground festival-shadow-sm",children:["VIEW EVENT",p.jsx(ay,{className:"h-3.5 w-3.5 transition-transform duration-200 group-hover:translate-x-1"})]})]}),p.jsx("div",{className:"hidden md:block h-full min-h-[116px] border-2 border-navy bg-background overflow-hidden festival-shadow-sm",children:o.imageSrc?p.jsx("img",{src:o.imageSrc,alt:o.imageAlt||o.title,className:"h-full w-full object-cover",loading:"lazy"}):p.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 bg-muted text-navy/70",children:[p.jsx(vR,{className:"h-5 w-5","aria-hidden":"true"}),p.jsx("span",{className:"font-display text-xs tracking-wider",children:"IMAGE UNAVAILABLE"})]})})]})}):l?p.jsx("div",{"aria-busy":"true",className:"max-w-3xl mx-auto mb-6 md:mb-7 border-2 border-navy bg-secondary/75 text-left festival-shadow p-3 sm:p-4",children:p.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_240px] md:items-center",children:[p.jsxs("div",{children:[p.jsx("p",{className:"font-display tracking-[0.14em] text-primary text-[10px] sm:text-xs mb-1.5",children:"FEATURED EVENT"}),p.jsx("h3",{className:"font-display text-xl sm:text-2xl text-navy mb-1.5",children:"Loading event..."}),p.jsxs("span",{className:"mt-3 inline-flex h-9 items-center justify-center gap-2 whitespace-nowrap rounded-none border-2 border-navy bg-primary px-3 font-display font-medium tracking-wider text-sm text-primary-foreground festival-shadow-sm",children:["VIEW EVENT",p.jsx(ay,{className:"h-3.5 w-3.5"})]})]}),p.jsx("div",{className:"hidden md:block h-full min-h-[116px] border-2 border-navy bg-background overflow-hidden festival-shadow-sm",children:p.jsx("div",{className:"h-full w-full animate-pulse bg-muted"})})]})}):null,p.jsxs("div",{id:"calendar",className:"mt-8 md:mt-10",children:[p.jsx(Io,{selector:"#calendar",className:"font-display text-4xl sm:text-5xl md:text-6xl text-navy mb-4",children:"EVENT CALENDAR"}),p.jsxs("div",{className:"mb-2 mx-auto flex w-full max-w-[360px] items-start justify-center gap-2 sm:max-w-none",children:[Ct?p.jsxs("div",{className:"w-[calc(50%-0.25rem)] min-w-0 sm:w-[166px]",children:[p.jsx(Ue,{asChild:!0,size:"sm",className:"w-full rounded-none border-2 border-navy font-display tracking-wider text-sm festival-shadow-sm hover:translate-x-[1px] hover:translate-y-[1px] transition-all",children:p.jsxs("a",{href:ei,target:"_blank",rel:"noopener noreferrer",children:[p.jsx("span",{className:"max-[430px]:hidden",children:"HOST AN EVENT"}),p.jsx("span",{className:"hidden max-[430px]:inline",children:"HOST"})]})}),p.jsx("p",{className:"mt-2 text-center font-display text-[11px] sm:text-xs tracking-[0.1em] text-navy/80",children:wS})]}):null,y?p.jsxs("form",{id:"calendar-updates-form",onSubmit:x,className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[p.jsx("label",{htmlFor:"calendar-updates-email",className:"sr-only",children:"Subscribe for updates email"}),p.jsx(Hs,{id:"calendar-updates-email",type:"email",value:u,onChange:E=>d(E.target.value),placeholder:"[email protected]",required:!0,className:"w-full rounded-none border-2 border-navy bg-background sm:w-[240px]"}),p.jsx(Ue,{type:"submit",size:"sm",disabled:f,className:"w-full sm:w-[166px] rounded-none border-2 border-navy !bg-accent !text-navy font-display tracking-wider text-sm festival-shadow-sm hover:!bg-accent/90 hover:!text-navy hover:translate-x-[1px] hover:translate-y-[1px] transition-all",children:f?"
287SUBSCRIBING...":"SUBSCRIBE"})]}):w?p.jsx("p",{className:`${Ct?"w-[calc(50%-0.25rem)] min-w-0 sm:w-[166px]":"w-full sm:w-[240px]"} text-center font-display text-[11px] sm:text-xs tracking-[0.08em] text-navy/85`,children:"You'll receive Community Week NYC news!"}):p.jsxs(Ue,{type:"button",size:"sm",onClick:()=>{m(!1),_(""),g(!0)},className:`${Ct?"w-[calc(50%-0.25rem)] min-w-0 sm:w-[166px]":"w-full sm:w-[240px]"} rounded-none border-2 border-navy !bg-transparent !text-navy font-display tracking-wider text-sm festival-shadow-sm hover:!bg-accent/90 hover:!text-navy hover:translate-x-[1px] hover:translate-y-[1px] transition-all`,children:[p.jsx("span",{className:"max-[430px]:hidden",children:"SUBSCRIBE FOR UPDATES"}),p.jsx("span",{className:"hidden max-[430px]:inline",children:"SUBSCRIBE"})]})]}),v?p.jsx("p",{className:"mb-2 text-center text-sm text-destructive",children:v}):null,p.jsx("div",{className:"w-full max-w-[1200px] mx-auto",children:p.jsx("div",{ref:n,"data-calendar-embed":"true",className:"border-2 border-navy festival-shadow bg-background overflow-hidden",style:{height:`${s}px`},children:p.jsx("iframe",{src:"https://weeknights.co/embed/community-week?ref=cw-website&theme=light",width:"100%",className:"h-full w-full",frameBorder:"0",title:"Community Week calendar on week nights",loading:"lazy",allow:"clipboard-write"})})}),p.jsx(BL,{className:"mt-8"})]})]})})]})}function bF(){const t=()=>{ko("#calendar")},e=r=>{window.dispatchEvent(new CustomEvent("cw:set-get-involved-tab",{detail:{tab:r}})),ko("#get-involved")};return p.jsxs("section",{id:"final-cta",className:"py-20 relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0",children:p.jsx("img",{src:"/final-cta-bg.png",alt:"Group of people smiling and laughing looking at the camera.","aria-hidden":"true",className:"h-full w-full object-cover",loading:"lazy"})}),p.jsx("div",{className:"absolute inset-0 bg-white/70"}),p.jsx("div",{className:"container mx-auto px-4 relative z-10",children:p.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[p.jsxs(Io,{selector:"#final-cta",className:"font-display text-5xl md:text-7xl text-navy mb-4",children:["COME CURIOUS.",p.jsx("br",{}),"LEAVE CONNECTED."]}),p.jsx("p",{className:"text-lg text-muted-foreground max-w-3xl mx-auto mb-8",children:"Whether you are looking for your people, building a community, opening your space, or backing the future of belonging in New York, there is a place for you in Community Week."}),p.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[p.jsx(Ue,{size:"lg",onClick:t,className:"rounded-none border-2 border-navy bg-primary/50 text-navy font-display tracking-wider text-lg festival-shadow hover:bg-primary/70 hover:text-navy hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all",children:"EXPLORE EVENTS"}),p.jsx(Ue,{size:"lg",onClick:()=>e(Ct?"host-event":"partner-venue"),className:"rounded-none border-2 border-navy bg-secondary/60 text-accent-foreground font-display tracking-wider text-lg festival-shadow hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all hover:bg-secondary/80",children:Ct?"HOST AN EVENT":"PARTNER AS A VENUE"}),p.jsx(Ue,{asChild:!0,size:"lg",className:"rounded-none border-2 border-navy bg-accent/60 text-navy font-display tracking-wider text-lg festival-shadow hover:bg-accent/80 hover:text-navy hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all",children:p.jsx(Ir,{to:"/sponsors",children:"BECOME A SPONSOR"})})]})]})})]})}function xF(){return p.jsxs("section",{id:"who-we-are",className:"py-20 bg-navy text-primary-foreground relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 halftone-dots opacity-10"}),p.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[p.jsxs("div",{className:"text-center mb-16",children:[p.jsx(Io,{selector:"#who-we-are",className:"font-display text-5xl md:text-7xl text-accent mb-4",children:"WHO WE ARE"}
287),p.jsx("p",{className:"text-lg text-primary-foreground/70 max-w-2xl mx-auto",children:"Community Week NYC is presented by Sugary NYC and week nights, two organizations rooted in real-life connection, community building, and the belief that belonging should be easier to find and sustain."})]}),p.jsxs("div",{className:"grid md:grid-cols-2 gap-8 max-w-5xl mx-auto",children:[p.jsxs("div",{className:"bg-background text-foreground p-8 border-2 border-navy festival-shadow-pink flex flex-col h-full",children:[p.jsx("img",{src:"https://www.sugarynyc.com/assets/sugary-wordmark-DadsoCO6.png",alt:"Sugary NYC",className:"h-16 md:h-20 w-auto mb-6 self-start object-contain"}),p.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"Sugary brings people together through curated, intimate experiences designed to spark meaningful conversations. We're redefining what it means to spend a weeknight, transforming ordinary evenings into opportunities for connection and community."}),p.jsx(Ue,{asChild:!0,variant:"outline",className:"mt-auto rounded-none border-2 border-navy festival-shadow-sm font-display tracking-wider hover:translate-x-[1px] hover:translate-y-[1px] transition-all",children:p.jsxs("a",{href:"https://www.sugarynyc.com/about",target:"_blank",rel:"noopener noreferrer",children:["LEARN MORE ABOUT SUGARY",p.jsx(ly,{className:"ml-2 h-4 w-4"})]})})]}),p.jsxs("div",{className:"bg-background text-foreground p-8 border-2 border-navy festival-shadow-pink flex flex-col h-full",children:[p.jsx("h3",{className:"font-satoshi text-[40px] md:text-[60px] font-bold text-black mb-6 lowercase tracking-[-2px] leading-[1.25] md:h-20",children:"week nights"}),p.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"week nights believes connection is not something you scroll into. Trust is built face to face. Belonging grows through consistent, meaningful, intentional connections in real life. We give organizers what they need to easily create, grow, and sustain those moments. Less friction, fewer tools, more time bringing people together."}),p.jsx(Ue,{asChild:!0,variant:"outline",className:"mt-auto rounded-none border-2 border-navy festival-shadow-sm font-display tracking-wider hover:translate-x-[1px] hover:translate-y-[1px] transition-all",children:p.jsxs("a",{href:"https://weeknights.co",target:"_blank",rel:"noopener noreferrer",children:["LEARN MORE ABOUT WEEK NIGHTS",p.jsx(ly,{className:"ml-2 h-4 w-4"})]})})]})]}),p.jsx("p",{className:"text-center text-primary-foreground/70 text-lg max-w-3xl mx-auto mt-10",children:"Together, they bring deep experience in gathering people, growing communities, building tools, and advocating for the organizers who make cities feel human."})]})]})}const Lu=b.forwardRef(({className:t,...e},r)=>p.jsx("textarea",{className:pe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
287ing-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",t),ref:r,...e}));Lu.displayName="Textarea";var EF="Label",BS=b.forwardRef((t,e)=>p.jsx(he.label,{...t,ref:e,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));BS.displayName=EF;var zS=BS;const SF=nd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),dn=b.forwardRef(({className:t,...e},r)=>p.jsx(zS,{ref:r,className:pe(SF(),t),...e}));dn.displayName=zS.displayName;var kF=b.createContext(void 0);function Nv(t){const e=b.useContext(kF);return t||e||"ltr"}var Vh="rovingFocusGroup.onEntryFocus",CF={bubbles:!1,cancelable:!0},jl="RovingFocusGroup",[zp,WS,TF]=Ug(jl),[PF,HS]=bn(jl,[TF]),[RF,NF]=PF(jl),VS=b.forwardRef((t,e)=>p.jsx(zp.Provider,{scope:t.__scopeRovingFocusGroup,children:p.jsx(zp.Slot,{scope:t.__scopeRovingFocusGroup,children:p.jsx(OF,{...t,ref:e})})}));VS.displayName=jl;var OF=b.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=t,f=b.useRef(null),h=Xe(e,f),y=Nv(i),[g,w]=ni({prop:o,defaultProp:a??null,onChange:l,caller:jl}),[m,v]=b.useState(!1),_=_r(c),x=WS(r),E=b.useRef(!1),[k,S]=b.useState(0);return b.useEffect(()=>{const C=f.current;if(C)return C.addEventListener(Vh,_),()=>C.removeEventListener(Vh,_)},[_]),p.jsx(RF,{scope:r,orientation:n,dir:y,loop:s,currentTabStopId:g,onItemFocus:b.useCallback(C=>w(C),[w]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>S(C=>C+1),[]),onFocusableItemRemove:b.useCallback(()=>S(C=>C-1),[]),children:p.jsx(he.div,{tabIndex:m||k===0?-1:0,"data-orientation":n,...d,ref:h,style:{outline:"none",...t.style},onMouseDown:le(t.onMouseDown,()=>{E.current=!0}),onFocus:le(t.onFocus,C=>{const N=!E.current;if(C.target===C.currentTarget&&N&&!m){const A=new CustomEvent(Vh,CF);if(C.currentTarget.dispatchEvent(A),!A.defaultPrevented){const H=x().filter(q=>q.focusable),L=H.find(q=>q.active),Y=H.find(q=>q.id===g),ee=[L,Y,...H].filter(Boolean).map(q=>q.ref.current);GS(ee,u)}}E.current=!1}),onBlur:le(t.onBlur,()=>v(!1))})})}),qS="RovingFocusGroupItem",KS=b.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:i,children:o,...a}=t,l=Ws(),c=i||l,u=NF(qS,r),d=u.currentTabStopId===c,f=WS(r),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=u;return b.useEffect(()=>{if(n)return h(),()=>y()},[n,h,y]),p.jsx(zp.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:p.jsx(he.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:le(t.onMouseDown,w=>{n?u.onItemFocus(c):w.preventDefault()}),onFocus:le(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:le(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){u.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const m=IF(w,u.orientation,u.dir);if(m!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let _=f().filter(x=>x.focusable).map(x=>x.ref.current);if(m==="last")_.reverse();else if(m==="prev"||m==="next"){m==="prev"&&_.reverse();const x=_.indexOf(w.currentTarget);_=u.loop?$F(_,x+1):_.slice(x+1)}setTimeout(()=>GS(_))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:g!=null}):o})})});KS.displayName=qS;var AF={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jF(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function IF(t,e,r){const n=jF(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return AF[n]}function GS(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function $F(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var LF=VS,MF=KS,kd="Tabs",[DF,j3]=bn(kd,[HS]),YS=HS(),[FF,Ov]=DF(kd),JS=b.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:i,orientation:o="horizontal",dir:a,activationMode:l="automatic",...c}=t,u=Nv(a),[d,f]=ni({prop:n,onChange:s,defaultProp:i??"",caller:kd});return p.jsx(FF,{scope:r,baseId:Ws(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:l,children:p.jsx(he.div,{dir:u,"data-orientation":o,...c,ref:e})})});JS.displayName=kd;var QS="TabsList",XS=b.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,i=Ov(QS,r),o=YS(r);return p.jsx(LF,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:n,children:p.jsx(he.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});XS.displayName=QS;var ZS="TabsTrigger",ek=b.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...i}=t,o=Ov(ZS,r),a=YS(r),l=nk(o.baseId,n),c=sk(o.baseId,n),u=n===o.value;return p.jsx(MF,{asChild:!0,...a,focusable:!s,active:u,children:p.jsx(he.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...i,ref:e,onMouseDown:le(t.onMouseDown,d=>{!s&&d.button===0&&d.ctrlKey===!1?o.onValueChange(n):d.preventDefault()}),onKeyDown:le(t.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&o.onValueChange(n)}),onFocus:le(t.onFocus,()=>{const d=o.activationMode!=="manual";!u&&!s&&d&&o.onValueChange(n)})})})});ek.displayName=ZS;var tk="TabsContent",rk=b.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:i,...o}=t,a=Ov(tk,r),l=nk(a.baseId,n),c=sk(a.baseId,n),u=n===a.value,d=b.useRef(u);return b.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),p.jsx(ps,{present:s||u,children:({present:f})=>p.jsx(he.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...o,ref:e,style:{...t.style,animationDuration:d.current?"0s":void 0},children:f&&i})})});rk.displayName=tk;function nk(t,e){return`${t}-trigger-${e}`}function sk(t,e){return`${t}-content-${e}`}var UF=JS,ik=XS,ok=ek,ak=rk;const BF=UF,lk=b.forwardRef(({className:t,...e},r)=>p.jsx(ik,{ref:r,className:pe("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));lk.displayName=ik.displayName;const wa=b.forwardRef(({className:t,...e},r)=>p.jsx(ok,{ref:r,className:pe("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",t),...e}));wa.displayName=ok.displayName;const ba=b.forwardRef(({className:t,...e},r)=>p.jsx(ak,{ref:r,className:pe("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));ba.displayName=ak.displayName;async function zF(t){var s,i,o;const e=Rv();if(!e)throw new Error("Supabase is not configured. Set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY.");const r=t.email.trim().toLowerCase(),{error:n}=await e.from("venue_leads").insert({name:t.name.trim(),email:r,venue_details:((s=t.venueDetails)==null?void 0:s.trim())||null,availability:((i=t.availability)==null?void 0:i.trim())||null,source:((o=t.source)==null?void 0:o.trim())||"get_involved_venue",city:"nyc"});if(n)throw n}const Pr={attend:{label:"Attend",title:"ATTEND",description:"Discover events, gatherings, and spaces across New York where real connection is already happening.",cta:"STAY UPDATED",href:"#calendar",Icon:Vf},"host-event":{label:"Host an event",title:"HOST AN EVENT",description:"Join the official calendar, reach new audiences, and be part of a citywide celebration of belonging.",cta:"Become a Host",href:ei,Icon:Hf},"partner-venue":{label:"Partner as a venue",title:"PARTNER AS A VENUE",description:"Open your doors to communities, co-host meaningful events, and help power connection in the city.",cta:"Partner as a Venue",href:"#sponsors",Icon:Wf},sponsor:{label:"Sponsor Community Week",title:"SPONSOR COMMUNITY WEEK",description:"Support the people and places making New York feel like New York.",cta:"BECOME A SPONSOR",href:"/sponsors",Icon:kx}};function WF(){const{toast:t}=Fg(),[e,r]=b.useState("attend"),[n,s]=b.useState(!1),[i,o]=b.useState(!1),a=()=>{ko("#calendar")};b.useEffect(()=>{const c=u=>{var h;const f=(h=u.detail)==null?void 0:h.tab;if(f==="attend"){r("attend");return}if(f==="host"){r(Ct?"host-event":"partner-venue");return}if(f==="partner"){r("partner-venue");return}if(f==="host-event"&&Ct){r("host-event");return}(f==="partner-venue"||f==="sponsor")&&r(f)};return window.addEventListener("cw:set-get-involved-tab",c),()=>window.removeEventListener("cw:set-get-involved-tab",c)},[]);const l=async c=>{c.preventDefault();const u=c.currentTarget,d=new FormData(u),f=String(d.get("name")||"").trim(),h=String(d.get("email")||"").trim(),y=String(d.get("venueDetails")||"").trim(),g=String(d.get("availability")||"").trim();if(!h){t({title:"Missing email",description:"Please enter your email address."});return}o(!0);try{await zF({name:f,email:h,venueDetails:y,availability:g,source:"get_involved_venue"}),s(!0),t({title:"Venue interest received!",description:"We'll be in touch about partnership opportunities."}),u.reset()}catch(w){const m=w;(m==null?void 0:m.code)==="23505"?(s(!0),t({title:"Already submitted",description:"We already have your venue details on file."})):t({title:"Something went wrong",description:"We couldn't save your venue form right now. Please try again.",variant:"destructive"})}finally{o(!1)}};return p.jsxs("section",{id:"get-involved",className:"py-14 md:py-16 relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 halftone-dots-dense opacity-20"}),p.jsx("div",{className:"pointer-events-none absolute left-4 md:left-8 top-14 hidden md:block w-48 lg:w-60 rotate-[-6deg] border-2 border-navy bg-background/90 p-1 festival-shadow-sm opacity-80",children:p.jsx("img",{src:"/community-photos/p1640122.png",alt:"","aria-hidden":"true",className:"h-full w-full object-cover",loading:"lazy"})}),p.jsx("div",{className:"pointer-events-none absolute right-4 md:right-8 bottom-12 hidden md:block w-48 lg:w-60 rotate-[8deg] border-2 border-navy bg-background/90 p-1 festival-shadow-sm opacity-80",children:p.jsx("img",{src:"/community-photos/img-8635.png",alt:"","aria-hidden":"true",className:"h-full w-full object-cover",loading:"lazy"})}),p.jsx("div",{className:"pointer-events-none absolute -left-4 md:-left-6 bottom-14 hidden xl:block w-48 lg:w-80 rotate-[10deg] border-2 border-navy bg-background/90 p-1 festival-shadow-sm opacity-80",children:p.jsx("img",{src:"/community-photos/img-9100-side.png",alt:"","aria-hidden":"true",className:"h-full w-full object-cover",loading:"lazy"})}),p.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[p.jsxs("div",{className:"text-center mb-8 md:mb-10",children:[p.jsx(Io,{selector:"#get-involved",className:"font-display text-5xl md:text-7xl text-navy mb-3",children:"GET INVOLVED"}),p.jsx("p",{className:"text-base md:text-lg text-muted-foreground max-w-3xl mx-auto",children:"How do you want to participate in Community Week NYC."})]}),p.jsx("div",{className:"max-w-4xl mx-auto",children:p.jsxs(BF,{value:e,onValueChange:c=>r(c),className:"w-full",children:[p.jsxs(lk,{className:`grid w-full ${Ct?"grid-cols-2 md:grid-cols-4":"grid-cols-3"} mb-4 md:mb-6 rounded-none border-2 border-navy bg-muted h-auto p-0`,children:[p.jsxs(wa,{value:"attend",className:"flex items-center justify-center gap-2 rounded-none py-3 font-display tracking-wider text-sm md:text-base lg:text-lg data-[state=inactive]:bg-primary data-[state=inactive]:text-primary-foreground data-[state=inactive]:opacity-60 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:opacity-100 border-b-2 border-r-2 md:border-b-0 border-navy",children:[p.jsx(Vf,{className:"h-4 w-4"}),p.jsx("span",{children:"ATTEND"})]}),Ct?p.jsxs(wa,{value:"host-event",className:"flex items-center justify-center gap-2 rounded-none py-3 font-display tracking-wider text-sm md:text-base lg:text-lg data-[state=inactive]:bg-secondary data-[state=inactive]:text-accent-foreground data-[state=inactive]:opacity-60 data-[state=active]:bg-secondary data-[state=active]:text-secondary-foreground data-[state=active]:opacity-100 border-b-2 md:border-b-0 md:border-r-2 border-navy",children:[p.jsx(Hf,{className:"h-4 w-4"}),p.jsx("span",{children:"HOST"})]}):null,p.jsxs(wa,{value:"partner-venue",className:`flex items-center justify-center gap-2 rounded-none py-3 font-display tracking-wider text-sm md:text-base lg:text-lg data-[state=inactive]:bg-navy data-[state=inactive]:text-background data-[state=inactive]:opacity-60 data-[state=active]:bg-navy data-[state=active]:text-background data-[state=active]:opacity-100 ${Ct?"border-r-2":"border-x-2"} border-navy`,children:[p.jsx(Wf,{className:"h-4 w-4"}),p.jsx("span",{children:"VENUE"})]}),p.jsxs(wa,{value:"sponsor",className:"flex items-center justify-center gap-2 rounded-none py-3 font-display tracking-wider text-sm md:text-base lg:text-lg data-[state=inactive]:bg-accent data-[state=inactive]:text-secondary-foreground data-[state=inactive]:opacity-60 data-[state=active]:bg-accent data-[state=active]:text-accent-foreground data-[state=active]:opacity-100",children:[p.jsx(Sx,{className:"h-4 w-4"}),p.jsx("span",{children:"SPONSOR"})]})]}),p.jsx(ba,{value:"attend",children:p.jsxs("div",{className:"bg-background p-5 md:p-6 border-2 border-navy festival-shadow",children:[p.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[p.jsx(Vf,{className:"h-5 w-5 mt-1 text-accent shrink-0","aria-hidden":"true"}),p.jsx("h3",{className:"font-display text-2xl md:text-3xl text-navy",children:Pr.attend.title})]}),p.jsx("p",{className:"text-muted-foreground mb-4",children:Pr.attend.description}),p.jsx(Ue,{type:"button",size:"lg",onClick:a,className:"w-full rounded-none border-2 border-navy festival-shadow font-display tracking-wider text-lg hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all",children:"VIEW CALENDAR"})]})}),Ct?p.jsx(ba,{value:"host-event",children:p.jsxs("div",{className:"bg-background p-5 md:p-6 border-2 border-navy festival-shadow",children:[p.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[p.jsx(Hf,{className:"h-5 w-5 mt-1 text-accent shrink-0","aria-hidden":"true"}),p.jsx("h3",{className:"font-display text-2xl md:text-3xl text-navy",children:Pr["host-event"].title})]}),p.jsx("p",{className:"text-muted-foreground mb-4",children:Pr["host-event"].description}),p.jsx("form",{className:"space-y-4",children:p.jsx(Ue,{asChild:!0,size:"lg",className:"w-full rounded-none border-2 border-navy festival-shadow bg-secondary text-secondary-foreground font-display tracking-wider text-lg hover:bg-secondary hover:text-secondary-foreground hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all",children:p.jsx("a",{href:ei,target:"_blank",rel:"noopener noreferrer",children:"BECOME A HOST"})})})]})}):null,p.jsx(ba,{value:"partner-venue",children:p.jsxs("div",{className:"bg-background p-5 md:p-6 border-2 border-navy festival-shadow",children:[p.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[p.jsx(Wf,{className:"h-5 w-5 mt-1 text-accent shrink-0","aria-hidden":"true"}),p.jsx("h3",{className:"font-display text-2xl md:text-3xl text-navy",children:Pr["partner-venue"].title})]}),p.jsx("p",{className:"text-muted-foreground mb-4",children:Pr["partner-venue"].description}),n?p.jsxs("div",{className:"text-center py-8",children:[p.jsx(Ex,{className:"h-16 w-16 text-secondary mx-auto mb-4"}),p.jsx("h3",{className:"font-display text-4xl text-navy mb-2",children:"THANK YOU!"}),p.jsx("p",{className:"text-muted-foreground",children:"We appreciate your interest. We'll be in touch!"})]}):p.jsxs("for
287m",{onSubmit:l,className:"space-y-4",children:[p.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(dn,{htmlFor:"vol-name",className:"font-display tracking-wider",children:"NAME"}),p.jsx(Hs,{id:"vol-name",name:"name",placeholder:"Your name",required:!0,className:"rounded-none border-2 border-navy"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(dn,{htmlFor:"vol-email",className:"font-display tracking-wider",children:"EMAIL"}),p.jsx(Hs,{id:"vol-email",name:"email",type:"email",placeholder:"[email protected]",required:!0,className:"rounded-none border-2 border-navy"})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(dn,{htmlFor:"vol-interests",className:"font-display tracking-wider",children:"TELL US ABOUT YOUR VENUE"}),p.jsx(Lu,{id:"vol-interests",name:"venueDetails",placeholder:"Capacity, neighborhood, ideal event format, and collaboration goals.",rows:2,className:"rounded-none border-2 border-navy"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(dn,{htmlFor:"vol-availability",className:"font-display tracking-wider",children:"AVAILABILITY (MAY 9-17)"}),p.jsx(Lu,{id:"vol-availability",name:"availability",placeholder:"Let us know what dates/times your space is available.",rows:2,className:"rounded-none border-2 border-navy"})]}),p.jsx(Ue,{type:"submit",size:"lg",disabled:i,className:"w-full rounded-none border-2 border-navy festival-shadow bg-navy text-background font-display tracking-wider text-lg hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all hover:bg-navy",children:i?"SUBMITTING...":"PARTNER AS A VENUE"})]})]})}),p.jsx(ba,{value:"sponsor",children:p.jsxs("div",{className:"bg-background p-5 md:p-6 border-2 border-navy festival-shadow",children:[p.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[p.jsx(kx,{className:"h-5 w-5 mt-1 text-accent shrink-0","aria-hidden":"true"}),p.jsx("h3",{className:"font-display text-2xl md:text-3xl text-navy",children:Pr.sponsor.title})]}),p.jsx("p",{className:"text-muted-foreground mb-5",children:Pr.sponsor.description}),p.jsx(Ue,{asChild:!0,size:"lg",className:"w-full rounded-none border-2 border-navy festival-shadow bg-accent text-navy font-display tracking-wider text-lg hover:bg-accent hover:text-navy hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all",children:p.jsx(Ir,{to:Pr.sponsor.href,children:Pr.sponsor.cta})})]})})]})})]})]})}const HF=[{icon:gR,title:"Authentic Connection",description:"New Yorkers crave intentional, authentic social connection. They are not looking for another event, they are looking for somewhere to belong.",color:"bg-primary/20"},{icon:Cx,title:"Celebrating Builders",description:"There are people doing the hard, mostly thankless work of bringing people together. Community Week exists to put a spotlight on them.",color:"bg-secondary/30"},{icon:yR,title:"What Participating Communities Receive",description:"A shared platform for visibility, collaboration, and momentum: citywide discovery, shared promotion, builder gatherings, and stronger peer connections.",color:"bg-accent/30"},{icon:dR,title:"Building the Platform",description:"The first public expression of a larger vision: building long-term visibility, support, and investment for community builders.",color:"bg-lime/20"}];function VF(){return p.jsxs("section",{id:"mission",className:"py-20 relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 halftone-dots-dense opacity-30"}),p.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[p.jsxs("div",{className:"max-w-3xl mx-auto text-center mb-16",children:[p.jsx(Io,{selector:"#mission",className:"font-display text-5xl md:text-7xl text-navy mb-6",children:"WHAT IS COMMUNITY WEEK?"}),p.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Community Week brings together builders and participants around a shared belief: that being intentional about belonging builds deeper relationships, healthier cities, and stronger local economies."})]}),p.jsx("div",{className:"grid md:grid-cols-4 gap-6 max-w-7xl mx-auto",children:HF.map(t=>p.jsxs("div",{className:"bg-background p-8 border-2 border-navy rounded-none festival-shadow hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all group",children:[p.jsx("div",{className:`w-14 h-14 ${t.color} border-2 border-navy rounded-none flex items-center justify-center mb-4`,children:p.jsx(t.icon,{className:"h-7 w-7 text-navy"})}),p.jsx("h3",{className:"font-display text-2xl text-navy mb-3 tracking-wide",children:t.title}),p.jsx("p",{className:"text-muted-foreground",children:t.description})]},t.title))})]})]})}function qF(){return p.jsxs("section",{id:"faq",className:"py-16 bg-accent/20 relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 halftone-dots opacity-20"}),p.jsx("div",{className:"container mx-auto px-4 relative z-10",children:p.jsxs("div",{className:"text-center",children:[p.jsx(Io,{selector:"#faq",className:"font-display text-5xl md:text-7xl text-navy mb-4",children:"Have Any Questions?"}),p.jsx(Ue,{asChild:!0,size:"lg",className:"rounded-none border-2 border-navy bg-accent/70 text-navy font-display tracking-wider text-lg festival-shadow hover:bg-accent/90 hover:text-navy hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all",children:p.jsx(Ir,{to:"/faq",children:"VISIT THE FAQ PAGE"})})]})})]})}const KF=()=>p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsx(bv,{}),p.jsxs("main",{children:[p.jsx(wF,{}),p.jsx(VF,{}),p.jsx(WF,{}),p.jsx(xF,{}),p.jsx(bF,{}),p.jsx(qF,{})]}),p.jsx(xv,{})]});async function GF(t){var s,i;const e=Rv();if(!e)throw new Error("Supabase is not configured. Set VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY.");const r=t.email.trim().toLowerCase(),{error:n}=await e.from("sponsor_leads").insert({name:t.name.trim(),company:t.company.trim(),email:r,message:((s=t.message)==null?void 0:s.trim())||null,source:((i=t.source)==null?void 0:i.trim())||"sponsors",city:"nyc"});if(n)throw n}const YF=[{icon:Cx,title:"Engaged Audience",description:"Connect with thousands of community-minded New Yorkers actively seeking connection.",color:"bg-primary/20"},{icon:wR,title:"Brand Visibility",description:"Logo placement across events, digital materials, and press coverage.",color:"bg-secondary/30"},{icon:xR,title:"Impact Alignment",description:"Associate your brand with the people and places building a more connected NYC.",color:"bg-
287accent/30"}],JF=[{name:"SM3",logoSrcLightBg:"/sponsor-photos/sm3-logo-light-bg.png",logoSrcDarkBg:"/sponsor-photos/sm3-logo-dark-bg.png",href:"https://activ8.m-ios.com/"},{name:"New York Life",logoSrcLightBg:"/sponsor-photos/new-york-life-logo.png",logoSrcDarkBg:"/sponsor-photos/new-york-life-logo.png",href:"https://www.newyorklife.com/",logoBgClassName:"bg-white !w-auto max-w-full mx-auto !scale-100"}];function QF(){const{toast:t}=Fg(),[e,r]=b.useState(!1),[n,s]=b.useState(!1),[i,o]=b.useState(!1),a=async l=>{l.preventDefault();const c=l.currentTarget,u=new FormData(c),d=String(u.get("name")||"").trim(),f=String(u.get("company")||"").trim(),h=String(u.get("email")||"").trim(),y=String(u.get("message")||"").trim();if(!h){t({title:"Missing email",description:"Please enter your email address."});return}o(!0);try{await GF({name:d,company:f,email:h,message:y,source:"sponsors_page"}),r(!0),t({title:"Interest received!",description:"We'll reach out soon to discuss sponsorship opportunities."}),c.reset(),setTimeout(()=>s(!1),2e3)}catch(g){const w=g;(w==null?void 0:w.code)==="23505"?(r(!0),t({title:"Already submitted",description:"We already have your sponsor interest on file."}),setTimeout(()=>s(!1),1500)):t({title:"Something went wrong",description:"We couldn't save your request right now. Please try again.",variant:"destructive"})}finally{o(!1)}};return p.jsxs("section",{id:"sponsors",className:"bg-primary text-primary-foreground relative overflow-hidden h-full",children:[p.jsx("div",{className:"absolute inset-0 halftone-dots opacity-10"}),p.jsxs("div",{className:"container mx-auto px-4 pt-12 md:pt-16 pb-4 md:pb-6 relative z-10 h-full flex flex-col",children:[p.jsxs("div",{className:"max-w-5xl mx-auto w-full",children:[p.jsxs("div",{className:"text-center mb-5 md:mb-6",children:[p.jsx("h2",{className:"font-display text-4xl md:text-6xl text-primary-foreground mb-2 md:mb-3",children:"SPONSOR"}),p.jsx("p",{className:"text-base md:text-lg text-primary-foreground/80 max-w-2xl mx-auto",children:"More people gathering IRL is good for neighborhoods, local economies, public health, and civic engagement. Partner with us to invest in social connection."})]}),p.jsx("div",{className:"grid md:grid-cols-3 gap-3 md:gap-4 mb-5 md:mb-6",children:YF.map(l=>p.jsxs("div",{className:"bg-background text-foreground p-4 md:p-5 border-2 border-navy festival-shadow text-center",children:[p.jsx("div",{className:`w-10 h-10 md:w-12 md:h-12 ${l.color} border-2 border-navy mx-auto mb-2 md:mb-3 flex items-center justify-center`,children:p.jsx(l.icon,{className:"h-6 w-6 md:h-7 md:w-7 text-navy"})}),p.jsx("h3",{className:"font-display text-xl text-navy mb-1 tracking-wide",children:l.title}),p.jsx("p",{className:"text-base text-muted-foreground",children:l.description})]},l.title))}),p.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 md:gap-4 justify-center",children:[p.jsx(Ue,{asChild:!0,size:"lg",className:"gap-2 rounded-none border-2 border-navy bg-accent text-accent-foreground font-display tracking-wider festival-shadow hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all hover:bg-accent",children:p.jsxs("a",{href:"https://docs.google.com/presentation/d/1WYjY0fWHxcKNo6gi2dJvgVe-rx_DmVpfHEopU0qrEd4/edit?usp=sharing",target:"_blank",rel:"noopener noreferrer",children:[p.jsx(pR,{className:"h-4 w-4"}),"VIEW PITCH DECK"]})}),p.jsxs(bS,{open:n,onOpenChange:l=>{s(l),l&&r(!1)},children:[p.jsx(xS,{asChild:!0,children:p.jsxs(Ue,{size:"lg",className:"gap-2 rounded-none border-2 border-navy bg-accent text-accent-foreground font-display tracking-wider festival-shadow hover:translate-x-[2px] hover:translate-y-[2px] hover:shadow-[4px_4px_0px_hsl(var(--navy))] transition-all hover:bg-accent",children:[p.jsx(Sx,{className:"h-4 w-4"}),"BECOME A SPONSOR"]})}),p.jsxs(Ev,{className:"max-w-md rounded-none border-2 border-navy",children:[p.jsxs(Sv,{children:[p.jsx(kv,{className:"font-display text-3xl",children:"SPONSORSHIP INTEREST"}),p.jsx(Cv,{children:"Tell us about your organization and we'll follow up."})]}),e?p.jsxs("div",{className:"text-center py-8",children:[p.jsx(Ex,{className:"h-16 w-16 text-secondary mx-auto mb-4"}),p.jsx("p",{className:"text-muted-foreground",children:"We'll be in touch soon!"})]}):p.jsxs("form",{onSubmit:a,className:"space-y-4 pt-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(dn,{htmlFor:"sponsor-name",className:"font-display tracking-wider",children:"NAME"}),p.jsx(Hs,{id:"sponsor-name",name:"name",placeholder:"Your name",required:!0,className:"rounded-none border-2 border-navy"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(dn,{htmlFor:"sponsor-company",className:"font-display tracking-wider",children:"COMPANY"}),p.jsx(Hs,{id:"sponsor-company",name:"company",placeholder:"Company name",required:!0,className:"rounded-none border-2 border-navy"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(dn,{htmlFor:"sponsor-email",className:"font-display tracking-wider",children:"EMAIL"}),p.jsx(Hs,{id:"sponsor-email",name:"email",type:"email",placeholder:"[email protected]",required:!0,className:"rounded-none border-2 border-navy"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(dn,{htmlFor:"sponsor-message",className:"font-display tracking-wider",children:"MESSAGE"}),p.jsx(Lu,{id:"sponsor-message",name:"message",placeholder:"Tell us about your goals...",rows:3,className:"rounded-none border-2 border-navy"})]}),p.jsx(Ue,{type:"submit",disabled:i,className:"w-full rounded-none border-2 border-navy festival-shadow font-display tracking-wider hover:translate-x-[2px] hover:translate-y-[2px] transition-all",children:i?"SUBMITTING...":"SUBMIT INTEREST"})]})]})]})]})]}),p.jsxs("div",{className:"mt-6 md:mt-8",children:[p.jsx("h3",{className:"mb-2 font-display tracking-[0.14em] text-primary-foreground
287/90 text-sm sm:text-base text-center",children:"SPONSORED BY"}),p.jsx("div",{className:"bg-background text-foreground p-3 md:p-4 border-2 border-navy festival-shadow",children:p.jsx("div",{className:"flex flex-col items-center gap-3",children:p.jsx("div",{className:"flex flex-wrap justify-center gap-1 sm:gap-1.5",children:JF.map(l=>l.name==="SM3"?p.jsx(SS,{children:p.jsx("button",{type:"button","aria-label":`View ${l.name} sponsor details`,className:"flex h-16 w-52 sm:h-20 sm:w-60 items-center justify-center p-0",children:p.jsx("img",{src:l.logoSrcLightBg,alt:`${l.name} logo`,className:`h-full w-full object-contain object-center scale-125 ${l.logoBgClassName??""}`,loading:"lazy"})})},l.name):l.href?p.jsx("a",{href:l.href,target:"_blank",rel:"noopener noreferrer","aria-label":`Visit ${l.name}`,className:"flex h-16 w-52 sm:h-20 sm:w-60 items-center justify-center p-0",children:p.jsx("img",{src:l.logoSrcLightBg,alt:`${l.name} logo`,className:`h-full w-full object-contain object-center scale-125 ${l.logoBgClassName??""}`,loading:"lazy"})},l.name):p.jsx("div",{className:"flex h-16 w-52 sm:h-20 sm:w-60 items-center justify-center p-0",children:p.jsx("img",{src:l.logoSrcLightBg,alt:`${l.name} logo`,className:`h-full w-full object-contain object-center scale-125 ${l.logoBgClassName??""}`,loading:"lazy"})},l.name))})})})]})]})]})}const XF=()=>p.jsxs("div",{className:"min-h-[100svh] bg-primary flex flex-col",children:[p.jsx(bv,{}),p.jsx("main",{className:"mt-14 flex-1 bg-primary",children:p.jsx(QF,{})}),p.jsx(xv,{})]});var Cd="Collapsible",[ZF,ck]=bn(Cd),[e3,Av]=ZF(Cd),uk=b.forwardRef((t,e)=>{const{__scopeCollapsible:r,open:n,defaultOpen:s,disabled:i,onOpenChange:o,...a}=t,[l,c]=ni({prop:n,defaultProp:s??!1,onChange:o,caller:Cd});return p.jsx(e3,{scope:r,disabled:i,contentId:Ws(),open:l,onOpenToggle:b.useCallback(()=>c(u=>!u),[c]),children:p.jsx(he.div,{"data-state":Iv(l),"data-disabled":i?"":void 0,...a,ref:e})})});uk.displayName=Cd;var dk="CollapsibleTrigger",hk=b.forwardRef((t,e)=>{const{__scopeCollapsible:r,...n}=t,s=Av(dk,r);return p.jsx(he.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":Iv(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...n,ref:e,onClick:le(t.onClick,s.onOpenToggle)})});hk.displayName=dk;var jv="CollapsibleContent",fk=b.forwardRef((t,e)=>{const{forceMount:r,...n}=t,s=Av(jv,t.__scopeCollapsible);return p.jsx(ps,{present:r||s.open,children:({present:i})=>p.jsx(t3,{...n,ref:e,present:i})})});fk.displayName=jv;var t3=b.forwardRef((t,e)=>{const{__scopeCollapsible:r,present:n,children:s,...i}=t,o=Av(jv,r),[a,l]=b.useState(n),c=b.useRef(null),u=Xe(e,c),d=b.useRef(0),f=d.current,h=b.useRef(0),y=h.current,g=o.open||a,w=b.useRef(g),m=b.useRef(void 0);return b.useEffect(()=>{const v=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(v)},[]),Hr(()=>{const v=c.current;if(v){m.current=m.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const _=v.getBoundingClientRect();d.current=_.height,h.current=_.width,w.current||(v.style.transitionDuration=m.current.transitionDuration,v.style.animationName=m.current.animationName),l(n)}},[o.open,n]),p.jsx(he.div,{"data-state":Iv(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!g,...i,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...t.style},children:g&&s})});function Iv(t){return t?"open":"closed"}var r3=uk,n3=hk,s3=fk,Sr="Accordion",i3=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[$v,o3,a3]=Ug(Sr),[Td,I3]=bn(Sr,[a3,ck]),Lv=ck(),pk=j.forwardRef((t,e)=>{const{type:r,...n}=t,s=n,i=n;return p.jsx($v.Provider,{scope:t.__scopeAccordion,children:r==="multiple"?p.jsx(d3,{...i,ref:e}):p.jsx(u3,{...s,ref:e})})});pk.displayName=Sr;var[gk,l3]=Td(Sr),[vk,c3]=Td(Sr,{collapsible:!1}),u3=j.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},collapsible:i=!1,...o}=t,[a,l]=ni({prop:r,defaultProp:n??"",onChange:s,caller:Sr});return p.jsx(gk,{scope:t.__scopeAccordion,value:j.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:j.useCallback(()=>i&&l(""),[i,l]),children:p.jsx(vk,{scope:t.__scopeAccordion,collapsible:i,children:p.jsx(mk,{...o,ref:e})})})}),d3=j.forwardRef((t,e)=>{const{value:r,defaultValue:n,onValueChange:s=()=>{},...i}=t,[o,a]=ni({prop:r,defaultProp:n??[],onChange:s,caller:Sr}),l=j.useCallback(u=>a((d=[])=>[...d,u]),[a]),c=j.useCallback(u=>a((d=[])=>d.filter(f=>f!==u)),[a]);return p.jsx(gk,{scope:t.__scopeAccordion,value:o,onItemOpen:l,onItemClose:c,children:p.jsx(vk,{scope:t.__scopeAccordion,collapsible:!0,children:p.jsx(mk,{...i,ref:e})})})}),[h3,Pd]=Td(Sr),mk=j.forwardRef((t,e)=>{const{__scopeAccordion:r,disabled:n,dir:s,orientation:i="vertical",...o}=t,a=j.useRef(null),l=Xe(a,e),c=o3(r),d=Nv(s)==="ltr",f=le(t.onKeyDown,h=>{var C;if(!i3.includes(h.key))return;const y=h.target,g=c().filter(N=>{var A;return!((A=N.ref.current)!=null&&A.disabled)}),w=g.findIndex(N=>N.ref.current===y),m=g.length;if(w===-1)return;h.preventDefault();let v=w;const _=0,x=m-1,E=()=>{v=w+1,v>x&&(v=_)},k=()=>{v=w-1,v<_&&(v=x)};switch(h.key){case"Home":v=_;break;case"End":v=x;break;case"ArrowRight":i==="horizontal"&&(d?E():k());break;case"ArrowDown":i==="vertical"&&E();break;case"ArrowLeft":i==="horizontal"&&(d?k():E());break;case"ArrowUp":i==="vertical"&&k();break}const S=v%m;(C=g[S].ref.current)==null||C.focus()});return p.jsx(h3,{scope:r,disabled:n,direction:s,orientation:i,children:p.jsx($v.Slot,{scope:r,children:p.jsx(he.div,{...o,"data-orientation":i,ref:l,onKeyDown:n?void 0:f})})})}),Mu="AccordionItem",[f3,Mv]=Td(Mu),yk=j.forwardRef((t,e)=>{const{__scopeAccordion:r,value:n,...s}=t,i=Pd(Mu,r),o=l3(Mu,r),a=Lv(r),l=Ws(),c=n&&o.value.includes(n)||!1,u=i.disabled||t.disabled;return p.jsx(f3,{scope:r,open:c,disabled:u,triggerId:l,children:p.jsx(r3,{"data-orientation":i.orientation,"data-state":Sk(c),...a,...s,ref:e,disabled:u,open:c,onOpenChange:d=>{d?o.onItemOpen(n):o.onItemClose(n)}})})});yk.displayName=Mu;var _k="AccordionHeader",wk=j.forwardRef((t,e)=>{const{__scopeAccordion:r,...n}=t,s=Pd(Sr,r),i=Mv(_k,r);return p.jsx(he.h3,{"data-orientation":s.orientation,"data-state":Sk(i.open),"data-disabled":i.disabled?"":void 0,...n,ref:e})});wk.displayName=_k;var Wp="AccordionTrigger",bk=j.forwardRef((t,e)=>{const{__scopeAccordion:r,...n}=t,s=Pd(Sr,r),i=Mv(Wp,r),o=c3(Wp,r),a=Lv(r);return p.jsx($v.ItemSlot,{scope:r,children:p.jsx(n3,{"aria-disabled":i.open&&!o.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...a,...n,ref:e})})});bk.displayName=Wp;var xk="AccordionContent",Ek=j.forwardRef((t,e)=>{const{__scopeAccordion:r,...n}=t,s=Pd(Sr,r),i=Mv(xk,r),o=Lv(r);return p.jsx(s3,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...o,...n,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});Ek.displayName=xk;function Sk(t){return t?"open":"closed"}var p3=pk,g3=yk,v3=wk,kk=bk,Ck=Ek;const m3=p3,Tk=b.forwardRef(({className:t,...e},r)=>p.jsx(g3,{ref:r,className:pe("border-b",t),...e}));Tk.displayName="AccordionItem";const Pk=b.forwardRef(({className:t,children:e,...r},n)=>p.jsx(v3,{className:"flex",children:p.jsxs(kk,{ref:n,className:pe("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...r,children:[e,p.jsx(fR,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Pk.displayName=kk.displayName;const Rk=b.forwardRef(({className:t,children:e,...r},n)=>p.jsx(Ck,{ref:n,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...r,children:p.jsx("div",{className:pe("pb-4 pt-0",t),children:e})}));Rk.displayName=Ck.displayName;const y3=[{topic:"General",faqs:[{question:"What is Community Week NYC?",answer:"Community Week NYC is a citywide celebration of belonging, running May 9-17, 2026. It's dedicated to the builders, space
287s, and communities that are making real social connection possible in New York City. Think of it as a week-long festival of connection, featuring events, workshops, and gatherings designed to bring people together."},{question:"Who should attend Community Week?",answer:"Everyone! Whether you're a community builder looking for peers and resources, someone seeking to find their people in NYC, or just curious about the community space, there's something for you."},{question:"How much do events cost?",answer:"Community Week will feature a mix of free and ticketed events. Many community gatherings and networking events will be free to attend. Some workshops, special experiences, and larger events may have a ticket price to cover costs."},{question:"Where will events be held?",answer:"Events will be held across all five boroughs of NYC! We're partnering with third spaces, community venues, co-working spaces, restaurants, and other gathering places throughout the city."},{question:"Will there be virtual/online events?",answer:"Community Week is primarily focused on in-person connection. However, we may livestream certain panels or discussions for those who cannot attend in person."}]},{topic:"Event Types",faqs:[...Ct?[{question:"How can I host an event during Community Week?",answer:p.jsxs(p.Fragment,{children:["We'd love to have you! If you're a community builder or venue interested in hosting an official Community Week event, please fill out the"," ",p.jsx("a",{href:ei,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"host interest form"}),"."]})},{question:"What is the deadline to submit a host event request?",answer:p.jsxs(p.Fragment,{children:[p.jsx("strong",{children:wS}),". Submit your request via the"," ",p.jsx("a",{href:ei,target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"host interest form"})," ","before the deadline."]})}]:[],{question:"What if my event does not fall exactly between May 9-17?",answer:"That is totally okay. While May 9-17 is our core celebration window, we can still include events happening throughout May as part of Community Week programming."},{question:"What type of community events are being hosted?",answer:p.jsxs(p.Fragment,{children:["A broad mix of social-club style events, including:",p.jsxs("ul",{className:"mt-3 space-y-2 list-disc pl-5",children:[p.jsx("li",{children:"Social mixers and happy hours"}),p.jsx("li",{children:"Food experiences (pizza crawls, brunches, and dinner parties)"}),p.jsx("li",{children:"Arts and culture events (film screenings, live music, and performances)"}),p.jsx("li",{children:"Wellness and movement gatherings (yoga, dance, breathwork, and group walks)"}),p.jsx("li",{children:"Community-building discussions and builder workshops"}),p.jsx("li",{children:"Creative and interactive events (karaoke, board games, and storytelling)"}),p.jsx("li",{children:"Cultural and identity-centered gatherings"}),p.jsx("li",{children:"Book and learning circles"})]})]})},{question:"What events do you typically stay away from?",answer:"We prioritize community-first experiences over purely transactional events. In general, we avoid events that are mostly networking-for-business, lead generation, or sales-focused without a meaningful social/community component."}]},{topic:"Community Builders & Special Programming",faqs:[{question:"Will there be workshops for community builders?",answer:p.jsxs(p.Fragment,{children:["Yes. We are hosting builder-focused sessions throughout Community Week. Current lineup:",p.jsxs("ul",{className:"mt-3 space-y-2 list-disc pl-5",children:[p.jsxs("li",{children:["Fri, May 8, 7:00-9:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_7lq82HJvyA?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"CW NYC: Builders'-Only Welcome Reception"})]}),p.jsxs("li",{children:["Mon, May 11, 8:30-10:00 AM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_EH2hvwsDfC?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"Coffee and Conversation about Community (Session 1)"})]}),p.jsxs("li",{children:["Mon, May 11, 4:00-6:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_lrdOu7GKwY?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"Connection Academy 101: Creating Community"})]}),p.jsxs("li",{children:["Mon, May 11, 7:00-9:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_PZfaEu4qXz?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"Pitch-a-Community: Find Your People, Build Something Together"})]}),p.jsxs("li",{children:["Tue, May 12, 4:00-6:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_R28xjC2R0u?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"Connection Academy 201: Sustaining Community"})]}),p.jsxs("li",{children:["Wed, May 13, 8:30-10:00 AM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_loAW1AjXPD?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"Coffee and Conversation about Community (Session 2)"})]}),p.jsxs("li",{children:["Wed, May 13, 12:00-2:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_QrQh2fW6wH?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"Building Belonging in the Workplace"})]}),p.jsxs("li",{children:["Wed, May 13, 4:00-6:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_DfSXvscrz0?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"Money, Partners, and People: A Workshop on Sponsorship and Partnerships for Community Builders"})]}),p.jsxs("li",{children:["Fri, May 15, 9:00-10:30 AM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_PfIkXmIH7u?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"Coffee and Conversation about Community (Session 3)"})]}),p.jsxs("li",{children:["Fri, May 15, 11:00 AM-1:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_Hqijs0HKMc?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"The Future of Social Connection"})]})]})]})},{question:"Will there be any special events to look out for?",answer:p.jsxs(p.Fragment,{children:["Yes. We have special events across the week. Current lineup:",p.jsxs("ul",{className:"mt-3 space-y-2 list-disc pl-5",children:[p.jsxs("li",{children:["Sat, May 9, 8:00-11:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_fKG3bSffoO?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:'CW NYC Kickoff: "Find Your People" Celebration'})]}),p.jsxs("li",{children:["Mon, May 4, 6:30-9:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_sY9w0W50tO?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"CW Film Screening: Join or Die! (Emmy-Nominated) + Discussion"})]}),p.jsxs("li",{children:["Wed, May 13, 7:00-9:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_WfsixGczYN?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"CW NYC: Black Is Beautiful: The Kwame Brathwaite Story (Film Screening and Discussion)"})]}),p.jsxs("li",{children:["Sun, May 17, 6:00-9:00 PM:"," ",p.jsx("a",{href:"https://weeknights.co/events/evt_rRVZ56LjKo?utm_source=cw-faq",target:"_blank",rel:"noopener noreferrer",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"CW NYC: Closing Celebration Party with Special Guests and Performances"})]})]})]})},{question:"I'm a community builder. What's in it for me?",answer:"Community Week is built specifically with you in mind. Beyond the recognition and spotlight, you'll have access to builder-only gatherings, workshops on running sustainable communities, and the opportunity to connect with peers."}]},{topic:"Sponsorship",faqs:[{question:"How can I sponsor Community Week?",answer:p.jsxs(p.Fragment,{children:["We're actively seeking sponsors who believe in the power of community. Check out our"," ",p.jsx(Ir,{to:"/sponsors",className:"font-medium text-navy underline underline-offset-2 hover:text-primary transition-colors",children:"sponsors page"}
287)," ","for more details or reach out directly to discuss custom partnership opportunities."]})}]}],_3=()=>p.jsxs("div",{className:"min-h-screen bg-background",children:[p.jsx(bv,{}),p.jsx("main",{children:p.jsxs("section",{id:"faq",className:"py-24 bg-accent/20 relative overflow-hidden",children:[p.jsx("div",{className:"absolute inset-0 halftone-dots opacity-20"}),p.jsxs("div",{className:"container mx-auto px-4 relative z-10",children:[p.jsx("div",{className:"text-center mb-12",children:p.jsx("h2",{className:"font-display text-5xl md:text-7xl text-navy mb-4",children:"FAQ"})}),p.jsx("div",{className:"max-w-3xl mx-auto bg-background border-2 border-navy festival-shadow p-8 space-y-10",children:y3.map(t=>p.jsxs("div",{children:[p.jsx("div",{className:"mb-4",children:p.jsx("h3",{className:"inline-flex items-center rounded-none border-2 border-navy bg-accent/60 px-3 py-1.5 font-display text-xl md:text-2xl tracking-[0.12em] text-navy festival-shadow-sm",children:t.topic})}),p.jsx(m3,{type:"single",collapsible:!0,className:"w-full",children:t.faqs.map((e,r)=>p.jsxs(Tk,{value:`${t.topic}-item-${r}`,className:"border-b-2 border-navy last:border-b-0",children:[p.jsx(Pk,{className:"text-left font-display text-lg tracking-wide text-navy hover:text-primary hover:no-underline py-5",children:e.question}),p.jsx(Rk,{className:"text-muted-foreground pb-5",children:e.answer})]},`${t.topic}-${e.question}`))})]},t.topic))})]})]})}),p.jsx(xv,{})]}),w3=()=>{const t=oi();return b.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),p.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),p.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),p.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},b3=new KA;function x3(){const t=oi();return b.useEffect(()=>{y$(`${t.pathname}${t.search}${t.hash}`);const e=t.state,r=(e==null?void 0:e.scrollTo)||"",n=t.hash||"",s=n||r,i=()=>{var l;const o=window.history.state;if(!((l=o==null?void 0:o.usr)!=null&&l.scrollTo))return;const a={...o,usr:{...o.usr}};delete a.usr.scrollTo,window.history.replaceState(a,"")};if(s){const o=(a="smooth")=>{const l=ko(s,{behavior:a});return l&&(r&&!n&&i(),!0)};if(!o()){let a=0;const l=window.setInterval(()=>{a+=1,(o()||a>=20)&&window.clearInterval(l)},100);return()=>window.clearInterval(l)}if(n){const a=window.setTimeout(()=>{o("auto")},150);return()=>window.clearTimeout(a)}return}window.scrollTo({top:0,behavior:"auto"})},[t.pathname,t.search,t.hash,t.state]),null}const E3=()=>p.jsx(YA,{client:b3,children:p.jsxs(EA,{children:[p.jsx(sN,{}),p.jsx(LN,{}),p.jsxs(V2,{children:[p.jsx(x3,{}),p.jsxs(D2,{children:[p.jsx(ca,{path:"/",element:p.jsx(KF,{})}),p.jsx(ca,{path:"/sponsors",element:p.jsx(XF,{})}),p.jsx(ca,{path:"/faq",element:p.jsx(_3,{})}),p.jsx(ca,{path:"*",element:p.jsx(w3,{})})]})]})]})});m$();Gb(document.getElementById("root")).render(p.jsx(E3,{}));

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.