vendor: 6,571 bytes, lines 1-9
1var um=t=>{throw TypeError(t)};var gu=(t,e,r)=>e.has(t)||um("Cannot "+r);var j=(t,e,r)=>(gu(t,e,"read from private field"),r?r.call(t):e.get(t)),ae=(t,e,r)=>e.has(t)?um("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ee=(t,e,r,n)=>(gu(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),We=(t,e,r)=>(gu(t,e,"access private method"),r);var Pa=(t,e,r,n)=>({set _(s){ee(t,e,s,r)},get _(){return j(t,e,n)}});function by(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();function _y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function IE(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}),r}var Sy={exports:{}},bc={},Ey={exports:{}},se={};/** 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 ca=Symbol.for("react.element"),DE=Symbol.for("react.portal"),ME=Symbol.for("react.fragment"),LE=Symbol.for("react.strict_mode"),$E=Symbol.for("react.profiler"),FE=Symbol.for("react.provider"),UE=Symbol.for("react.context"),BE=Symbol.for("react.forward_ref"),zE=Symbol.for("react.suspense"),VE=Symbol.for("react.memo"),WE=Symbol.for("react.lazy"),dm=Symbol.iterator;function HE(t){return t===null||typeof t!="object"?null:(t=dm&&t[dm]||t["@@iterator"],typeof t=="function"?t:null)}var Cy={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ky=Object.assign,Ry={};function Mo(t,e,r){this.props=t,this.context=e,this.refs=Ry,this.updater=r||Cy}Mo.prototype.isReactComponent={};Mo.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")};Mo.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Py(){}Py.prototype=Mo.prototype;function oh(t,e,r){this.props=t,this.context=e,this.refs=Ry,this.updater=r||Cy}var ih=oh.prototype=new Py;ih.constructor=oh;ky(ih,Mo.prototype);ih.isPureReactComponent=!0;var fm=Array.isArray,Ty=Object.prototype.hasOwnProperty,ah={current:null},jy={key:!0,ref:!0,__self:!0,__source:!0};function Ny(t,e,r){var n,s={},o=null,i=null;if(e!=null)for(n in e.ref!==void 0&&(i=e.ref),e.key!==void 0&&(o=""+e.key),e)Ty.call(e,n)&&!jy.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:ca,type:t,key:o,ref:i,props:s,_owner:ah.current}}function KE(t,e){return{$$typeof:ca,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function lh(t){return typeof t=="object"&&t!==null&&t.$$typeof===ca}function qE(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(r){return e[r]})}var hm=/\/+/g;function vu(t,e){return typeof t=="object"&&t!==null&&t.key!=null?qE(""+t.key):e.toString(36)}function dl(t,e,r,n,s){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case ca:case DE:i=!0}}if(i)return i=t,s=s(i),t=n===""?"."+vu(i,0):n,fm(s)?(r="",t!=null&&(r=t.replace(hm,"$&/")+"/"),dl(s,e,r,"",function(c){return c})):s!=null&&(lh(s)&&(s=KE(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(hm,"$&/")+"/")+t)),e.push(s)),1;if(i=0,n=n===""?".":n+":",fm(t))for(var a=0;a<t.length;a++){o=t[a];var l=n+vu(o,a);i+=dl(o,e,r,l,s)}else if(l=HE(t),typeof l=="function")for(t=l.call(t),a=0;!(o=t.next()).done;)o=o.value,l=n+vu(o,a++),i+=dl(o,e,r,l,s);else if(o==="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 i}function Ta(t,e,r){if(t==null)return t;var n=[],s=0;return dl(t,n,"","",function(o){return e.call(r,o,s++)}),n}function GE(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 rt={current:null},fl={transition:null},YE={ReactCurrentDispatcher:rt,ReactCurrentBatchConfig:fl,ReactCurrentOwner:ah};function Oy(){throw Error("act(...) is not supported in production builds of React.")}se.Children={map:Ta,forEach:function(t,e,r){Ta(t,function(){e.apply(this,arguments)},r)},count:function(t){var e=0;return Ta(t,function(){e++}),e},toArray:function(t){return Ta(t,function(e){return e})||[]},only:function(t){if(!lh(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};se.Component=Mo;se.Fragment=ME;se.Profiler=$E;se.PureComponent=oh;se.StrictMode=LE;se.Suspense=zE;
vendor: 5,216 bytes, lines 9-25
9se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=YE;se.act=Oy;se.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=ky({},t.props),s=t.key,o=t.ref,i=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,i=ah.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)Ty.call(e,l)&&!jy.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:ca,type:t.type,key:s,ref:o,props:n,_owner:i}};se.createContext=function(t){return t={$$typeof:UE,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:FE,_context:t},t.Consumer=t};se.createElement=Ny;se.createFactory=function(t){var e=Ny.bind(null,t);return e.type=t,e};se.createRef=function(){return{current:null}};se.forwardRef=function(t){return{$$typeof:BE,render:t}};se.isValidElement=lh;se.lazy=function(t){return{$$typeof:WE,_payload:{_status:-1,_result:t},_init:GE}};se.memo=function(t,e){return{$$typeof:VE,type:t,compare:e===void 0?null:e}};se.startTransition=function(t){var e=fl.transition;fl.transition={};try{t()}finally{fl.transition=e}};se.unstable_act=Oy;se.useCallback=function(t,e){return rt.current.useCallback(t,e)};se.useContext=function(t){return rt.current.useContext(t)};se.useDebugValue=function(){};se.useDeferredValue=function(t){return rt.current.useDeferredValue(t)};se.useEffect=function(t,e){return rt.current.useEffect(t,e)};se.useId=function(){return rt.current.useId()};se.useImperativeHandle=function(t,e,r){return rt.current.useImperativeHandle(t,e,r)};se.useInsertionEffect=function(t,e){return rt.current.useInsertionEffect(t,e)};se.useLayoutEffect=function(t,e){return rt.current.useLayoutEffect(t,e)};se.useMemo=function(t,e){return rt.current.useMemo(t,e)};se.useReducer=function(t,e,r){return rt.current.useReducer(t,e,r)};se.useRef=function(t){return rt.current.useRef(t)};se.useState=function(t){return rt.current.useState(t)};se.useSyncExternalStore=function(t,e,r){return rt.current.useSyncExternalStore(t,e,r)};se.useTransition=function(){return rt.current.useTransition()};se.version="18.3.1";Ey.exports=se;var g=Ey.exports;const $=_y(g),ch=by({__proto__:null,default:$},[g]);/** 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 QE=g,JE=Symbol.for("react.element"),XE=Symbol.for("react.fragment"),ZE=Object.prototype.hasOwnProperty,eC=QE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,tC={key:!0,ref:!0,__self:!0,__source:!0};function Ay(t,e,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),e.key!==void 0&&(o=""+e.key),e.ref!==void 0&&(i=e.ref);for(n in e)ZE.call(e,n)&&!tC.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:JE,type:t,key:o,ref:i,props:s,_owner:eC.current}}bc.Fragment=XE;bc.jsx=Ay;bc.jsxs=Ay;Sy.exports=bc;var d=Sy.exports,Iy={exports:{}},Ct={},Dy={exports:{}},My={};/** 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(T,R){var L=T.length;T.push(R);e:for(;0<L;){var B=L-1>>>1,z=T[B];if(0<s(z,R))T[B]=R,T[L]=z,L=B;else break e}}function r(T){return T.length===0?null:T[0]}function n(T){if(T.length===0)return null;var R=T[0],L=T.pop();if(L!==R){T[0]=L;e:for(var B=0,z=T.length,Q=z>>>1;B<Q;){var X=2*(B+1)-1,pe=T[X],Re=X+1,ne=T[Re];if(0>s(pe,L))Re<z&&0>s(ne,pe)?(T[B]=ne,T[Re]=L,B=Re):(T[B]=pe,T[X]=L,B=X);else if(Re<z&&0>s(ne,L))T[B]=ne,T[Re]=L,B=Re;else break e}}return R}function s(T,R){var L=T.sortIndex-R.sortIndex;return L!==0?L:T.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();t.unstable_now=function(){return i.now()-a}}var l=[],c=[],u=1,f=null,p=3,h=!1,v=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(T){for(var R=r(c);R!==null;){if(R.callback===null)n(c);else if(R.startTime<=T)n(c),R.sortIndex=R.expirationTime,e(l,R);else break;R=r(c)}}function _(T){if(m=!1,b(T),!v)if(r(l)!==null)v=!0,M(S);else{var R=r(c);R!==null&&U(_,R.startTime-T)}}function S(T,R){v=!1,m&&(m=!1,x(k),k=-1),h=!0;var L=p;try{for(b(R),f=r(l);f!==null&&(!(f.expirationTime>R)||T&&!H());){var B=f.callback;if(typeof B=="function"){f.callback=null,p=f.priorityLevel;var z=B(f.expirationTime<=R);R=t.unstable_now(),typeof z=="function"?f.callback=z:f===r(l)&&n(l),b(R
vendor: 8,993 bytes, lines 25-34
25)}else n(l);f=r(l)}if(f!==null)var Q=!0;else{var X=r(c);X!==null&&U(_,X.startTime-R),Q=!1}return Q}finally{f=null,p=L,h=!1}}var E=!1,C=null,k=-1,P=5,N=-1;function H(){return!(t.unstable_now()-N<P)}function A(){if(C!==null){var T=t.unstable_now();N=T;var R=!0;try{R=C(!0,T)}finally{R?F():(E=!1,C=null)}}else E=!1}var F;if(typeof y=="function")F=function(){y(A)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,I=O.port2;O.port1.onmessage=A,F=function(){I.postMessage(null)}}else F=function(){w(A,0)};function M(T){C=T,E||(E=!0,F())}function U(T,R){k=w(function(){T(t.unstable_now())},R)}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(T){T.callback=null},t.unstable_continueExecution=function(){v||h||(v=!0,M(S))},t.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<T?Math.floor(1e3/T):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(l)},t.unstable_next=function(T){switch(p){case 1:case 2:case 3:var R=3;break;default:R=p}var L=p;p=R;try{return T()}finally{p=L}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(T,R){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var L=p;p=T;try{return R()}finally{p=L}},t.unstable_scheduleCallback=function(T,R,L){var B=t.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?B+L:B):L=B,T){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=L+z,T={id:u++,callback:R,priorityLevel:T,startTime:L,expirationTime:z,sortIndex:-1},L>B?(T.sortIndex=L,e(c,T),r(l)===null&&T===r(c)&&(m?(x(k),k=-1):m=!0,U(_,L-B))):(T.sortIndex=z,e(l,T),v||h||(v=!0,M(S))),T},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(T){var R=p;return function(){var L=p;p=R;try{return T.apply(this,arguments)}finally{p=L}}}})(My);Dy.exports=My;var rC=Dy.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 nC=g,St=rC;function D(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 Ly=new Set,Pi={};function Ss(t,e){Eo(t,e),Eo(t+"Capture",e)}function Eo(t,e){for(Pi[t]=e,t=0;t<e.length;t++)Ly.add(e[t])}var Lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bd=Object.prototype.hasOwnProperty,sC=/^[: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]*$/,pm={},mm={};function oC(t){return bd.call(mm,t)?!0:bd.call(pm,t)?!1:sC.test(t)?mm[t]=!0:(pm[t]=!0,!1)}function iC(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 aC(t,e,r,n){if(e===null||typeof e>"u"||iC(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 nt(t,e,r,n,s,o,i){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=o,this.removeEmptyString=i}var Ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){Ve[t]=new nt(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];Ve[e]=new nt(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){Ve[t]=new nt(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){Ve[t]=new nt(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){Ve[t]=new nt(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){Ve[t]=new nt(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){Ve[t]=new nt(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){Ve[t]=new nt(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){Ve[t]=new nt(t,5,!1,t.toLowerCase(),null,!1,!1)});var uh=/[\-:]([a-z])/g;function dh(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(uh,dh);Ve[e]=new nt(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(uh,dh);Ve[e]=new nt(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(uh,dh);Ve[e]=new nt(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){Ve[t]=new nt(t,1,!1,t.toLowerCase(),null,!1,!1)});Ve.xlinkHref=new nt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){Ve[t]=new nt(t,1,!1,t.toLowerCase(),null,!0,!0)});function fh(t,e,r,n){var s=Ve.hasOwnProperty(e)?Ve[e]:null;(s!==null?s.type!==0:n||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(aC(e,r,s,n)&&(r=null),n||s===null?oC(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 Wr=nC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ja=Symbol.for("react.element"),Ks=Symbol.for("react.portal"),qs=Symbol.for("react.fragment"),hh=Symbol.for("react.strict_mode"),_d=Symbol.for("react.profiler"),$y=Symbol.for("react.provider"),Fy=Symbol.for("react.context"),ph=Symbol.for("react.forward_ref"),Sd=Symbol.for("react.suspense"),Ed=Symbol.for("react.suspense_list"),mh=Symbol.for("react.memo"),sn=Symbol.for("react.lazy"),Uy=Symbol.for("react.offscreen"),gm=Symbol.iterator;function Yo(t){return t===null||typeof t!="object"?null:(t=gm&&t[gm]||t["@@iterator"],typeof t=="function"?t:null)}var ke=Object.assign,yu;function li(t){if(yu===void 0)try{throw Error()}catch(r){var e=r.stack.trim().match(/\n( *(at )?)/);yu=e&&e[1]||""}return` 34`+yu+t}var wu=!1;function xu(t,e){if(!t||wu)return"";wu=!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: 6,068 bytes, lines 34-37
34catch(c){if(c&&n&&typeof c.stack=="string"){for(var s=c.stack.split(` 35`),o=n.stack.split(` 36`),i=s.length-1,a=o.length-1;1<=i&&0<=a&&s[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(s[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||s[i]!==o[a]){var l=` 37`+s[i].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=i&&0<=a);break}}}finally{wu=!1,Error.prepareStackTrace=r}return(t=t?t.displayName||t.name:"")?li(t):""}function lC(t){switch(t.tag){case 5:return li(t.type);case 16:return li("Lazy");case 13:return li("Suspense");case 19:return li("SuspenseList");case 0:case 2:case 15:return t=xu(t.type,!1),t;case 11:return t=xu(t.type.render,!1),t;case 1:return t=xu(t.type,!0),t;default:return""}}function Cd(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 qs:return"Fragment";case Ks:return"Portal";case _d:return"Profiler";case hh:return"StrictMode";case Sd:return"Suspense";case Ed:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Fy:return(t.displayName||"Context")+".Consumer";case $y:return(t._context.displayName||"Context")+".Provider";case ph:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case mh:return e=t.displayName||null,e!==null?e:Cd(t.type)||"Memo";case sn:e=t._payload,t=t._init;try{return Cd(t(e))}catch{}}return null}function cC(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 Cd(e);case 8:return e===hh?"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 jn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function By(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function uC(t){var e=By(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,o=r.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(t,e,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Na(t){t._valueTracker||(t._valueTracker=uC(t))}function zy(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var r=e.getValue(),n="";return t&&(n=By(t)?t.checked?"true":"false":t.value),t=n,t!==r?(e.setValue(t),!0):!1}function jl(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 kd(t,e){var r=e.checked;return ke({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??t._wrapperState.initialChecked})}function vm(t,e){var r=e.defaultValue==null?"":e.defaultValue,n=e.checked!=null?e.checked:e.defaultChecked;r=jn(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 Vy(t,e){e=e.checked,e!=null&&fh(t,"checked",e,!1)}function Rd(t,e){Vy(t,e);var r=jn(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")?Pd(t,e.type,r):e.hasOwnProperty("defaultValue")&&Pd(t,e.type,jn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function ym(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 Pd(t,e,r){(e!=="number"||jl(t.ownerDocument)!==t)&&(r==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+r&&(t.defaultValue=""+r))}var ci=Array.isArray;function so(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=""+jn(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 Td(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(D(91));return ke({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function wm(t,e){var r=e.value;if(r==null){if(r=e.children,e=e.defaultValue,r!=null){if(e!=null)throw Error(D(92));if(ci(r)){if(1<r.length)throw Error(D(93));r=r[0]}e=r}e==null&&(e=""),r=e}t._wrapperState={initialValue:jn(r)}}function Wy(t,e){var r=jn(e.value),n=jn(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 xm(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Hy(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"}}
vendor: 11,052 bytes, line 37
37function jd(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Hy(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Oa,Ky=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(Oa=Oa||document.createElement("div"),Oa.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Oa.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Ti(t,e){if(e){var r=t.firstChild;if(r&&r===t.lastChild&&r.nodeType===3){r.nodeValue=e;return}}t.textContent=e}var pi={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},dC=["Webkit","ms","Moz","O"];Object.keys(pi).forEach(function(t){dC.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),pi[e]=pi[t]})});function qy(t,e,r){return e==null||typeof e=="boolean"||e===""?"":r||typeof e!="number"||e===0||pi.hasOwnProperty(t)&&pi[t]?(""+e).trim():e+"px"}function Gy(t,e){t=t.style;for(var r in e)if(e.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=qy(r,e[r],n);r==="float"&&(r="cssFloat"),n?t.setProperty(r,s):t[r]=s}}var fC=ke({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 Nd(t,e){if(e){if(fC[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(D(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(D(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(D(61))}if(e.style!=null&&typeof e.style!="object")throw Error(D(62))}}function Od(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 Ad=null;function gh(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Id=null,oo=null,io=null;function bm(t){if(t=fa(t)){if(typeof Id!="function")throw Error(D(280));var e=t.stateNode;e&&(e=kc(e),Id(t.stateNode,t.type,e))}}function Yy(t){oo?io?io.push(t):io=[t]:oo=t}function Qy(){if(oo){var t=oo,e=io;if(io=oo=null,bm(t),e)for(t=0;t<e.length;t++)bm(e[t])}}function Jy(t,e){return t(e)}function Xy(){}var bu=!1;function Zy(t,e,r){if(bu)return t(e,r);bu=!0;try{return Jy(t,e,r)}finally{bu=!1,(oo!==null||io!==null)&&(Xy(),Qy())}}function ji(t,e){var r=t.stateNode;if(r===null)return null;var n=kc(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(D(231,e,typeof r));return r}var Dd=!1;if(Lr)try{var Qo={};Object.defineProperty(Qo,"passive",{get:function(){Dd=!0}}),window.addEventListener("test",Qo,Qo),window.removeEventListener("test",Qo,Qo)}catch{Dd=!1}function hC(t,e,r,n,s,o,i,a,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(r,c)}catch(u){this.onError(u)}}var mi=!1,Nl=null,Ol=!1,Md=null,pC={onError:function(t){mi=!0,Nl=t}};function mC(t,e,r,n,s,o,i,a,l){mi=!1,Nl=null,hC.apply(pC,arguments)}function gC(t,e,r,n,s,o,i,a,l){if(mC.apply(this,arguments),mi){if(mi){var c=Nl;mi=!1,Nl=null}else throw Error(D(198));Ol||(Ol=!0,Md=c)}}function Es(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 ew(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 _m(t){if(Es(t)!==t)throw Error(D(188))}function vC(t){var e=t.alternate;if(!e){if(e=Es(t),e===null)throw Error(D(188));return e!==t?null:t}for(var r=t,n=e;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return _m(s),t;if(o===n)return _m(s),e;o=o.sibling}throw Error(D(188))}if(r.return!==n.return)r=s,n=o;else{for(var i=!1,a=s.child;a;){if(a===r){i=!0,r=s,n=o;break}if(a===n){i=!0,n=s,r=o;break}a=a.sibling}if(!i){for(a=o.child;a;){if(a===r){i=!0,r=o,n=s;break}if(a===n){i=!0,n=o,r=s;break}a=a.sibling}if(!i)throw Error(D(189))}}if(r.alternate!==n)throw Error(D(190))}if(r.tag!==3)throw Error(D(188));return r.stateNode.current===r?t:e}function tw(t){return t=vC(t),t!==null?rw(t):null}function rw(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=rw(t);if(e!==null)return e;t=t.sibling}return null}var nw=St.unstable_scheduleCallback,Sm=St.unstable_cancelCallback,yC=St.unstable_shouldYield,wC=St.unstable_requestPaint,je=St.unstable_now,xC=St.unstable_getCurrentPriorityLevel,vh=St.unstable_ImmediatePriority,sw=St.unstable_UserBlockingPriority,Al=St.unstable_NormalPriority,bC=St.unstable_LowPriority,ow=St.unstable_IdlePriority,_c=null,vr=null;function _C(t){if(vr&&typeof vr.onCommitFiberRoot=="function")try{vr.onCommitFiberRoot(_c,t,void 0,(t.current.flags&128)===128)}catch{}}var Zt=Math.clz32?Math.clz32:CC,SC=Math.log,EC=Math.LN2;function CC(t){return t>>>=0,t===0?32:31-(SC(t)/EC|0)|0}var Aa=64,Ia=4194304;function ui(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 Il(t,e){var r=t.pendingLanes;if(r===0)return 0;var n=0,s=t.suspendedLanes,o=t.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=ui(a):(o&=i,o!==0&&(n=ui(o)))}else i=r&~s,i!==0?n=ui(i):o!==0&&(n=ui(o));if(n===0)return 0;if(e!==0&&e!==n&&!(e&s)&&(s=n&-n,o=e&-e,s>=o||s===16&&(o&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-Zt(e),s=1<<r,n|=t[r],e&=~s;return n}function kC(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 RC(t,e){for(var r=t.suspendedLanes,n=t.pingedLanes,s=t.expirationTimes,o=t.pendingLanes;0<o;){var i=31-Zt(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=kC(a,e)):l<=e&&(t.expiredLanes|=a),o&=~a}}function Ld(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function iw(){var t=Aa;return Aa<<=1,!(Aa&4194240)&&(Aa=64),t}function _u(t){for(var e=[],r=0;31>r;r++)e.push(t);return e}function ua(t,e,r){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-Zt(e),t[e]=r}function PC(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-Zt(r),o=1<<s;e[s]=0,n[s]=-1,t[s]=-1,r&=~o}}function yh(t,e){var r=t.entangledLanes|=e;for(t=t.entanglements;r;){var n=31-Zt(r),s=1<<n;s&e|t[n]&e&&(t[n]|=e),r&=~s}}var fe=0;function aw(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var lw,wh,cw,uw,dw,$d=!1,Da=[],wn=null,xn=null,bn=null,Ni=new Map,Oi=new Map,an=[],TC="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 Em(t,e){switch(t){case"focusin":case"focusout":wn=null;break;case"dragenter":case"dragleave":xn=null;break;case"mouseover":case"mouseout":bn=null;break;case"pointerover":case"pointerout":Ni.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oi.delete(e.pointerId)}}function Jo(t,e,r,n,s,o){return t===null||t.nativeEvent!==o?(t={blockedOn:e,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},e!==null&&(e=fa(e),e!==null&&wh(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,s!==null&&e.indexOf(s)===-1&&e.push(s),t)}function jC(t,e,r,n,s){switch(e){case"focusin":return wn=Jo(wn,t,e,r,n,s),!0;case"dragenter":return xn=Jo(xn,t,e,r,n,s),!0;case"mouseover":return bn=Jo(bn,t,e,r,n,s),!0;case"pointerover":var o=s.pointerId;return Ni.set(o,Jo(Ni.get(o)||null,t,e,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Oi.set(o,Jo(Oi.get(o)||null,t,e,r,n,s)),!0}return!1}function fw(t){var e=Zn(t.target);if(e!==null){var r=Es(e);if(r!==null){if(e=r.tag,e===13){if(e=ew(r),e!==null){t.blockedOn=e,dw(t.priority,function(){cw(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 hl(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var r=Fd(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(r===null){r=t.nativeEvent;var n=new r.constructor(r.type,r);Ad=n,r.target.dispatchEvent(n),Ad=null}else return e=fa(r),e!==null&&wh(e),t.blockedOn=r,!1;e.shift()}return!0}function Cm(t,e,r){hl(t)&&r.delete(e)}function NC(){$d=!1,wn!==null&&hl(wn)&&(wn=null),xn!==null&&hl(xn)&&(xn=null),bn!==null&&hl(bn)&&(bn=null),Ni.forEach(Cm),Oi.forEach(Cm)}function Xo(t,e){t.blockedOn===e&&(t.blockedOn=null,$d||($d=!0,St.unstable_scheduleCallback(St.unstable_NormalPriority,NC)))}function Ai(t){function e(s){return Xo(s,t)}if(0<Da.length){Xo(Da[0],t);for(var r=1;r<Da.length;r++){var n=Da[r];n.blockedOn===t&&(n.blockedOn=null)}}for(wn!==null&&Xo(wn,t),xn!==null&&Xo(xn,t),bn!==null&&Xo(bn,t),Ni.forEach(e),Oi.forEac
vendor: 13,160 bytes, line 37
37h(e),r=0;r<an.length;r++)n=an[r],n.blockedOn===t&&(n.blockedOn=null);for(;0<an.length&&(r=an[0],r.blockedOn===null);)fw(r),r.blockedOn===null&&an.shift()}var ao=Wr.ReactCurrentBatchConfig,Dl=!0;function OC(t,e,r,n){var s=fe,o=ao.transition;ao.transition=null;try{fe=1,xh(t,e,r,n)}finally{fe=s,ao.transition=o}}function AC(t,e,r,n){var s=fe,o=ao.transition;ao.transition=null;try{fe=4,xh(t,e,r,n)}finally{fe=s,ao.transition=o}}function xh(t,e,r,n){if(Dl){var s=Fd(t,e,r,n);if(s===null)Ou(t,e,n,Ml,r),Em(t,n);else if(jC(s,t,e,r,n))n.stopPropagation();else if(Em(t,n),e&4&&-1<TC.indexOf(t)){for(;s!==null;){var o=fa(s);if(o!==null&&lw(o),o=Fd(t,e,r,n),o===null&&Ou(t,e,n,Ml,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else Ou(t,e,n,null,r)}}var Ml=null;function Fd(t,e,r,n){if(Ml=null,t=gh(n),t=Zn(t),t!==null)if(e=Es(t),e===null)t=null;else if(r=e.tag,r===13){if(t=ew(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 Ml=t,null}function hw(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(xC()){case vh:return 1;case sw:return 4;case Al:case bC:return 16;case ow:return 536870912;default:return 16}default:return 16}}var mn=null,bh=null,pl=null;function pw(){if(pl)return pl;var t,e=bh,r=e.length,n,s="value"in mn?mn.value:mn.textContent,o=s.length;for(t=0;t<r&&e[t]===s[t];t++);var i=r-t;for(n=1;n<=i&&e[r-n]===s[o-n];n++);return pl=s.slice(t,1<n?1-n:void 0)}function ml(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 Ma(){return!0}function km(){return!1}function kt(t){function e(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(r=t[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ma:km,this.isPropagationStopped=km,this}return ke(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=Ma)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ma)},persist:function(){},isPersistent:Ma}),e}var Lo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_h=kt(Lo),da=ke({},Lo,{view:0,detail:0}),IC=kt(da),Su,Eu,Zo,Sc=ke({},da,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sh,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"?(Su=t.screenX-Zo.screenX,Eu=t.screenY-Zo.screenY):Eu=Su=0,Zo=t),Su)},movementY:function(t){return"movementY"in t?t.movementY:Eu}}),Rm=kt(Sc),DC=ke({},Sc,{dataTransfer:0}),MC=kt(DC),LC=ke({},da,{relatedTarget:0}),Cu=kt(LC),$C=ke({},Lo,{animationName:0,elapsedTime:0,pseudoElement:0}),FC=kt($C),UC=ke({},Lo,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),BC=kt(UC),zC=ke({},Lo,{data:0}),Pm=kt(zC),VC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},WC={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"},HC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KC(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=HC[t])?!!e[t]:!1}function Sh(){return KC}var qC=ke({},da,{key:function(t){if(t.key){var e=VC[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ml(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?WC[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sh,charCode:function(t){return t.type==="keypress"?ml(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ml(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),GC=kt(qC),YC=ke({},Sc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tm=kt(YC),QC=ke({},da,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sh}),JC=kt(QC),XC=ke({},Lo,{propertyName:0,elapsedTime:0,pseudoElement:0}),ZC=kt(XC),ek=ke({},Sc,{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}),tk=kt(ek),rk=[9,13,27,32],Eh=Lr&&"CompositionEvent"in window,gi=null;Lr&&"documentMode"in document&&(gi=document.documentMode);var nk=Lr&&"TextEvent"in window&&!gi,mw=Lr&&(!Eh||gi&&8<gi&&11>=gi),jm=" ",Nm=!1;function gw(t,e){switch(t){case"keyup":return rk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vw(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Gs=!1;function sk(t,e){switch(t){case"compositionend":return vw(e);case"keypress":return e.which!==32?null:(Nm=!0,jm);case"textInput":return t=e.data,t===jm&&Nm?null:t;default:return null}}function ok(t,e){if(Gs)return t==="compositionend"||!Eh&&gw(t,e)?(t=pw(),pl=bh=mn=null,Gs=!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 mw&&e.locale!=="ko"?null:e.data;default:return null}}var ik={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 Om(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!ik[t.type]:e==="textarea"}function yw(t,e,r,n){Yy(n),e=Ll(e,"onChange"),0<e.length&&(r=new _h("onChange","change",null,r,n),t.push({event:r,listeners:e}))}var vi=null,Ii=null;function ak(t){Tw(t,0)}function Ec(t){var e=Js(t);if(zy(e))return t}function lk(t,e){if(t==="change")return e}var ww=!1;if(Lr){var ku;if(Lr){var Ru="oninput"in document;if(!Ru){var Am=document.createElement("div");Am.setAttribute("oninput","return;"),Ru=typeof Am.oninput=="function"}ku=Ru}else ku=!1;ww=ku&&(!document.documentMode||9<document.documentMode)}function Im(){vi&&(vi.detachEvent("onpropertychange",xw),Ii=vi=null)}function xw(t){if(t.propertyName==="value"&&Ec(Ii)){var e=[];yw(e,Ii,t,gh(t)),Zy(ak,e)}}function ck(t,e,r){t==="focusin"?(Im(),vi=e,Ii=r,vi.attachEvent("onpropertychange",xw)):t==="focusout"&&Im()}function uk(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ec(Ii)}function dk(t,e){if(t==="click")return Ec(e)}function fk(t,e){if(t==="input"||t==="change")return Ec(e)}function hk(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var rr=typeof Object.is=="function"?Object.is:hk;function Di(t,e){if(rr(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(!bd.call(e,s)||!rr(t[s],e[s]))return!1}return!0}function Dm(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Mm(t,e){var r=Dm(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=Dm(r)}}function bw(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?bw(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function _w(){for(var t=window,e=jl();e instanceof t.HTMLIFrameElement;){try{var r=typeof e.contentWindow.location.href=="string"}catch{r=!1}if(r)t=e.contentWindow;else break;e=jl(t.document)}return e}function Ch(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 pk(t){var e=_w(),r=t.focusedElem,n=t.selectionRange;if(e!==r&&r&&r.ownerDocument&&bw(r.ownerDocument.documentElement,r)){if(n!==null&&Ch(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,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!t.extend&&o>n&&(s=n,n=o,o=s),s=Mm(r,o);var i=Mm(r,n);s&&i&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==i.node||t.focusOffset!==i.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),o>n?(t.addRange(e),t.extend(i.node,i.offset)):(e.setEnd(i.node,i.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 mk=Lr&&"documentMode"in document&&11>=document.documentMode,Ys=null,Ud=null,yi=null,Bd=!1;function Lm(t,e,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Bd||Ys==null||Ys!==jl(n)||(n=Ys,"selectionStart"in n&&Ch(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),yi&&Di(yi,n)||(yi=n,n=Ll(Ud,"onSelect"),0<n.length&&(e=new _h("onSelect","select",null,e,r),t.push({event:e,listeners:n}),e.target=Ys)))}function La(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit"+t]="webkit"+e,r["Moz"+t]="moz"+e,r}var Qs={animationend:La("Animation","AnimationEnd"),animationiteration:La("Animation","AnimationIteration"),animationstart:La("Animation","AnimationStart"),transitionend:La("Transition","TransitionEnd")},Pu={},Sw={};Lr&&(Sw=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function Cc(t){if(Pu[t])return Pu[t];if(!Qs[t])return t;var e=Qs[t],r;for(r in e)if(e.hasOwnProperty(r)&&r in Sw)return Pu[t]=e[r];return t}var Ew=Cc("animationend"),Cw=Cc("animationiteration"),kw=Cc("animationstart"),Rw=Cc("transitionend"),Pw=new Map,$m="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 In(t,e){Pw.set(t,e),Ss(e,[t])}for(var Tu=0;Tu<$m.length;
vendor: 4,898 bytes, line 37
37Tu++){var ju=$m[Tu],gk=ju.toLowerCase(),vk=ju[0].toUpperCase()+ju.slice(1);In(gk,"on"+vk)}In(Ew,"onAnimationEnd");In(Cw,"onAnimationIteration");In(kw,"onAnimationStart");In("dblclick","onDoubleClick");In("focusin","onFocus");In("focusout","onBlur");In(Rw,"onTransitionEnd");Eo("onMouseEnter",["mouseout","mouseover"]);Eo("onMouseLeave",["mouseout","mouseover"]);Eo("onPointerEnter",["pointerout","pointerover"]);Eo("onPointerLeave",["pointerout","pointerover"]);Ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ss("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var di="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(" "),yk=new Set("cancel close invalid load scroll toggle".split(" ").concat(di));function Fm(t,e,r){var n=t.type||"unknown-event";t.currentTarget=r,gC(n,e,void 0,t),t.currentTarget=null}function Tw(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 o=void 0;if(e)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;Fm(s,a,c),o=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,c=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;Fm(s,a,c),o=l}}}if(Ol)throw t=Md,Ol=!1,Md=null,t}function we(t,e){var r=e[Kd];r===void 0&&(r=e[Kd]=new Set);var n=t+"__bubble";r.has(n)||(jw(e,t,2,!1),r.add(n))}function Nu(t,e,r){var n=0;e&&(n|=4),jw(r,t,n,e)}var $a="_reactListening"+Math.random().toString(36).slice(2);function Mi(t){if(!t[$a]){t[$a]=!0,Ly.forEach(function(r){r!=="selectionchange"&&(yk.has(r)||Nu(r,!1,t),Nu(r,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[$a]||(e[$a]=!0,Nu("selectionchange",!1,e))}}function jw(t,e,r,n){switch(hw(e)){case 1:var s=OC;break;case 4:s=AC;break;default:s=xh}r=s.bind(null,e,r,t),s=void 0,!Dd||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 Ou(t,e,r,n,s){var o=n;if(!(e&1)&&!(e&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(i===4)for(i=n.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;i=i.return}for(;a!==null;){if(i=Zn(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}Zy(function(){var c=o,u=gh(r),f=[];e:{var p=Pw.get(t);if(p!==void 0){var h=_h,v=t;switch(t){case"keypress":if(ml(r)===0)break e;case"keydown":case"keyup":h=GC;break;case"focusin":v="focus",h=Cu;break;case"focusout":v="blur",h=Cu;break;case"beforeblur":case"afterblur":h=Cu;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=Rm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=MC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=JC;break;case Ew:case Cw:case kw:h=FC;break;case Rw:h=ZC;break;case"scroll":h=IC;break;case"wheel":h=tk;break;case"copy":case"cut":case"paste":h=BC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Tm}var m=(e&4)!==0,w=!m&&t==="scroll",x=m?p!==null?p+"Capture":null:p;m=[];for(var y=c,b;y!==null;){b=y;var _=b.stateNode;if(b.tag===5&&_!==null&&(b=_,x!==null&&(_=ji(y,x),_!=null&&m.push(Li(y,_,b)))),w)break;y=y.return}0<m.length&&(p=new h(p,v,null,r,u),f.push({event:p,listeners:m}))}}if(!(e&7)){e:{if(p=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",p&&r!==Ad&&(v=r.relatedTarget||r.fromElement)&&(Zn(v)||v[$r]))break e;if((h||p)&&(p=u.window===u?u:(p=u.ownerDocument)?p.defaultView||p.parentWindow:window,h?(v=r.relatedTarget||r.toElement,h=c,v=v?Zn(v):null,v!==null&&(w=Es(v),v!==w||v.tag!==5&&v.tag!==6)&&(v=null)):(h=null,v=c),h!==v)){if(m=Rm,_="onMouseLeave",x="onMouseEnter",y="mouse",(t==="pointerout"||t==="pointerover")&&(m=Tm,_="onPointerLeave",x="onPointerEnter",y="pointer"),w=h==null?p:Js(
vendor: 6,349 bytes, lines 37-38
37h),b=v==null?p:Js(v),p=new m(_,y+"leave",h,r,u),p.target=w,p.relatedTarget=b,_=null,Zn(u)===c&&(m=new m(x,y+"enter",v,r,u),m.target=b,m.relatedTarget=w,_=m),w=_,h&&v)t:{for(m=h,x=v,y=0,b=m;b;b=As(b))y++;for(b=0,_=x;_;_=As(_))b++;for(;0<y-b;)m=As(m),y--;for(;0<b-y;)x=As(x),b--;for(;y--;){if(m===x||x!==null&&m===x.alternate)break t;m=As(m),x=As(x)}m=null}else m=null;h!==null&&Um(f,p,h,m,!1),v!==null&&w!==null&&Um(f,w,v,m,!0)}}e:{if(p=c?Js(c):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var S=lk;else if(Om(p))if(ww)S=fk;else{S=uk;var E=ck}else(h=p.nodeName)&&h.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(S=dk);if(S&&(S=S(t,c))){yw(f,S,r,u);break e}E&&E(t,p,c),t==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&Pd(p,"number",p.value)}switch(E=c?Js(c):window,t){case"focusin":(Om(E)||E.contentEditable==="true")&&(Ys=E,Ud=c,yi=null);break;case"focusout":yi=Ud=Ys=null;break;case"mousedown":Bd=!0;break;case"contextmenu":case"mouseup":case"dragend":Bd=!1,Lm(f,r,u);break;case"selectionchange":if(mk)break;case"keydown":case"keyup":Lm(f,r,u)}var C;if(Eh)e:{switch(t){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Gs?gw(t,r)&&(k="onCompositionEnd"):t==="keydown"&&r.keyCode===229&&(k="onCompositionStart");k&&(mw&&r.locale!=="ko"&&(Gs||k!=="onCompositionStart"?k==="onCompositionEnd"&&Gs&&(C=pw()):(mn=u,bh="value"in mn?mn.value:mn.textContent,Gs=!0)),E=Ll(c,k),0<E.length&&(k=new Pm(k,t,null,r,u),f.push({event:k,listeners:E}),C?k.data=C:(C=vw(r),C!==null&&(k.data=C)))),(C=nk?sk(t,r):ok(t,r))&&(c=Ll(c,"onBeforeInput"),0<c.length&&(u=new Pm("onBeforeInput","beforeinput",null,r,u),f.push({event:u,listeners:c}),u.data=C))}Tw(f,e)})}function Li(t,e,r){return{instance:t,listener:e,currentTarget:r}}function Ll(t,e){for(var r=e+"Capture",n=[];t!==null;){var s=t,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=ji(t,r),o!=null&&n.unshift(Li(t,o,s)),o=ji(t,e),o!=null&&n.push(Li(t,o,s))),t=t.return}return n}function As(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function Um(t,e,r,n,s){for(var o=e._reactName,i=[];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=ji(r,o),l!=null&&i.unshift(Li(r,l,a))):s||(l=ji(r,o),l!=null&&i.push(Li(r,l,a)))),r=r.return}i.length!==0&&t.push({event:e,listeners:i})}var wk=/\r\n?/g,xk=/\u0000|\uFFFD/g;function Bm(t){return(typeof t=="string"?t:""+t).replace(wk,` 38`).replace(xk,"")}function Fa(t,e,r){if(e=Bm(e),Bm(t)!==e&&r)throw Error(D(425))}function $l(){}var zd=null,Vd=null;function Wd(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 Hd=typeof setTimeout=="function"?setTimeout:void 0,bk=typeof clearTimeout=="function"?clearTimeout:void 0,zm=typeof Promise=="function"?Promise:void 0,_k=typeof queueMicrotask=="function"?queueMicrotask:typeof zm<"u"?function(t){return zm.resolve(null).then(t).catch(Sk)}:Hd;function Sk(t){setTimeout(function(){throw t})}function Au(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),Ai(e);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Ai(e)}function _n(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 Vm(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 $o=Math.random().toString(36).slice(2),pr="__reactFiber$"+$o,$i="__reactProps$"+$o,$r="__reactContainer$"+$o,Kd="__reactEvents$"+$o,Ek="__reactListeners$"+$o,Ck="__reactHandles$"+$o;function Zn(t){var e=t[pr];if(e)return e;for(var r=t.parentNode;r;){if(e=r[$r]||r[pr]){if(r=e.alternate,e.child!==null||r!==null&&r.child!==null)for(t=Vm(t);t!==null;){if(r=t[pr])return r;t=Vm(t)}return e}t=r,r=t.parentNode}return null}function fa(t){return t=t[pr]||t[$r],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Js(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(D(33))}function kc(t){return t[$i]||null}var qd=[],Xs=-1;function Dn(t){return{current:t}}function xe(t){0>Xs||(t.current=qd[Xs],qd[Xs]=null,Xs--)}function ge(t,e){Xs++,qd[Xs]=t.current,t.current=e}var Nn={},Ye=Dn(Nn),ct=Dn(!1),ps=Nn;function Co(t,e){var r=t.type.contextTypes;if(!r)return Nn;var n=t.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===e)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=e[o];return n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function ut(t){return t=t.childContextTypes,t!=null}function Fl(){xe(ct),xe(Ye)}function Wm(t,e,r){if(Ye.current!==Nn)throw Error(D(168));ge(Ye,e),ge(ct,r)}function Nw(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(D(108,cC(t)||"Unknown",s));return ke({},r,n)}function Ul(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Nn,ps=Ye.current,ge(Ye,t),ge(ct,ct.current),!0}function Hm(t,e,r){var n=t.stateNode;if(!n)throw Error(D(169));r?(t=Nw(t,e,ps),n.__reactInternalMemoizedMergedChildContext=t,xe(ct),xe(Ye),ge(Ye,t)):xe(ct),ge(ct,r)}var Tr=null,Rc=!1,Iu=!1;function Ow(t){Tr===null?Tr=[t]:Tr.push(t)}function kk(t){Rc=!0,Ow(t)}function Mn(){if(!Iu&&Tr!==null){Iu=!0;var t=0,e=fe;try{var r=Tr;for(fe=1;t<r.length;t++){var n=r[t];do n=n(!0);while(n!==null)}Tr=null,Rc=!1}catch(s){throw Tr!==null&&(Tr=Tr.slice(t+1)),nw(vh,Mn),s}finally{fe=e,Iu=!1}}return null}var Zs=[],eo=0,Bl=null,zl=0,Nt=[],Ot=0,ms=null,Nr=1,Or="";function Kn(t,e){Zs[eo++]=zl,Zs[eo++]=Bl,Bl=t,zl=e}function Aw(t,e,r){Nt[Ot++]=Nr,Nt[Ot++]=Or,Nt[Ot++]=ms,ms=t;var n=Nr;t=Or;var s=32-Zt(n)-1;n&=~(1<<s),r+=1;var o=32-Zt(e)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,Nr=1<<32-Zt(e)+s|r<<s|n,Or=o+t}else Nr=1<<o|r<<s|n,Or=t}
vendor: 14,957 bytes, line 38
38function kh(t){t.return!==null&&(Kn(t,1),Aw(t,1,0))}function Rh(t){for(;t===Bl;)Bl=Zs[--eo],Zs[eo]=null,zl=Zs[--eo],Zs[eo]=null;for(;t===ms;)ms=Nt[--Ot],Nt[Ot]=null,Or=Nt[--Ot],Nt[Ot]=null,Nr=Nt[--Ot],Nt[Ot]=null}var bt=null,xt=null,_e=!1,Xt=null;function Iw(t,e){var r=It(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 Km(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,bt=t,xt=_n(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,bt=t,xt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(r=ms!==null?{id:Nr,overflow:Or}:null,t.memoizedState={dehydrated:e,treeContext:r,retryLane:1073741824},r=It(18,null,null,0),r.stateNode=e,r.return=t,t.child=r,bt=t,xt=null,!0):!1;default:return!1}}function Gd(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Yd(t){if(_e){var e=xt;if(e){var r=e;if(!Km(t,e)){if(Gd(t))throw Error(D(418));e=_n(r.nextSibling);var n=bt;e&&Km(t,e)?Iw(n,r):(t.flags=t.flags&-4097|2,_e=!1,bt=t)}}else{if(Gd(t))throw Error(D(418));t.flags=t.flags&-4097|2,_e=!1,bt=t}}}function qm(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;bt=t}function Ua(t){if(t!==bt)return!1;if(!_e)return qm(t),_e=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Wd(t.type,t.memoizedProps)),e&&(e=xt)){if(Gd(t))throw Dw(),Error(D(418));for(;e;)Iw(t,e),e=_n(e.nextSibling)}if(qm(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(D(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var r=t.data;if(r==="/$"){if(e===0){xt=_n(t.nextSibling);break e}e--}else r!=="$"&&r!=="$!"&&r!=="$?"||e++}t=t.nextSibling}xt=null}}else xt=bt?_n(t.stateNode.nextSibling):null;return!0}function Dw(){for(var t=xt;t;)t=_n(t.nextSibling)}function ko(){xt=bt=null,_e=!1}function Ph(t){Xt===null?Xt=[t]:Xt.push(t)}var Rk=Wr.ReactCurrentBatchConfig;function ei(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(D(309));var n=r.stateNode}if(!n)throw Error(D(147,t));var s=n,o=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===o?e.ref:(e=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},e._stringRef=o,e)}if(typeof t!="string")throw Error(D(284));if(!r._owner)throw Error(D(290,t))}return t}function Ba(t,e){throw t=Object.prototype.toString.call(e),Error(D(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function Gm(t){var e=t._init;return e(t._payload)}function Mw(t){function e(x,y){if(t){var b=x.deletions;b===null?(x.deletions=[y],x.flags|=16):b.push(y)}}function r(x,y){if(!t)return null;for(;y!==null;)e(x,y),y=y.sibling;return null}function n(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function s(x,y){return x=kn(x,y),x.index=0,x.sibling=null,x}function o(x,y,b){return x.index=b,t?(b=x.alternate,b!==null?(b=b.index,b<y?(x.flags|=2,y):b):(x.flags|=2,y)):(x.flags|=1048576,y)}function i(x){return t&&x.alternate===null&&(x.flags|=2),x}function a(x,y,b,_){return y===null||y.tag!==6?(y=Bu(b,x.mode,_),y.return=x,y):(y=s(y,b),y.return=x,y)}function l(x,y,b,_){var S=b.type;return S===qs?u(x,y,b.props.children,_,b.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===sn&&Gm(S)===y.type)?(_=s(y,b.props),_.ref=ei(x,y,b),_.return=x,_):(_=_l(b.type,b.key,b.props,null,x.mode,_),_.ref=ei(x,y,b),_.return=x,_)}function c(x,y,b,_){return y===null||y.tag!==4||y.stateNode.containerInfo!==b.containerInfo||y.stateNode.implementation!==b.implementation?(y=zu(b,x.mode,_),y.return=x,y):(y=s(y,b.children||[]),y.return=x,y)}function u(x,y,b,_,S){return y===null||y.tag!==7?(y=us(b,x.mode,_,S),y.return=x,y):(y=s(y,b),y.return=x,y)}function f(x,y,b){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Bu(""+y,x.mode,b),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ja:return b=_l(y.type,y.key,y.props,null,x.mode,b),b.ref=ei(x,null,y),b.return=x,b;case Ks:return y=zu(y,x.mode,b),y.return=x,y;case sn:var _=y._init;return f(x,_(y._payload),b)}if(ci(y)||Yo(y))return y=us(y,x.mode,b,null),y.return=x,y;Ba(x,y)}return null}function p(x,y,b,_){var S=y!==null?y.key:null;if(typeof b=="string"&&b!==""||typeof b=="number")return S!==null?null:a(x,y,""+b,_);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ja:return b.key===S?l(x,y,b,_):null;case Ks:return b.key===S?c(x,y,b,_):null;case sn:return S=b._init,p(x,y,S(b._payload),_)}if(ci(b)||Yo(b))return S!==null?null:u(x,y,b,_,null);Ba(x,b)}return null}function h(x,y,b,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return x=x.get(b)||null,a(y,x,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ja:return x=x.get(_.key===null?b:_.key)||null,l(y,x,_,S);case Ks:return x=x.get(_.key===null?b:_.key)||null,c(y,x,_,S);case sn:var E=_._init;return h(x,y,b,E(_._payload),S)}if(ci(_)||Yo(_))return x=x.get(b)||null,u(y,x,_,S,null);Ba(y,_)}return null}function v(x,y,b,_){for(var S=null,E=null,C=y,k=y=0,P=null;C!==null&&k<b.length;k++){C.index>k?(P=C,C=null):P=C.sibling;var N=p(x,C,b[k],_);if(N===null){C===null&&(C=P);break}t&&C&&N.alternate===null&&e(x,C),y=o(N,y,k),E===null?S=N:E.sibling=N,E=N,C=P}if(k===b.length)return r(x,C),_e&&Kn(x,k),S;if(C===null){for(;k<b.length;k++)C=f(x,b[k],_),C!==null&&(y=o(C,y,k),E===null?S=C:E.sibling=C,E=C);return _e&&Kn(x,k),S}for(C=n(x,C);k<b.length;k++)P=h(C,x,k,b[k],_),P!==null&&(t&&P.alternate!==null&&C.delete(P.key===null?k:P.key),y=o(P,y,k),E===null?S=P:E.sibling=P,E=P);return t&&C.forEach(function(H){return e(x,H)}),_e&&Kn(x,k),S}function m(x,y,b,_){var S=Yo(b);if(typeof S!="function")throw Error(D(150));if(b=S.call(b),b==null)throw Error(D(151));for(var E=S=null,C=y,k=y=0,P=null,N=b.next();C!==null&&!N.done;k++,N=b.next()){C.index>k?(P=C,C=null):P=C.sibling;var H=p(x,C,N.value,_);if(H===null){C===null&&(C=P);break}t&&C&&H.alternate===null&&e(x,C),y=o(H,y,k),E===null?S=H:E.sibling=H,E=H,C=P}if(N.done)return r(x,C),_e&&Kn(x,k),S;if(C===null){for(;!N.done;k++,N=b.next())N=f(x,N.value,_),N!==null&&(y=o(N,y,k),E===null?S=N:E.sibling=N,E=N);return _e&&Kn(x,k),S}for(C=n(x,C);!N.done;k++,N=b.next())N=h(C,x,k,N.value,_),N!==null&&(t&&N.alternate!==null&&C.delete(N.key===null?k:N.key),y=o(N,y,k),E===null?S=N:E.sibling=N,E=N);return t&&C.forEach(function(A){return e(x,A)}),_e&&Kn(x,k),S}function w(x,y,b,_){if(typeof b=="object"&&b!==null&&b.type===qs&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case ja:e:{for(var S=b.key,E=y;E!==null;){if(E.key===S){if(S=b.type,S===qs){if(E.tag===7){r(x,E.sibling),y=s(E,b.props.children),y.return=x,x=y;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===sn&&Gm(S)===E.type){r(x,E.sibling),y=s(E,b.props),y.ref=ei(x,E,b),y.return=x,x=y;break e}r(x,E);break}else e(x,E);E=E.sibling}b.type===qs?(y=us(b.props.children,x.mode,_,b.key),y.return=x,x=y):(_=_l(b.type,b.key,b.props,null,x.mode,_),_.ref=ei(x,y,b),_.return=x,x=_)}return i(x);case Ks:e:{for(E=b.key;y!==null;){if(y.key===E)if(y.tag===4&&y.stateNode.containerInfo===b.containerInfo&&y.stateNode.implementation===b.implementation){r(x,y.sibling),y=s(y,b.children||[]),y.return=x,x=y;break e}else{r(x,y);break}else e(x,y);y=y.sibling}y=zu(b,x.mode,_),y.return=x,x=y}return i(x);case sn:return E=b._init,w(x,y,E(b._payload),_)}if(ci(b))return v(x,y,b,_);if(Yo(b))return m(x,y,b,_);Ba(x,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,y!==null&&y.tag===6?(r(x,y.sibling),y=s(y,b),y.return=x,x=y):(r(x,y),y=Bu(b,x.mode,_),y.return=x,x=y),i(x)):r(x,y)}return w}var Ro=Mw(!0),Lw=Mw(!1),Vl=Dn(null),Wl=null,to=null,Th=null;function jh(){Th=to=Wl=null}function Nh(t){var e=Vl.current;xe(Vl),t._currentValue=e}function Qd(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 lo(t,e){Wl=t,Th=to=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(at=!0),t.firstContext=null)}function $t(t){var e=t._currentValue;if(Th!==t)if(t={context:t,memoizedValue:e,next:null},to===null){if(Wl===null)throw Error(D(308));to=t,Wl.dependencies={lanes:0,firstContext:t}}else to=to.next=t;return e}var es=null;function Oh(t){es===null?es=[t]:es.push(t)}function $w(t,e,r,n){var s=e.interleaved;return s===null?(r.next=r,Oh(e)):(r.next=s.next,s.next=r),e.interleaved=r,Fr(t,n)}function Fr(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 on=!1;function Ah(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fw(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 Ir(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(t,e,r){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,ie&2){var s=n.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),n.pending=e,Fr(t,r)}return s=n.interleaved,s===null?(e.next=e,Oh(n)):(e.next=s.next,s.next=e),n.interleaved=e,Fr(t,r)}function gl(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,yh(t,r)}}function Ym(t,e){var r=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=e:o=o.next=e}else s=o=e;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,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 Hl(t,e,r,n){var s=t.updateQueue;on=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,i===null?o=c:i.next=c,i=l;var u=t.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==i&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(o!==null){var f=s.baseState;i=0,u=c=l=null,a=o;do{var p=a.lane,h=a.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var v=t,m=a;switch(p=e,h=r,m.tag){case 1:if(v=m.payload,typeof v=="function"){f=v.call(h,f,p);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=m.payload,p=typeof v=="function"?v.call(h,f,p):v,p==null)break e;f=ke({},f,p);break e;case 2:on=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,p=s.effects,p===null?s.effects=[a]:p.push(a))}else h={eventTime:h,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=f):u=u.next=h,i|=p;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;p=a,a=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);if(u===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=u,e=s.shared.interleaved,e!==null){s=e;do i|=s.lane,s=s.next;while(s!==e)}else o===null&&(s.shared.lanes=0);vs|=i,t.lanes=i,t.memoizedState=f}}function Qm(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(D(191,s));s.call(n)}}}var ha={},yr=Dn(ha),Fi=Dn(ha),Ui=Dn(ha);function ts(t){if(t===ha)throw Error(D(174));return t}function Ih(t,e){switch(ge(Ui,e),ge(Fi,t),ge(yr,ha),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:jd(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=jd(e,t)}xe(yr),ge(yr,e)}function Po(){xe(yr),xe(Fi),xe(Ui)}function Uw(t){ts(Ui.current);var e=ts(yr.current),r=jd(e,t.type);e!==r&&(ge(Fi,t),ge(yr,r))}function Dh(t){Fi.current===t&&(xe(yr),xe(Fi))}var Ee=Dn(0);function Kl(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 Du=[];function Mh(){for(var t=0;t<Du.length;t++)Du[t]._workInProgressVersionPrimary=null;Du.length=0}var vl=Wr.ReactCurrentDispatcher,Mu=Wr.ReactCurrentBatchConfig,gs=0,Ce=null,De=null,$e=null,ql=!1,wi=!1,Bi=0,Pk=0;function He(){throw Error(D(321))}function Lh(t,e){if(e===null)return!1;for(var r=0;r<e.length&&r<t.length;r++)if(!rr(t[r],e[r]))return!1;return!0}function $h(t,e,r,n,s,o){if(gs=o,Ce=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,vl.current=t===null||t.memoizedState===null?Ok:Ak,t=r(n,s),wi){o=0;do{if(wi=!1,Bi=0,25<=o)throw Error(D(301));o+=1,$e=De=null,e.updateQueue=null,vl.current=Ik,t=r(n,s)}while(wi)}if(vl.current=Gl,e=De!==null&&De.next!==null,gs=0,$e=De=Ce=null,ql=!1,e)throw Error(D(300));return t}function Fh(){var t=Bi!==0;return Bi=0,t}function ur(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $e===null?Ce.memoizedState=$e=t:$e=$e.next=t,$e}function Ft(){if(De===null){var t=Ce.alternate;t=t!==null?t.memoizedState:null}else t=De.next;var e=$e===null?Ce.memoizedState:$e.next;if(e!==null)$e=e,De=t;else{if(t===null)throw Error(D(310));De=t,t={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},$e===null?Ce.memoizedState=$e=t:$e=$e.next=t}return $e}function zi(t,e){return typeof e=="function"?e(t):e}function Lu(t){var e=Ft(),r=e.queue;if(r===null)throw Error(D(311));r.lastRenderedReducer=t;var n=De,s=n.baseQueue,o=r.pending;if(o!==null){if(s!==null){var i=s.next;s.next=o.next,o.next=i}n.baseQueue=s=o,r.pending=null}if(s!==null){o=s.next,n=n.baseState;var a=i=null,l=null,c=o;do{var u=c.lane;if((gs&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 f={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,i=n):l=l.next=f,Ce.lanes|=u,vs|=u}c=c.next}while(c!==null&&c!==o);l===null?i=n:l.next=a,rr(n,e.memoizedState)||(at=!0),e.memoizedState=n,e.baseState=i,e.baseQueue=l,r.lastRenderedState=n}if(t=r.interleaved,t!==null){s=t;do o=s.lane,Ce.lanes|=o,vs|=o,s=s.next;while(s!==t)}else s===null&&(r.lanes=0);
vendor: 2,485 bytes, line 38
38return[e.memoizedState,r.dispatch]}function $u(t){var e=Ft(),r=e.queue;if(r===null)throw Error(D(311));r.lastRenderedReducer=t;var n=r.dispatch,s=r.pending,o=e.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=t(o,i.action),i=i.next;while(i!==s);rr(o,e.memoizedState)||(at=!0),e.memoizedState=o,e.baseQueue===null&&(e.baseState=o),r.lastRenderedState=o}return[o,n]}function Bw(){}function zw(t,e){var r=Ce,n=Ft(),s=e(),o=!rr(n.memoizedState,s);if(o&&(n.memoizedState=s,at=!0),n=n.queue,Uh(Hw.bind(null,r,n,t),[t]),n.getSnapshot!==e||o||$e!==null&&$e.memoizedState.tag&1){if(r.flags|=2048,Vi(9,Ww.bind(null,r,n,s,e),void 0,null),Fe===null)throw Error(D(349));gs&30||Vw(r,e,s)}return s}function Vw(t,e,r){t.flags|=16384,t={getSnapshot:e,value:r},e=Ce.updateQueue,e===null?(e={lastEffect:null,stores:null},Ce.updateQueue=e,e.stores=[t]):(r=e.stores,r===null?e.stores=[t]:r.push(t))}function Ww(t,e,r,n){e.value=r,e.getSnapshot=n,Kw(e)&&qw(t)}function Hw(t,e,r){return r(function(){Kw(e)&&qw(t)})}function Kw(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!rr(t,r)}catch{return!0}}function qw(t){var e=Fr(t,1);e!==null&&er(e,t,1,-1)}function Jm(t){var e=ur();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:t},e.queue=t,t=t.dispatch=Nk.bind(null,Ce,t),[e.memoizedState,t]}function Vi(t,e,r,n){return t={tag:t,create:e,destroy:r,deps:n,next:null},e=Ce.updateQueue,e===null?(e={lastEffect:null,stores:null},Ce.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 Gw(){return Ft().memoizedState}function yl(t,e,r,n){var s=ur();Ce.flags|=t,s.memoizedState=Vi(1|e,r,void 0,n===void 0?null:n)}function Pc(t,e,r,n){var s=Ft();n=n===void 0?null:n;var o=void 0;if(De!==null){var i=De.memoizedState;if(o=i.destroy,n!==null&&Lh(n,i.deps)){s.memoizedState=Vi(e,r,o,n);return}}Ce.flags|=t,s.memoizedState=Vi(1|e,r,o,n)}function Xm(t,e){return yl(8390656,8,t,e)}function Uh(t,e){return Pc(2048,8,t,e)}function Yw(t,e){return Pc(4,2,t,e)}function Qw(t,e){return Pc(4,4,t,e)}function Jw(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 Xw(t,e,r){return r=r!=null?r.concat([t]):null,Pc(4,4,Jw.bind(null,e,t),r)}function Bh(){}function Zw(t,e){var r=Ft();e=e===void 0?null:e;var n=r.memoizedState;
vendor: 8,337 bytes, lines 38-40
38return n!==null&&e!==null&&Lh(e,n[1])?n[0]:(r.memoizedState=[t,e],t)}function e0(t,e){var r=Ft();e=e===void 0?null:e;var n=r.memoizedState;return n!==null&&e!==null&&Lh(e,n[1])?n[0]:(t=t(),r.memoizedState=[t,e],t)}function t0(t,e,r){return gs&21?(rr(r,e)||(r=iw(),Ce.lanes|=r,vs|=r,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,at=!0),t.memoizedState=r)}function Tk(t,e){var r=fe;fe=r!==0&&4>r?r:4,t(!0);var n=Mu.transition;Mu.transition={};try{t(!1),e()}finally{fe=r,Mu.transition=n}}function r0(){return Ft().memoizedState}function jk(t,e,r){var n=Cn(t);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},n0(t))s0(e,r);else if(r=$w(t,e,r,n),r!==null){var s=tt();er(r,t,n,s),o0(r,e,n)}}function Nk(t,e,r){var n=Cn(t),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(n0(t))s0(e,s);else{var o=t.alternate;if(t.lanes===0&&(o===null||o.lanes===0)&&(o=e.lastRenderedReducer,o!==null))try{var i=e.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,rr(a,i)){var l=e.interleaved;l===null?(s.next=s,Oh(e)):(s.next=l.next,l.next=s),e.interleaved=s;return}}catch{}finally{}r=$w(t,e,s,n),r!==null&&(s=tt(),er(r,t,n,s),o0(r,e,n))}}function n0(t){var e=t.alternate;return t===Ce||e!==null&&e===Ce}function s0(t,e){wi=ql=!0;var r=t.pending;r===null?e.next=e:(e.next=r.next,r.next=e),t.pending=e}function o0(t,e,r){if(r&4194240){var n=e.lanes;n&=t.pendingLanes,r|=n,e.lanes=r,yh(t,r)}}var Gl={readContext:$t,useCallback:He,useContext:He,useEffect:He,useImperativeHandle:He,useInsertionEffect:He,useLayoutEffect:He,useMemo:He,useReducer:He,useRef:He,useState:He,useDebugValue:He,useDeferredValue:He,useTransition:He,useMutableSource:He,useSyncExternalStore:He,useId:He,unstable_isNewReconciler:!1},Ok={readContext:$t,useCallback:function(t,e){return ur().memoizedState=[t,e===void 0?null:e],t},useContext:$t,useEffect:Xm,useImperativeHandle:function(t,e,r){return r=r!=null?r.concat([t]):null,yl(4194308,4,Jw.bind(null,e,t),r)},useLayoutEffect:function(t,e){return yl(4194308,4,t,e)},useInsertionEffect:function(t,e){return yl(4,2,t,e)},useMemo:function(t,e){var r=ur();return e=e===void 0?null:e,t=t(),r.memoizedState=[t,e],t},useReducer:function(t,e,r){var n=ur();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=jk.bind(null,Ce,t),[n.memoizedState,t]},useRef:function(t){var e=ur();return t={current:t},e.memoizedState=t},useState:Jm,useDebugValue:Bh,useDeferredValue:function(t){return ur().memoizedState=t},useTransition:function(){var t=Jm(!1),e=t[0];return t=Tk.bind(null,t[1]),ur().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,r){var n=Ce,s=ur();if(_e){if(r===void 0)throw Error(D(407));r=r()}else{if(r=e(),Fe===null)throw Error(D(349));gs&30||Vw(n,e,r)}s.memoizedState=r;var o={value:r,getSnapshot:e};return s.queue=o,Xm(Hw.bind(null,n,o,t),[t]),n.flags|=2048,Vi(9,Ww.bind(null,n,o,r,e),void 0,null),r},useId:function(){var t=ur(),e=Fe.identifierPrefix;if(_e){var r=Or,n=Nr;r=(n&~(1<<32-Zt(n)-1)).toString(32)+r,e=":"+e+"R"+r,r=Bi++,0<r&&(e+="H"+r.toString(32)),e+=":"}else r=Pk++,e=":"+e+"r"+r.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},Ak={readContext:$t,useCallback:Zw,useContext:$t,useEffect:Uh,useImperativeHandle:Xw,useInsertionEffect:Yw,useLayoutEffect:Qw,useMemo:e0,useReducer:Lu,useRef:Gw,useState:function(){return Lu(zi)},useDebugValue:Bh,useDeferredValue:function(t){var e=Ft();return t0(e,De.memoizedState,t)},useTransition:function(){var t=Lu(zi)[0],e=Ft().memoizedState;return[t,e]},useMutableSource:Bw,useSyncExternalStore:zw,useId:r0,unstable_isNewReconciler:!1},Ik={readContext:$t,useCallback:Zw,useContext:$t,useEffect:Uh,useImperativeHandle:Xw,useInsertionEffect:Yw,useLayoutEffect:Qw,useMemo:e0,useReducer:$u,useRef:Gw,useState:function(){return $u(zi)},useDebugValue:Bh,useDeferredValue:function(t){var e=Ft();return De===null?e.memoizedState=t:t0(e,De.memoizedState,t)},useTransition:function(){var t=$u(zi)[0],e=Ft().memoizedState;return[t,e]},useMutableSource:Bw,useSyncExternalStore:zw,useId:r0,unstable_isNewReconciler:!1};function Kt(t,e){if(t&&t.defaultProps){e=ke({},e),t=t.defaultProps;for(var r in t)e[r]===void 0&&(e[r]=t[r]);return e}return e}function Jd(t,e,r,n){e=t.memoizedState,r=r(n,e),r=r==null?e:ke({},e,r),t.memoizedState=r,t.lanes===0&&(t.updateQueue.baseState=r)}var Tc={isMounted:function(t){return(t=t._reactInternals)?Es(t)===t:!1},enqueueSetState:function(t,e,r){t=t._reactInternals;var n=tt(),s=Cn(t),o=Ir(n,s);o.payload=e,r!=null&&(o.callback=r),e=Sn(t,o,s),e!==null&&(er(e,t,s,n),gl(e,t,s))},enqueueReplaceState:function(t,e,r){t=t._reactInternals;var n=tt(),s=Cn(t),o=Ir(n,s);o.tag=1,o.payload=e,r!=null&&(o.callback=r),e=Sn(t,o,s),e!==null&&(er(e,t,s,n),gl(e,t,s))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var r=tt(),n=Cn(t),s=Ir(r,n);s.tag=2,e!=null&&(s.callback=e),e=Sn(t,s,n),e!==null&&(er(e,t,n,r),gl(e,t,n))}};function Zm(t,e,r,n,s,o,i){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,o,i):e.prototype&&e.prototype.isPureReactComponent?!Di(r,n)||!Di(s,o):!0}function i0(t,e,r){var n=!1,s=Nn,o=e.contextType;return typeof o=="object"&&o!==null?o=$t(o):(s=ut(e)?ps:Ye.current,n=e.contextTypes,o=(n=n!=null)?Co(t,s):Nn),e=new e(r,o),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Tc,t.stateNode=e,e._reactInternals=t,n&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=s,t.__reactInternalMemoizedMaskedChildContext=o),e}function eg(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&&Tc.enqueueReplaceState(e,e.state,null)}function Xd(t,e,r,n){var s=t.stateNode;s.props=r,s.state=t.memoizedState,s.refs={},Ah(t);var o=e.contextType;typeof o=="object"&&o!==null?s.context=$t(o):(o=ut(e)?ps:Ye.current,s.context=Co(t,o)),s.state=t.memoizedState,o=e.getDerivedStateFromProps,typeof o=="function"&&(Jd(t,e,o,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&&Tc.enqueueReplaceState(s,s.state,null),Hl(t,r,s,n),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308)}function To(t,e){try{var r="",n=e;do r+=lC(n),n=n.return;while(n);var s=r}catch(o){s=` 39Error generating stack: `+o.message+` 40`+o.stack}return{value:t,source:e,stack:s,digest:null}}function Fu(t,e,r){return{value:t,source:null,stack:r??null,digest:e??null}}function Zd(t,e){try{console.error(e.value)}catch(r){setTimeout(function(){throw r})}}var Dk=typeof WeakMap=="function"?WeakMap:Map;function a0(t,e,r){r=Ir(-1,r),r.tag=3,r.payload={element:null};var n=e.value;return r.callback=function(){Ql||(Ql=!0,uf=n),Zd(t,e)},r}function l0(t,e,r){r=Ir(-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(){Zd(t,e)}}var o=t.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){Zd(t,e),typeof n!="function"&&(En===null?En=new Set([this]):En.add(this));var i=e.stack;this.componentDidCatch(e.value,{componentStack:i!==null?i:""})}),r}function tg(t,e,r){var n=t.pingCache;if(n===null){n=t.pingCache=new Dk;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=Yk.bind(null,t,e,r),e.then(t,t))}function rg(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 ng(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=Ir(-1,1),e.tag=2,Sn(r,e,1))),r.lanes|=1),t)}var Mk=Wr.ReactCurrentOwner,at=!1;function Xe(t,e,r,n){e.child=t===null?Lw(e,null,r,n):Ro(e,t.child,r,n)}function sg(t,e,r,n,s){r=r.render;var o=e.ref;
vendor: 6,220 bytes, line 40
40return lo(e,s),n=$h(t,e,r,n,o,s),r=Fh(),t!==null&&!at?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Ur(t,e,s)):(_e&&r&&kh(e),e.flags|=1,Xe(t,e,n,s),e.child)}function og(t,e,r,n,s){if(t===null){var o=r.type;return typeof o=="function"&&!Yh(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(e.tag=15,e.type=o,c0(t,e,o,n,s)):(t=_l(r.type,null,n,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(o=t.child,!(t.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:Di,r(i,n)&&t.ref===e.ref)return Ur(t,e,s)}return e.flags|=1,t=kn(o,n),t.ref=e.ref,t.return=e,e.child=t}function c0(t,e,r,n,s){if(t!==null){var o=t.memoizedProps;if(Di(o,n)&&t.ref===e.ref)if(at=!1,e.pendingProps=n=o,(t.lanes&s)!==0)t.flags&131072&&(at=!0);else return e.lanes=t.lanes,Ur(t,e,s)}return ef(t,e,r,n,s)}function u0(t,e,r){var n=e.pendingProps,s=n.children,o=t!==null?t.memoizedState:null;if(n.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ge(no,pt),pt|=r;else{if(!(r&1073741824))return t=o!==null?o.baseLanes|r:r,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ge(no,pt),pt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,ge(no,pt),pt|=n}else o!==null?(n=o.baseLanes|r,e.memoizedState=null):n=r,ge(no,pt),pt|=n;return Xe(t,e,s,r),e.child}function d0(t,e){var r=e.ref;(t===null&&r!==null||t!==null&&t.ref!==r)&&(e.flags|=512,e.flags|=2097152)}function ef(t,e,r,n,s){var o=ut(r)?ps:Ye.current;return o=Co(e,o),lo(e,s),r=$h(t,e,r,n,o,s),n=Fh(),t!==null&&!at?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Ur(t,e,s)):(_e&&n&&kh(e),e.flags|=1,Xe(t,e,r,s),e.child)}function ig(t,e,r,n,s){if(ut(r)){var o=!0;Ul(e)}else o=!1;if(lo(e,s),e.stateNode===null)wl(t,e),i0(e,r,n),Xd(e,r,n,s),n=!0;else if(t===null){var i=e.stateNode,a=e.memoizedProps;i.props=a;var l=i.context,c=r.contextType;typeof c=="object"&&c!==null?c=$t(c):(c=ut(r)?ps:Ye.current,c=Co(e,c));var u=r.getDerivedStateFromProps,f=typeof u=="function"||typeof i.getSnapshotBeforeUpdate=="function";f||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==c)&&eg(e,i,n,c),on=!1;var p=e.memoizedState;i.state=p,Hl(e,n,i,s),l=e.memoizedState,a!==n||p!==l||ct.current||on?(typeof u=="function"&&(Jd(e,r,u,n),l=e.memoizedState),(a=on||Zm(e,r,a,n,p,l,c))?(f||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=l),i.props=n,i.state=l,i.context=c,n=a):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{i=e.stateNode,Fw(t,e),a=e.memoizedProps,c=e.type===e.elementType?a:Kt(e.type,a),i.props=c,f=e.pendingProps,p=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=$t(l):(l=ut(r)?ps:Ye.current,l=Co(e,l));var h=r.getDerivedStateFromProps;(u=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==f||p!==l)&&eg(e,i,n,l),on=!1,p=e.memoizedState,i.state=p,Hl(e,n,i,s);var v=e.memoizedState;a!==f||p!==v||ct.current||on?(typeof h=="function"&&(Jd(e,r,h,n),v=e.memoizedState),(c=on||Zm(e,r,c,n,p,v,l)||!1)?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,v,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,v,l)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=v),i.props=n,i.state=v,i.context=l,n=c):(typeof i.componentDidUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&p===t.memoizedState||(e.flags|=1024),n=!1)}return tf(t,e,r,n,o,s)}function tf(t,e,r,n,s,o){d0(t,e);var i=(e.flags&128)!==0;if(!n&&!i)return s&&Hm(e,r,!1),Ur(t,e,o);n=e.stateNode,Mk.current=e;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return e.flags|=1,t!==null&&i?(e.child=Ro(e,t.child,null,o),e.child=Ro(e,null,a,o)):Xe(t,e,a,o),e.memoizedState=n.state,s&&Hm(e,r,!0),e.child}function f0(t){var e=t.stateNode;e.pendingContext?Wm(t,e.pendingContext,e.pendingContext!==e.context):e.context&&Wm(t,e.context,!1),Ih(t,e.containerInfo)}function ag(t,e,r,n,s){return ko(),Ph(s),e.flags|=256,Xe(t,e,r,n),e.child}var rf={dehydrated:null,treeContext:null,retryLane:0};function nf(t){return{baseLanes:t,cachePool:null,transitions:null}}function h0(t,e,r){var n=e.pendingProps,s=Ee.current,o=!1,i=(e.flags&128)!==0,a;if((a=i)||(a=t!==null&&t.memoizedState===null?!1:(s&2)!==0),a?(o=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),ge(Ee,s&1),t===null)return Yd(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):(i=n.children,t=n.fallback,o?(n=e.mode,o=e.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Oc(i,n,0,null),t=us(t,n,r,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=nf(r),e.memoizedState=rf,t):zh(e,i));if(s=t.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Lk(t,e,i,n,a,s,r);if(o){o=n.fallback,i=e.mode,s=t.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&e.child!==s?(n=e.child,n.childLanes=0,n.pendingProps=l,e.deletions=null):(n=kn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=kn(a,o):(o=us(o,i,r,null),o.flags|=2),o.return=e,n.return=e,n.sibling=o,e.child=n,n=o,o=e.child,i=t.child.memoizedState,i=i===null?nf(r):{base
vendor: 8,213 bytes, line 40
40Lanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=t.childLanes&~r,e.memoizedState=rf,n}return o=t.child,t=o.sibling,n=kn(o,{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 zh(t,e){return e=Oc({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function za(t,e,r,n){return n!==null&&Ph(n),Ro(e,t.child,null,r),t=zh(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Lk(t,e,r,n,s,o,i){if(r)return e.flags&256?(e.flags&=-257,n=Fu(Error(D(422))),za(t,e,i,n)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(o=n.fallback,s=e.mode,n=Oc({mode:"visible",children:n.children},s,0,null),o=us(o,s,i,null),o.flags|=2,n.return=e,o.return=e,n.sibling=o,e.child=n,e.mode&1&&Ro(e,t.child,null,i),e.child.memoizedState=nf(i),e.memoizedState=rf,o);if(!(e.mode&1))return za(t,e,i,null);if(s.data==="$!"){if(n=s.nextSibling&&s.nextSibling.dataset,n)var a=n.dgst;return n=a,o=Error(D(419)),n=Fu(o,n,void 0),za(t,e,i,n)}if(a=(i&t.childLanes)!==0,at||a){if(n=Fe,n!==null){switch(i&-i){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(n.suspendedLanes|i)?0:s,s!==0&&s!==o.retryLane&&(o.retryLane=s,Fr(t,s),er(n,t,s,-1))}return Gh(),n=Fu(Error(D(421))),za(t,e,i,n)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=Qk.bind(null,t),s._reactRetry=e,null):(t=o.treeContext,xt=_n(s.nextSibling),bt=e,_e=!0,Xt=null,t!==null&&(Nt[Ot++]=Nr,Nt[Ot++]=Or,Nt[Ot++]=ms,Nr=t.id,Or=t.overflow,ms=e),e=zh(e,n.children),e.flags|=4096,e)}function lg(t,e,r){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Qd(t.return,e,r)}function Uu(t,e,r,n,s){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function p0(t,e,r){var n=e.pendingProps,s=n.revealOrder,o=n.tail;if(Xe(t,e,n.children,r),n=Ee.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&&lg(t,r,e);else if(t.tag===19)lg(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(ge(Ee,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&&Kl(t)===null&&(s=r),r=r.sibling;r=s,r===null?(s=e.child,e.child=null):(s=r.sibling,r.sibling=null),Uu(e,!1,s,r,o);break;case"backwards":for(r=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&Kl(t)===null){e.child=s;break}t=s.sibling,s.sibling=r,r=s,s=t}Uu(e,!0,r,null,o);break;case"together":Uu(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function wl(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Ur(t,e,r){if(t!==null&&(e.dependencies=t.dependencies),vs|=e.lanes,!(r&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(D(153));if(e.child!==null){for(t=e.child,r=kn(t,t.pendingProps),e.child=r,r.return=e;t.sibling!==null;)t=t.sibling,r=r.sibling=kn(t,t.pendingProps),r.return=e;r.sibling=null}return e.child}function $k(t,e,r){switch(e.tag){case 3:f0(e),ko();break;case 5:Uw(e);break;case 1:ut(e.type)&&Ul(e);break;case 4:Ih(e,e.stateNode.containerInfo);break;case 10:var n=e.type._context,s=e.memoizedProps.value;ge(Vl,n._currentValue),n._currentValue=s;break;case 13:if(n=e.memoizedState,n!==null)return n.dehydrated!==null?(ge(Ee,Ee.current&1),e.flags|=128,null):r&e.child.childLanes?h0(t,e,r):(ge(Ee,Ee.current&1),t=Ur(t,e,r),t!==null?t.sibling:null);ge(Ee,Ee.current&1);break;case 19:if(n=(r&e.childLanes)!==0,t.flags&128){if(n)return p0(t,e,r);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ge(Ee,Ee.current),n)break;return null;case 22:case 23:return e.lanes=0,u0(t,e,r)}return Ur(t,e,r)}var m0,sf,g0,v0;m0=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}};sf=function(){};g0=function(t,e,r,n){var s=t.memoizedProps;if(s!==n){t=e.stateNode,ts(yr.current);var o=null;switch(r){case"input":s=kd(t,s),n=kd(t,n),o=[];break;case"select":s=ke({},s,{value:void 0}),n=ke({},n,{value:void 0}),o=[];break;case"textarea":s=Td(t,s),n=Td(t,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(t.onclick=$l)}Nd(r,n);var i;r=null;for(c in s)if(!n.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Pi.hasOwnProperty(c)?o||(o=[]):(o=o||[]).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(i in a)!a.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&a[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(o||(o=[]),o.push(c,r)),r=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Pi.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&we("scroll",t),o||a===l||(o=[])):(o=o||[]).push(c,l))}r&&(o=o||[]).push("style",r);var c=o;(e.updateQueue=c)&&(e.flags|=4)}};v0=function(t,e,r,n){r!==n&&(e.flags|=4)};function ti(t,e){if(!_e)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 Ke(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 Fk(t,e,r){var n=e.pendingProps;switch(Rh(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(e),null;case 1:return ut(e.type)&&Fl(),Ke(e),null;case 3:return n=e.stateNode,Po(),xe(ct),xe(Ye),Mh(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Ua(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Xt!==null&&(hf(Xt),Xt=null))),sf(t,e),Ke(e),null;case 5:Dh(e);var s=ts(Ui.current);if(r=e.type,t!==null&&e.stateNode!=null)g0(t,e,r,n,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!n){if(e.stateNode===null)throw Error(D(166));return Ke(e),null}if(t=ts(yr.current),Ua(e)){n=e.stateNode,r=e.type;var o=e.memoizedProps;switch(n[pr]=e,n[$i]=o,t=(e.mode&1)!==0,r){case"dialog":we("cancel",n),we("close",n);break;case"iframe":case"object":case"embed":we("load",n);break;case"video":case"audio":for(s=0;s<di.length;s++)we(di[s],n);break;case"source":we("error",n);break;case"img":case"image":case"link":we("error",n),we("load",n);break;case"details":we("toggle",n);break;case"input":vm(n,o),we("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},we("invalid",n);break;case"textarea":wm(n,o),we("invalid",n)}Nd(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];
vendor: 30,121 bytes, line 40
40i==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&Fa(n.textContent,a,t),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Fa(n.textContent,a,t),s=["children",""+a]):Pi.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&we("scroll",n)}switch(r){case"input":Na(n),ym(n,o,!0);break;case"textarea":Na(n),xm(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=$l)}n=s,e.updateQueue=n,n!==null&&(e.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Hy(r)),t==="http://www.w3.org/1999/xhtml"?r==="script"?(t=i.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof n.is=="string"?t=i.createElement(r,{is:n.is}):(t=i.createElement(r),r==="select"&&(i=t,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):t=i.createElementNS(t,r),t[pr]=e,t[$i]=n,m0(t,e,!1,!1),e.stateNode=t;e:{switch(i=Od(r,n),r){case"dialog":we("cancel",t),we("close",t),s=n;break;case"iframe":case"object":case"embed":we("load",t),s=n;break;case"video":case"audio":for(s=0;s<di.length;s++)we(di[s],t);s=n;break;case"source":we("error",t),s=n;break;case"img":case"image":case"link":we("error",t),we("load",t),s=n;break;case"details":we("toggle",t),s=n;break;case"input":vm(t,n),s=kd(t,n),we("invalid",t);break;case"option":s=n;break;case"select":t._wrapperState={wasMultiple:!!n.multiple},s=ke({},n,{value:void 0}),we("invalid",t);break;case"textarea":wm(t,n),s=Td(t,n),we("invalid",t);break;default:s=n}Nd(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?Gy(t,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Ky(t,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Ti(t,l):typeof l=="number"&&Ti(t,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Pi.hasOwnProperty(o)?l!=null&&o==="onScroll"&&we("scroll",t):l!=null&&fh(t,o,l,i))}switch(r){case"input":Na(t),ym(t,n,!1);break;case"textarea":Na(t),xm(t);break;case"option":n.value!=null&&t.setAttribute("value",""+jn(n.value));break;case"select":t.multiple=!!n.multiple,o=n.value,o!=null?so(t,!!n.multiple,o,!1):n.defaultValue!=null&&so(t,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(t.onclick=$l)}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 Ke(e),null;case 6:if(t&&e.stateNode!=null)v0(t,e,t.memoizedProps,n);else{if(typeof n!="string"&&e.stateNode===null)throw Error(D(166));if(r=ts(Ui.current),ts(yr.current),Ua(e)){if(n=e.stateNode,r=e.memoizedProps,n[pr]=e,(o=n.nodeValue!==r)&&(t=bt,t!==null))switch(t.tag){case 3:Fa(n.nodeValue,r,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Fa(n.nodeValue,r,(t.mode&1)!==0)}o&&(e.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[pr]=e,e.stateNode=n}return Ke(e),null;case 13:if(xe(Ee),n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(_e&&xt!==null&&e.mode&1&&!(e.flags&128))Dw(),ko(),e.flags|=98560,o=!1;else if(o=Ua(e),n!==null&&n.dehydrated!==null){if(t===null){if(!o)throw Error(D(318));if(o=e.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(D(317));o[pr]=e}else ko(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Ke(e),o=!1}else Xt!==null&&(hf(Xt),Xt=null),o=!0;if(!o)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||Ee.current&1?Me===0&&(Me=3):Gh())),e.updateQueue!==null&&(e.flags|=4),Ke(e),null);case 4:return Po(),sf(t,e),t===null&&Mi(e.stateNode.containerInfo),Ke(e),null;case 10:return Nh(e.type._context),Ke(e),null;case 17:return ut(e.type)&&Fl(),Ke(e),null;case 19:if(xe(Ee),o=e.memoizedState,o===null)return Ke(e),null;if(n=(e.flags&128)!==0,i=o.rendering,i===null)if(n)ti(o,!1);else{if(Me!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(i=Kl(t),i!==null){for(e.flags|=128,ti(o,!1),n=i.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),e.subtreeFlags=0,n=r,r=e.child;r!==null;)o=r,t=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=t,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,t=i.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),r=r.sibling;return ge(Ee,Ee.current&1|2),e.child}t=t.sibling}o.tail!==null&&je()>jo&&(e.flags|=128,n=!0,ti(o,!1),e.lanes=4194304)}else{if(!n)if(t=Kl(i),t!==null){if(e.flags|=128,n=!0,r=t.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),ti(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!_e)return Ke(e),null}else 2*je()-o.renderingStartTime>jo&&r!==1073741824&&(e.flags|=128,n=!0,ti(o,!1),e.lanes=4194304);o.isBackwards?(i.sibling=e.child,e.child=i):(r=o.last,r!==null?r.sibling=i:e.child=i,o.last=i)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=je(),e.sibling=null,r=Ee.current,ge(Ee,n?r&1|2:r&1),e):(Ke(e),null);case 22:case 23:return qh(),n=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==n&&(e.flags|=8192),n&&e.mode&1?pt&1073741824&&(Ke(e),e.subtreeFlags&6&&(e.flags|=8192)):Ke(e),null;case 24:return null;case 25:return null}throw Error(D(156,e.tag))}function Uk(t,e){switch(Rh(e),e.tag){case 1:return ut(e.type)&&Fl(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Po(),xe(ct),xe(Ye),Mh(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Dh(e),null;case 13:if(xe(Ee),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(D(340));ko()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return xe(Ee),null;case 4:return Po(),null;case 10:return Nh(e.type._context),null;case 22:case 23:return qh(),null;case 24:return null;default:return null}}var Va=!1,Ge=!1,Bk=typeof WeakSet=="function"?WeakSet:Set,V=null;function ro(t,e){var r=t.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Te(t,e,n)}else r.current=null}function of(t,e,r){try{r()}catch(n){Te(t,e,n)}}var cg=!1;function zk(t,e){if(zd=Dl,t=_w(),Ch(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,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,c=0,u=0,f=t,p=null;t:for(;;){for(var h;f!==r||s!==0&&f.nodeType!==3||(a=i+s),f!==o||n!==0&&f.nodeType!==3||(l=i+n),f.nodeType===3&&(i+=f.nodeValue.length),(h=f.firstChild)!==null;)p=f,f=h;for(;;){if(f===t)break t;if(p===r&&++c===s&&(a=i),p===o&&++u===n&&(l=i),(h=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Vd={focusedElem:t,selectionRange:r},Dl=!1,V=e;V!==null;)if(e=V,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,V=t;else for(;V!==null;){e=V;try{var v=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var m=v.memoizedProps,w=v.memoizedState,x=e.stateNode,y=x.getSnapshotBeforeUpdate(e.elementType===e.type?m:Kt(e.type,m),w);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=e.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(_){Te(e,e.return,_)}if(t=e.sibling,t!==null){t.return=e.return,V=t;break}V=e.return}return v=cg,cg=!1,v}function xi(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 o=s.destroy;s.destroy=void 0,o!==void 0&&of(e,r,o)}s=s.next}while(s!==n)}}function jc(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 y0(t){var e=t.alternate;e!==null&&(t.alternate=null,y0(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[pr],delete e[$i],delete e[Kd],delete e[Ek],delete e[Ck])),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 w0(t){return t.tag===5||t.tag===3||t.tag===4}function ug(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||w0(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 lf(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=$l));else if(n!==4&&(t=t.child,t!==null))for(lf(t,e,r),t=t.sibling;t!==null;)lf(t,e,r),t=t.sibling}function cf(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(cf(t,e,r),t=t.sibling;t!==null;)cf(t,e,r),t=t.sibling}var Be=null,Jt=!1;function Jr(t,e,r){for(r=r.child;r!==null;)x0(t,e,r),r=r.sibling}function x0(t,e,r){if(vr&&typeof vr.onCommitFiberUnmount=="function")try{vr.onCommitFiberUnmount(_c,r)}catch{}switch(r.tag){case 5:Ge||ro(r,e);case 6:var n=Be,s=Jt;Be=null,Jr(t,e,r),Be=n,Jt=s,Be!==null&&(Jt?(t=Be,r=r.stateNode,t.nodeType===8?t.parentNode.removeChild(r):t.removeChild(r)):Be.removeChild(r.stateNode));break;case 18:Be!==null&&(Jt?(t=Be,r=r.stateNode,t.nodeType===8?Au(t.parentNode,r):t.nodeType===1&&Au(t,r),Ai(t)):Au(Be,r.stateNode));break;case 4:n=Be,s=Jt,Be=r.stateNode.containerInfo,Jt=!0,Jr(t,e,r),Be=n,Jt=s;break;case 0:case 11:case 14:case 15:if(!Ge&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){s=n=n.next;do{var o=s,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&of(r,e,i),s=s.next}while(s!==n)}Jr(t,e,r);break;case 1:if(!Ge&&(ro(r,e),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){Te(r,e,a)}Jr(t,e,r);break;case 21:Jr(t,e,r);break;case 22:r.mode&1?(Ge=(n=Ge)||r.memoizedState!==null,Jr(t,e,r),Ge=n):Jr(t,e,r);break;default:Jr(t,e,r)}}function dg(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var r=t.stateNode;r===null&&(r=t.stateNode=new Bk),e.forEach(function(n){var s=Jk.bind(null,t,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Vt(t,e){var r=e.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=t,i=e,a=i;e:for(;a!==null;){switch(a.tag){case 5:Be=a.stateNode,Jt=!1;break e;case 3:Be=a.stateNode.containerInfo,Jt=!0;break e;case 4:Be=a.stateNode.containerInfo,Jt=!0;break e}a=a.return}if(Be===null)throw Error(D(160));x0(o,i,s),Be=null,Jt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Te(s,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)b0(e,t),e=e.sibling}function b0(t,e){var r=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Vt(e,t),lr(t),n&4){try{xi(3,t,t.return),jc(3,t)}catch(m){Te(t,t.return,m)}try{xi(5,t,t.return)}catch(m){Te(t,t.return,m)}}break;case 1:Vt(e,t),lr(t),n&512&&r!==null&&ro(r,r.return);break;case 5:if(Vt(e,t),lr(t),n&512&&r!==null&&ro(r,r.return),t.flags&32){var s=t.stateNode;try{Ti(s,"")}catch(m){Te(t,t.return,m)}}if(n&4&&(s=t.stateNode,s!=null)){var o=t.memoizedProps,i=r!==null?r.memoizedProps:o,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&Vy(s,o),Od(a,i);var c=Od(a,o);for(i=0;i<l.length;i+=2){var u=l[i],f=l[i+1];u==="style"?Gy(s,f):u==="dangerouslySetInnerHTML"?Ky(s,f):u==="children"?Ti(s,f):fh(s,u,f,c)}switch(a){case"input":Rd(s,o);break;case"textarea":Wy(s,o);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?so(s,!!o.multiple,h,!1):p!==!!o.multiple&&(o.defaultValue!=null?so(s,!!o.multiple,o.defaultValue,!0):so(s,!!o.multiple,o.multiple?[]:"",!1))}s[$i]=o}catch(m){Te(t,t.return,m)}}break;case 6:if(Vt(e,t),lr(t),n&4){if(t.stateNode===null)throw Error(D(162));s=t.stateNode,o=t.memoizedProps;try{s.nodeValue=o}catch(m){Te(t,t.return,m)}}break;case 3:if(Vt(e,t),lr(t),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ai(e.containerInfo)}catch(m){Te(t,t.return,m)}break;case 4:Vt(e,t),lr(t);break;case 13:Vt(e,t),lr(t),s=t.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Hh=je())),n&4&&dg(t);break;case 22:if(u=r!==null&&r.memoizedState!==null,t.mode&1?(Ge=(c=Ge)||u,Vt(e,t),Ge=c):Vt(e,t),lr(t),n&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(V=t,u=t.child;u!==null;){for(f=V=u;V!==null;){switch(p=V,h=p.child,p.tag){case 0:case 11:case 14:case 15:xi(4,p,p.return);break;case 1:ro(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){n=p,r=p.return;try{e=n,v.props=e.memoizedProps,v.state=e.memoizedState,v.componentWillUnmount()}catch(m){Te(n,r,m)}}break;case 5:ro(p,p.return);break;case 22:if(p.memoizedState!==null){hg(f);continue}}h!==null?(h.return=p,V=h):hg(f)}u=u.sibling}e:for(u=null,f=t;;){if(f.tag===5){if(u===null){u=f;try{s=f.stateNode,c?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=f.stateNode,l=f.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=qy("display",i))}catch(m){Te(t,t.return,m)}}}else if(f.tag===6){if(u===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(m){Te(t,t.return,m)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===t)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;u===f&&(u=null),f=f.return}u===f&&(u=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Vt(e,t),lr(t),n&4&&dg(t);break;case 21:break;default:Vt(e,t),lr(t)}}function lr(t){var e=t.flags;if(e&2){try{e:{for(var r=t.return;r!==null;){if(w0(r)){var n=r;break e}r=r.return}throw Error(D(160))}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(Ti(s,""),n.flags&=-33);var o=ug(t);cf(t,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=ug(t);lf(t,a,i);break;default:throw Error(D(161))}}catch(l){Te(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Vk(t,e,r){V=t,_0(t)}function _0(t,e,r){for(var n=(t.mode&1)!==0;V!==null;){var s=V,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||Va;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ge;a=Va;var c=Ge;if(Va=i,(Ge=l)&&!c)for(V=s;V!==null;)i=V,l=i.child,i.tag===22&&i.memoizedState!==null?pg(s):l!==null?(l.return=i,V=l):pg(s);for(;o!==null;)V=o,_0(o),o=o.sibling;V=s,Va=a,Ge=c}fg(t)}else s.subtreeFlags&8772&&o!==null?(o.return=s,V=o):fg(t)}}function fg(t){for(;V!==null;){var e=V;if(e.flags&8772){var r=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ge||jc(5,e);break;case 1:var n=e.stateNode;if(e.flags&4&&!Ge)if(r===null)n.componentDidMount();else{var s=e.elementType===e.type?r.memoizedProps:Kt(e.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;o!==null&&Qm(e,o,n);break;case 3:var i=e.updateQueue;if(i!==null){if(r=null,e.child!==null)switch(e.child.tag){case 5:r=e.child.stateNode;break;case 1:r=e.child.stateNode}Qm(e,i,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 f=u.dehydrated;f!==null&&Ai(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}Ge||e.flags&512&&af(e)}catch(p){Te(e,e.return,p)}}if(e===t){V=null;break}if(r=e.sibling,r!==null){r.return=e.return,V=r;break}V=e.return}}function hg(t){for(;V!==null;){var e=V;if(e===t){V=null;break}var r=e.sibling;if(r!==null){r.return=e.return,V=r;break}V=e.return}}function pg(t){for(;V!==null;){var e=V;try{switch(e.tag){case 0:case 11:case 15:var r=e.return;try{jc(4,e)}catch(l){Te(e,r,l)}break;case 1:var n=e.stateNode;if(typeof n.componentDidMount=="function"){var s=e.return;try{n.componentDidMount()}catch(l){Te(e,s,l)}}var o=e.return;try{af(e)}catch(l){Te(e,o,l)}break;case 5:var i=e.return;try{af(e)}catch(l){Te(e,i,l)}}}catch(l){Te(e,e.return,l)}if(e===t){V=null;break}var a=e.sibling;if(a!==null){a.return=e.return,V=a;break}V=e.return}}var Wk=Math.ceil,Yl=Wr.ReactCurrentDispatcher,Vh=Wr.ReactCurrentOwner,Dt=Wr.ReactCurrentBatchConfig,ie=0,Fe=null,Oe=null,ze=0,pt=0,no=Dn(0),Me=0,Wi=null,vs=0,Nc=0,Wh=0,bi=null,it=null,Hh=0,jo=1/0,Rr=null,Ql=!1,uf=null,En=null,Wa=!1,gn=null,Jl=0,_i=0,df=null,xl=-1,bl=0;function tt(){return ie&6?je():xl!==-1?xl:xl=je()}function Cn(t){return t.mode&1?ie&2&&ze!==0?ze&-ze:Rk.transition!==null?(bl===0&&(bl=iw()),bl):(t=fe,t!==0||(t=window.event,t=t===void 0?16:hw(t.type)),t):1}function er(t,e,r,n){if(50<_i)throw _i=0,df=null,Error(D(185));ua(t,r,n),(!(ie&2)||t!==Fe)&&(t===Fe&&(!(ie&2)&&(Nc|=r),Me===4&&ln(t,ze)),dt(t,n),r===1&&ie===0&&!(e.mode&1)&&(jo=je()+500,Rc&&Mn()))}function dt(t,e){var r=t.callbackNode;RC(t,e);var n=Il(t,t===Fe?ze:0);if(n===0)r!==null&&Sm(r),t.callbackNode=null,t.callbackPriority=0;else if(e=n&-n,t.callbackPriority!==e){if(r!=null&&Sm(r),e===1)t.tag===0?kk(mg.bind(null,t)):Ow(mg.bind(null,t)),_k(function(){!(ie&6)&&Mn()}),r=null;else{switch(aw(n)){case 1:r=vh;break;case 4:r=sw;break;case 16:r=Al;break;case 536870912:r=ow;break;default:r=Al}r=j0(r,S0.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function S0(t,e){if(xl=-1,bl=0,ie&6)throw Error(D(327));var r=t.callbackNode;if(co()&&t.callbackNode!==r)return null;var n=Il(t,t===Fe?ze:0);if(n===0)return null;if(n&30||n&t.expiredLanes||e)e=Xl(t,n);else{e=n;var s=ie;ie|=2;var o=C0();(Fe!==t||ze!==e)&&(Rr=null,jo=je()+500,cs(t,e));do try{qk();break}catch(a){E0(t,a)}while(!0);jh(),Yl.current=o,ie=s,Oe!==null?e=0:(Fe=null,ze=0,e=Me)}if(e!==0){if(e===2&&(s=Ld(t),s!==0&&(n=s,e=ff(t,s))),e===1)throw r=Wi,cs(t,0),ln(t,n),dt(t,je()),r;if(e===6)ln(t,n);else{if(s=t.current.alternate,!(n&30)&&!Hk(s)&&(e=Xl(t,n),e===2&&(o=Ld(t),o!==0&&(n=o,e=ff(t,o))),e===1))throw r=Wi,cs(t,0),ln(t,n),dt(t,je()),r;switch(t.finishedWork=s,t.finishedLanes=n,e){case 0:case 1:throw Error(D(345));case 2:qn(t,it,Rr);break;case 3:if(ln(t,n),(n&130023424)===n&&(e=Hh+500-je(),10<e)){if(Il(t,0)!==0)break;if(s=t.suspendedLanes,(s&n)!==n){tt(),t.pingedLanes|=t.suspendedLanes&s;break}t.timeoutHandle=Hd(qn.bind(null,t,it,Rr),e);break}qn(t,it,Rr);break;case 4:if(ln(t,n),(n&4194240)===n)break;for(e=t.eventTimes,s=-1;0<n;){var i=31-Zt(n);o=1<<i,i=e[i],i>s&&(s=i),n&=~o}if(n=s,n=je()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Wk(n/1960))-n,10<n){t.timeoutHandle=Hd(qn.bind(null,t,it,Rr),n);break}qn(t,it,Rr);break;case 5:qn(t,it,Rr);break;default:throw Error(D(329))}}}return dt(t,je()),t.callbackNode===r?S0.bind(null,t):null}function ff(t,e){var r=bi;return t.current.memoizedState.isDehydrated&&(cs(t,e).flags|=256),t=Xl(t,e),t!==2&&(e=it,it=r,e!==null&&hf(e)),t}function hf(t){it===null?it=t:it.push.apply(it,t)}function Hk(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],o=s.getSnapshot;s=s.value;try{if(!rr(o(),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 ln(t,e){for(e&=~Wh,e&=~Nc,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var r=31-Zt(e),n=1<<r;t[r]=-1,e&=~n}}function mg(t){if(ie&6)throw Error(D(327));co();var e=Il(t,0);if(!(e&1))return dt(t,je()),null;var r=Xl(t,e);if(t.tag!==0&&r===2){var n=Ld(t);n!==0&&(e=n,r=ff(t,n))}if(r===1)throw r=Wi,cs(t,0),ln(t,e),dt(t,je()),r;if(r===6)throw Error(D(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,qn(t,it,Rr),dt(t,je()),null}function Kh(t,e){var r=ie;ie|=1;try{return t(e)}finally{ie=r,ie===0&&(jo=je()+500,Rc&&Mn())}}function ys(t){gn!==null&&gn.tag===0&&!(ie&6)&&co();var e=ie;ie|=1;var r=Dt.transition,n=fe;try{if(Dt.transition=null,fe=1,t)return t()}finally{fe=n,Dt.transition=r,ie=e,!(ie&6)&&Mn()}}function qh(){pt=no.current,xe(no)}function cs(t,e){t.finishedWork=null,t.finishedLanes=0;var r=t.timeoutHandle;if(r!==-1&&(t.timeoutHandle=-1,bk(r)),Oe!==null)for(r=Oe.return;r!==null;){var n=r;switch(Rh(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Fl();break;case 3:Po(),xe(ct),xe(Ye),Mh();break;case 5:Dh(n);break;case 4:Po();break;case 13:xe(Ee);break;case 19:xe(Ee);break;case 10:Nh(n.type._context);break;case 22:case 23:qh()}r=r.return}if(Fe=t,Oe=t=kn(t.current,null),ze=pt=e,Me=0,Wi=null,Wh=Nc=vs=0,it=bi=null,es!==null){for(e=0;e<es.length;e++)if(r=es[e],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}es=null}return t}function E0(t,e){do{var r=Oe;try{if(jh(),vl.current=Gl,ql){for(var n=Ce.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}ql=!1}if(gs=0,$e=De=Ce=null,wi=!1,Bi=0,Vh.current=null,r===null||r.return===null){Me=1,Wi=e,Oe=null;break}e:{var o=t,i=r.return,a=r,l=e;if(e=ze,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=a,f=u.tag;if(!(u.mode&1)&&(f===0||f===11||f===15)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=rg(i);if(h!==null){h.flags&=-257,ng(h,i,a,o,e),h.mode&1&&tg(o,c,e),e=h,l=c;var v=e.updateQueue;if(v===null){var m=new Set;m.add(l),e.updateQueue=m}else v.add(l);break e}else{if(!(e&1)){tg(o,c,e),Gh();break e}l=Error(D(426))}}else if(_e&&a.mode&1){var w=rg(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),ng(w,i,a,o,e),Ph(To(l,a));break e}}o=l=To(l,a),Me!==4&&(Me=2),bi===null?bi=[o]:bi.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,e&=-e,o.lanes|=e;var x=a0(o,l,e);Ym(o,x);break e;case 1:a=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(En===null||!En.has(b)))){o.flags|=65536,e&=-e,o.lanes|=e;var _=l0(o,a,e);Ym(o,_);break e}}o=o.return}while(o!==null)}R0(r)}catch(S){e=S,Oe===r&&r!==null&&(Oe=r=r.return);continue}break}while(!0)}function C0(){var t=Yl.current;return Yl.current=Gl,t===null?Gl:t}function Gh(){(Me===0||Me===3||Me===2)&&(Me=4),Fe===null||!(vs&268435455)&&!(Nc&268435455)||ln(Fe,ze)}function Xl(t,e){var r=ie;ie|=2;var n=C0();(Fe!==t||ze!==e)&&(Rr=null,cs(t,e));do try{Kk();break}catch(s){E0(t,s)}while(!0);if(jh(),ie=r,Yl.current=n,Oe!==null)throw Error(D(261));return Fe=null,ze=0,Me}function Kk(){for(;Oe!==null;)k0(Oe)}function qk(){for(;Oe!==null&&!yC();)k0(Oe)}function k0(t){var e=T0(t.alternate,t,pt);t.memoizedProps=t.pendingProps,e===null?R0(t):Oe=e,Vh.current=null}function R0(t){var e=t;do{var r=e.alternate;if(t=e.return,e.flags&32768){if(r=Uk(r,e),r!==null){r.flags&=32767,Oe=r;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Me=6,Oe=null;return}}else if(r=Fk(r,e,pt),r!==null){Oe=r;return}if(e=e.sibling,e!==null){Oe=e;return}Oe=e=t}while(e!==null);Me===0&&(Me=5)}function qn(t,e,r){var n=fe,s=Dt.transition;try{Dt.transition=null,fe=1,Gk(t,e,r,n)}finally{Dt.transition=s,fe=n}return null}function Gk(t,e,r,n){do co();while(gn!==null);if(ie&6)throw Error(D(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(D(177));t.callbackNode=null,t.callbackPriority=0;var o=r.lanes|r.childLanes;if(PC(t,o),t===Fe&&(Oe=Fe=null,ze=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Wa||(Wa=!0,j0(Al,function(){return co(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=Dt.transition,Dt.transition=null;var i=fe;fe=1;var a=ie;ie|=4,Vh.current=null,zk(t,r),b0(r,t),pk(Vd),Dl=!!zd,Vd=zd=null,t.current=r,Vk(r),wC(),ie=a,fe=i,Dt.transition=o}else t.current=r;if(Wa&&(Wa=!1,gn=t,Jl=s),o=t.pendingLanes,o===0&&(En=null),_C(r.stateNode),dt(t,je()),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(Ql)throw Ql=!1,t=uf,uf=null,t;return Jl&1&&t.tag!==0&&co(),o=t.pendingLanes,o&1?t===df?_i++:(_i=0,df=t):_i=0,Mn(),null}function co(){if(gn!==null){var t=aw(Jl),e=Dt.transition,r=fe;try{if(Dt.transition=null,fe=16>t?16:t,gn===null)var n=!1;else{if(t=gn,gn=null,Jl=0,ie&6)throw Error(D(331));var s=ie;for(ie|=4,V=t.current;V!==null;){var o=V,i=o.child;if(V.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(V=c;V!==null;){var u=V;switch(u.tag){case 0:case 11:case 15:xi(8,u,o)}var f=u.child;if(f!==null)f.return=u,V=f;else for(;V!==null;){u=V;var p=u.sibling,h=u.return;if(y0(u),u===c){V=null;break}if(p!==null){p.return=h,V=p;break}V=h}}}var v=o.alternate;if(v!==null){var m=v.child;if(m!==null){v.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}V=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,V=i;else e:for(;V!==null;){if(o=V,o.flags&2048)switch(o.tag){case 0:case 11:case 15:xi(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,V=x;break e}V=o.return}}var y=t.current;for(V=y;V!==null;){i=V;var b=i.child;if(i.subtreeFlags&2064&&b!==null)b.return=i,V=b;else e:for(i=y;V!==null;){if(a=V,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:jc(9,a)}}catch(S){Te(a,a.return,S)}if(a===i){V=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,V=_;break e}V=a.return}}if(ie=s,Mn(),vr&&typeof vr.onPostCommitFiberRoot=="function")try{vr.onPostCommitFiberRoot(_c,t)}catch{}n=!0}return n}finally{fe=r,Dt.transition=e}}return!1}function gg(t,e,r){e=To(r,e),e=a0(t,e,1),t=Sn(t,e,1),e=tt(),t!==null&&(ua(t,1,e),dt(t,e))}function Te(t,e,r){if(t.tag===3)gg(t,t,r);else for(;e!==null;){if(e.tag===3){gg(e,t,r);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(En===null||!En.has(n))){t=To(r,t),t=l0(e,t,1),e=Sn(e,t,1),t=tt(),e!==null&&(ua(e,1,t),dt(e,t));break}}e=e.return}}function Yk(t,e,r){var n=t.pingCache;n!==null&&n.delete(e),e=tt(),t.pingedLanes|=t.suspendedLanes&r,Fe===t&&(ze&r)===r&&(Me===4||Me===3&&(ze&130023424)===ze&&500>je()-Hh?cs(t,0):Wh|=r),dt(t,e)}function P0(t,e){e===0&&(t.mode&1?(e=Ia,Ia<<=1,!(Ia&130023424)&&(Ia=4194304)):e=1);var r=tt();t=Fr(t,e),t!==null&&(ua(t,e,r),dt(t,r))}function Qk(t){var e=t.memoizedState,r=0;e!==null&&(r=e.retryLane),P0(t,r)}function Jk(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(D(314))}n!==null&&n.delete(e),P0(t,r)}var T0;T0=function(t,e,r){if(t!==null)if(t.memoizedProps!==e.pendingProps||ct.current)at=!0;else{if(!(t.lanes&r)&&!(e.flags&128))return at=!1,$k(t,e,r);at=!!(t.flags&131072)}else at=!1,_e&&e.flags&1048576&&Aw(e,zl,e.index);switch(e.lanes=0,e.tag){case 2:var n=e.type;wl(t,e),t=e.pendingProps;var s=Co(e,Ye.current);lo(e,r),s=$h(null,e,n,t,s,r);var o=Fh();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,ut(n)?(o=!0,Ul(e)):o=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Ah(e),s.updater=Tc,e.stateNode=s,s._reactInternals=e,Xd(e,n,t,r),e=tf(null,e,n,!0,o,r)):(e.tag=0,_e&&o&&kh(e),Xe(null,e,s,r),e=e.child),e;case 16:n=e.elementType;e:{switch(wl(t,e),t=e.pendingProps,s=n._init,n=s(n._payload),e.type=n,s=e.tag=Zk(n),t=Kt(n,t),s){case 0:e=ef(null,e,n,t,r);break e;case 1:e=ig(null,e,n,t,r);break e;case 11:e=sg(null,e,n,t,r);break e;case 14:e=og(null,e,n,Kt(n.type,t),r);break e}throw Error(D(306,n,""))}return e;case 0:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Kt(n,s),ef(t,e,n,s,r);case 1:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Kt(n,s),ig(t,e,n,s,r);case 3:e:{if(f0(e),t===null)throw Error(D(387));n=e.pendingProps,o=e.memoizedState,s=o.element,Fw(t,e),Hl(e,n,null,r);var i=e.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},e.updateQueue.baseState=o,e.memoizedState=o,e.flags&256){s=To(Error(D(423)),e),e=ag(t,e,n,r,s);break e}else if(n!==s){s=To(Error(D(424)),e),e=ag(t,e,n,r,s);break e}else for(xt=_n(e.stateNode.containerInfo.firstChild),bt=e,_e=!0,Xt=null,r=Lw(e,null,n,r),e.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(ko(),n===s){e=Ur(t,e,r);break e}Xe(t,e,n,r)}e=e.child}return e;case 5:return Uw(e),t===null&&Yd(e),n=e.type,s=e.pendingProps,o=t!==null?t.memoizedProps:null,i=s.children,Wd(n,s)?i=null:o!==null&&Wd(n,o)&&(e.flags|=32),d0(t,e),Xe(t,e,i,r),e.child;case 6:return t===null&&Yd(e),null;case 13:return h0(t,e,r);case 4:return Ih(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=Ro(e,null,n,r):Xe(t,e,n,r),e.child;case 11:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Kt(n,s),sg(t,e,n,s,r);case 7:return Xe(t,e,e.pendingProps,r),e.child;case 8:return Xe(t,e,e.pendingProps.children,r),e.child;case 12:return Xe(t,e,e.pendingProps.children,r),e.child;
vendor: 2,882 bytes, line 40
40case 10:e:{if(n=e.type._context,s=e.pendingProps,o=e.memoizedProps,i=s.value,ge(Vl,n._currentValue),n._currentValue=i,o!==null)if(rr(o.value,i)){if(o.children===s.children&&!ct.current){e=Ur(t,e,r);break e}}else for(o=e.child,o!==null&&(o.return=e);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var l=a.firstContext;l!==null;){if(l.context===n){if(o.tag===1){l=Ir(-1,r&-r),l.tag=2;var c=o.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}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),Qd(o.return,r,e),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===e.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(D(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),Qd(i,r,e),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===e){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Xe(t,e,s.children,r),e=e.child}return e;case 9:return s=e.type,n=e.pendingProps.children,lo(e,r),s=$t(s),n=n(s),e.flags|=1,Xe(t,e,n,r),e.child;case 14:return n=e.type,s=Kt(n,e.pendingProps),s=Kt(n.type,s),og(t,e,n,s,r);case 15:return c0(t,e,e.type,e.pendingProps,r);case 17:return n=e.type,s=e.pendingProps,s=e.elementType===n?s:Kt(n,s),wl(t,e),e.tag=1,ut(n)?(t=!0,Ul(e)):t=!1,lo(e,r),i0(e,n,s),Xd(e,n,s,r),tf(null,e,n,!0,t,r);case 19:return p0(t,e,r);case 22:return u0(t,e,r)}throw Error(D(156,e.tag))};function j0(t,e){return nw(t,e)}function Xk(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 It(t,e,r,n){return new Xk(t,e,r,n)}function Yh(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Zk(t){if(typeof t=="function")return Yh(t)?1:0;if(t!=null){if(t=t.$$typeof,t===ph)return 11;if(t===mh)return 14}return 2}function kn(t,e){var r=t.alternate;return r===null?(r=It(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 _l(t,e,r,n,s,o){var i=2;if(n=t,typeof t=="function")Yh(t)&&(i=1);else if(typeof t=="string")i=5;else e:switch(t){case qs:return us(r.children,s,o,e);case hh:i=8,s|=8;break;case _d:return t=It(12,r,e,s|2),t.elementType=_d,t.lanes=o,t;
vendor: 6,258 bytes, line 40
40case Sd:return t=It(13,r,e,s),t.elementType=Sd,t.lanes=o,t;case Ed:return t=It(19,r,e,s),t.elementType=Ed,t.lanes=o,t;case Uy:return Oc(r,s,o,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case $y:i=10;break e;case Fy:i=9;break e;case ph:i=11;break e;case mh:i=14;break e;case sn:i=16,n=null;break e}throw Error(D(130,t==null?t:typeof t,""))}return e=It(i,r,e,s),e.elementType=t,e.type=n,e.lanes=o,e}function us(t,e,r,n){return t=It(7,t,n,e),t.lanes=r,t}function Oc(t,e,r,n){return t=It(22,t,n,e),t.elementType=Uy,t.lanes=r,t.stateNode={isHidden:!1},t}function Bu(t,e,r){return t=It(6,t,null,e),t.lanes=r,t}function zu(t,e,r){return e=It(4,t.children!==null?t.children:[],t.key,e),e.lanes=r,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function eR(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=_u(0),this.expirationTimes=_u(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_u(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Qh(t,e,r,n,s,o,i,a,l){return t=new eR(t,e,r,a,l),e===1?(e=1,o===!0&&(e|=8)):e=0,o=It(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ah(o),t}function tR(t,e,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ks,key:n==null?null:""+n,children:t,containerInfo:e,implementation:r}}function N0(t){if(!t)return Nn;t=t._reactInternals;e:{if(Es(t)!==t||t.tag!==1)throw Error(D(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(ut(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(D(171))}if(t.tag===1){var r=t.type;if(ut(r))return Nw(t,r,e)}return e}function O0(t,e,r,n,s,o,i,a,l){return t=Qh(r,n,!0,t,s,o,i,a,l),t.context=N0(null),r=t.current,n=tt(),s=Cn(r),o=Ir(n,s),o.callback=e??null,Sn(r,o,s),t.current.lanes=s,ua(t,s,n),dt(t,n),t}function Ac(t,e,r,n){var s=e.current,o=tt(),i=Cn(s);return r=N0(r),e.context===null?e.context=r:e.pendingContext=r,e=Ir(o,i),e.payload={element:t},n=n===void 0?null:n,n!==null&&(e.callback=n),t=Sn(s,e,i),t!==null&&(er(t,s,i,o),gl(t,s,i)),i}function Zl(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 vg(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var r=t.retryLane;t.retryLane=r!==0&&r<e?r:e}}function Jh(t,e){vg(t,e),(t=t.alternate)&&vg(t,e)}function rR(){return null}var A0=typeof reportError=="function"?reportError:function(t){console.error(t)};function Xh(t){this._internalRoot=t}Ic.prototype.render=Xh.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(D(409));Ac(t,e,null,null)};Ic.prototype.unmount=Xh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;ys(function(){Ac(null,t,null,null)}),e[$r]=null}};function Ic(t){this._internalRoot=t}Ic.prototype.unstable_scheduleHydration=function(t){if(t){var e=uw();t={blockedOn:null,target:t,priority:e};for(var r=0;r<an.length&&e!==0&&e<an[r].priority;r++);an.splice(r,0,t),r===0&&fw(t)}};function Zh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Dc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function yg(){}function nR(t,e,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var c=Zl(i);o.call(c)}}var i=O0(e,n,t,0,null,!1,!1,"",yg);return t._reactRootContainer=i,t[$r]=i.current,Mi(t.nodeType===8?t.parentNode:t),ys(),i}for(;s=t.lastChild;)t.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var c=Zl(l);a.call(c)}}var l=Qh(t,0,!1,null,null,!1,!1,"",yg);return t._reactRootContainer=l,t[$r]=l.current,Mi(t.nodeType===8?t.parentNode:t),ys(function(){Ac(e,l,r,n)}),l}function Mc(t,e,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=Zl(i);a.call(l)}}Ac(e,i,t,s)}else i=nR(r,e,t,s,n);return Zl(i)}lw=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var r=ui(e.pendingLanes);r!==0&&(yh(e,r|1),dt(e,je()),!(ie&6)&&(jo=je()+500,Mn()))}break;case 13:ys(function(){var n=Fr(t,1);if(n!==null){var s=tt();er(n,t,1,s)}}),Jh(t,1)}};wh=function(t){if(t.tag===13){var e=Fr(t,134217728);if(e!==null){var r=tt();er(e,t,134217728,r)}Jh(t,134217728)}};cw=function(t){if(t.tag===13){var e=Cn(t),r=Fr(t,e);if(r!==null){var n=tt();er(r,t,e,n)}Jh(t,e)}};uw=function(){return fe};dw=function(t,e){var r=fe;try{return fe=t,e()}finally{fe=r}};Id=function(t,e,r){switch(e){case"input":if(Rd(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=kc(n);if(!s)throw Error(D(90));zy(n),Rd(n,s)}}}break;case"textarea":Wy(t,r);break;case"select":e=r.value,e!=null&&so(t,!!r.multiple,e,!1)}};Jy=Kh;Xy=ys;var sR={usingClientEntryPoint:!1,Events:[fa,Js,kc,Yy,Qy,Kh]},ri={findFiberByHostInstance:Zn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},oR={bundleType:ri.bundleType,version:ri.version,rendererPackageName:ri.rendererPackageName,rendererConfig:ri.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wr.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=tw(t),t===null?null:t.stateNode},findFiberByHostInstance:ri.findFiberByHostInstance||rR,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 Ha=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ha.isDisabled&&Ha.supportsFiber)try{_c=Ha.inject(oR),vr=Ha}catch{}}Ct.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=sR;Ct.createPortal=function(t,e){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Zh(e))throw Error(D(200));return tR(t,e,null,r)};Ct.createRoot=function(t,e){if(!Zh(t))throw Error(D(299));var r=!1,n="",s=A0;return e!=null&&(e.unstable_strictMode===!0&&(r=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onRecoverableError!==void 0&&(s=e.onRecoverableError)),e=Qh(t,1,!1,null,null,r,!1,n,s),t[$r]=e.current,Mi(t.nodeType===8?t.parentNode:t),new Xh(e)};Ct.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(D(188)):(t=Object.keys(t).join(","),Error(D(268,t)));return t=tw(e),t=t===null?null:t.stateNode,t};Ct.flushSync=function(t){return ys(t)};Ct.hydrate=function(t,e,r){if(!Dc(e))throw Error(D(200));return Mc(null,t,e,!0,r)};Ct.hydrateRoot=function(t,e,r){if(!Zh(t))throw Error(D(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=A0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),e=O0(e,null,t,1,r??null,s,!1,o,i),t[$r]=e.current,Mi(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 Ic(e)};Ct.render=function(t,e,r){if(!Dc(e))throw Error(D(200));return Mc(null,t,e,!1,r)};Ct.unmountComponentAtNode=function(t){if(!Dc(t))throw Error(D(40));return t._reactRootContainer?(ys(function(){Mc(null,null,t,!1,function(){t._reactRootContainer=null,t[$r]=null})}),!0):!1};Ct.unstable_batchedUpdates=Kh;Ct.unstable_renderSubtreeIntoContainer=function(t,e,r,n){if(!Dc(r))throw Error(D(200));if(t==null||t._reactInternals===void 0)throw Error(D(38));return Mc(t,e,r,!1,n)};Ct.version="18.3.1-next-f1338f8080-20240426";function I0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(I0)}catch(t){console.error(t)}}I0(),Iy.exports=Ct;var pa=Iy.exports;const D0=_y(pa);var M0,wg=pa;M0=wg.createRoot,wg.hydrateRoot;const iR=1,aR=1e6;let Vu=0;function lR(){return Vu=(Vu+1)%Number.MAX_SAFE_INTEGER,Vu.toString()}const Wu=new Map,xg=t=>{if(Wu.has(t))return;const e=setTimeout(()=>{Wu.delete(t),Si({type:"REMOVE_TOAST",toastId:t})},aR);Wu.set(t,e)},cR=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,iR)};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?xg(r):t.toasts.forEach(n=>{xg(n.id)}),{...t,toasts:t.toasts.map(n=>
vendor: 11,650 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)}}},Sl=[];let El={toasts:[]};function Si(t){El=cR(El,t),Sl.forEach(e=>{e(El)})}function uR({...t}){const e=lR(),r=s=>Si({type:"UPDATE_TOAST",toast:{...s,id:e}}),n=()=>Si({type:"DISMISS_TOAST",toastId:e});return Si({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||n()}}}),{id:e,dismiss:n,update:r}}function Lc(){const[t,e]=g.useState(El);return g.useEffect(()=>(Sl.push(e),()=>{const r=Sl.indexOf(e);r>-1&&Sl.splice(r,1)}),[t]),{...t,toast:uR,dismiss:r=>Si({type:"DISMISS_TOAST",toastId:r})}}function W(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 bg(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function $c(...t){return e=>{let r=!1;const n=t.map(s=>{const o=bg(s,e);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():bg(t[s],null)}}}}function ce(...t){return g.useCallback($c(...t),t)}function dR(t,e){const r=g.createContext(e),n=o=>{const{children:i,...a}=o,l=g.useMemo(()=>a,Object.values(a));return d.jsx(r.Provider,{value:l,children:i})};n.displayName=t+"Provider";function s(o){const i=g.useContext(r);if(i)return i;if(e!==void 0)return e;throw new Error(`\`${o}\` must be used within \`${t}\``)}return[n,s]}function ft(t,e=[]){let r=[];function n(o,i){const a=g.createContext(i),l=r.length;r=[...r,i];const c=f=>{var x;const{scope:p,children:h,...v}=f,m=((x=p==null?void 0:p[t])==null?void 0:x[l])||a,w=g.useMemo(()=>v,Object.values(v));return d.jsx(m.Provider,{value:w,children:h})};c.displayName=o+"Provider";function u(f,p){var m;const h=((m=p==null?void 0:p[t])==null?void 0:m[l])||a,v=g.useContext(h);if(v)return v;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,u]}const s=()=>{const o=r.map(i=>g.createContext(i));return function(a){const l=(a==null?void 0:a[t])||o;return g.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return s.scopeName=t,[n,fR(s,...e)]}function fR(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return r.scopeName=e.scopeName,r}function No(t){const e=pR(t),r=g.forwardRef((n,s)=>{const{children:o,...i}=n,a=g.Children.toArray(o),l=a.find(mR);if(l){const c=l.props.children,u=a.map(f=>f===l?g.Children.count(c)>1?g.Children.only(null):g.isValidElement(c)?c.props.children:null:f);return d.jsx(e,{...i,ref:s,children:g.isValidElement(c)?g.cloneElement(c,void 0,u):null})}return d.jsx(e,{...i,ref:s,children:o})});return r.displayName=`${t}.Slot`,r}var hR=No("Slot");function pR(t){const e=g.forwardRef((r,n)=>{const{children:s,...o}=r;if(g.isValidElement(s)){const i=vR(s),a=gR(o,s.props);return s.type!==g.Fragment&&(a.ref=n?$c(n,i):i),g.cloneElement(s,a)}return g.Children.count(s)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var L0=Symbol("radix.slottable");function $0(t){const e=({children:r})=>d.jsx(d.Fragment,{children:r});return e.displayName=`${t}.Slottable`,e.__radixId=L0,e}function mR(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===L0}function gR(t,e){const r={...e};for(const n in e){const s=t[n],o=e[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...a)=>{const l=o(...a);return s(...a),l}:s&&(r[n]=s):n==="style"?r[n]={...s,...o}:n==="className"&&(r[n]=[s,o].filter(Boolean).join(" "))}return{...t,...r}}function vR(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 ep(t){const e=t+"CollectionProvider",[r,n]=ft(e),[s,o]=r(e,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:w,children:x}=m,y=$.useRef(null),b=$.useRef(new Map).current;return d.jsx(s,{scope:w,itemMap:b,collectionRef:y,children:x})};i.displayName=e;const a=t+"CollectionSlot",l=No(a),c=$.forwardRef((m,w)=>{const{scope:x,children:y}=m,b=o(a,x),_=ce(w,b.collectionRef);return d.jsx(l,{ref:_,children:y})});c.displayName=a;const u=t+"CollectionItemSlot",f="data-radix-collection-item",p=No(u),h=$.forwardRef((m,w)=>{const{scope:x,children:y,...b}=m,_=$.useRef(null),S=ce(w,_),E=o(u,x);return $.useEffect(()=>(E.itemMap.set(_,{ref:_,...b}),()=>void E.itemMap.delete(_))),d.jsx(p,{[f]:"",ref:S,children:y})});h.displayName=u;function v(m){const w=o(t+"CollectionConsumer",m);return $.useCallback(()=>{const y=w.collectionRef.current;if(!y)return[];const b=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(w.itemMap.values()).sort((E,C)=>b.indexOf(E.ref.current)-b.indexOf(C.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:c,ItemSlot:h},v,n]}var yR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],te=yR.reduce((t,e)=>{const r=No(`Primitive.${e}`),n=g.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function tp(t,e){t&&pa.flushSync(()=>t.dispatchEvent(e))}function Et(t){const e=g.useRef(t);return g.useEffect(()=>{e.current=t}),g.useMemo(()=>(...r)=>{var n;return(n=e.current)==null?void 0:n.call(e,...r)},[])}function wR(t,e=globalThis==null?void 0:globalThis.document){const r=Et(t);g.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 xR="DismissableLayer",pf="dismissableLayer.update",bR="dismissableLayer.pointerDownOutside",_R="dismissableLayer.focusOutside",_g,F0=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ma=g.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=t,c=g.useContext(F0),[u,f]=g.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=g.useState({}),v=ce(e,C=>f(C)),m=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(w),y=u?m.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,_=y>=x,S=ER(C=>{const k=C.target,P=[...c.branches].some(N=>N.contains(k));!_||P||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},p),E=CR(C=>{const k=C.target;[...c.branches].some(N=>N.contains(k))||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},p);return wR(C=>{y===c.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},p),g.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(_g=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Sg(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=_g)}},[u,p,r,c]),g.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Sg())},[u,c]),g.useEffect(()=>{const C=()=>h({});return document.addEventListener(pf,C),()=>document.removeEventListener(pf,C)},[]),d.jsx(te.div,{...l,ref:v,style:{pointerEvents:b?_?"auto":"none":void 0,...t.style},onFocusCapture:W(t.onFocusCapture,E.onFocusCapture),onBlurCapture:W(t.onBlurCapture,E.onBlurCapture),onPointerDownCapture:W(t.onPointerDownCapture,S.onPointerDownCapture)})});ma.displayName=xR;var SR="DismissableLayerBranch",U0=g.forwardRef((t,e)=>{const r=g.useContext(F0),n=g.useRef(null),s=ce(e,n);return g.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),d.jsx(te.div,{...t,ref:s})});U0.displayName=SR;function ER(t,e=globalThis==null?void 0:globalThis.document){const r=Et(t),n=g.useRef(!1),s=g.useRef(()=>{});return g.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){B0(bR,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},i=window.setTimeout(()=>{e.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",o),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function CR(t,e=globalThis==null?void 0:globalThis.document){const r=Et(t),n=g.useRef(!1);return g.useEffect(()=>{const s=o=>{o.target&&!n.current&&B0(_R,r,{originalEvent:o},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Sg(){const t=new CustomEvent(pf);document.dispatchEvent(t)}function B0(t,e,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?tp(s,o):s.dispatchEvent(o)}var kR=ma,RR=U0,Br=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},PR="Portal",Fc=g.forwardRef((t,e)=>{var a;const{container:r,...n}=t,[s,o]=g.useState(!1);Br(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?D0.createPortal(d.jsx(te.div,{...n,ref:e}),i):null});Fc.displayName=PR;function TR(t,e){return g.useReducer((r,n)=>e[r][n]??r,t)}var Rt=t=>{const{present:e,children:r}=t,n=jR(e),s=typeof r=="function"?r({present:n.isPresent}):g.Children.only(r),o=ce(n.ref,NR(s));return typeof r=="function"||n.isPresent?g.cloneElement(s,{ref:o}):null};Rt.displayName="Presence";function jR(t){const[e,r]=g.useState(),n=g.useRef(null),s=g.useRef(t),o=g.useRef("none"),i=t?"mounted":"unmounted",[a,l]=TR(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const c=Ka(n.current);o.current=a==="mounted"?c:"none"},[a]),Br(()=>{const c=n.current,u=s.current;if(u!==t){const p=o.current,h=Ka(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,l]),Br(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,f=h=>{const m=Ka(n.current).includes(h.animationName);if(h.target===e&&m&&(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)})}},p=h=>{h.target===e&&(o.current=Ka(n.current))};return e.addEventListener("animationstart",p),e.addEventListener("animationcancel",f),e.addEventListener("animationend",f),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",p),e.removeEventListener("animationcancel",f),e.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Ka(t){return(t==null?void 0:t.animationName)||"none"}function NR(t){var n,s;let e=(n=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.
40isReactWarning;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 OR=ch[" useInsertionEffect ".trim().toString()]||Br;function Ln({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,o,i]=AR({defaultProp:e,onChange:r}),a=t!==void 0,l=a?t:s;{const u=g.useRef(t!==void 0);g.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${n} is changing from ${f?"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=g.useCallback(u=>{var f;if(a){const p=IR(u)?u(t):u;p!==t&&((f=i.current)==null||f.call(i,p))}else o(u)},[a,t,o,i]);return[l,c]}function AR({defaultProp:t,onChange:e}){const[r,n]=g.useState(t),s=g.useRef(r),o=g.useRef(e);return OR(()=>{o.current=e},[e]),g.useEffect(()=>{var i;s.current!==r&&((i=o.current)==null||i.call(o,r),s.current=r)},[r,s]),[r,n,o]}function IR(t){return typeof t=="function"}var DR=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"}),MR="VisuallyHidden",Uc=g.forwardRef((t,e)=>d.jsx(te.span,{...t,ref:e,style:{...DR,...t.style}}));Uc.displayName=MR;var LR=Uc,rp="ToastProvider",[np,$R,FR]=ep("Toast"),[z0,P4]=ft("Toast",[FR]),[UR,Bc]=z0(rp),V0=t=>{const{__scopeToast:e,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=t,[a,l]=g.useState(null),[c,u]=g.useState(0),f=g.useRef(!1),p=g.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${rp}\`. Expected non-empty \`string\`.`),d.jsx(np.Provider,{scope:e,children:d.jsx(UR,{scope:e,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>u(h=>h+1),[]),onToastRemove:g.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:i})})};V0.displayName=rp;var W0="ToastViewport",BR=["F8"],mf="toast.viewportPause",gf="toast.viewportResume",H0=g.forwardRef((t,e)=>{const{__scopeToast:r,hotkey:n=BR,label:s="Notifications ({hotkey})",...o}=t,i=Bc(W0,r),a=$R(r),l=g.useRef(null),c=g.useRef(null),u=g.useRef(null),f=g.useRef(null),p=ce(e,f,i.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),v=i.toastCount>0;g.useEffect(()=>{const w=x=>{var b;n.length!==0&&n.every(_=>x[_]||x.code===_)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),g.useEffect(()=>{const w=l.current,x=f.current;if(v&&w&&x){const y=()=>{if(!i.isClosePausedRef.current){const E=new CustomEvent(mf);x.dispatchEvent(E),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const E=new CustomEvent(gf);x.dispatchEvent(E),i.isClosePausedRef.current=!1}},_=E=>{!w.contains(E.relatedTarget)&&b()},S=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",y),w.addEventListener("focusout",_),w.addEventListener("pointermove",y),w.addEventListener("pointerleave",S),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",y),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",y),w.removeEventListener("pointerleave",S),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[v,i.isClosePausedRef]);const m=g.useCallback(({tabbingDirection:w})=>{const y=a().map(b=>{const _=b.ref.current,S=[_,...eP(_)];return w==="forwards"?S:S.reverse()});return(w==="forwards"?y.reverse():y).flat()},[a]);return g.useEffect(()=>{const w=f.current;if(w){const x=y=>{var S,E,C;const b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){const k=document.activeElement,P=y.shiftKey;if(y.target===w&&P){(S=c.current)==null||S.focus();return}const A=m({tabbingDirection:P?"backwards":"forwards"}),F=A.findIndex(O=>O===k);Hu(A.slice(F+1))?y.preventDefault():P?(E=c.current)==null||E.focus():(C=u.current)==null||C.focus()}};return w.addEventListener("keydown",x),()=>w.removeEventListener("keydown",x)}},[a,m]),d.jsxs(RR,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:v?void 0:"none"},children:[v&&d.jsx(vf,{ref:c,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"forwards"});Hu(w)}}),d.jsx(np.Slot,{scope:r,children:d.jsx(te.ol,{tabIndex:-1,...o,ref:p})}),v&&d.jsx(vf,{ref:u,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"backwards"});Hu(w)}})]})});H0.displayName=W0;var K0="ToastFocusProxy",vf=g.forwardRef((t,e)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=t,o=Bc(K0,r);return d.jsx(Uc,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=o.viewport)!=null&&c.contains(a))&&n()}})});
vendor: 5,746 bytes, line 40
40vf.displayName=K0;var ga="Toast",zR="toast.swipeStart",VR="toast.swipeMove",WR="toast.swipeCancel",HR="toast.swipeEnd",q0=g.forwardRef((t,e)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=t,[a,l]=Ln({prop:n,defaultProp:s??!0,onChange:o,caller:ga});return d.jsx(Rt,{present:r||a,children:d.jsx(GR,{open:a,...i,ref:e,onClose:()=>l(!1),onPause:Et(t.onPause),onResume:Et(t.onResume),onSwipeStart:W(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(t.onSwipeMove,c=>{const{x:u,y:f}=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",`${f}px`)}),onSwipeCancel:W(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:W(t.onSwipeEnd,c=>{const{x:u,y:f}=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",`${f}px`),l(!1)})})})});q0.displayName=ga;var[KR,qR]=z0(ga,{onClose(){}}),GR=g.forwardRef((t,e)=>{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:p,onSwipeEnd:h,...v}=t,m=Bc(ga,r),[w,x]=g.useState(null),y=ce(e,O=>x(O)),b=g.useRef(null),_=g.useRef(null),S=s||m.duration,E=g.useRef(0),C=g.useRef(S),k=g.useRef(0),{onToastAdd:P,onToastRemove:N}=m,H=Et(()=>{var I;(w==null?void 0:w.contains(document.activeElement))&&((I=m.viewport)==null||I.focus()),i()}),A=g.useCallback(O=>{!O||O===1/0||(window.clearTimeout(k.current),E.current=new Date().getTime(),k.current=window.setTimeout(H,O))},[H]);g.useEffect(()=>{const O=m.viewport;if(O){const I=()=>{A(C.current),c==null||c()},M=()=>{const U=new Date().getTime()-E.current;C.current=C.current-U,window.clearTimeout(k.current),l==null||l()};return O.addEventListener(mf,M),O.addEventListener(gf,I),()=>{O.removeEventListener(mf,M),O.removeEventListener(gf,I)}}},[m.viewport,S,l,c,A]),g.useEffect(()=>{o&&!m.isClosePausedRef.current&&A(S)},[o,S,m.isClosePausedRef,A]),g.useEffect(()=>(P(),()=>N()),[P,N]);const F=g.useMemo(()=>w?ex(w):null,[w]);return m.viewport?d.jsxs(d.Fragment,{children:[F&&d.jsx(YR,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:F}),d.jsx(KR,{scope:r,onClose:H,children:pa.createPortal(d.jsx(np.ItemSlot,{scope:r,children:d.jsx(kR,{asChild:!0,onEscapeKeyDown:W(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||H(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:d.jsx(te.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":m.swipeDirection,...v,ref:y,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:W(t.onKeyDown,O=>{O.key==="Escape"&&(a==null||a(O.nativeEvent),O.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:W(t.onPointerDown,O=>{O.button===0&&(b.current={x:O.clientX,y:O.clientY})}),onPointerMove:W(t.onPointerMove,O=>{if(!b.current)return;const I=O.clientX-b.current.x,M=O.clientY-b.current.y,U=!!_.current,T=["left","right"].includes(m.swipeDirection),R=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,L=T?R(0,I):0,B=T?0:R(0,M),z=O.pointerType==="touch"?10:2,Q={x:L,y:B},X={originalEvent:O,delta:Q};U?(_.current=Q,qa(VR,f,X,{discrete:!1})):Eg(Q,m.swipeDirection,z)?(_.current=Q,qa(zR,u,X,{discrete:!1}),O.target.setPointerCapture(O.pointerId)):(Math.abs(I)>z||Math.abs(M)>z)&&(b.current=null)}),onPointerUp:W(t.onPointerUp,O=>{const I=_.current,M=O.target;if(M.hasPointerCapture(O.pointerId)&&M.releasePointerCapture(O.pointerId),_.current=null,b.current=null,I){const U=O.currentTarget,T={originalEvent:O,delta:I};Eg(I,m.swipeDirection,m.swipeThreshold)?qa(HR,h,T,{discrete:!0}):qa(WR,p,T,{discrete:!0}),U.addEventListener("click",R=>R.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),YR=t=>{const{__scopeToast:e,children:r,...n}=t,s=Bc(ga,e),[o,i]=g.useState(!1),[a,l]=g.useState(!1);return XR(()=>i(!0)),g.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:d.jsx(Fc,{asChild:!0,children:d.jsx(Uc,{...n,children:o&&d.jsxs(d.Fragment,{children:[s.label," ",r]})})})},QR="ToastTitle",G0=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return d.jsx(te.div,{...n,ref:e})});G0.displayName=QR;var JR="ToastDescription",Y0=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t;return d.jsx(te.div,{...n,ref:e})});Y0.displayName=JR;var Q0="ToastAction",J0=g.forwardRef((t,e)=>{const{altText:r,...n}=t;return r.trim()?d.jsx(Z0,{altText:r,asChild:!0,children:d.jsx(sp,{...n,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${Q0}\`. Expected non-empty \`string\`.`),null)});J0.displayName=Q0;var X0="ToastClose",sp=g.forwardRef((t,e)=>{const{__scopeToast:r,...n}=t,s=qR(X0,r);return d.jsx(Z0,{asChild:!0,children:d.jsx(te.button,{type:"button",...n,ref:e,onClick:W(t.onClick,s.onClose)})})});sp.displayName=X0;var Z0=g.forwardRef((t,e)=>{const{__scopeToast:r,altText:n,...s}=t;return d.jsx(te.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:e})});function ex(t){const e=[];
vendor: 8,074 bytes, lines 40-129
40return Array.from(t.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&e.push(n.textContent),ZR(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&e.push(i)}else e.push(...ex(n))}}),e}function qa(t,e,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?tp(s,o):s.dispatchEvent(o)}var Eg=(t,e,r=0)=>{const n=Math.abs(t.x),s=Math.abs(t.y),o=n>s;return e==="left"||e==="right"?o&&n>r:!o&&s>r};function XR(t=()=>{}){const e=Et(t);Br(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[e])}function ZR(t){return t.nodeType===t.ELEMENT_NODE}function eP(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 Hu(t){const e=document.activeElement;return t.some(r=>r===e?!0:(r.focus(),document.activeElement!==e))}var tP=V0,tx=H0,rx=q0,nx=G0,sx=Y0,ox=J0,ix=sp;function ax(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=ax(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function lx(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=ax(t))&&(n&&(n+=" "),n+=e);return n}const Cg=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,kg=lx,va=(t,e)=>r=>{var n;if((e==null?void 0:e.variants)==null)return kg(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=e,i=Object.keys(s).map(c=>{const u=r==null?void 0:r[c],f=o==null?void 0:o[c];if(u===null)return null;const p=Cg(u)||Cg(f);return s[c][p]}),a=r&&Object.entries(r).reduce((c,u)=>{let[f,p]=u;return p===void 0||(c[f]=p),c},{}),l=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:f,className:p,...h}=u;return Object.entries(h).every(v=>{let[m,w]=v;return Array.isArray(w)?w.includes({...o,...a}[m]):{...o,...a}[m]===w})?[...c,f,p]:c},[]);return kg(t,i,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 rP=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cx=(...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 nP={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 sP=g.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>g.createElement("svg",{ref:l,...nP,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:cx("lucide",s),...a},[...i.map(([c,u])=>g.createElement(c,u)),...Array.isArray(o)?o:[o]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const ue=(t,e)=>{const r=g.forwardRef(({className:n,...s},o)=>g.createElement(sP,{ref:o,iconNode:e,className:cx(`lucide-${rP(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 oP=ue("Apple",[["path",{d:"M12 20.94c1.5 0 2.75 1.06 4 1.06 3 0 6-8 6-12.22A4.91 4.91 0 0 0 17 5c-2.22 0-4 1.44-5 2-1-.56-2.78-2-5-2a4.9 4.9 0 0 0-5 4.78C2 14 5 22 8 22c1.25 0 2.5-1.06 4-1.06Z",key:"3s7exb"}],["path",{d:"M10 2c1 .5 2 2 2 5",key:"fcco2y"}]]);/** 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 op=ue("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** 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 iP=ue("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 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 aP=ue("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/** 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 ux=ue("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 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 lP=ue("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 dx=ue("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 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 cP=ue("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 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 uP=ue("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 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 fx=ue("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 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 hx=ue("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** 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 dP=ue("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"}]]);/** 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 fP=ue("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** 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 ip=ue("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 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 hP=ue("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"}]]);/** 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 pP=ue("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** 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 yf=ue("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 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 mP=ue("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/** 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 Ar=ue("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 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 gP=ue("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** 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 vP=ue("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 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 Hi=ue("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const ec=ue("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const yP=ue("ShieldOff",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const tc=ue("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
vendor: 9,514 bytes, lines 185-210
185y:"oel41y"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const Ku=ue("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const wP=ue("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const xP=ue("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const Rg=ue("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"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const bP=ue("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ap="-",_P=t=>{const e=EP(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:i=>{const a=i.split(ap);return a[0]===""&&a.length!==1&&a.shift(),px(a,e)||SP(i)},getConflictingClassGroupIds:(i,a)=>{const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}}},px=(t,e)=>{var i;if(t.length===0)return e.classGroupId;const r=t[0],n=e.nextPart.get(r),s=n?px(t.slice(1),n):void 0;if(s)return s;if(e.validators.length===0)return;const o=t.join(ap);return(i=e.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},Pg=/^\[(.+)\]$/,SP=t=>{if(Pg.test(t)){const e=Pg.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},EP=t=>{const{theme:e,prefix:r}=t,n={nextPart:new Map,validators:[]};return kP(Object.entries(t.classGroups),r).forEach(([o,i])=>{wf(i,n,o,e)}),n},wf=(t,e,r,n)=>{t.forEach(s=>{if(typeof s=="string"){const o=s===""?e:Tg(e,s);o.classGroupId=r;return}if(typeof s=="function"){if(CP(s)){wf(s(n),e,r,n);return}e.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{wf(i,Tg(e,o),r,n)})})},Tg=(t,e)=>{let r=t;return e.split(ap).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},CP=t=>t.isThemeGetter,kP=(t,e)=>e?t.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?e+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[e+i,a])):o);return[r,s]}):t,RP=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,n=new Map;const s=(o,i)=>{r.set(o,i),e++,e>t&&(e=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}},mx="!",PP=t=>{const{separator:e,experimentalParseClassName:r}=t,n=e.length===1,s=e[0],o=e.length,i=a=>{const l=[];let c=0,u=0,f;for(let w=0;w<a.length;w++){let x=a[w];if(c===0){if(x===s&&(n||a.slice(w,w+o)===e)){l.push(a.slice(u,w)),u=w+o;continue}if(x==="/"){f=w;continue}}x==="["?c++:x==="]"&&c--}const p=l.length===0?a:a.substring(u),h=p.startsWith(mx),v=h?p.substring(1):p,m=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:v,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:i}):i},TP=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},jP=t=>({cache:RP(t.cacheSize),parseClassName:PP(t),..._P(t)}),NP=/\s+/,OP=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=e,o=[],i=t.trim().split(NP);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:u,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:h}=r(c);let v=!!h,m=n(v?p.substring(0,h):p);if(!m){if(!v){a=c+(a.length>0?" "+a:a);continue}if(m=n(p),!m){a=c+(a.length>0?" "+a:a);continue}v=!1}const w=TP(u).join(":"),x=f?w+mx:w,y=x+m;if(o.includes(y))continue;o.push(y);const b=s(m,v);for(let _=0;_<b.length;++_){const S=b[_];o.push(x+S)}a=c+(a.length>0?" "+a:a)}return a};function AP(){let t=0,e,r,n="";for(;t<arguments.length;)(e=arguments[t++])&&(r=gx(e))&&(n&&(n+=" "),n+=r);return n}const gx=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=gx(t[n]))&&(r&&(r+=" "),r+=e);return r};function IP(t,...e){let r,n,s,o=i;function i(l){const c=e.reduce((u,f)=>f(u),t());return r=jP(c),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const c=n(l);if(c)return c;const u=OP(l,r);return s(l,u),u}return function(){return o(AP.apply(null,arguments))}}const ye=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},vx=/^\[(?:([a-z-]+):)?(.+)\]$/i,DP=/^\d+\/\d+$/,MP=new Set(["px","full","screen"]),LP=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$P=/\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$/,FP=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,UP=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BP=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Cr=t=>uo(t)||MP.has(t)||DP.test(t),Xr=t=>Fo(t,"length",YP),uo=t=>!!t&&!Number.isNaN(Number(t)),qu=t=>Fo(t,"number",uo),ni=t=>!!t&&Number.isInteger(Number(t)),zP=t=>t.endsWith("%")&&uo(t.slice(0,-1)),re=t=>vx.test(t),Zr=t=>LP.test(t),VP=new Set(["length","size","percentage"]),WP=t=>Fo(t,VP,yx),HP=t=>Fo(t,"position",yx),KP=new Set(["image","url"]),qP=t=>Fo(t,KP,JP),GP=t=>Fo(t,"",QP),si=()=>!0,Fo=(t,e,r)=>{const n=vx.exec(t);return n?n[1]?typeof e=="string"?n[1]===e:e.has(n[1]):r(n[2]):!1},YP=t=>$P.test(t)&&!FP.test(t),yx=()=>!1,QP=t=>UP.test(t),JP=t=>BP.test(t),XP=()=>{const t=ye("colors"),e=ye("spacing"),r=ye("blur"),n=ye("brightness"),s=ye("borderColor"),o=ye("borderRadius"),i=ye("borderSpacing"),a=ye("borderWidth"),l=ye("contrast"),c=ye("grayscale"),u=ye("hueRotate"),f=ye("invert"),p=ye("gap"),h=ye("gradientColorStops"),v=ye("gradientColorStopPositions"),m=ye("inset"),w=ye("margin"),x=ye("opacity"),y=ye("padding"),b=ye("saturate"),_=ye("scale"),S=ye("sepia"),E=ye("skew"),C=ye("space"),k=ye("translate"),P=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",re,e],A=()=>[re,e],F=()=>["",Cr,Xr],O=()=>["auto",uo,re],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",re],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[uo,re];return{cacheSize:500,separator:":",theme:{colors:[si],spacing:[Cr,Xr],blur:["none","",Zr,re],brightness:B(),borderColor:[t],borderRadius:["none","","full",Zr,re],borderSpacing:A(),borderWidth:F(),contrast:B(),grayscale:R(),hueRotate:B(),invert:R(),gap:A(),gradientColorStops:[t],gradientColorStopPositions:[zP,Xr],inset:H(),margin:H(),opacity:B(),padding:A(),saturate:B(),scale:B(),sepia:R(),skew:B(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[Zr]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"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:[...I(),re]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}
vendor: 9,947 bytes, line 210
210],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ni,re]}],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",re]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",ni,re]}],"grid-cols":[{"grid-cols":[si]}],"col-start-end":[{col:["auto",{span:["full",ni,re]},re]}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":[si]}],"row-start-end":[{row:["auto",{span:[ni,re]},re]}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],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":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,e]}],"min-w":[{"min-w":[re,e,"min","max","fit"]}],"max-w":[{"max-w":[re,e,"none","full","min","max","fit","prose",{screen:[Zr]},Zr]}],h:[{h:[re,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Zr,Xr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",qu]}],"font-family":[{font:[si]}],"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",re]}],"line-clamp":[{"line-clamp":["none",uo,qu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Cr,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Cr,Xr]}],"underline-offset":[{"underline-offset":["auto",Cr,re]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],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",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),HP]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",WP]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qP]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[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":[x]}],"border-style":[{border:[...M(),"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":[x]}],"divide-style":[{divide:M()}],"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:["",...M()]}],"outline-offset":[{"outline-offset":[Cr,re]}],"outline-w":[{outline:[Cr,Xr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[Cr,Xr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Zr,GP]}],"shadow-color":[{shadow:[si]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...U(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":U()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Zr,re]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[S]}],"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":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[ni,re]}],"translate-x":[{"translate-x":[k]}],"translate-y":[{"translate-y":[k]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],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",re]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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"]}
vendor: 4,642 bytes, line 210
210],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",re]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Cr,Xr,qu]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ZP=IP(XP);function G(...t){return ZP(lx(t))}const eT=tP,wx=g.forwardRef(({className:t,...e},r)=>d.jsx(tx,{ref:r,className:G("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}));wx.displayName=tx.displayName;const tT=va("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"}}),xx=g.forwardRef(({className:t,variant:e,...r},n)=>d.jsx(rx,{ref:n,className:G(tT({variant:e}),t),...r}));xx.displayName=rx.displayName;const rT=g.forwardRef(({className:t,...e},r)=>d.jsx(ox,{ref:r,className:G("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}));rT.displayName=ox.displayName;const bx=g.forwardRef(({className:t,...e},r)=>d.jsx(ix,{ref:r,className:G("absolute right-2 top-2 rounded-md p-1 text-foreground
210/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:d.jsx(bP,{className:"h-4 w-4"})}));bx.displayName=ix.displayName;const _x=g.forwardRef(({className:t,...e},r)=>d.jsx(nx,{ref:r,className:G("text-sm font-semibold",t),...e}));_x.displayName=nx.displayName;const Sx=g.forwardRef(({className:t,...e},r)=>d.jsx(sx,{ref:r,className:G("text-sm opacity-90",t),...e}));Sx.displayName=sx.displayName;function nT(){const{toasts:t}=Lc();return d.jsxs(eT,{children:[t.map(function({id:e,title:r,description:n,action:s,...o}){return d.jsxs(xx,{...o,children:[d.jsxs("div",{className:"grid gap-1",children:[r&&d.jsx(_x,{children:r}),n&&d.jsx(Sx,{children:n})]}),s,d.jsx(bx,{})]},e)}),d.jsx(wx,{})]})}var jg=["light","dark"],sT="(prefers-color-scheme: dark)",oT=g.createContext(void 0),iT={setTheme:t=>{},themes:[]},aT=()=>{var t;return(t=g.useContext(oT))!=null?t:iT};g.memo(({forcedTheme:t,storageKey:e,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let c=o==="system",u=r==="class"?`var d=document.documentElement,c=d.classList;
210${`c.remove(${a.map(v=>`'${v}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,f=s?jg.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",p=(v,m=!1,w=!0)=>{let x=i?i[v]:v,y=m?v+"|| ''":`'${x}'`,b="";return s&&w&&!m&&jg.includes(v)&&(b+=`d.style.colorScheme = '${v}';`),r==="class"?m||x?b+=`c.add(${y})`:b+="null":x&&(b+=`d[s](n,${y})`),b},h=t?`!function(){${u}${p(t)}}()`:n?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${sT}',m=window.matchMedia(t);if(m.media!==t||m.matches){${p("dark")}}else{${p("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}${c?"":"else{"+p(o,!1,!1)+"}"}${f}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${p(i?"x[e]":"e",!0)}}else{${p(o,!1,!1)};}${f}}catch(t){}}();`;return g.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var lT=t=>{switch(t){case"success":return dT;case"info":return hT;case"warning":return fT;case"error":return pT;default:return null}},cT=Array(12).fill(0),uT=({visible:t,className:e})=>$.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},$.createElement("div",{className:"sonner-spinner"},cT.map((r,n)=>$.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),dT=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),fT=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$.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"})),hT=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),pT=$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$.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"})),mT=$.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"},$.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),gT=()=>{let[t,e]=$.useState(document.hidden);return $.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},xf=1,vT=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:r,...n}=t,s=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:xf++,o=this.toasts.find(a=>a.id===s),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...t,id:s,title:r}),{...a,...t,id:s,dismissible:i,title:r}):a):this.addToast({title:r,...n,dismissible:i,id:s}),s},this.dismiss=t=>
210(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(r=>r({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let r;e.loading!==void 0&&(r=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let n=t instanceof Promise?t:t(),s=r!==void 0,o,i=n.then(async l=>{if(o=["resolve",l],$.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(wT(l)&&!l.ok){s=!1;let c=typeof e.error=="function"?await e.error(`HTTP error! status: ${l.status}`):e.error,u=typeof e.description=="function"?await e.description(`HTTP error! status: ${l.status}`):e.description;this.create({id:r,type:"error",message:c,description:u})}else if(e.success!==void 0){s=!1;let c=typeof e.success=="function"?await e.success(l):e.success,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"success",message:c,description:u})}}).catch(async l=>{if(o=["reject",l],e.error!==void 0){s=!1;let c=typeof e.error=="function"?await e.error(l):e.error,u=typeof e.description=="function"?await e.description(l):e.description;this.create({id:r,type:"error",message:c,description:u})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=e.finally)==null||l.call(e)}),a=()=>new Promise((l,c)=>i.then(()=>o[0]==="reject"?c(o[1]):l(o[1])).catch(c));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(t,e)=>{let r=(e==null?void 0:e.id)||xf++;return this.create({jsx:t(r),id:r,...e}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ot=new vT,yT=(t,e)=>{let r=(e==null?void 0:e.id)||xf++;return ot.addToast({title:t,...e,id:r}),r},wT=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",xT=yT,bT=()=>ot.toasts,_T=()=>ot.getActiveToasts(),oe=Object.assign(xT,{success:ot.success,info:ot.info,warning:ot.warning,error:ot.error,custom:ot.custom,message:ot.message,promise:ot.promise,dismiss:ot.dismiss,loading:ot.loading},{getHistory:bT,getToasts:_T});function ST(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))}ST(`: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;
210left: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}
210: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%);
210--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%)} 211`);function Ga(t){return t.label!==void 0}var ET=3,CT="32px",kT="16px",Ng=4e3,RT=356,PT=14,TT=20,jT=200;function Wt(...t){return t.filter(Boolean).join(" ")}function NT(t){let[e,r]=t.split("-"),n=[];return e&&n.push(e),r&&n.push(r),n}var OT=t=>{var e,r,n,s,o,i,a,l,c,u,f;let{invert:p,toast:h,unstyled:v,interacting:m,setHeights:w,visibleToasts:x,heights:y,index:b,toasts:_,expanded:S,removeToast:E,defaultRichColors:C,closeButton:k,style:P,cancelButtonStyle:N,actionButtonStyle:H,className:A="",descriptionClassName:F="",duration:O,position:I,gap:M,loadingIcon:U,expandByDefault:T,classNames:R,icons:L,closeButtonAriaLabel:B="Close toast",pauseWhenPageIsHidden:z}=t,[Q,X]=$.useState(null),[pe,Re]=$.useState(null),[ne,Er]=$.useState(!1),[Le,ar]=$.useState(!1),[Kr,Ps]=$.useState(!1),[qr,Ca]=$.useState(!1),[fu,ka]=$.useState(!1),[hu,qo]=$.useState(0),[Ts,sm]=$.useState(0),Go=$.useRef(h.duration||O||Ng),om=$.useRef(null),zn=$.useRef(null),CE=b===0,kE=b+1<=x,Pt=h.type,js=h.dism
211issible!==!1,RE=h.className||"",PE=h.descriptionClassName||"",Ra=$.useMemo(()=>y.findIndex(Z=>Z.toastId===h.id)||0,[y,h.id]),TE=$.useMemo(()=>{var Z;return(Z=h.closeButton)!=null?Z:k},[h.closeButton,k]),im=$.useMemo(()=>h.duration||O||Ng,[h.duration,O]),pu=$.useRef(0),Ns=$.useRef(0),am=$.useRef(0),Os=$.useRef(null),[jE,NE]=I.split("-"),lm=$.useMemo(()=>y.reduce((Z,he,be)=>be>=Ra?Z:Z+he.height,0),[y,Ra]),cm=gT(),OE=h.invert||p,mu=Pt==="loading";Ns.current=$.useMemo(()=>Ra*M+lm,[Ra,lm]),$.useEffect(()=>{Go.current=im},[im]),$.useEffect(()=>{Er(!0)},[]),$.useEffect(()=>{let Z=zn.current;if(Z){let he=Z.getBoundingClientRect().height;return sm(he),w(be=>[{toastId:h.id,height:he,position:h.position},...be]),()=>w(be=>be.filter(Ut=>Ut.toastId!==h.id))}},[w,h.id]),$.useLayoutEffect(()=>{if(!ne)return;let Z=zn.current,he=Z.style.height;Z.style.height="auto";let be=Z.getBoundingClientRect().height;Z.style.height=he,sm(be),w(Ut=>Ut.find(Bt=>Bt.toastId===h.id)?Ut.map(Bt=>Bt.toastId===h.id?{...Bt,height:be}:Bt):[{toastId:h.id,height:be,position:h.position},...Ut])},[ne,h.title,h.description,w,h.id]);let Gr=$.useCallback(()=>{ar(!0),qo(Ns.current),w(Z=>Z.filter(he=>he.toastId!==h.id)),setTimeout(()=>{E(h)},jT)},[h,E,w,Ns]);$.useEffect(()=>{if(h.promise&&Pt==="loading"||h.duration===1/0||h.type==="loading")return;let Z;return S||m||z&&cm?(()=>{if(am.current<pu.current){let he=new Date().getTime()-pu.current;Go.current=Go.current-he}am.current=new Date().getTime()})():Go.current!==1/0&&(pu.current=new Date().getTime(),Z=setTimeout(()=>{var he;(he=h.onAutoClose)==null||he.call(h,h),Gr()},Go.current)),()=>clearTimeout(Z)},[S,m,h,Pt,z,cm,Gr]),$.useEffect(()=>{h.delete&&Gr()},[Gr,h.delete]);function AE(){var Z,he,be;return L!=null&&L.loading?$.createElement("div",{className:Wt(R==null?void 0:R.loader,(Z=h==null?void 0:h.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":Pt==="loading"},L.loading):U?$.createElement("div",{className:Wt(R==null?void 0:R.loader,(he=h==null?void 0:h.classNames)==null?void 0:he.loader,"sonner-loader"),"data-visible":Pt==="loading"},U):$.createElement(uT,{className:Wt(R==null?void 0:R.loader,(be=h==null?void 0:h.classNames)==null?void 0:be.loader),visible:Pt==="loading"})}return $.createElement("li",{tabIndex:0,ref:zn,className:Wt(A,RE,R==null?void 0:R.toast,(e=h==null?void 0:h.classNames)==null?void 0:e.toast,R==null?void 0:R.default,R==null?void 0:R[Pt],(r=h==null?void 0:h.classNames)==null?void 0:r[Pt]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:C,"data-styled":!(h.jsx||h.unstyled||v),"data-mounted":ne,"data-promise":!!h.promise,"data-swiped":fu,"data-removed":Le,"data-visible":kE,"data-y-position":jE,"data-x-position":NE,"data-index":b,"data-front":CE,"data-swiping":Kr,"data-dismissible":js,"data-type":Pt,"data-invert":OE,"data-swipe-out":qr,"data-swipe-direction":pe,"data-expanded":!!(S||T&&ne),style:{"--index":b,"--toasts-before":b,"--z-index":_.length-b,"--offset":`${Le?hu:Ns.current}px`,"--initial-height":T?"auto":`${Ts}px`,...P,...h.style},onDragEnd:()=>{Ps(!1),X(null),Os.current=null},onPointerDown:Z=>{mu||!js||(om.current=new Date,qo(Ns.current),Z.target.setPointerCapture(Z.pointerId),Z.target.tagName!=="BUTTON"&&(Ps(!0),Os.current={x:Z.clientX,y:Z.clientY}))},onPointerUp:()=>{var Z,he,be,Ut;if(qr||!js)return;Os.current=null;let Bt=Number(((Z=zn.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Yr=Number(((he=zn.current)==null?void 0:he.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Vn=new Date().getTime()-((be=om.current)==null?void 0:be.getTime()),zt=Q==="x"?Bt:Yr,Qr=Math.abs(zt)/Vn;if(Math.abs(zt)>=TT||Qr>.11){qo(Ns.current),(Ut=h.onDismiss)==null||Ut.call(h,h),Re(Q==="x"?Bt>0?"right":"left":Yr>0?"down":"up"),Gr(),Ca(!0),ka(!1);return}Ps(!1),X(null)},onPointerMove:Z=>{var he,be,Ut,Bt;if(!Os.current||!js||((he=window.getSelection())==null?void 0:he.toString().length)>0)return;let Yr=Z.clientY-Os.current.y,Vn=Z.clientX-Os.current.x,zt=(be=t.swipeDirections)!=null?be:NT(I);!Q&&(Math.abs(Vn)>1||Math.abs(Yr)>1)&&X(Math.abs(Vn)>Math.abs(Yr)?"x":"y");let Qr={x:0,y:0};Q==="y"?(zt.includes("top")||zt.includes("bottom"))&&(zt.includes("top")&&Yr<0||zt.includes("bottom")&&Yr>0)&&(Qr.y=Yr):Q==="x"&&(zt.includes("left")||zt.includes("right"))&&(zt.includes("left")&&Vn<0||zt.includes("right")&&Vn>0)&&(Qr.x=Vn),(Math.abs(Qr.x)>0||Math.abs(Qr.y)>0)&&ka(!0),(Ut=zn.current)==null||Ut.style.setProperty("--swipe-amount-x",`${Qr.x}px`),(Bt=zn.current)==null||Bt.style.setProperty("--swipe-amount-y",`${Qr.y}px`)}},TE&&!h.jsx?$.createElement("button",{"aria-label":B,"data-disabled":mu,"data-close-button":!0,onClick:mu||!js?()=>{}:()=>{var Z;Gr(),(Z=h.onDismiss)==null||Z.call(h,h)},className:Wt(R==null?void 0:R.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(o=L==null?void 0:L.close)!=null?o:mT):null,h.jsx||g.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:$.createElement($.Fragment,null,Pt||h.icon||h.promise?$.createElement("div",{"data-icon":"",className:Wt(R==null?void 0:R.icon,(i=h==null?void 0:h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||AE():null,h.type!=="loading"?h.icon||(L==null?void 0:L[Pt])||lT(Pt):null):null,$.createElement("div",{"data-content":"",className:Wt(R==null?void 0:R.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},$.createElement("div",{"data-title":"",className:Wt(R==null?void 0:R.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?$.createElement("div",{"data-description":"",className:Wt(F,PE,R==null?void 0:R.description,(c=h==null?void 0:h.classNames)==null?void 0:c.description)},typeof h.description=="function"?h.description():h.description):null),g.isValidElement(h.cancel)?h.cancel:h.cancel&&Ga(h.cancel)?$.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||N,onClick:Z=>{var he,be;Ga(h.cancel)&&js&&((be=(he=h.cancel).onClick)==null||be.call(he,Z),Gr())},className:Wt(R==null?void 0:R.cancelButton,(u=h==null?void 0:h.classNames)==null?void 0:u.cancelButton)},h.cancel.label):null,g.isValidElement(h.action)?h.action:h.action&&Ga(h.action)?$.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||H,onClick:Z=>{var he,be;Ga(h.action)&&((be=(he=h.action).onClick)==null||be.call(he,Z),!Z.defaultPrevented&&Gr())},className:Wt(R==null?void 0:R.actionButton,(f=h==null?void 0:h.classNames)==null?void 0:f.actionButton)},h.action.label):null))};function Og(){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 AT(t,e){let r={};return[t,e].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",a=o?kT:CT;function l(c){["top","right","bottom","left"].forEach(u=>{r[`${i}-${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[`${i}-${c}`]=a:r[`${i}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(a)}),r}var IT=g.forwardRef(function(t,e){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:l,mobileOffset:c,theme:u="light",richColors:f,duration:p,style:h,visibleToasts:v=ET,toastOptions:m,dir:w=Og(),gap:x=PT,loadingIcon:y,icons:b,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=t,[E,C]=$.useState([]),k=$.useMemo(()=>Array.from(new Set([n].concat(E.filter(z=>z.position).map(z=>z.position)))),[E,n]),[P,N]=$.useState([]),[H,A]=$.useState(!1),[F,O]=$.useState(!1),[I,M]=$.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
211k":"light"),U=$.useRef(null),T=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=$.useRef(null),L=$.useRef(!1),B=$.useCallback(z=>{C(Q=>{var X;return(X=Q.find(pe=>pe.id===z.id))!=null&&X.delete||ot.dismiss(z.id),Q.filter(({id:pe})=>pe!==z.id)})},[]);return $.useEffect(()=>ot.subscribe(z=>{if(z.dismiss){C(Q=>Q.map(X=>X.id===z.id?{...X,delete:!0}:X));return}setTimeout(()=>{D0.flushSync(()=>{C(Q=>{let X=Q.findIndex(pe=>pe.id===z.id);return X!==-1?[...Q.slice(0,X),{...Q[X],...z},...Q.slice(X+1)]:[z,...Q]})})})}),[]),$.useEffect(()=>{if(u!=="system"){M(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),typeof window>"u")return;let z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:Q})=>{M(Q?"dark":"light")})}catch{z.addListener(({matches:X})=>{try{M(X?"dark":"light")}catch(pe){console.error(pe)}})}},[u]),$.useEffect(()=>{E.length<=1&&A(!1)},[E]),$.useEffect(()=>{let z=Q=>{var X,pe;s.every(Re=>Q[Re]||Q.code===Re)&&(A(!0),(X=U.current)==null||X.focus()),Q.code==="Escape"&&(document.activeElement===U.current||(pe=U.current)!=null&&pe.contains(document.activeElement))&&A(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[s]),$.useEffect(()=>{if(U.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,L.current=!1)}},[U.current]),$.createElement("section",{ref:e,"aria-label":`${_} ${T}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((z,Q)=>{var X;let[pe,Re]=z.split("-");return E.length?$.createElement("ol",{key:z,dir:w==="auto"?Og():w,tabIndex:-1,ref:U,className:a,"data-sonner-toaster":!0,"data-theme":I,"data-y-position":pe,"data-lifted":H&&E.length>1&&!o,"data-x-position":Re,style:{"--front-toast-height":`${((X=P[0])==null?void 0:X.height)||0}px`,"--width":`${RT}px`,"--gap":`${x}px`,...h,...AT(l,c)},onBlur:ne=>{L.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(L.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||L.current||(L.current=!0,R.current=ne.relatedTarget)},onMouseEnter:()=>A(!0),onMouseMove:()=>A(!0),onMouseLeave:()=>{F||A(!1)},onDragEnd:()=>A(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||O(!0)},onPointerUp:()=>O(!1)},E.filter(ne=>!ne.position&&Q===0||ne.position===z).map((ne,Er)=>{var Le,ar;return $.createElement(OT,{key:ne.id,icons:b,index:Er,toast:ne,defaultRichColors:f,duration:(Le=m==null?void 0:m.duration)!=null?Le:p,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:v,closeButton:(ar=m==null?void 0:m.closeButton)!=null?ar:i,interacting:F,position:z,style:m==null?void 0:m.style,unstyled:m==null?void 0:m.unstyled,classNames:m==null?void 0:m.classNames,cancelButtonStyle:m==null?void 0:m.cancelButtonStyle,actionButtonStyle:m==null?void 0:m.actionButtonStyle,removeToast:B,toasts:E.filter(Kr=>Kr.position==ne.position),heights:P.filter(Kr=>Kr.position==ne.position),setHeights:N,expandByDefault:o,gap:x,loadingIcon:y,expanded:H,pauseWhenPageIsHidden:S,swipeDirections:t.swipeDirections})})):null}))});const DT=({...t})=>{const{theme:e="system"}=aT();return d.jsx(IT,{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 MT=ch[" useId ".trim().toString()]||(()=>{}),LT=0;function ds(t){const[e,r]=g.useState(MT());return Br(()=>{t||r(n=>n??String(LT++))},[t]),t||(e?`radix-${e}`:"")}const $T=["top","right","bottom","left"],On=Math.min,vt=Math.max,rc=Math.round,Ya=Math.floor,wr=t=>({x:t,y:t}
vendor: 11,913 bytes, line 211
211),FT={left:"right",right:"left",bottom:"top",top:"bottom"},UT={start:"end",end:"start"};function bf(t,e,r){return vt(t,On(e,r))}function zr(t,e){return typeof t=="function"?t(e):t}function Vr(t){return t.split("-")[0]}function Uo(t){return t.split("-")[1]}function lp(t){return t==="x"?"y":"x"}function cp(t){return t==="y"?"height":"width"}const BT=new Set(["top","bottom"]);function mr(t){return BT.has(Vr(t))?"y":"x"}function up(t){return lp(mr(t))}function zT(t,e,r){r===void 0&&(r=!1);const n=Uo(t),s=up(t),o=cp(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(i=nc(i)),[i,nc(i)]}function VT(t){const e=nc(t);return[_f(t),e,_f(e)]}function _f(t){return t.replace(/start|end/g,e=>UT[e])}const Ag=["left","right"],Ig=["right","left"],WT=["top","bottom"],HT=["bottom","top"];function KT(t,e,r){switch(t){case"top":case"bottom":return r?e?Ig:Ag:e?Ag:Ig;case"left":case"right":return e?WT:HT;default:return[]}}function qT(t,e,r,n){const s=Uo(t);let o=KT(Vr(t),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),e&&(o=o.concat(o.map(_f)))),o}function nc(t){return t.replace(/left|right|bottom|top/g,e=>FT[e])}function GT(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ex(t){return typeof t!="number"?GT(t):{top:t,right:t,bottom:t,left:t}}function sc(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 Dg(t,e,r){let{reference:n,floating:s}=t;const o=mr(e),i=up(e),a=cp(i),l=Vr(e),c=o==="y",u=n.x+n.width/2-s.width/2,f=n.y+n.height/2-s.height/2,p=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:f};break;case"left":h={x:n.x-s.width,y:f};break;default:h={x:n.x,y:n.y}}switch(Uo(e)){case"start":h[i]-=p*(r&&c?-1:1);break;case"end":h[i]+=p*(r&&c?-1:1);break}return h}const YT=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:o=[],platform:i}=r,a=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(e));let c=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:f}=Dg(c,n,l),p=n,h={},v=0;for(let m=0;m<a.length;m++){const{name:w,fn:x}=a[m],{x:y,y:b,data:_,reset:S}=await x({x:u,y:f,initialPlacement:n,placement:p,strategy:s,middlewareData:h,rects:c,platform:i,elements:{reference:t,floating:e}});u=y??u,f=b??f,h={...h,[w]:{...h[w],..._}},S&&v<=50&&(v++,typeof S=="object"&&(S.placement&&(p=S.placement),S.rects&&(c=S.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:u,y:f}=Dg(c,p,l)),m=-1)}return{x:u,y:f,placement:p,strategy:s,middlewareData:h}};async function Ki(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:h=0}=zr(e,t),v=Ex(h),w=a[p?f==="floating"?"reference":"floating":f],x=sc(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(w)))==null||r?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=f==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,b=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(b))?await(o.getScale==null?void 0:o.getScale(b))||{x:1,y:1}:{x:1,y:1},S=sc(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:b,strategy:l}):y);return{top:(x.top-S.top+v.top)/_.y,bottom:(S.bottom-x.bottom+v.bottom)/_.y,left:(x.left-S.left+v.left)/_.x,right:(S.right-x.right+v.right)/_.x}}const QT=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=zr(t,e)||{};if(c==null)return{};const f=Ex(u),p={x:r,y:n},h=up(s),v=cp(h),m=await i.getDimensions(c),w=h==="y",x=w?"top":"left",y=w?"bottom":"right",b=w?"clientHeight":"clientWidth",_=o.reference[v]+o.reference[h]-p[h]-o.floating[v],S=p[h]-o.reference[h],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let C=E?E[b]:0;(!C||!await(i.isElement==null?void 0:i.isElement(E)))&&(C=a.floating[b]||o.floating[v]);const k=_/2-S/2,P=C/2-m[v]/2-1,N=On(f[x],P),H=On(f[y],P),A=N,F=C-m[v]-H,O=C/2-m[v]/2+k,I=bf(A,O,F),M=!l.arrow&&Uo(s)!=null&&O!==I&&o.reference[v]/2-(O<A?N:H)-m[v]/2<0,U=M?O<A?O-A:O-F:0;return{[h]:p[h]+U,data:{[h]:I,centerOffset:O-I-U,...M&&{alignmentOffset:U}},reset:M}}}),JT=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:m=!0,...w}=zr(t,e);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const x=Vr(s),y=mr(a),b=Vr(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=p||(b||!m?[nc(a)]:VT(a)),E=v!=="none";!p&&E&&S.push(...qT(a,m,v,_));const C=[a,...S],k=await Ki(e,w),P=[];let N=((n=o.flip)==null?void 0:n.overflows)||[];if(u&&P.push(k[x]),f){const O=zT(s,i,_);P.push(k[O[0]],k[O[1]])}if(N=[...N,{placement:s,overflows:P}],!P.every(O=>O<=0)){var H,A;const O=(((H=o.flip)==null?void 0:H.index)||0)+1,I=C[O];if(I&&(!(f==="alignment"?y!==mr(I):!1)||N.every(T=>T.overflows[0]>0&&mr(T.placement)===y)))return{data:{index:O,overflows:N},reset:{placement:I}};let M=(A=N.filter(U=>U.overflows[0]<=0).sort((U,T)=>U.overflows[1]-T.overflows[1])[0])==null?void 0:A.placement;if(!M)switch(h){case"bestFit":{var F;const U=(F=N.filter(T=>{if(E){const R=mr(T.placement);return R===y||R==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(R=>R>0).reduce((R,L)=>R+L,0)]).sort((T,R)=>T[1]-R[1])[0])==null?void 0:F[0];U&&(M=U);break}case"initialPlacement":M=a;break}if(s!==M)return{reset:{placement:M}}}return{}}}};function Mg(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Lg(t){return $T.some(e=>t[e]>=0)}const XT=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=zr(t,e);switch(n){case"referenceHidden":{const o=await Ki(e,{...s,elementContext:"reference"}),i=Mg(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Lg(i)}}}case"escaped":{const o=await Ki(e,{...s,altBoundary:!0}),i=Mg(o,r.floating);return{data:{escapedOffsets:i,escaped:Lg(i)}}}default:return{}}}}},Cx=new Set(["left","top"]);async function ZT(t,e){const{placement:r,platform:n,elements:s}=t,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=Vr(r),a=Uo(r),l=mr(r)==="y",c=Cx.has(i)?-1:1,u=o&&l?-1:1,f=zr(e,t);let{mainAxis:p,crossAxis:h,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof v=="number"&&(h=a==="end"?v*-1:v),l?{x:h*u,y:p*c}:{x:p*c,y:h*u}}const ej=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=e,l=await ZT(e,t);return i===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:i}}}}},tj=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x,y}=w;return{x,y}}},...l}=zr(t,e),c={x:r,y:n},u=await Ki(e,l),f=mr(Vr(s)),p=lp(f);let h=c[p],v=c[f];if(o){const w=p==="y"?"top":"left",x=p==="y"?"bottom":"right",y=h+u[w],b=h-u[x];h=bf(y,h,b)}if(i){const w=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=v+u[w],b=v-u[x];v=bf(y,v,b)}const m=a.fn({...e,[p]:h,[f]:v});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[p]:o,[f]:i}}}}}},rj=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=e,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=zr(t,e),u={x:r,y:n},f=mr(s),p=lp(f);let h=u[p],v=u[f];const m=zr(a,e),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=p==="y"?"height":"width",_=o.reference[p]-o.floating[b]+w.mainAxis,S=o.reference[p]+o.reference[b]-w.mainAxis;h<_?h=_:h>S&&(h=S)}if(c){var x,y;const b=p==="y"?"width":"height",_=Cx.has(Vr(s)),S=o.reference[f]-o.floating[b]+(_&&((x=i.offset)==null?void 0:x[f])||0)+(_?0:w.crossAxis),E=o.reference[f]+o.reference[b]+(_?0:((y=i.offset)==null?void 0:y[f])||0)-(_?w.crossAxis:0);v<S?v=S:v>E&&(v=E)}return{[p]:h,[f]:v}}}},nj=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:o,platform:i,elements:a}=e,{apply:l=()=>{},...c}=zr(t,e),u=await Ki(e,c),f=Vr(s),p=Uo(s),h=mr(s)==="y",{width:v,height:m}=o.floating;let w,x;f==="top"||f==="bottom"?(w=f,x=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,w=p==="end"?"top":"bottom");const y=m-u.top-u.bottom,b=v-u.left-u.right,_=On(m-u[w],y),S=On(v-u[x],b),E=!e.middlewareData.shift;let C=_,k=S;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(k=b),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(C=y),E&&!p){const N=vt(u.left,0),H=vt(u.right,0),A=vt(u.top,0),F=vt(u.bottom,0);h?k=v-2*(N!==0||H!==0?N+H:vt(u.left,u.right)):C=m-2*(A!==0||F!==0?A+F:vt(u.top,u.bottom))}await l({...e,availableWidth:k,availableHeight:C});const P=await i.getDimensions(a.floating);return v!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}};function zc(){return typeof window<"u"}function Bo(t){return kx(t)?(t.nodeName||"").toLowerCase():"#document"}function _t(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function _r(t){var e;return(e=(kx(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function kx(t){return zc()?t instanceof Node||t instanceof _t(t).Node:!1}function nr(t){return zc()?t instanceof Element||t instanceof _t(t).Element:!1}function br(t){return zc()?t instanceof HTMLElement||t instanceof _t(t).HTMLElement:!1}function $g(t){return!zc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _t(t).ShadowRoot}const sj=new Set(["inline","contents"]);function ya(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=sr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!sj.has(s)}const oj=new Set(["table","td","th"]);function ij(t){return oj.has(Bo(t))}const aj=[":popover-open",":modal"];function Vc(t){return aj.some(e=>{try{return t.matches(e)}catch{return!1}})}const lj=["transform","translate","scale","rotate","perspective"],cj=["transform","translate","scale","rotate","perspective","filter"],uj=["paint","layout","strict","content"];function dp(t){const e=fp(),r=nr(t)?sr(t):t;return lj.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)||cj.some(n=>(r.willChange||"").includes(n))||uj.some(n=>(r.contain||"").includes(n))}function dj(t){let e=An(t);for(;br(e)&&!Oo(e);){if(dp(e))return e;if(Vc(e))return null;e=An(e)}return null}function fp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const fj=new Set(["html","body","#document"]);function Oo(t){return fj.has(Bo(t))}function sr(t){return _t(t).getComputedStyle(t)}function Wc(t){return nr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function An(t){if(Bo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||$g(t)&&t.host||_r(t);return $g(e)?e.host:e}function Rx(t){const e=An(t);return Oo(e)?t.ownerDocument?t.ownerDocument.body:t.body:br(e)&&ya(e)?e:Rx(e)}function qi(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=Rx(t),o=s===((n=t.ownerDocument)==null?void 0:n.body),i=_t(s);if(o){const a=Sf(i);
vendor: 4,828 bytes, line 211
211return e.concat(i,i.visualViewport||[],ya(s)?s:[],a&&r?qi(a):[])}return e.concat(s,qi(s,[],r))}function Sf(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Px(t){const e=sr(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=br(t),o=s?t.offsetWidth:r,i=s?t.offsetHeight:n,a=rc(r)!==o||rc(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function hp(t){return nr(t)?t:t.contextElement}function fo(t){const e=hp(t);if(!br(e))return wr(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:o}=Px(e);let i=(o?rc(r.width):r.width)/n,a=(o?rc(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const hj=wr(0);function Tx(t){const e=_t(t);return!fp()||!e.visualViewport?hj:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function pj(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==_t(t)?!1:e}function ws(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),o=hp(t);let i=wr(1);e&&(n?nr(n)&&(i=fo(n)):i=fo(t));const a=pj(o,r,n)?Tx(o):wr(0);let l=(s.left+a.x)/i.x,c=(s.top+a.y)/i.y,u=s.width/i.x,f=s.height/i.y;if(o){const p=_t(o),h=n&&nr(n)?_t(n):n;let v=p,m=Sf(v);for(;m&&n&&h!==v;){const w=fo(m),x=m.getBoundingClientRect(),y=sr(m),b=x.left+(m.clientLeft+parseFloat(y.paddingLeft))*w.x,_=x.top+(m.clientTop+parseFloat(y.paddingTop))*w.y;l*=w.x,c*=w.y,u*=w.x,f*=w.y,l+=b,c+=_,v=_t(m),m=Sf(v)}}return sc({width:u,height:f,x:l,y:c})}function pp(t,e){const r=Wc(t).scrollLeft;return e?e.left+r:ws(_r(t)).left+r}function jx(t,e,r){r===void 0&&(r=!1);const n=t.getBoundingClientRect(),s=n.left+e.scrollLeft-(r?0:pp(t,n)),o=n.top+e.scrollTop;return{x:s,y:o}}function mj(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const o=s==="fixed",i=_r(n),a=e?Vc(e.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},c=wr(1);const u=wr(0),f=br(n);if((f||!f&&!o)&&((Bo(n)!=="body"||ya(i))&&(l=Wc(n)),br(n))){const h=ws(n);c=fo(n),u.x=h.x+n.clientLeft,u.y=h.y+n.clientTop}const p=i&&!f&&!o?jx(i,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+p.x,y:r.y*c.y-l.scrollTop*c.y+u.y+p.y}}function gj(t){return Array.from(t.getClientRects())}function vj(t){const e=_r(t),r=Wc(t),n=t.ownerDocument.body,s=vt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=vt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+pp(t);const a=-r.scrollTop;return sr(n).direction==="rtl"&&(i+=vt(e.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function yj(t,e){const r=_t(t),n=_r(t),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const c=fp();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}const wj=new Set(["absolute","fixed"]);function xj(t,e){const r=ws(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,o=br(t)?fo(t):wr(1),i=t.clientWidth*o.x,a=t.clientHeight*o.y,l=s*o.x,c=n*o.y;return{width:i,height:a,x:l,y:c}}function Fg(t,e,r){let n;if(e==="viewport")n=yj(t,r);else if(e==="document")n=vj(_r(t));else if(nr(e))n=xj(e,r);else{const s=Tx(t);n={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return sc(n)}function Nx(t,e){const r=An(t);return r===e||!nr(r)||Oo(r)?!1:sr(r).position==="fixed"||Nx(r,e)}function bj(t,e){const r=e.get(t);if(r)return r;let n=qi(t,[],!1).filter(a=>nr(a)&&Bo(a)!=="body"),s=null;const o=sr(t).position==="fixed";let i=o?An(t):t;for(;nr(i)&&!Oo(i);){const a=sr(i),l=dp(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&wj.has(s.position)||ya(i)&&!l&&Nx(t,i))?n=n.filter(u=>u!==i):s=a,i=An(i)}return e.set(t,n),n}function _j(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=[...r==="clippingAncestors"?Vc(e)?[]:bj(e,this._c):[].concat(r),n],a=i[0],l=i.reduce((c,u)=>{const f=Fg(e,u,s);return c.top=vt(f.top,c.top),c.right=On(f.right,c.right),c.bottom=On(f.bottom,c.bottom),c.left=vt(f.left,c.left),c},Fg(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Sj(t){const{width:e,height:r}=Px(t);return{width:e,height:r}}function Ej(t,e,r){const n=br(e),s=_r(e),o=r==="fixed",i=ws(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=wr(0);function c(){l.x=pp(s)}if(n||!n&&!o)if((Bo(e)!=="body"||ya(s))&&(a=Wc(e)),n){const h=ws(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else s&&c();o&&!n&&s&&c();const u=s&&!n&&!o?jx(s,a):wr(0),f=i.left+a.scrollLeft-l.x-u.x,p=i.top+a.scrollTop-l.y-u.y;return{x:f,y:p,width:i.width,height:i.height}}function Gu(t){return sr(t).position==="static"}function Ug(t,e){if(!br(t)||sr(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return _r(t)===r&&(r=r.ownerDocument.body),r}function Ox(t,e){const r=_t(t);if(Vc(t))return r;if(!br(t)){let s=An(t);for(;s&&!Oo(s);
vendor: 8,057 bytes, line 211
211){if(nr(s)&&!Gu(s))return s;s=An(s)}return r}let n=Ug(t,e);for(;n&&ij(n)&&Gu(n);)n=Ug(n,e);return n&&Oo(n)&&Gu(n)&&!dp(n)?r:n||dj(t)||r}const Cj=async function(t){const e=this.getOffsetParent||Ox,r=this.getDimensions,n=await r(t.floating);return{reference:Ej(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function kj(t){return sr(t).direction==="rtl"}const Rj={convertOffsetParentRelativeRectToViewportRelativeRect:mj,getDocumentElement:_r,getClippingRect:_j,getOffsetParent:Ox,getElementRects:Cj,getClientRects:gj,getDimensions:Sj,getScale:fo,isElement:nr,isRTL:kj};function Ax(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Pj(t,e){let r=null,n;const s=_r(t);function o(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=t.getBoundingClientRect(),{left:u,top:f,width:p,height:h}=c;if(a||e(),!p||!h)return;const v=Ya(f),m=Ya(s.clientWidth-(u+p)),w=Ya(s.clientHeight-(f+h)),x=Ya(u),b={rootMargin:-v+"px "+-m+"px "+-w+"px "+-x+"px",threshold:vt(0,On(1,l))||1};let _=!0;function S(E){const C=E[0].intersectionRatio;if(C!==l){if(!_)return i();C?i(!1,C):n=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!Ax(c,t.getBoundingClientRect())&&i(),_=!1}try{r=new IntersectionObserver(S,{...b,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,b)}r.observe(t)}return i(!0),o}function Tj(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=hp(t),u=s||o?[...c?qi(c):[],...qi(e)]:[];u.forEach(x=>{s&&x.addEventListener("scroll",r,{passive:!0}),o&&x.addEventListener("resize",r)});const f=c&&a?Pj(c,r):null;let p=-1,h=null;i&&(h=new ResizeObserver(x=>{let[y]=x;y&&y.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),r()}),c&&!l&&h.observe(c),h.observe(e));let v,m=l?ws(t):null;l&&w();function w(){const x=ws(t);m&&!Ax(m,x)&&r(),m=x,v=requestAnimationFrame(w)}return r(),()=>{var x;u.forEach(y=>{s&&y.removeEventListener("scroll",r),o&&y.removeEventListener("resize",r)}),f==null||f(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(v)}}const jj=ej,Nj=tj,Oj=JT,Aj=nj,Ij=XT,Bg=QT,Dj=rj,Mj=(t,e,r)=>{const n=new Map,s={platform:Rj,...r},o={...s.platform,_c:n};return YT(t,e,{...s,platform:o})};var Lj=typeof document<"u",$j=function(){},Cl=Lj?g.useLayoutEffect:$j;function oc(t,e){if(t===e)return!0;if(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(!oc(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 o=s[n];if(!(o==="_owner"&&t.$$typeof)&&!oc(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function Ix(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function zg(t,e){const r=Ix(t);return Math.round(e*r)/r}function Yu(t){const e=g.useRef(t);return Cl(()=>{e.current=t}),e}function Fj(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=t,[u,f]=g.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[p,h]=g.useState(n);oc(p,n)||h(n);const[v,m]=g.useState(null),[w,x]=g.useState(null),y=g.useCallback(T=>{T!==E.current&&(E.current=T,m(T))},[]),b=g.useCallback(T=>{T!==C.current&&(C.current=T,x(T))},[]),_=o||v,S=i||w,E=g.useRef(null),C=g.useRef(null),k=g.useRef(u),P=l!=null,N=Yu(l),H=Yu(s),A=Yu(c),F=g.useCallback(()=>{if(!E.current||!C.current)return;const T={placement:e,strategy:r,middleware:p};H.current&&(T.platform=H.current),Mj(E.current,C.current,T).then(R=>{const L={...R,isPositioned:A.current!==!1};O.current&&!oc(k.current,L)&&(k.current=L,pa.flushSync(()=>{f(L)}))})},[p,e,r,H,A]);Cl(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(T=>({...T,isPositioned:!1})))},[c]);const O=g.useRef(!1);Cl(()=>(O.current=!0,()=>{O.current=!1}),[]),Cl(()=>{if(_&&(E.current=_),S&&(C.current=S),_&&S){if(N.current)return N.current(_,S,F);F()}},[_,S,F,N,P]);const I=g.useMemo(()=>({reference:E,floating:C,setReference:y,setFloating:b}),[y,b]),M=g.useMemo(()=>({reference:_,floating:S}),[_,S]),U=g.useMemo(()=>{const T={position:r,left:0,top:0};if(!M.floating)return T;const R=zg(M.floating,u.x),L=zg(M.floating,u.y);return a?{...T,transform:"translate("+R+"px, "+L+"px)",...Ix(M.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:R,top:L}},[r,a,M.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:F,refs:I,elements:M,floatingStyles:U}),[u,F,I,M,U])}const Uj=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?Bg({element:n.current,padding:s}).fn(r):{}:n?Bg({element:n,padding:s}).fn(r):{}}}},Bj=(t,e)=>({...jj(t),options:[t,e]}),zj=(t,e)=>({...Nj(t),options:[t,e]}),Vj=(t,e)=>({...Dj(t),options:[t,e]}),Wj=(t,e)=>({...Oj(t),options:[t,e]}),Hj=(t,e)=>({...Aj(t),options:[t,e]}),Kj=(t,e)=>({...Ij(t),options:[t,e]}),qj=(t,e)=>({...Uj(t),options:[t,e]});var Gj="Arrow",Dx=g.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...o}=t;return d.jsx(te.svg,{...o,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Dx.displayName=Gj;var Yj=Dx;function Hc(t){const[e,r]=g.useState(void 0);return Br(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=t.offsetWidth,a=t.offsetHeight;r({width:i,height:a})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var mp="Popper",[Mx,Kc]=ft(mp),[Qj,Lx]=Mx(mp),$x=t=>{const{__scopePopper:e,children:r}=t,[n,s]=g.useState(null);return d.jsx(Qj,{scope:e,anchor:n,onAnchorChange:s,children:r})};$x.displayName=mp;var Fx="PopperAnchor",Ux=g.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,o=Lx(Fx,r),i=g.useRef(null),a=ce(e,i);return g.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:d.jsx(te.div,{...s,ref:a})});Ux.displayName=Fx;var gp="PopperContent",[Jj,Xj]=Mx(gp),Bx=g.forwardRef((t,e)=>{var ne,Er,Le,ar,Kr,Ps;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:v,...m}=t,w=Lx(gp,r),[x,y]=g.useState(null),b=ce(e,qr=>y(qr)),[_,S]=g.useState(null),E=Hc(_),C=(E==null?void 0:E.width)??0,k=(E==null?void 0:E.height)??0,P=n+(o!=="center"?"-"+o:""),N=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},H=Array.isArray(c)?c:[c],A=H.length>0,F={padding:N,boundary:H.filter(eN),altBoundary:A},{refs:O,floatingStyles:I,placement:M,isPositioned:U,middlewareData:T}=Fj({strategy:"fixed",placement:P,whileElementsMounted:(...qr)=>Tj(...qr,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[Bj({mainAxis:s+k,alignmentAxis:i}),l&&zj({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Vj():void 0,...F}),l&&Wj({...F}),Hj({...F,apply:({elements:qr,rects:Ca,availableWidth:fu,availableHeight:ka})=>{const{width:hu,height:qo}=Ca.reference,Ts=qr.floating.style;Ts.setProperty("--radix-popper-available-width",`${fu}px`),Ts.setProperty("--radix-popper-available-height",`${ka}px`),Ts.setProperty("--radix-popper-anchor-width",`${hu}px`),Ts.setProperty("--radix-popper-anchor-height",`${qo}px`)}}),_&&qj({element:_,padding:a}
vendor: 4,763 bytes, line 211
211),tN({arrowWidth:C,arrowHeight:k}),p&&Kj({strategy:"referenceHidden",...F})]}),[R,L]=Wx(M),B=Et(v);Br(()=>{U&&(B==null||B())},[U,B]);const z=(ne=T.arrow)==null?void 0:ne.x,Q=(Er=T.arrow)==null?void 0:Er.y,X=((Le=T.arrow)==null?void 0:Le.centerOffset)!==0,[pe,Re]=g.useState();return Br(()=>{x&&Re(window.getComputedStyle(x).zIndex)},[x]),d.jsx("div",{ref:O.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:U?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(ar=T.transformOrigin)==null?void 0:ar.x,(Kr=T.transformOrigin)==null?void 0:Kr.y].join(" "),...((Ps=T.hide)==null?void 0:Ps.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:d.jsx(Jj,{scope:r,placedSide:R,onArrowChange:S,arrowX:z,arrowY:Q,shouldHideArrow:X,children:d.jsx(te.div,{"data-side":R,"data-align":L,...m,ref:b,style:{...m.style,animation:U?void 0:"none"}})})})});Bx.displayName=gp;var zx="PopperArrow",Zj={top:"bottom",right:"left",bottom:"top",left:"right"},Vx=g.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,o=Xj(zx,n),i=Zj[o.placedSide];return d.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:d.jsx(Yj,{...s,ref:r,style:{...s.style,display:"block"}})})});Vx.displayName=zx;function eN(t){return t!==null}var tN=t=>({name:"transformOrigin",options:t,fn(e){var w,x,y;const{placement:r,rects:n,middlewareData:s}=e,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:t.arrowWidth,l=i?0:t.arrowHeight,[c,u]=Wx(r),f={start:"0%",center:"50%",end:"100%"}[u],p=(((x=s.arrow)==null?void 0:x.x)??0)+a/2,h=(((y=s.arrow)==null?void 0:y.y)??0)+l/2;let v="",m="";return c==="bottom"?(v=i?f:`${p}px`,m=`${-l}px`):c==="top"?(v=i?f:`${p}px`,m=`${n.floating.height+l}px`):c==="right"?(v=`${-l}px`,m=i?f:`${h}px`):c==="left"&&(v=`${n.floating.width+l}px`,m=i?f:`${h}px`),{data:{x:v,y:m}}}});function Wx(t){const[e,r="center"]=t.split("-");return[e,r]}var rN=$x,Hx=Ux,Kx=Bx,qx=Vx,[qc,T4]=ft("Tooltip",[Kc]),vp=Kc(),Gx="TooltipProvider",nN=700,Vg="tooltip.open",[sN,Yx]=qc(Gx),Qx=t=>{const{__scopeTooltip:e,delayDuration:r=nN,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=t,i=g.useRef(!0),a=g.useRef(!1),l=g.useRef(0);return g.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),d.jsx(sN,{scope:e,isOpenDelayedRef:i,delayDuration:r,onOpen:g.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:g.useCallback(c=>{a.current=c},[]),disableHoverableContent:s,children:o})};Qx.displayName=Gx;var Jx="Tooltip",[j4,Gc]=qc(Jx),Ef="TooltipTrigger",oN=g.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=Gc(Ef,r),o=Yx(Ef,r),i=vp(r),a=g.useRef(null),l=ce(e,a,s.onTriggerChange),c=g.useRef(!1),u=g.useRef(!1),f=g.useCallback(()=>c.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),d.jsx(Hx,{asChild:!0,...i,children:d.jsx(te.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:W(t.onPointerMove,p=>{p.pointerType!=="touch"&&!u.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),u.current=!0)}),onPointerLeave:W(t.onPointerLeave,()=>{s.onTriggerLeave(),u.current=!1}),onPointerDown:W(t.onPointerDown,()=>{s.open&&s.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:W(t.onFocus,()=>{c.current||s.onOpen()}),onBlur:W(t.onBlur,s.onClose),onClick:W(t.onClick,s.onClose)})})});oN.displayName=Ef;var iN="TooltipPortal",[N4,aN]=qc(iN,{forceMount:void 0}),Ao="TooltipContent",Xx=g.forwardRef((t,e)=>{const r=aN(Ao,t.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=t,i=Gc(Ao,t.__scopeTooltip);return d.jsx(Rt,{present:n||i.open,children:i.disableHoverableContent?d.jsx(Zx,{side:s,...o,ref:e}):d.jsx(lN,{side:s,...o,ref:e})})}),lN=g.forwardRef((t,e)=>{const r=Gc(Ao,t.__scopeTooltip),n=Yx(Ao,t.__scopeTooltip),s=g.useRef(null),o=ce(e,s),[i,a]=g.useState(null),{trigger:l,onClose:c}=r,u=s.current,{onPointerInTransitChange:f}=n,p=g.useCallback(()=>{a(null),f(!1)},[f]),h=g.useCallback((v,m)=>{const w=v.currentTarget,x={x:v.clientX,y:v.clientY},y=hN(x,w.getBoundingClientRect()),b=pN(x,y),_=mN(m.getBoundingClientRect()),S=vN([...b,..._]);a(S),f(!0)},[f]);return g.useEffect(()=>()=>
vendor: 5,612 bytes, line 211
211p(),[p]),g.useEffect(()=>{if(l&&u){const v=w=>h(w,u),m=w=>h(w,l);return l.addEventListener("pointerleave",v),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",v),u.removeEventListener("pointerleave",m)}}},[l,u,h,p]),g.useEffect(()=>{if(i){const v=m=>{const w=m.target,x={x:m.clientX,y:m.clientY},y=(l==null?void 0:l.contains(w))||(u==null?void 0:u.contains(w)),b=!gN(x,i);y?p():b&&(p(),c())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,u,i,c,p]),d.jsx(Zx,{...t,ref:o})}),[cN,uN]=qc(Jx,{isInside:!1}),dN=$0("TooltipContent"),Zx=g.forwardRef((t,e)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=t,l=Gc(Ao,r),c=vp(r),{onClose:u}=l;return g.useEffect(()=>(document.addEventListener(Vg,u),()=>document.removeEventListener(Vg,u)),[u]),g.useEffect(()=>{if(l.trigger){const f=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),d.jsx(ma,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:d.jsxs(Kx,{"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:[d.jsx(dN,{children:n}),d.jsx(cN,{scope:r,isInside:!0,children:d.jsx(LR,{id:l.contentId,role:"tooltip",children:s||n})})]})})});Xx.displayName=Ao;var eb="TooltipArrow",fN=g.forwardRef((t,e)=>{const{__scopeTooltip:r,...n}=t,s=vp(r);return uN(eb,r).isInside?null:d.jsx(qx,{...s,...n,ref:e})});fN.displayName=eb;function hN(t,e){const r=Math.abs(e.top-t.y),n=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),o=Math.abs(e.left-t.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function pN(t,e,r=5){const n=[];switch(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 mN(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 gN(t,e){const{x:r,y:n}=t;let s=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const a=e[o],l=e[i],c=a.x,u=a.y,f=l.x,p=l.y;u>n!=p>n&&r<(f-c)*(n-u)/(p-u)+c&&(s=!s)}return s}function vN(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),yN(e)}function yN(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 o=e[e.length-1],i=e[e.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.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 o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),e.length===1&&r.length===1&&e[0].x===r[0].x&&e[0].y===r[0].y?e:e.concat(r)}var wN=Qx,tb=Xx;const xN=wN,bN=g.forwardRef(({className:t,sideOffset:e=4,...r},n)=>d.jsx(tb,{ref:n,sideOffset:e,className:G("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}));bN.displayName=tb.displayName;var Yc=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(){}},Qc=typeof window>"u"||"Deno"in globalThis;function qt(){}function _N(t,e){return typeof t=="function"?t(e):t}function SN(t){return typeof t=="number"&&t>=0&&t!==1/0}function EN(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Cf(t,e){return typeof t=="function"?t(e):t}function CN(t,e){return typeof t=="function"?t(e):t}function Wg(t,e){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:a}=t;if(i){if(n){if(e.queryHash!==yp(i,e.options))return!1}else if(!Yi(e.queryKey,i))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||o&&!o(e))}function Hg(t,e){const{exact:r,status:n,predicate:s,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(r){if(Gi(e.options.mutationKey)!==Gi(o))return!1}else if(!Yi(e.options.mutationKey,o))return!1}return!(n&&e.state.status!==n||s&&!s(e))}function yp(t,e){return((e==null?void 0:e.queryKeyHashFn)||Gi)(t)}function Gi(t){return JSON.stringify(t,(e,r)=>kf(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Yi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>Yi(t[r],e[r])):!1}function rb(t,e){if(t===e)return t;const r=Kg(t)&&Kg(e);
vendor: 6,792 bytes, line 211
211if(r||kf(t)&&kf(e)){const n=r?t:Object.keys(t),s=n.length,o=r?e:Object.keys(e),i=o.length,a=r?[]:{},l=new Set(n);let c=0;for(let u=0;u<i;u++){const f=r?u:o[u];(!r&&l.has(f)||r)&&t[f]===void 0&&e[f]===void 0?(a[f]=void 0,c++):(a[f]=rb(t[f],e[f]),a[f]===t[f]&&t[f]!==void 0&&c++)}return s===i&&c===s?t:a}return e}function Kg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function kf(t){if(!qg(t))return!1;const e=t.constructor;if(e===void 0)return!0;const r=e.prototype;return!(!qg(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function qg(t){return Object.prototype.toString.call(t)==="[object Object]"}function kN(t){return new Promise(e=>{setTimeout(e,t)})}function RN(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?rb(t,e):e}function PN(t,e,r=0){const n=[...t,e];return r&&n.length>r?n.slice(1):n}function TN(t,e,r=0){const n=[e,...t];return r&&n.length>r?n.slice(0,-1):n}var wp=Symbol();function nb(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===wp?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var ns,un,go,hy,jN=(hy=class extends Yc{constructor(){super();ae(this,ns);ae(this,un);ae(this,go);ee(this,go,e=>{if(!Qc&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){j(this,un)||this.setEventListener(j(this,go))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,un))==null||e.call(this),ee(this,un,void 0))}setEventListener(e){var r;ee(this,go,e),(r=j(this,un))==null||r.call(this),ee(this,un,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){j(this,ns)!==e&&(ee(this,ns,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof j(this,ns)=="boolean"?j(this,ns):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ns=new WeakMap,un=new WeakMap,go=new WeakMap,hy),sb=new jN,vo,dn,yo,py,NN=(py=class extends Yc{constructor(){super();ae(this,vo,!0);ae(this,dn);ae(this,yo);ee(this,yo,e=>{if(!Qc&&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(){j(this,dn)||this.setEventListener(j(this,yo))}onUnsubscribe(){var e;this.hasListeners()||((e=j(this,dn))==null||e.call(this),ee(this,dn,void 0))}setEventListener(e){var r;ee(this,yo,e),(r=j(this,dn))==null||r.call(this),ee(this,dn,e(this.setOnline.bind(this)))}setOnline(e){j(this,vo)!==e&&(ee(this,vo,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return j(this,vo)}},vo=new WeakMap,dn=new WeakMap,yo=new WeakMap,py),ic=new NN;function ON(){let t,e;const r=new Promise((s,o)=>{t=s,e=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),t(s)},r.reject=s=>{n({status:"rejected",reason:s}),e(s)},r}function AN(t){return Math.min(1e3*2**t,3e4)}function ob(t){return(t??"online")==="online"?ic.isOnline():!0}var ib=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Qu(t){return t instanceof ib}function ab(t){let e=!1,r=0,n=!1,s;const o=ON(),i=m=>{var w;n||(p(new ib(m)),(w=t.abort)==null||w.call(t))},a=()=>{e=!0},l=()=>{e=!1},c=()=>sb.isFocused()&&(t.networkMode==="always"||ic.isOnline())&&t.canRun(),u=()=>ob(t.networkMode)&&t.canRun(),f=m=>{var w;n||(n=!0,(w=t.onSuccess)==null||w.call(t,m),s==null||s(),o.resolve(m))},p=m=>{var w;n||(n=!0,(w=t.onError)==null||w.call(t,m),s==null||s(),o.reject(m))},h=()=>new Promise(m=>{var w;s=x=>{(n||c())&&m(x)},(w=t.onPause)==null||w.call(t)}).then(()=>{var m;s=void 0,n||(m=t.onContinue)==null||m.call(t)}),v=()=>{if(n)return;let m;const w=r===0?t.initialPromise:void 0;try{m=w??t.fn()}catch(x){m=Promise.reject(x)}Promise.resolve(m).then(f).catch(x=>{var E;if(n)return;const y=t.retry??(Qc?0:3),b=t.retryDelay??AN,_=typeof b=="function"?b(r,x):b,S=y===!0||typeof y=="number"&&r<y||typeof y=="function"&&y(r,x);if(e||!S){p(x);return}r++,(E=t.onFail)==null||E.call(t,r,x),kN(_).then(()=>c()?void 0:h()).then(()=>{e?p(x):v()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?v():h().then(v),o)}}var IN=t=>setTimeout(t,0);function DN(){let t=[],e=0,r=a=>{a()},n=a=>{a()},s=IN;const o=a=>{e?t.push(a):s(()=>{r(a)})},i=()=>{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||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Ze=DN(),ss,my,lb=(my=class{constructor(){ae(this,ss)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),SN(this.gcTime)&&ee(this,ss,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Qc?1/0:5*60*1e3))}clearGcTimeout(){j(this,ss)&&(clearTimeout(j(this,ss)),ee(this,ss,void 0))}},ss=new WeakMap,my),wo,os,Tt,is,qe,aa,as,Yt,kr,gy,MN=(gy=class extends lb{constructor(e){super();ae(this,Yt);ae(this,wo);ae(this,os);ae(this,Tt);ae(this,is);ae(this,qe);ae(this,aa);ae(this,as);ee(this,as,!1),ee(this,aa,e.defaultOptions),this.setOptions(e.options),this.observers=[],ee(this,is,e.client),ee(this,Tt,j(this,is).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ee(this,wo,$N(this.options)),this.state=e.state??j(this,wo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=j(this,qe))==null?void 0:e.promise}setOptions(e){this.options={...j(this,aa),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&j(this,Tt).remove(this)}setData(e,r){const n=RN(this.state.data,e,this.options);return We(this,Yt,kr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(e,r){We(this,Yt,kr).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var n,s;const r=(n=j(this,qe))==null?void 0:n.promise;return(s=j(this,qe))==null||s.cancel(e),r?r.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(j(this,wo))}isActive(){return this.observers.some(e=>CN(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wp||this.state.dataUpdateCount+this.state.errorUpdate
211Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Cf(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:!EN(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=j(this,qe))==null||r.continue()}onOnline(){var r;const e=this.observers.find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=j(this,qe))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),j(this,Tt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(j(this,qe)&&(j(this,as)?j(this,qe).cancel({revert:!0}):j(this,qe).cancelRetry()),this.scheduleGc()),j(this,Tt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||We(this,Yt,kr).call(this,{type:"invalidate"})}fetch(e,r){var c,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(j(this,qe))return j(this,qe).continueRetry(),j(this,qe).promise}if(e&&this.setOptions(e),!this.options.queryFn){const p=this.observers.find(h=>h.options.queryFn);p&&this.setOptions(p.options)}const n=new AbortController,s=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(ee(this,as,!0),n.signal)})},o=()=>{const p=nb(this.options,r),v=(()=>{const m={client:j(this,is),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return ee(this,as,!1),this.options.persister?this.options.persister(p,v,this):p(v)},a=(()=>{const p={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:j(this,is),state:this.state,fetchFn:o};return s(p),p})();(c=this.options.behavior)==null||c.onFetch(a,this),ee(this,os,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&We(this,Yt,kr).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const l=p=>{var h,v,m,w;Qu(p)&&p.silent||We(this,Yt,kr).call(this,{type:"error",error:p}),Qu(p)||((v=(h=j(this,Tt).config).onError)==null||v.call(h,p,this),(w=(m=j(this,Tt).config).onSettled)==null||w.call(m,this.state.data,p,this)),this.scheduleGc()};return ee(this,qe,ab({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:p=>{var h,v,m,w;if(p===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(p)}catch(x){l(x);return}(v=(h=j(this,Tt).config).onSuccess)==null||v.call(h,p,this),(w=(m=j(this,Tt).config).onSettled)==null||w.call(m,p,this.state.error,this),this.scheduleGc()},onError:l,onFail:(p,h)=>{We(this,Yt,kr).call(this,{type:"failed",failureCount:p,error:h})},onPause:()=>{We(this,Yt,kr).call(this,{type:"pause"})},onContinue:()=>{We(this,Yt,kr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),j(this,qe).start()}},wo=new WeakMap,os=new WeakMap,Tt=new WeakMap,is=new WeakMap,qe=new WeakMap,aa=new WeakMap,as=new WeakMap,Yt=new WeakSet,kr=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,...LN(n.data,this.options),fetchMeta:e.meta??null};case"success":return ee(this,os,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 Qu(s)&&s.revert&&j(this,os)?{...j(this,os),fetchStatus:"idle"}
vendor: 4,600 bytes, line 211
211:{...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),Ze.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),j(this,Tt).notify({query:this,type:"updated",action:e})})},gy);function LN(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ob(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function $N(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 dr,vy,FN=(vy=class extends Yc{constructor(e={}){super();ae(this,dr);this.config=e,ee(this,dr,new Map)}build(e,r,n){const s=r.queryKey,o=r.queryHash??yp(s,r);let i=this.get(o);return i||(i=new MN({client:e,queryKey:s,queryHash:o,options:e.defaultQueryOptions(r),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(i)),i}add(e){j(this,dr).has(e.queryHash)||(j(this,dr).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=j(this,dr).get(e.queryHash);r&&(e.destroy(),r===e&&j(this,dr).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ze.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return j(this,dr).get(e)}getAll(){return[...j(this,dr).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(n=>Wg(r,n))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(n=>Wg(e,n)):r}notify(e){Ze.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){Ze.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ze.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},dr=new WeakMap,vy),fr,Je,ls,hr,rn,yy,UN=(yy=class extends lb{constructor(e){super();ae(this,hr);ae(this,fr);ae(this,Je);ae(this,ls);this.mutationId=e.mutationId,ee(this,Je,e.mutationCache),ee(this,fr,[]),this.state=e.state||BN(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){j(this,fr).includes(e)||(j(this,fr).push(e),this.clearGcTimeout(),j(this,Je).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ee(this,fr,j(this,fr).filter(r=>r!==e)),this.scheduleGc(),j(this,Je).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){j(this,fr).length||(this.state.status==="pending"?this.scheduleGc():j(this,Je).remove(this))}continue(){var e;return((e=j(this,ls))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,i,a,l,c,u,f,p,h,v,m,w,x,y,b,_,S,E,C,k;const r=()=>{We(this,hr,rn).call(this,{type:"continue"})};ee(this,ls,ab({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(P,N)=>{We(this,hr,rn).call(this,{type:"failed",failureCount:P,error:N})},onPause:()=>{We(this,hr,rn).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>j(this,Je).canRun(this)}));const n=this.state.status==="pending",s=!j(this,ls).canStart();try{if(n)r();else{We(this,hr,rn).call(this,{type:"pending",variables:e,isPaused:s}),await((i=(o=j(this,Je).config).onMutate)==null?void 0:i.call(o,e,this));const N=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,e));N!==this.state.context&&We(this,hr,rn).call(this,{type:"pending",context:N,variables:e,isPaused:s})}const P=await j(this,ls).start();return await((u=(c=j(this,Je).config).onSuccess)==null?void 0:u.call(c,P,e,this.state.context,this)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,P,e,this.state.context)),await((v=(h=j(this,Je).config).onSettled)==null?void 0:v.call(h,P,null,this.state.variables,this.state.context,this)),await((w=(m=this.options).onSettled)==null?void 0:w.call(m,P,null,e,this.state.context)),We(this,hr,rn).call(this,{type:"success",data:P}),P}catch(P){try{throw await((y=(x=j(this,Je).config).onError)==null?void 0:y.call(x,P,e,this.state.context,this)),await((_=(b=this.options).onError)==null?void 0:_.call(b,P,e,this.state.context)),await((E=(S=j(this,Je).config).onSettled)==null?void 0:E.
211call(S,void 0,P,this.state.variables,this.state.context,this)),await((k=(C=this.options).onSettled)==null?void 0:k.call(C,void 0,P,e,this.state.context)),P}finally{We(this,hr,rn).call(this,{type:"error",error:P})}}finally{j(this,Je).runNext(this)}}},fr=new WeakMap,Je=new WeakMap,ls=new WeakMap,hr=new WeakSet,rn=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),Ze.batch(()=>{j(this,fr).forEach(n=>{n.onMutationUpdate(e)}),j(this,Je).notify({mutation:this,type:"updated",action:e})})},yy);function BN(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jr,Qt,la,wy,zN=(wy=class extends Yc{constructor(e={}){super();ae(this,jr);ae(this,Qt);ae(this,la);this.config=e,ee(this,jr,new Set),ee(this,Qt,new Map),ee(this,la,0)}build(e,r,n){const s=new UN({mutationCache:this,mutationId:++Pa(this,la)._,options:e.defaultMutationOptions(r),state:n});return this.add(s),s}add(e){j(this,jr).add(e);const r=Qa(e);if(typeof r=="string"){const n=j(this,Qt).get(r);n?n.push(e):j(this,Qt).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(j(this,jr).delete(e)){const r=Qa(e);if(typeof r=="string"){const n=j(this,Qt).get(r);if(n)if(n.length>1){const s=n.indexOf(e);s!==-1&&n.splice(s,1)}else n[0]===e&&j(this,Qt).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=Qa(e);if(typeof r=="string"){const n=j(this,Qt).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===e}else return!0}runNext(e){var n;const r=Qa(e);if(typeof r=="string"){const s=(n=j(this,Qt).get(r))==null?void 0:n.find(o=>o!==e&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ze.batch(()=>{j(this,jr).forEach(e=>{this.notify({type:"removed",mutation:e})}),j(this,jr).clear(),j(this,Qt).clear()})}getAll(){return Array.from(j(this,jr))}find(e){const r={exact:!0,...e};return this.getAll().find(n=>Hg(r,n))}findAll(e={}){return this.getAll().filter(r=>Hg(e,r))}notify(e){Ze.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>
vendor: 4,731 bytes, line 211
211r.state.isPaused);return Ze.batch(()=>Promise.all(e.map(r=>r.continue().catch(qt))))}},jr=new WeakMap,Qt=new WeakMap,la=new WeakMap,wy);function Qa(t){var e;return(e=t.options.scope)==null?void 0:e.id}function Gg(t){return{onFetch:(e,r)=>{var u,f,p,h,v;const n=e.options,s=(p=(f=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,o=((h=e.state.data)==null?void 0:h.pages)||[],i=((v=e.state.data)==null?void 0:v.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const w=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?m=!0:e.signal.addEventListener("abort",()=>{m=!0}),e.signal)})},x=nb(e.options,e.fetchOptions),y=async(b,_,S)=>{if(m)return Promise.reject();if(_==null&&b.pages.length)return Promise.resolve(b);const C=(()=>{const H={client:e.client,queryKey:e.queryKey,pageParam:_,direction:S?"backward":"forward",meta:e.options.meta};return w(H),H})(),k=await x(C),{maxPages:P}=e.options,N=S?TN:PN;return{pages:N(b.pages,k,P),pageParams:N(b.pageParams,_,P)}};if(s&&o.length){const b=s==="backward",_=b?VN:Yg,S={pages:o,pageParams:i},E=_(n,S);a=await y(S,E,b)}else{const b=t??o.length;do{const _=l===0?i[0]??n.initialPageParam:Yg(n,a);if(l>0&&_==null)break;a=await y(a,_),l++}while(l<b)}return a};e.options.persister?e.fetchFn=()=>{var m,w;return(w=(m=e.options).persister)==null?void 0:w.call(m,c,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=c}}}function Yg(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 VN(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 Pe,fn,hn,xo,bo,pn,_o,So,xy,WN=(xy=class{constructor(t={}){ae(this,Pe);ae(this,fn);ae(this,hn);ae(this,xo);ae(this,bo);ae(this,pn);ae(this,_o);ae(this,So);ee(this,Pe,t.queryCache||new FN),ee(this,fn,t.mutationCache||new zN),ee(this,hn,t.defaultOptions||{}),ee(this,xo,new Map),ee(this,bo,new Map),ee(this,pn,0)}mount(){Pa(this,pn)._++,j(this,pn)===1&&(ee(this,_o,sb.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,Pe).onFocus())})),ee(this,So,ic.subscribe(async t=>{t&&(await this.resumePausedMutations(),j(this,Pe).onOnline())})))}unmount(){var t,e;Pa(this,pn)._--,j(this,pn)===0&&((t=j(this,_o))==null||t.call(this),ee(this,_o,void 0),(e=j(this,So))==null||e.call(this),ee(this,So,void 0))}isFetching(t){return j(this,Pe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return j(this,fn).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=j(this,Pe).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=j(this,Pe).build(this,e),n=r.state.data;return n===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Cf(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(n))}getQueriesData(t){return j(this,Pe).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=j(this,Pe).get(n.queryHash),o=s==null?void 0:s.state.data,i=_N(e,o);if(i!==void 0)return j(this,Pe).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(t,e,r){return Ze.batch(()=>j(this,Pe).findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=j(this,Pe).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=j(this,Pe);Ze.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=j(this,Pe);return Ze.batch(()=>(r.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},n=Ze.batch(()=>j(this,Pe).findAll(t).map(s=>s.cancel(r)));return Promise.all(n).then(qt).catch(qt)}invalidateQueries(t,e={}){return Ze.batch(()=>(j(this,Pe).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=Ze.batch(()=>j(this,Pe).findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(qt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(qt)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=j(this,Pe).build(this,e);return r.isStaleByTime(Cf(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(qt).catch(qt)}
211fetchInfiniteQuery(t){return t.behavior=Gg(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(qt).catch(qt)}ensureInfiniteQueryData(t){return t.behavior=Gg(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return ic.isOnline()?j(this,fn).resumePausedMutations():Promise.resolve()}getQueryCache(){return j(this,Pe)}getMutationCache(){return j(this,fn)}getDefaultOptions(){return j(this,hn)}setDefaultOptions(t){ee(this,hn,t)}setQueryDefaults(t,e){j(this,xo).set(Gi(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...j(this,xo).values()],r={};return e.forEach(n=>{Yi(t,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(t,e){j(this,bo).set(Gi(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...j(this,bo).values()],r={};return e.forEach(n=>{Yi(t,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...j(this,hn).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=yp(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===wp&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...j(this,hn).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){j(this,Pe).clear(),j(this,fn).clear()}},Pe=new WeakMap,fn=new WeakMap,hn=new WeakMap,xo=new WeakMap,bo=new WeakMap,pn=new WeakMap,_o=new WeakMap,So=new WeakMap,xy),HN=g.createContext(void 0),KN=({client:t,children:e})=>(g.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),d.jsx(HN.Provider,{value:t,children:e}));/** 212 * @remix-run/router v1.23.0 213 * 214 * Copyright (c) Remix Software Inc. 215 * 216 * This source code is licensed under the MIT license found in the 217 * LICENSE.md file in the root directory of this source tree. 218 * 219 * @license MIT 220 */function Qi(){return Qi=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},Qi.apply(this,arguments)}var vn;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(vn||(vn={}));const Qg="popstate";function qN(t){t===void 0&&(t={});function e(n,s){let{pathname:o,search:i,hash:a}=n.location;return Rf("",{pathname:o,search:i,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function r(n,s){return typeof s=="string"?s:ac(s)}return YN(e,r,null,t)}function Ae(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function cb(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function GN(){return Math.random().toString(36).substr(2,8)}function Jg(t,e){return{usr:t.state,key:t.key,idx:e}}function Rf(t,e,r,n){return r===void 0&&(r=null),Qi({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?zo(e):e,{state:r,key:e&&e.key||n||GN()})}function ac(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 zo(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 YN(t,e,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=vn.Pop,l=null,c=u();c==null&&(c=0,i.replaceState(Qi({},i.state,{idx:c}),""));function u(){return(i.state||{idx:null}).idx}function f(){a=vn.Pop;let w=u(),x=w==null?null:w-c;c=w,l&&l({action:a,location:m.location,delta:x})}function p(w,x){a=vn.Push;let y=Rf(m.location,w,x);c=u()+1;let b=Jg(y,c),_=m.createHref(y);try{i.pushState(b,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}o&&l&&l({action:a,location:m.location,delta:1})}function h(w,x){a=vn.Replace;let y=Rf(m.location,w,x);c=u();let b=Jg(y,c),_=m.createHref(y);i.replaceState(b,"",_),o&&l&&l({action:a,location:m.location,delta:0})}function v(w){let x=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof w=="string"?w:ac(w);return y=y.replace(/ $/,"%20"),Ae(x,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,x)}let m={get action(){return a},get location(){return t(s,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Qg,f),l=w,()=>{s.removeEventListener(Qg,f),l=null}},createHref(w){return e(s,w)},createURL:v,encodeLocation(w){let x=v(w);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:p,replace:h,go(w){return i.go(w)}};return m}var Xg;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Xg||(Xg={}));function QN(t,e,r){return r===void 0&&(r="/"),JN(t,e,r,!1)}function JN(t,e,r,n){let s=typeof e=="string"?zo(e):e,o=xp(s.pathname||"/",r);if(o==null)return null;let i=ub(t);XN(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let c=cO(o);a=aO(i[l],c,n)}return a}function ub(t,e,r,n){e===void 0&&(e=[]),r===void 0&&(r=[]),n===void 0&&(n="");let s=(o,i,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};l.relativePath.startsWith("/")&&(Ae(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not val
220id. 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=Rn([n,l.relativePath]),u=r.concat(l);o.children&&o.children.length>0&&(Ae(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),ub(o.children,e,u,c)),!(o.path==null&&!o.index)&&e.push({path:c,score:oO(c,o.index),routesMeta:u})};return t.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of db(o.path))s(o,i,l)}),e}function db(t){let e=t.split("/");if(e.length===0)return[];let[r,...n]=e,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=db(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function XN(t){t.sort((e,r)=>e.score!==r.score?r.score-e.score:iO(e.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const ZN=/^:[\w-]+$/,eO=3,tO=2,rO=1,nO=10,sO=-2,Zg=t=>t==="*";function oO(t,e){let r=t.split("/"),n=r.length;return r.some(Zg)&&(n+=sO),e&&(n+=tO),r.filter(s=>!Zg(s)).reduce((s,o)=>s+(ZN.test(o)?eO:o===""?rO:nO),n)}function iO(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 aO(t,e,r){let{routesMeta:n}=t,s={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],c=a===n.length-1,u=o==="/"?e:e.slice(o.length)||"/",f=ev({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),p=l.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=ev({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!f)return null;
vendor: 9,495 bytes, lines 220-229
220Object.assign(s,f.params),i.push({params:s,pathname:Rn([o,f.pathname]),pathnameBase:hO(Rn([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=Rn([o,f.pathnameBase]))}return i}function ev(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[r,n]=lO(t.path,t.caseSensitive,t.end),s=e.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((c,u,f)=>{let{paramName:p,isOptional:h}=u;if(p==="*"){let m=a[f]||"";i=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const v=a[f];return h&&!v?c[p]=void 0:c[p]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:i,pattern:t}}function lO(t,e,r){e===void 0&&(e=!1),r===void 0&&(r=!0),cb(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,(i,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 cO(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return cb(!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 xp(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 uO(t,e){e===void 0&&(e="/");let{pathname:r,search:n="",hash:s=""}=typeof t=="string"?zo(t):t;return{pathname:r?r.startsWith("/")?r:dO(r,e):e,search:pO(n),hash:mO(s)}}function dO(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 Ju(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 fO(t){return t.filter((e,r)=>r===0||e.route.path&&e.route.path.length>0)}function fb(t,e){let r=fO(t);return e?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function hb(t,e,r,n){n===void 0&&(n=!1);let s;typeof t=="string"?s=zo(t):(s=Qi({},t),Ae(!s.pathname||!s.pathname.includes("?"),Ju("?","pathname","search",s)),Ae(!s.pathname||!s.pathname.includes("#"),Ju("#","pathname","hash",s)),Ae(!s.search||!s.search.includes("#"),Ju("#","search","hash",s)));let o=t===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let f=e.length-1;if(!n&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}a=f>=0?e[f]:"/"}let l=uO(s,a),c=i&&i!=="/"&&i.endsWith("/"),u=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Rn=t=>t.join("/").replace(/\/\/+/g,"/"),hO=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),pO=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,mO=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function gO(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const pb=["post","put","patch","delete"];new Set(pb);const vO=["get",...pb];new Set(vO);/** 221 * React Router v6.30.1 222 * 223 * Copyright (c) Remix Software Inc. 224 * 225 * This source code is licensed under the MIT license found in the 226 * LICENSE.md file in the root directory of this source tree. 227 * 228 * @license MIT 229 */function Ji(){return Ji=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},Ji.apply(this,arguments)}const bp=g.createContext(null),yO=g.createContext(null),Cs=g.createContext(null),Jc=g.createContext(null),$n=g.createContext({outlet:null,matches:[],isDataRoute:!1}),mb=g.createContext(null);function wO(t,e){let{relative:r}=e===void 0?{}:e;wa()||Ae(!1);let{basename:n,navigator:s}=g.useContext(Cs),{hash:o,pathname:i,search:a}=vb(t,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:Rn([n,i])),s.createHref({pathname:l,search:a,hash:o})}function wa(){return g.useContext(Jc)!=null}function Fn(){return wa()||Ae(!1),g.useContext(Jc).location}function gb(t){g.useContext(Cs).static||g.useLayoutEffect(t)}function Sr(){let{isDataRoute:t}=g.useContext($n);return t?AO():xO()}function xO(){wa()||Ae(!1);let t=g.useContext(bp),{basename:e,future:r,navigator:n}=g.useContext(Cs),{matches:s}=g.useContext($n),{pathname:o}=Fn(),i=JSON.stringify(fb(s,r.v7_relativeSplatPath)),a=g.useRef(!1);return gb(()=>{a.current=!0}),g.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){n.go(c);return}let f=hb(c,JSON.parse(i),o,u.relative==="path");t==null&&e!=="/"&&(f.pathname=f.pathname==="/"?e:Rn([e,f.pathname])),(u.replace?n.replace:n.push)(f,u.state,u)},[e,n,i,o,t])}function bO(){let{matches:t}=g.useContext($n),e=t[t.length-1];return e?e.params:{}}function vb(t,e){let{relative:r}=e===void 0?{}:e,{future:n}=g.useContext(Cs),{matches:s}=g.useContext($n),{pathname:o}=Fn(),i=JSON.stringify(fb(s,n.v7_relativeSplatPath));return g.useMemo(()=>hb(t,JSON.parse(i),o,r==="path"),[t,i,o,r])}function _O(t,e){return SO(t,e)}function SO(t,e,r,n){wa()||Ae(!1);let{navigator:s}=g.useContext(Cs),{matches:o}=g.useContext($n),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let c=Fn(),u;if(e){var f;let w=typeof e=="string"?zo(e):e;l==="/"||(f=w.pathname)!=null&&f.startsWith(l)||Ae(!1),u=w}else u=c;let p=u.pathname||"/",h=p;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let v=QN(t,{pathname:h}),m=PO(v&&v.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Rn([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Rn([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r,n);return e&&m?g.createElement(Jc.Provider,{value:{location:Ji({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:vn.Pop}},m):m}function EO(){let t=OO(),e=gO(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 g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},e),r?g.createElement("pre",{style:s},r):null,null)}const CO=g.createElement(EO,null);class kO extends g.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?g.createElement($n.Provider,{value:this.props.routeContext},g.createElement(mb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function RO(t){let{routeContext:e,match:r,children:n}=t,s=g.useContext(bp);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),g.createElement($n.Provider,{value:e},n)}function PO(t,e,r,n){var s;if(e===void 0&&(e=[]),r===void 0&&(r=null),n===void 0&&(n=null),t==null){var o;if(!r)return null;if(r.errors)t=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&e.length===0&&!r.initialized&&r.matches.length>0)t=r.matches;else return null}let i=t,a=(s=r)==null?void 0:s.errors;if(a!=null){let u=i.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);u>=0||Ae(!1),i=i.slice(0,Math.min(i.length,u+1))}let l=!1,c=-1;if(r&&n&&n.v7_partialHydration)for(let u=0;u<i.length;u++){let f=i[u];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=u),f.route.id){let{loaderData:p,errors:h}=r,v=f.route.loader&&p[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||v){l=!0,c>=0?i=i.slice(0,c+1):i=[i[0]];break}}}return i.reduceRight((u,f,p)=>{let h,v=!1,m=null,w=null;r&&(h=a&&f.route.id?a[f.route.id]:void 0,m=f.route.errorElement||CO,l&&(c<0&&p===0?(v=!0,w=null):c===p&&(v=!0,w=f.route.hydrateFallbackElement||null)));let x=e.concat(i.slice(0,p+1)),y=()=>{let b;return h?b=m:v?b=w:f.route.Component?b=g.createElement(f.route.Component,null):f.route.element?b=f.route.element:b=u,g.createElement(RO,{match:f,routeContext:{outlet:u,matches:x,isDataRoute:r!=null},children:b})};return r&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?g.createElement(kO,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:y(),routeC
229ontext:{outlet:null,matches:x,isDataRoute:!0}}):y()},null)}var yb=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(yb||{}),lc=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}(lc||{});function TO(t){let e=g.useContext(bp);return e||Ae(!1),e}function jO(t){let e=g.useContext(yO);return e||Ae(!1),e}function NO(t){let e=g.useContext($n);return e||Ae(!1),e}function wb(t){let e=NO(),r=e.matches[e.matches.length-1];return r.route.id||Ae(!1),r.route.id}function OO(){var t;let e=g.useContext(mb),r=jO(lc.UseRouteError),n=wb(lc.UseRouteError);return e!==void 0?e:(t=r.errors)==null?void 0:t[n]}function AO(){let{router:t}=TO(yb.UseNavigateStable),e=wb(lc.UseNavigateStable),r=g.useRef(!1);return gb(()=>{r.current=!0}),g.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,Ji({fromRouteId:e},o)))},[t,e])}function IO(t,e){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function cr(t){Ae(!1)}function DO(t){let{basename:e="/",children:r=null,location:n,navigationType:s=vn.Pop,navigator:o,static:i=!1,future:a}=t;wa()&&Ae(!1);let l=e.replace(/^\/*/,"/"),c=g.useMemo(()=>({basename:l,navigator:o,static:i,future:Ji({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=zo(n));let{pathname:u="/",search:f="",hash:p="",state:h=null,key:v="default"}=n,m=g.useMemo(()=>{let w=xp(u,l);return w==null?null:{location:{pathname:w,search:f,hash:p,state:h,key:v},navigationType:s}},[l,u,f,p,h,v,s]);return m==null?null:g.createElement(Cs.Provider,{value:c},g.createElement(Jc.Provider,{children:r,value:m}))}function MO(t){let{children:e,location:r}=t;return _O(Pf(e),r)}new Promise(()=>{});function Pf(t,e){e===void 0&&(e=[]);let r=[];return g.Children.forEach(t,(n,s)=>{if(!g.isValidElement(n))return;let o=[...e,s];if(n.type===g.Fragment){r.push.apply(r,Pf(n.props.children,o));return}n.type!==cr&&Ae(!1),!n.props.index||!n.props.children||Ae(!1);let i={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(i.children=Pf(n.props.children,o)),r.push(i)}),r}/** 230 * React Router DOM v6.30.1 231 * 232 * Copyright (c) Remix Software Inc. 233 * 234 * This source code is licensed under the MIT license found in the 235 * LICENSE.md file in the root directory of this source tree. 236 * 237 * @license MIT 238 */function Tf(){return Tf=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},Tf.apply(this,arguments)}function LO(t,e){if(t==null)return{};var r={},n=Object.keys(t),s,o;for(o=0;o<n.length;o++)s=n[o],!(e.indexOf(s)>=0)&&(r[s]=t[s]);return r}function $O(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function FO(t,e){return t.button===0&&(!e||e==="_self")&&!$O(t)}function jf(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,r)=>{let n=t[r];return e.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function UO(t,e){let r=jf(t);return e&&e.forEach((n,s)=>{r.has(s)||e.getAll(s).forEach(o=>{r.append(s,o)})}),r}const BO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],zO="6";try{window.__reactRouterVersion=zO}catch{}const VO="startTransition",tv=ch[VO];function WO(t){let{basename:e,children:r,future:n,window:s}=t,o=g.useRef();o.current==null&&(o.current=qN({window:s,v5Compat:!0}));let i=o.current,[a,l]=g.useState({action:i.action,location:i.location}),{v7_startTransition:c}=n||{},u=g.useCallback(f=>{c&&tv?tv(()=>l(f)):l(f)},[l,c]);return g.useLayoutEffect(()=>i.listen(u),[i,u]),g.useEffect(()=>IO(n),[n]),g.createElement(DO,{basename:e,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}const HO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",KO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xa=g.forwardRef(function(e,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:c,preventScrollReset:u,viewTransition:f}
vendor: 4,983 bytes, line 238
238=e,p=LO(e,BO),{basename:h}=g.useContext(Cs),v,m=!1;if(typeof c=="string"&&KO.test(c)&&(v=c,HO))try{let b=new URL(window.location.href),_=c.startsWith("//")?new URL(b.protocol+c):new URL(c),S=xp(_.pathname,h);_.origin===b.origin&&S!=null?c=S+_.search+_.hash:m=!0}catch{}let w=wO(c,{relative:s}),x=qO(c,{replace:i,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:f});function y(b){n&&n(b),b.defaultPrevented||x(b)}return g.createElement("a",Tf({},p,{href:v||w,onClick:m||o?n:y,ref:r,target:l}))});var rv;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(rv||(rv={}));var nv;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(nv||(nv={}));function qO(t,e){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,viewTransition:a}=e===void 0?{}:e,l=Sr(),c=Fn(),u=vb(t,{relative:i});return g.useCallback(f=>{if(FO(f,r)){f.preventDefault();let p=n!==void 0?n:ac(c)===ac(u);l(t,{replace:p,state:s,preventScrollReset:o,relative:i,viewTransition:a})}},[c,l,u,n,s,r,t,o,i,a])}function GO(t){let e=g.useRef(jf(t)),r=g.useRef(!1),n=Fn(),s=g.useMemo(()=>UO(n.search,r.current?null:e.current),[n.search]),o=Sr(),i=g.useCallback((a,l)=>{const c=jf(typeof a=="function"?a(s):a);r.current=!0,o("?"+c,l)},[o,s]);return[s,i]}const J=t=>typeof t=="string",oi=()=>{let t,e;const r=new Promise((n,s)=>{t=n,e=s});return r.resolve=t,r.reject=e,r},sv=t=>t==null?"":""+t,YO=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},QO=/###/g,ov=t=>t&&t.indexOf("###")>-1?t.replace(QO,"."):t,iv=t=>!t||J(t),Ei=(t,e,r)=>{const n=J(e)?e.split("."):e;let s=0;for(;s<n.length-1;){if(iv(t))return{};const o=ov(n[s]);!t[o]&&r&&(t[o]=new r),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return iv(t)?{}:{obj:t,k:ov(n[s])}},av=(t,e,r)=>{const{obj:n,k:s}=Ei(t,e,Object);if(n!==void 0||e.length===1){n[s]=r;return}let o=e[e.length-1],i=e.slice(0,e.length-1),a=Ei(t,i,Object);for(;a.obj===void 0&&i.length;)o=`${i[i.length-1]}.${o}`,i=i.slice(0,i.length-1),a=Ei(t,i,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${o}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${o}`]=r},JO=(t,e,r,n)=>{const{obj:s,k:o}=Ei(t,e,Object);s[o]=s[o]||[],s[o].push(r)},cc=(t,e)=>{const{obj:r,k:n}=Ei(t,e);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},XO=(t,e,r)=>{const n=cc(t,r);return n!==void 0?n:cc(e,r)},xb=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in t?J(t[n])||t[n]instanceof String||J(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):xb(t[n],e[n],r):t[n]=e[n]);return t},Is=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ZO={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const eA=t=>J(t)?t.replace(/[&<>"'\/]/g,e=>ZO[e]):t;class tA{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const rA=[" ",",","?","!",";"],nA=new tA(20),sA=(t,e,r)=>{e=e||"",r=r||"";const n=rA.filter(i=>e.indexOf(i)<0&&r.indexOf(i)<0);if(n.length===0)return!0;const s=nA.getRegExp(`(${n.map(i=>i==="?"?"\\?":i).join("|")})`);let o=!s.test(t);if(!o){const i=t.indexOf(r);i>0&&!s.test(t.substring(0,i))&&(o=!0)}return o},Nf=(t,e,r=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const n=e.split(r);let s=t;for(let o=0;o<n.length;){if(!s||typeof s!="object")return;let i,a="";for(let l=o;l<n.length;++l)if(l!==o&&(a+=r),a+=n[l],i=s[a],i!==void 0){if(["string","number","boolean"].indexOf(typeof i)>-1&&l<n.length-1)continue;o+=l-o+1;break}s=i}return s},Xi=t=>t==null?void 0:t.replace("_","-"),oA={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var r,n;(n=(r=console==null?void 0:console[t])==null?void 0:r.apply)==null||n.call(r,console,e)}};class uc{constructor(e,r={}){this.init(e,r)}init(e,r={}){this.prefix=r.prefix||"i18next:",this.logger=e||oA,this.options=r,this.debug=r.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,s){return s&&!this.debug?null:(J(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new uc(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new uc(this.logger,e)}}var gr=new uc;class Xc{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const s=this.observers[n].get(r)||0;this.observers[n].set(r,s+1)}),this}
vendor: 3,210 bytes, line 238
238off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e,...r){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,o])=>{for(let i=0;i<o;i++)s(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,o])=>{for(let i=0;i<o;i++)s.apply(s,[e,...r])})}}class lv extends Xc{constructor(e,r={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const r=this.options.ns.indexOf(e);r>-1&&this.options.ns.splice(r,1)}getResource(e,r,n,s={}){var c,u;const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,i=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,r],n&&(Array.isArray(n)?a.push(...n):J(n)&&o?a.push(...n.split(o)):a.push(n)));const l=cc(this.data,a);return!l&&!r&&!n&&e.indexOf(".")>-1&&(e=a[0],r=a[1],n=a.slice(2).join(".")),l||!i||!J(n)?l:Nf((u=(c=this.data)==null?void 0:c[e])==null?void 0:u[r],n,o)}addResource(e,r,n,s,o={silent:!1}){const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let a=[e,r];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),s=r,r=a[1]),this.addNamespaces(r),av(this.data,a,s),o.silent||this.emit("added",e,r,n,s)}addResources(e,r,n,s={silent:!1}){for(const o in n)(J(n[o])||Array.isArray(n[o]))&&this.addResource(e,r,o,n[o],{silent:!0});s.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,s,o,i={silent:!1,skipCopy:!1}){let a=[e,r];e.indexOf(".")>-1&&(a=e.split("."),s=n,n=r,r=a[1]),this.addNamespaces(r);let l=cc(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),s?xb(l,n,o):l={...l,...n},av(this.data,a,l),i.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(s=>r[s]&&Object.keys(r[s]).length>0)}toJSON(){return this.data}}var bb={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,s){return t.forEach(o=>{var i;e=((i=this.processors[o])==null?void 0:i.process(e,r,n,s))??e}),e}};const _b=Symbol("i18next/PATH_KEY");function iA(){const t=[],e=Object.create(null);let r;return e.get=(n,s)=>{var o;return(o=r==null?void 0:r.revoke)==null||o.call(r),s===_b?t:(t.push(s),r=Proxy.revocable(n,e),r.proxy)},Proxy.revocable(Object.create(null),e).proxy}function Of(t,e){const{[_b]:r}=t(iA());return r.join((e==null?void 0:e.keySeparator)??".")}const cv={},Xu=t=>!J(t)&&typeof t!="boolean"&&typeof t!="number";class dc extends Xc{constructor(e,r={}){super(),YO(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
238i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=gr.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,r={interpolation:{}}){const n={...r};if(e==null)return!1;const s=this.resolve(e,n);if((s==null?void 0:s.res)===void 0)return!1;const o=Xu(s.res);return!(n.returnObjects===!1&&o)}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=r.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!sA(e,n,s);if(i&&!a){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:J(o)?[o]:o};const c=e.split(n);(n!==s||n===s&&this.options.ns.indexOf(c[0])>-1)&&(o=c.shift()),e=c.join(s)}return{key:e,namespaces:J(o)?[o]:o}}translate(e,r,n){let s=typeof r=="object"?{...r}:r;if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),e==null)return"";typeof e=="function"&&(e=Of(e,{...this.options,...s})),Array.isArray(e)||(e=[String(e)]);const o=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:a,namespaces:l}=this.extractFromKey(e[e.length-1],s),c=l[l.length-1];let u=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const f=s.lng||this.language,p=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return p?o?{res:`${c}${u}${a}`,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:`${c}${u}${a}`:o?{res:a,usedKey:a,exactUsedKey:a,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(s)}:a;const h=this.resolve(e,s);let v=h==null?void 0:h.res;const m=(h==null?void 0:h.usedKey)||a,w=(h==null?void 0:h.exactUsedKey)||a,x=["[object Number]","[object Function]","[object RegExp]"],y=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,b=!this.i18nFormat||this.i18nFormat.handleAsObject,_=s.count!==void 0&&!J(s.count),S=dc.hasDefaultValue(s),E=_?this.pluralResolver.getSuffix(f,s.count,s):"",C=s.ordinal&&_?this.pluralResolver.getSuffix(f,s.count,{ordinal:!1}):"",k=_&&!s.ordinal&&s.count===0,P=k&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${E}`]||s[`defaultValue${C}`]||s.defaultValue;let N=v;b&&!v&&S&&(N=P);const H=Xu(N),A=Object.prototype.toString.apply(N);if(b&&N&&H&&x.indexOf(A)<0&&!(J(y)&&Array.isArray(N))){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,N,{...s,ns:l}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(h.res=F,h.usedParams=this.getUsedParamsDetails(s),h):F}if(i){const F=Array.isArray(N),O=F?[]:{},I=F?w:m;for(const M in N)if(Object.prototype.hasOwnProperty.call(N,M)){const U=`${I}${i}${M}`;S&&!v?O[M]=this.translate(U,{...s,defaultValue:Xu(P)?P[M]:void 0,joinArrays:!1,ns:l}):O[M]=this.translate(U,{...s,joinArrays:!1,ns:l}),O[M]===U&&(O[M]=N[M])}v=O}}else if(b&&J(y)&&Array.isArray(v))v=v.join(y),v&&(v=this.extendTranslation(v,e,s,n));else{let F=!1,O=!1;!this.isValidLookup(v)&&S&&(F=!0,v=P),this.isValidLookup(v)||(O=!0,v=a);const M=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&O?void 0:v,U=S&&P!==v&&this.options.updateMissing;if(O||F||U){if(this.logger.log(U?"updateKey":"missingKey",f,c,a,U?P:v),i){const B=this.resolve(a,{...s,keySeparator:!1});B&&B.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let T=[];const R=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&R&&R[0])for(let B=0;B<R.length;B++)T.push(R[B]);else this.options.saveMissingTo==="all"?T=this.languageUtils.toResolveHierarchy(s.lng||this.language):T.push(s.lng||this.language);const L=(B,z,Q)=>{var pe;const X=S&&Q!==v?Q:M;this.options.missingKeyHandler?this.options.missingKeyHandler(B,c,z,X,U,s):(pe=this.backendConnector)!=null&&pe.saveMissing&&this.backendConnector.saveMissing(B,c,z,X,U,s),this.emit
vendor: 33,100 bytes, line 238
238("missingKey",B,c,z,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&_?T.forEach(B=>{const z=this.pluralResolver.getSuffixes(B,s);k&&s[`defaultValue${this.options.pluralSeparator}zero`]&&z.indexOf(`${this.options.pluralSeparator}zero`)<0&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(Q=>{L([B],a+Q,s[`defaultValue${Q}`]||P)})}):L(T,a,P))}v=this.extendTranslation(v,e,s,h,n),O&&v===a&&this.options.appendNamespaceToMissingKey&&(v=`${c}${u}${a}`),(O||F)&&this.options.parseMissingKeyHandler&&(v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${a}`:a,F?v:void 0,s))}return o?(h.res=v,h.usedParams=this.getUsedParamsDetails(s),h):v}extendTranslation(e,r,n,s,o){var l,c;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const u=J(e)&&(((c=n==null?void 0:n.interpolation)==null?void 0:c.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const h=e.match(this.interpolator.nestingRegexp);f=h&&h.length}let p=n.replace&&!J(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(p={...this.options.interpolation.defaultVariables,...p}),e=this.interpolator.interpolate(e,p,n.lng||this.language||s.usedLng,n),u){const h=e.match(this.interpolator.nestingRegexp),v=h&&h.length;f<v&&(n.nest=!1)}!n.lng&&s&&s.res&&(n.lng=this.language||s.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(o==null?void 0:o[0])===h[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${r[0]}`),null):this.translate(...h,r),n)),n.interpolation&&this.interpolator.reset()}const i=n.postProcess||this.options.postProcess,a=J(i)?[i]:i;return e!=null&&(a!=null&&a.length)&&n.applyPostProcessor!==!1&&(e=bb.handle(a,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,r={}){let n,s,o,i,a;return J(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(l,r),u=c.key;s=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const p=r.count!==void 0&&!J(r.count),h=p&&!r.ordinal&&r.count===0,v=r.context!==void 0&&(J(r.context)||typeof r.context=="number")&&r.context!=="",m=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);f.forEach(w=>{var x,y;this.isValidLookup(n)||(a=w,!cv[`${m[0]}-${w}`]&&((x=this.utils)!=null&&x.hasLoadedNamespace)&&!((y=this.utils)!=null&&y.hasLoadedNamespace(a))&&(cv[`${m[0]}-${w}`]=!0,this.logger.warn(`key "${s}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(b=>{var E;if(this.isValidLookup(n))return;i=b;const _=[u];if((E=this.i18nFormat)!=null&&E.addLookupKeys)this.i18nFormat.addLookupKeys(_,u,b,w,r);else{let C;p&&(C=this.pluralResolver.getSuffix(b,r.count,r));const k=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(r.ordinal&&C.indexOf(P)===0&&_.push(u+C.replace(P,this.options.pluralSeparator)),_.push(u+C),h&&_.push(u+k)),v){const N=`${u}${this.options.contextSeparator||"_"}${r.context}`;_.push(N),p&&(r.ordinal&&C.indexOf(P)===0&&_.push(N+C.replace(P,this.options.pluralSeparator)),_.push(N+C),h&&_.push(N+k))}}let S;for(;S=_.pop();)this.isValidLookup(n)||(o=S,n=this.getResource(b,w,S,r))}))})}),{res:n,usedKey:s,exactUsedKey:o,usedLng:i,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n,s={}){var o;return(o=this.i18nFormat)!=null&&o.getResource?this.i18nFormat.getResource(e,r,n,s):this.resourceStore.getResource(e,r,n,s)}getUsedParamsDetails(e={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!J(e.replace);let s=n?e.replace:e;if(n&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!n){s={...s};for(const o of r)delete s[o]}return s}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&r===n.substring(0,r.length)&&e[n]!==void 0)return!0;return!1}}class uv{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=gr.create("languageUtils")}getScriptPartFromCode(e){if(e=Xi(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Xi(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(J(e)&&e.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(e)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const s=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(s))&&(r=s)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const s=this.getScriptPartFromCode(n);if(this.isSupportedCode(s))return r=s;const o=this.getLanguagePartFromCode(n);if(this.isSupportedCode(o))return r=o;r=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),J(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],e),s=[],o=i=>{i&&(this.isSupportedCode(i)?s.push(i):this.logger.warn(`rejecting language code not found in supportedLngs: ${i}`))};return J(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):J(e)&&o(this.formatLanguageCode(e)),n.forEach(i=>{s.indexOf(i)<0&&o(this.formatLanguageCode(i))}),s}}const dv={zero:0,one:1,two:2,few:3,many:4,other:5},fv={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class aA{constructor(e,r={}){this.languageUtils=e,this.options=r,this.logger=gr.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,r){this.rules[e]=r}clearCache(){this.pluralRulesCache={}}getRule(e,r={}){const n=Xi(e==="dev"?"en":e),s=r.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:s});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),fv;if(!e.match(/-|_/))return fv;const l=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(l,r)}return this.pluralRulesCache[o]=i,i}needsPlural(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,r,n={}){return this.getSuffixes(e,n).map(s=>`${r}${s}`)}getSuffixes(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((s,o)=>dv[s]-dv[o]).map(s=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,r,n={}){const s=this.getRule(e,n);return s?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s.select(r)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",r,n))}}const hv=(t,e,r,n=".",s=!0)=>{let o=XO(t,e,r);return!o&&s&&J(r)&&(o=Nf(t,r,n),o===void 0&&(o=Nf(e,r,n))),o},Zu=t=>t.replace(/\$/g,"$$$$");class pv{constructor(e={}){var r;this.logger=gr.create("interpolator"),this.options=e,this.format=((r=e==null?void 0:e.interpolation)==null?void 0:r.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:s,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:p,nestingPrefixEscaped:h,nestingSuffix:v,nestingSuffixEscaped:m,nestingOptionsSeparator:w,maxReplaces:x,alwaysFormat:y}=e.interpolation;this.escape=r!==void 0?r:eA,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=o?Is(o):i||"{{",this.suffix=a?Is(a):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=p?Is(p):h||Is("$t("),this.nestingSuffix=v?Is(v):m||Is(")"),this.nestingOptionsSeparator=w||",",this.maxReplaces=x||1e3,this.alwaysFormat=y!==void 0?y:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,r,n,s){var h;let o,i,a;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=v=>{if(v.indexOf(this.formatSeparator)<0){const y=hv(r,l,v,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(y,void 0,n,{...s,...r,interpolationkey:v}):y}const m=v.split(this.formatSeparator),w=m.shift().trim(),x=m.join(this.formatSeparator).trim();return this.format(hv(r,l,w,this.options.keySeparator,this.options.ignoreJSONStructure),x,n,{...s,...r,interpolationkey:w})};this.resetRegExp();const u=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((h=s==null?void 0:s.interpolation)==null?void 0:h.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:v=>Zu(v)},{regex:this.regexp,safeValue:v=>this.escapeValue?Zu(this.escape(v)):Zu(v)}].forEach(v=>{for(a=0;o=v.regex.exec(e);){const m=o[1].trim();if(i=c(m),i===void 0)if(typeof u=="function"){const x=u(e,o,s);i=J(x)?x:""}else if(s&&Object.prototype.hasOwnProperty.call(s,m))i="";else if(f){i=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),i="";else!J(i)&&!this.useRawValueToEscape&&(i=sv(i));const w=v.safeValue(i);if(e=e.replace(o[0],w),f?(v.regex.lastIndex+=i.length,v.regex.lastIndex-=o[0].length):v.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,r,n={}){let s,o,i;const a=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let p=`{${f[1]}`;l=f[0],p=this.interpolate(p,i);const h=p.match(/'/g),v=p.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!v||v.length%2!==0)&&(p=p.replace(/'/g,'"'));try{i=JSON.parse(p),c&&(i={...c,...i})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${u}${p}`}return i.defaultValue&&i.defaultValue.indexOf(this.prefix)>-1&&delete i.defaultValue,l};for(;s=this.nestingRegexp.exec(e);){let l=[];i={...n},i=i.replace&&!J(i.replace)?i.replace:i,i.applyPostProcessor=!1,delete i.defaultValue;const c=/{.*}/.test(s[1])?s[1].lastIndexOf("}")+1:s[1].indexOf(this.formatSeparator);if(c!==-1&&(l=s[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),s[1]=s[1].slice(0,c)),o=r(a.call(this,s[1].trim(),i),i),o&&s[0]===e&&!J(o))return o;J(o)||(o=sv(o)),o||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),o=""),l.length&&(o=l.reduce((u,f)=>this.format(u,f,n.lng,{...n,interpolationkey:s[1].trim()}),o.trim())),e=e.replace(s[0],o),this.regexp.lastIndex=0}return e}}const lA=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const n=t.split("(");e=n[0].toLowerCase().trim();const s=n[1].substring(0,n[1].length-1);e==="currency"&&s.indexOf(":")<0?r.currency||(r.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?r.range||(r.range=s.trim()):s.split(";").forEach(i=>{if(i){const[a,...l]=i.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=a.trim();r[u]||(r[u]=c),c==="false"&&(r[u]=!1),c==="true"&&(r[u]=!0),isNaN(c)||(r[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:r}},mv=t=>{const e={};return(r,n,s)=>{let o=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(o={...o,[s.interpolationkey]:void 0});const i=n+JSON.stringify(o);let a=e[i];return a||(a=t(Xi(n),s),e[i]=a),a(r)}},cA=t=>(e,r,n)=>t(Xi(r),n)(e);class uA{constructor(e={}){this.logger=gr.create("formatter"),this.options=e,this.init(e)}init(e,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?mv:cA;this.formats={number:n((s,o)=>{const i=new Intl.NumberFormat(s,{...o});return a=>i.format(a)}),currency:n((s,o)=>{const i=new Intl.NumberFormat(s,{...o,style:"currency"});return a=>i.format(a)}),datetime:n((s,o)=>{const i=new Intl.DateTimeFormat(s,{...o});return a=>i.format(a)}),relativetime:n((s,o)=>{const i=new Intl.RelativeTimeFormat(s,{...o});return a=>i.format(a,o.range||"day")}),list:n((s,o)=>{const i=new Intl.ListFormat(s,{...o});return a=>i.format(a)})}}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=mv(r)}format(e,r,n,s={}){const o=r.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(a=>a.indexOf(")")>-1)){const a=o.findIndex(l=>l.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,a)].join(this.formatSeparator)}return o.reduce((a,l)=>{var f;const{formatName:c,formatOptions:u}=lA(l);if(this.formats[c]){let p=a;try{const h=((f=s==null?void 0:s.formatParams)==null?void 0:f[s.interpolationkey])||{},v=h.locale||h.lng||s.locale||s.lng||n;p=this.formats[c](a,v,{...u,...s,...h})}catch(h){this.logger.warn(h)}return p}else this.logger.warn(`there was no format function for ${c}`);return a},e)}}const dA=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class fA extends Xc{constructor(e,r,n,s={}){var o,i;super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=s,this.logger=gr.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(i=(o=this.backend)==null?void 0:o.init)==null||i.call(o,n,s.backend,s)}queueLoad(e,r,n,s){const o={},i={},a={},l={};return e.forEach(c=>{let u=!0;r.forEach(f=>{const p=`${c}|${f}`;!n.reload&&this.store.hasResourceBundle(c,f)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?i[p]===void 0&&(i[p]=!0):(this.state[p]=1,u=!1,i[p]===void 0&&(i[p]=!0),o[p]===void 0&&(o[p]=!0),l[f]===void 0&&(l[f]=!0)))}),u||(a[c]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}loaded(e,r,n){const s=e.split("|"),o=s[0],i=s[1];r&&this.emit("failedLoading",o,i,r),!r&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const a={};this.queue.forEach(l=>{JO(l.loaded,[o],i),dA(l,e),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{a[c]||(a[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{a[c][f]===void 0&&(a[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(l=>!l.done)}read(e,r,n,s=0,o=this.retryTimeout,i){if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:s,wait:o,callback:i});return}this.readingCalls++;const a=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&u&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,r,n,s+1,o*2,i)},o);return}i(c,u)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const c=l(e,r);c&&typeof c.then=="function"?c.then(u=>a(null,u)).catch(a):a(null,c)}catch(c){a(c)}return}return l(e,r,a)}prepareLoading(e,r,n={},s){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();J(e)&&(e=this.languageUtils.toResolveHierarchy(e)),J(r)&&(r=[r]);const o=this.queueLoad(e,r,n,s);if(!o.toLoad.length)return o.pending.length||s(),null;o.toLoad.forEach(i=>{this.loadOne(i)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e,r=""){const n=e.split("|"),s=n[0],o=n[1];this.read(s,o,"read",void 0,void 0,(i,a)=>{i&&this.logger.warn(`${r}loading namespace ${o} for language ${s} failed`,i),!i&&a&&this.logger.log(`${r}loaded namespace ${o} for language ${s}`,a),this.loaded(e,i,a)})}saveMissing(e,r,n,s,o,i={},a=()=>{}){var l,c,u,f,p;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((f=(u=this.services)==null?void 0:u.utils)!=null&&f.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((p=this.backend)!=null&&p.create){const h={...i,isUpdate:o},v=this.backend.create.bind(this.backend);if(v.length<6)try{let m;v.length===5?m=v(e,r,n,s,h):m=v(e,r,n,s),m&&typeof m.then=="function"?m.then(w=>a(null,w)).catch(a):a(null,m)}catch(m){a(m)}else v(e,r,n,s,a,h)}!e||!e[0]||this.store.addResource(e[0],r,n,s)}}}const gv=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),J(t[1])&&(e.defaultValue=t[1]),J(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),vv=t=>{var e,r;return J(t.ns)&&(t.ns=[t.ns]),J(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),J(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((r=(e=t.supportedLngs)==null?void 0:e.indexOf)==null?void 0:r.call(e,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},Ja=()=>{},hA=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class Ci extends Xc{constructor(e={},r){if(super(),this.options=vv(e),this.services={},this.logger=gr,this.modules={external:[]},hA(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(e={},r){this.isInitializing=!0,typeof e=="function"&&(r=e,e={}),e.defaultNS==null&&e.ns&&(J(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const n=gv();this.options={...n,...this.options,...vv(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const s=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?gr.init(s(this.modules.logger),this.options):gr.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=uA;const u=new uv(this.options);this.store=new lv(this.options.resources,this.options);const f=this.services;f.logger=gr,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new aA(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(f.formatter=s(c),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new pv(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new fA(s(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(h,...v)=>{this.emit(h,...v)}),this.modules.languageDetector&&(f.languageDetector=s(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=s(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new dc(this.services,this.options),this.translator.on("*",(h,...v)=>{this.emit(h,...v)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ja),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const a=oi(),l=()=>{const c=(u,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(f),r(u,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),a}loadResources(e,r=Ja){var o,i;let n=r;const s=J(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(f=>{f!=="cimode"&&a.indexOf(f)<0&&a.push(f)})};s?l(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>l(u)),(i=(o=this.options.preload)==null?void 0:o.forEach)==null||i.call(o,c=>l(c)),this.services.backendConnector.load(a,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(c)})}else n(null)}reloadResources(e,r,n){const s=oi();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=Ja),this.services.backendConnector.reload(e,r,o=>{s.resolve(),n(o)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&bb.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let r=0;r<this.languages.length;r++){const n=this.languages[r];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,r){this.isLanguageChangingTo=e;const n=oi();this.emit("languageChanging",e);const s=a=>{this.language=a,this.languages=this.services.languageUtils.toResolveHierarchy(a),this.resolvedLanguage=void 0,this.setResolvedLanguage(a)},o=(a,l)=>{l?this.isLanguageChangingTo===e&&(s(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...c)=>this.t(...c)),r&&r(a,(...c)=>this.t(...c))},i=a=>{var u,f;!e&&!a&&this.services.languageDetector&&(a=[]);const l=J(a)?a:a&&a[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(J(a)?[a]:a);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),(f=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||f.call(u,c)),this.loadResources(c,p=>{o(p,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?i(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(i):this.services.languageDetector.detect(i):i(e),n}getFixedT(e,r,n){const s=(o,i,...a)=>{let l;typeof i!="object"?l=this.options.overloadTranslationOptionHandler([o,i].concat(a)):l={...i},l.lng=l.lng||s.lng,l.lngs=l.lngs||s.lngs,l.ns=l.ns||s.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||n||s.keyPrefix);const c=this.options.keySeparator||".";let u;return l.keyPrefix&&Array.isArray(o)?u=o.map(f=>(typeof f=="function"&&(f=Of(f,{...this.options,...i})),`${l.keyPrefix}${c}${f}`)):(typeof o=="function"&&(o=Of(o,{...this.options,...i})),u=l.keyPrefix?`${l.keyPrefix}${c}${o}`:o),this.t(u,l)};return J(e)?s.lng=e:s.lngs=e,s.ns=r,s.keyPrefix=n,s}t(...e){var r;return(r=this.translator)==null?void 0:r.translate(...e)}exists(...e){var r;return(r=this.translator)==null?void 0:r.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const i=(a,l)=>{const c=this.services.backendConnector.state[`${a}|${l}`];return c===-1||c===0||c===2};if(r.precheck){const a=r.precheck(this,i);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||i(n,e)&&(!s||i(o,e)))}loadNamespaces(e,r){const n=oi();return this.options.ns?(J(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{n.resolve(),r&&r(s)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=oi();J(e)&&(e=[e]);const s=this.options.preload||[],o=e.filter(i=>s.indexOf(i)<0&&this.services.languageUtils.isSupportedCode(i));return o.length?(this.options.preload=s.concat(o),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}dir(e){var s,o;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const i=new Intl.Locale(e);if(i&&i.getTextInfo){const a=i.getTextInfo();if(a&&a.direction)return a.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((o=this.services)==null?void 0:o.languageUtils)||new uv(gv());return e.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(n.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},r){const n=new Ci(e,r);return n.createInstance=Ci.createInstance,n}cloneInstance(e={},r=Ja){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},o=new Ci(s);if((e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(a=>{o[a]=this[a]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n){const a=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,f)=>(u[f]={...l[c][f]},u),l[c]),l),{});o.store=new lv(a,s),o.services.resourceStore=o.store}return e.interpolation&&(o.services.interpolator=new pv(s)),o.translator=new dc(o.services,s),o.translator.on("*",(a,...l)=>{o.emit(a,...l)}),o.init(s,r),o.translator.options=s,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Qe=Ci.createInstance();Qe.createInstance;Qe.dir;Qe.init;Qe.loadResources;Qe.reloadResources;Qe.use;Qe.changeLanguage;Qe.getFixedT;Qe.t;Qe.exists;Qe.setDefaultNamespace;Qe.hasLoadedNamespace;Qe.loadNamespaces;Qe.loadLanguages;const pA=(t,e,r,n)=>{var o,i,a,l;const s=[r,{code:e,...n||{}}];if((i=(o=t==null?void 0:t.services)==null?void 0:o.logger)!=null&&i.forward)return t.services.logger.forward(s,"warn","react-i18next::",!0);xs(s[0])&&(s[0]=`react-i18next:: ${s[0]}`),(l=(a=t==null?void 0:t.services)==null?void 0:a.logger)!=null&&l.warn?t.services.logger.warn(...s):console!=null&&console.warn&&console.warn(...s)},yv={},Sb=(t,e,r,n)=>{xs(r)&&yv[r]||(xs(r)&&(yv[r]=new Date),pA(t,e,r,n))},Eb=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},Af=(t,e,r)=>{t.loadNamespaces(e,Eb(t,r))},wv=(t,e,r,n)=>{if(xs(r)&&(r=[r]),t.options.preload&&t.options.preload.indexOf(e)>-1)return Af(t,r,n);r.forEach(s=>{t.options.ns.indexOf(s)<0&&t.options.ns.push(s)}),t.loadLanguages(e,Eb(t,n))},mA=(t,e,r={})=>
238!e.languages||!e.languages.length?(Sb(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:r.lng,precheck:(n,s)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!s(n.isLanguageChangingTo,t))return!1}}),xs=t=>typeof t=="string",gA=t=>typeof t=="object"&&t!==null,vA=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,yA={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},wA=t=>yA[t],xA=t=>t.replace(vA,wA);let If={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:xA,transDefaultProps:void 0};const bA=(t={})=>{If={...If,...t}},_A=()=>If;let Cb;const SA=t=>{Cb=t},EA=()=>Cb,CA={type:"3rdParty",init(t){bA(t.options.react),SA(t)}},kA=g.createContext();class RA{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var kb={exports:{}},Rb={};/** 239 * @license React 240 * use-sync-external-store-shim.production.js 241 * 242 * Copyright (c) Meta Platforms, Inc. and affiliates. 243 * 244 * This source code is licensed under the MIT license found in the 245 * LICENSE file in the root directory of this source tree. 246 */var Io=g;function PA(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var TA=typeof Object.is=="function"?Object.is:PA,jA=Io.useState,NA=Io.useEffect,OA=Io.useLayoutEffect,AA=Io.useDebugValue;function IA(t,e){var r=e(),n=jA({inst:{value:r,getSnapshot:e}}),s=n[0].inst,o=n[1];return OA(function(){s.value=r,s.getSnapshot=e,ed(s)&&o({inst:s})},[t,r,e]),NA(function(){return ed(s)&&o({inst:s}),t(function(){ed(s)&&o({inst:s})})},[t]),AA(r),r}function ed(t){var e=t.getSnapshot;t=t.value;try{var r=e();return!TA(t,r)}catch{return!0}}function DA(t,e){return e()}var MA=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?DA:IA;Rb.useSyncExternalStore=Io.useSyncExternalStore!==void 0?Io.useSyncExternalStore:MA;kb.exports=Rb;var LA=kb.exports;const $A=(t,e)=>xs(e)?e:gA(e)&&xs(e.defaultValue)?e.defaultValue:Array.isArray(t)?t[t.length-1]:t,FA={t:$A,ready:!1},UA=()=>()=>{},Vo=(t,e={})=>{var P,N,H;const{i18n:r}=e,{i18n:n,defaultNS:s}=g.useContext(kA)||{},o=r||n||EA();o&&!o.reportNamespaces&&(o.reportNamespaces=new RA),o||Sb(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const i=g.useMemo(()=>{var A;return{..._A(),...(A=o==null?void 0:o.options)==null?void 0:A.react,...e}},[o,e]),{useSuspense:a,keyPrefix:l}=i,c=s||((P=o==null?void 0:o.options)==null?void 0:P.defaultNS),u=xs(c)?[c]:c||["translation"],f=g.useMemo(()=>u,u);(H=(N=o==null?void 0:o.reportNamespaces)==null?void 0:N.addUsedNamespaces)==null||H.call(N,f);const p=g.useRef(0),h=g.useCallback(A=>{if(!o)return UA;const{bindI18n:F,bindI18nStore:O}=i,I=()=>{p.current+=1,A()};return F&&o.on(F,I),O&&o.store.on(O,I),()=>{F&&F.split(" ").forEach(M=>o.off(M,I)),O&&O.split(" ").forEach(M=>o.store.off(M,I))}},[o,i]),v=g.useRef(),m=g.useCallback(()=>{if(!o)return FA;const A=!!(o.isInitialized||o.initializedStoreOnce)&&f.every(T=>mA(T,o,i)),F=e.lng||o.language,O=p.current,I=v.current;if(I&&I.ready===A&&I.lng===F&&I.keyPrefix===l&&I.revision===O)return I;const U={t:o.getFixedT(F,i.nsMode==="fallback"?f:f[0],l),ready:A,lng:F,keyPrefix:l,revision:O};return v.current=U,U},[o,f,l,i,e.lng]),[w,x]=g.useState(0),{t:y,ready:b}=LA.useSyncExternalStore(h,m,m);g.useEffect(()=>{if(o&&!b&&!a){const A=()=>x(F=>F+1);e.lng?wv(o,e.lng,f,A):Af(o,f,A)}},[o,e.lng,f,b,a,w]);const _=o||{},S=g.useRef(null),E=g.useRef(),C=A=>{const F=Object.getOwnPropertyDescriptors(A);F.__original&&delete F.__original;const O=Object.create(Object.getPrototypeOf(A),F);if(!Object.prototype.hasOwnProperty.call(O,"__original"))try{Object.defineProperty(O,"__original",{value:A,writable:!1,enumerable:!1,
246configurable:!1})}catch{}return O},k=g.useMemo(()=>{const A=_,F=A==null?void 0:A.language;let O=A;A&&(S.current&&S.current.__original===A?E.current!==F?(O=C(A),S.current=O,E.current=F):O=S.current:(O=C(A),S.current=O,E.current=F));const I=[y,O,b];return I.t=y,I.i18n=O,I.ready=b,I},[y,_,b,_.resolvedLanguage,_.language,_.languages]);if(o&&a&&!b)throw new Promise(A=>{const F=()=>A();e.lng?wv(o,e.lng,f,F):Af(o,f,F)});return k},Zi="/assets/five-health-logo-C_WFzG8R.png",_p=va("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),ve=g.forwardRef(({className:t,variant:e,size:r,asChild:n=!1,...s},o)=>{const i=n?hR:"button";return d.jsx(i,{className:G(_p({variant:e,size:r,className:t})),ref:o,...s})});ve.displayName="Button";const BA={signIn:"Sign In",connectTo:"Connect to",community:"Community",resources:"Resources",subtitle:"Find trusted local services for food, housing, and transportation support tailored to your needs",locateResources:"Locate Resources",food:"Food",housing:"Housing",transport:"Transport",health:"Health",jobs:"Jobs"},zA={title:"What help do you need?",subtitle:"Select all that apply. You can choose multiple options.",continue:"Continue",selected:"{{count}} category selected",selected_plural:"{{count}} categories selected",noSelection:"No categories selected",selectAtLeast:"Please select at least one category",chooseHelp:"Choose what kind of help you're looking for.",food:"Food",housing:"Housing",transportation:"Transportation",health:"Health",employment:"Employment"},VA={title:"Where are you located?",subtitle:"Enter your 5-digit zip code to find resources near you.",label:"Zip Code",placeholder:"12345",radiusLabel:"Search Radius (miles)",radiusPlaceholder:"Enter miles",findResources:"Find Resources",finding:"Finding resources...",backToCategories:"Back to categories",privacyNote:"Your information is anonymous and secure. We only use your zip code to find nearby resources.",invalidZip:"Enter a valid 5-digit zip code."},WA={title:"Resources within {{radius}} miles",of:"of {{zipCode}}",found:"Found {{count}} resource across {{categories}} category",found_plural:"Found {{count}} resources across {{categories}} categories",startNewSearch:"Start new search",filterLabel:"Show only resources open after 5 PM",noOpenAfter5:"No resources are open after 5 PM.",removeFilter:"Remove filter to see all results",noResources:"No {{category}} resources found in this area.",allFiltered:'All resources have been filtered out. Try removing the "after 5 PM" filter.',clearFilter:"Clear Filter",findingResources:"Finding resources near you...",unableToFind:"Unable to find location",tryDifferentZip:"We couldn't find coordinates for this zip code. Please try a different one.",errorFetching:"Error fetching resources",tryAgain:"Please try again."},HA={callNow:"Call Now",directions:"Directions",viewDetails:"View full details",visitWebsite:"Visit website",copiedLink:"Map link copied! Paste it in your browser to open directions",copyFailed:"Failed to copy link"},KA={somethingWrong:"Something went wrong",tryAgain:"Please try again."},qA={landing:BA,categories:zA,zipCode:VA,results:WA,resourceCard:HA,common:KA},GA={signIn:"Iniciar sesión",connectTo:"Conectar a",community:"Comunidad",resources:"Recursos",subtitle:"Encuentre servicios locales de confianza para alimentos, vivienda y apoyo de transporte adaptados a sus necesidades",locateResources:"Localizar Recursos",food:"Comida",housing:"Vivienda",transport:"Transporte",health:"Salud",jobs:"Empleos"}
246,YA={title:"¿Qué ayuda necesita?",subtitle:"Seleccione todas las que apliquen. Puede elegir múltiples opciones.",continue:"Continuar",selected:"{{count}} categorÃa seleccionada",selected_plural:"{{count}} categorÃas seleccionadas",noSelection:"No hay categorÃas seleccionadas",selectAtLeast:"Por favor seleccione al menos una categorÃa",chooseHelp:"Elija qué tipo de ayuda está buscando.",food:"Comida",housing:"Vivienda",transportation:"Transporte",health:"Salud",employment:"Empleo"},QA={title:"¿Dónde está ubicado?",subtitle:"Ingrese su código postal de 5 dÃgitos para encontrar recursos cercanos.",label:"Código Postal",placeholder:"12345",radiusLabel:"Radio de búsqueda (millas)",radiusPlaceholder:"Ingrese millas",findResources:"Buscar Recursos",finding:"Buscando recursos...",backToCategories:"Volver a categorÃas",privacyNote:"Su información es anónima y segura. Solo usamos su código postal para encontrar recursos cercanos.",invalidZip:"Ingrese un código postal válido de 5 dÃgitos."},JA={title:"Recursos dentro de {{radius}} millas",of:"de {{zipCode}}",found:"Encontrado {{count}} recurso en {{categories}} categorÃa",found_plural:"Encontrados {{count}} recursos en {{categories}} categorÃas",startNewSearch:"Iniciar nueva búsqueda",filterLabel:"Mostrar solo recursos abiertos después de las 5 PM",noOpenAfter5:"No hay recursos abiertos después de las 5 PM.",removeFilter:"Quitar filtro para ver todos los resultados",noResources:"No se encontraron recursos de {{category}} en esta área.",allFiltered:'Todos los recursos han sido filtrados. Intente quitar el filtro "después de las 5 PM".',clearFilter:"Quitar Filtro",findingResources:"Buscando recursos cerca de usted...",unableToFind:"No se puede encontrar la ubicación",tryDifferentZip:"No pudimos encontrar coordenadas para este código postal. Por favor intente con otro.",errorFetching:"Error al obtener recursos",tryAgain:"Por favor intente de nuevo."},XA={callNow:"Llamar Ahora",directions:"Direcciones",viewDetails:"Ver detalles completos",visitWebsite:"Visitar sitio web",copiedLink:"¡Enlace del mapa copiado! Péguelo en su navegador para abrir las direcciones",copyFailed:"Error al copiar enlace"},ZA={somethingWrong:"Algo salió mal",tryAgain:"Por favor intente de nuevo."},e2={landing:GA,categories:YA,zipCode:QA,results:JA,resourceCard:XA,common:ZA},t2={signIn:"Antre",connectTo:"Konekte ak",community:"Kominote",resources:"Resous",subtitle:"Jwenn sèvis lokal ou ka fè konfyans pou manje, lojman, ak sipò transpò ki adapte ak bezwen ou yo",locateResources:"Jwenn Resous",food:"Manje",housing:"Lojman",transport:"Transpò",health:"Sante",jobs:"Travay"},r2={title:"Ki èd ou bezwen?",subtitle:"Chwazi tout sa ki aplike. Ou ka chwazi plizyè opsyon.",continue:"Kontinye",selected:"{{count}} kategori chwazi",selected_plural:"{{count}} kategori chwazi",noSelection:"Pa gen kategori chwazi",selectAtLeast:"Tanpri chwazi omwen yon kategori",chooseHelp:"Chwazi ki kalite èd w ap chèche.",food:"Manje",housing:"Lojman",transportation:"Transpò",health:"Sante",employment:"Travay"},n2={title:"Ki kote ou ye?",subtitle:"Antre kòd postal 5 chif ou a pou jwenn resous tou pre ou.",label:"Kòd Postal",placeholder:"12345",radiusLabel:"Rayon rechèch (mil)",radiusPlaceholder:"Antre mil",findResources:"Jwenn Resous",finding:"N ap chèche resous...",backToCategories:"Retounen nan kategori yo",privacyNote:"Enfòmasyon ou yo anonim epi an sekirite. Nou sèlman itilize kòd postal ou pou jwenn resous tou pre.",invalidZip:"Antre yon kòd postal 5 chif ki valid."},s2={title:"Resous nan {{radius}} mil",of:"de {{zipCode}}",found:"Jwenn {{count}} resous nan {{categories}} kategori",found_plural:"Jwenn {{count}} resous nan {{categories}} kategori",startNewSearch:"Kòmanse nouvo rechèch",filterLabel:"Montre sèlman resous ki ouvri apre 5 PM",noOpenAfter5:"Pa gen resous ki ouvri apre 5 PM.",removeFilter:"Retire filt la pou wè tout rezilta yo",noResources:"Pa jwenn resous {{category}} nan zòn sa a.",allFiltered:'Tout resous yo filtre. Eseye retire filt "apre 5 PM" lan.',clearFilter:"Efase Filt",findingResources:"N ap chèche resous tou pre ou...",unableToFind:"Pa kapab jwenn kote a",tryDifferentZip:"Nou pa t kapab jwenn kowòdone pou kòd postal sa a. Tanpri eseye yon lòt.",errorFetching:"Erè pandan n ap chèche resous",tryAgain:"Tanpri eseye ankò."},o2={callNow:"Rele Kounye a",directions:"Direksyon",viewDetails:"Wè tout detay yo",visitWebsite:"Vizite sit entènèt",copiedLink:"Lyen kat la kopye! Kole li nan navigatè ou pou ouvr
246i direksyon yo",copyFailed:"Echèk kopye lyen"},i2={somethingWrong:"Yon bagay pa t mache",tryAgain:"Tanpri eseye ankò."},a2={landing:t2,categories:r2,zipCode:n2,results:s2,resourceCard:o2,common:i2},td=[{code:"en",name:"English",flag:"ðºð¸"},{code:"es",name:"Español",flag:"ðªð¸"},{code:"ht",name:"Kreyòl Ayisyen",flag:"ðð¹"}],l2=()=>typeof window<"u"&&localStorage.getItem("fivehealth-language")||"en";Qe.use(CA).init({resources:{en:{translation:qA},es:{translation:e2},ht:{translation:a2}},lng:l2(),fallbackLng:"en",interpolation:{escapeValue:!1}});Qe.on("languageChanged",t=>{typeof window<"u"&&localStorage.setItem("fivehealth-language",t)});var c2=g.createContext(void 0);function Zc(t){const e=g.useContext(c2);return t||e||"ltr"}var rd=0;function Pb(){g.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??xv()),document.body.insertAdjacentElement("beforeend",t[1]??xv()),rd++,()=>{rd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),rd--}},[])}function xv(){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 nd="focusScope.autoFocusOnMount",sd="focusScope.autoFocusOnUnmount",bv={bubbles:!1,cancelable:!0},u2="FocusScope",Sp=g.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=t,[a,l]=g.useState(null),c=Et(s),u=Et(o),f=g.useRef(null),p=ce(e,m=>l(m)),h=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(n){let m=function(b){if(h.paused||!a)return;const _=b.target;a.contains(_)?f.current=_:nn(f.current,{select:!0})},w=function(b){if(h.paused||!a)return;const _=b.relatedTarget;_!==null&&(a.contains(_)||nn(f.current,{select:!0}))},x=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&nn(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",w);const y=new MutationObserver(x);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",w),y.disconnect()}}},[n,a,h.paused]),g.useEffect(()=>{if(a){Sv.add(h);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(nd,bv);a.addEventListener(nd,c),a.dispatchEvent(x),x.defaultPrevented||(d2(g2(Tb(a)),{select:!0}),document.activeElement===m&&nn(a))}return()=>{a.removeEventListener(nd,c),setTimeout(()=>{const x=new CustomEvent(sd,bv);a.addEventListener(sd,u),a.dispatchEvent(x),x.defaultPrevented||nn(m??document.body,{select:!0}),a.removeEventListener(sd,u),Sv.remove(h)},0)}}},[a,c,u,h]);const v=g.useCallback(m=>{if(!r&&!n||h.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(w&&x){const y=m.currentTarget,[b,_]=f2(y);b&&_?!m.shiftKey&&x===_?(m.preventDefault(),r&&nn(b,{select:!0})):m.shiftKey&&x===b&&(m.preventDefault(),r&&nn(_,{select:!0})):x===y&&m.preventDefault()}},[r,n,h.paused]);return d.jsx(te.div,{tabIndex:-1,...i,ref:p,onKeyDown:v})});Sp.displayName=u2;function d2(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(nn(n,{select:e}),document.activeElement!==r)return}function f2(t){const e=Tb(t),r=_v(e,t),n=_v(e.reverse(),t);return[r,n]}function Tb(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 _v(t,e){for(const r of t)if(!h2(r,{upTo:e}))return r}function h2(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 p2(t){return t instanceof HTMLInputElement&&"select"in t}function nn(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&p2(t)&&e&&t.select()}}var Sv=m2();function m2(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=Ev(t,e),t.unshift(e)},remove(e){var r;t=Ev(t,e),(r=t[0])==null||r.resume()}}}function Ev(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function g2(t){return t.filter(e=>e.tagName!=="A")}var od="rovingFocusGroup.onEntryFocus",v2={bubbles:!1,cancelable:!0},ba="RovingFocusGroup",[Df,jb,y2]=ep(ba),[w2,Wo]=ft(ba,[y2]),[x2,b2]=w2(ba),Nb=g.forwardRef((t,e)=>d.jsx(Df.Provider,{scope:t.__scopeRovingFocusGroup,children:d.jsx(Df.Slot,{scope:t.__scopeRovingFocusGroup,children:d.jsx(_2,{...t,ref:e})})}));Nb.displayName=ba;var _2=g.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=t,p=g.useRef(null),h=ce(e,p),v=Zc(o),[m,w]=Ln({prop:i,defaultProp:a??null,onChange:l,caller:ba}),[x,y]=g.useState(!1),b=Et(c),_=jb(r),S=g.useRef(!1),[E,C]=g.useState(0);return g.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(od,b),()=>k.removeEventListener(od,b)},[b]),d.jsx(x2,{scope:r,orientation:n,dir:v,loop:s,currentTabStopId:m,onItemFocus:g.useCallback(k=>w(k),[w]),onItemShiftTab:g.useCallback(()=>y(!0),[]),onFocusableItemAdd:g.useCallback(()=>C(k=>k+1),[]),onFocusableItemRemove:g.useCallback(()=>C(k=>k-1),[]),children:d.jsx(te.div,{tabIndex:x||E===0?-1:0,"data-orientation":n,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:W(t.onMouseDown,()=>{S.current=!0}),onFocus:W(t.onFocus,k=>{const P=!S.current;if(k.target===k.currentTarget&&P&&!x){const N=new CustomEvent(od,v2);if(k.currentTarget.dispatchEvent(N),!N.defaultPrevented){const H=_().filter(M=>M.focusable),A=H.find(M=>M.active),F=H.find(M=>
vendor: 3,557 bytes, line 246
246M.id===m),I=[A,F,...H].filter(Boolean).map(M=>M.ref.current);Ib(I,u)}}S.current=!1}),onBlur:W(t.onBlur,()=>y(!1))})})}),Ob="RovingFocusGroupItem",Ab=g.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:i,...a}=t,l=ds(),c=o||l,u=b2(Ob,r),f=u.currentTabStopId===c,p=jb(r),{onFocusableItemAdd:h,onFocusableItemRemove:v,currentTabStopId:m}=u;return g.useEffect(()=>{if(n)return h(),()=>v()},[n,h,v]),d.jsx(Df.ItemSlot,{scope:r,id:c,focusable:n,active:s,children:d.jsx(te.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:W(t.onMouseDown,w=>{n?u.onItemFocus(c):w.preventDefault()}),onFocus:W(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:W(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){u.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const x=C2(w,u.orientation,u.dir);if(x!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let b=p().filter(_=>_.focusable).map(_=>_.ref.current);if(x==="last")b.reverse();else if(x==="prev"||x==="next"){x==="prev"&&b.reverse();const _=b.indexOf(w.currentTarget);b=u.loop?k2(b,_+1):b.slice(_+1)}setTimeout(()=>Ib(b))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:m!=null}):i})})});Ab.displayName=Ob;var S2={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function E2(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function C2(t,e,r){const n=E2(t.key,r);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return S2[n]}function Ib(t,e=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:e}),document.activeElement!==r))return}function k2(t,e){return t.map((r,n)=>t[(e+n)%t.length])}var Ep=Nb,Cp=Ab,R2=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Ds=new WeakMap,Xa=new WeakMap,Za={},id=0,Db=function(t){return t&&(t.host||Db(t.parentNode))},P2=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Db(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})},T2=function(t,e,r,n){var s=P2(e,Array.isArray(t)?t:[t]);Za[r]||(Za[r]=new WeakMap);var o=Za[r],i=[],a=new Set,l=new Set(s),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};s.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))u(p);else try{var h=p.getAttribute(n),v=h!==null&&h!=="false",m=(Ds.get(p)||0)+1,w=(o.get(p)||0)+1;Ds.set(p,m),o.set(p,w),i.push(p),m===1&&v&&Xa.set(p,!0),w===1&&p.setAttribute(r,"true"),v||p.setAttribute(n,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return u(e),a.clear(),id++,function(){i.forEach(function(f){var p=Ds.get(f)-1,h=o.get(f)-1;Ds.set(f,p),o.set(f,h),p||(Xa.has(f)||f.removeAttribute(n),Xa.delete(f)),h||f.removeAttribute(r)}),id--,id||(Ds=new WeakMap,Ds=new WeakMap,Xa=new WeakMap,Za={})}},Mb=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=R2(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),T2(n,s,r,"aria-hidden")):function(){return null}},Mf=function(t,e){return Mf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(r[s]=n[s])},Mf(t,e)};
vendor: 5,289 bytes, line 246
246function Lb(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Mf(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var At=function(){return At=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},At.apply(this,arguments)};function Un(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 $b(t,e,r,n){var s=arguments.length,o=s<3?e:n===null?n=Object.getOwnPropertyDescriptor(e,r):n,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s<3?i(o):s>3?i(e,r,o):i(e,r))||o);return s>3&&o&&Object.defineProperty(e,r,o),o}function Fb(t,e){return function(r,n){e(r,n,t)}}function Ub(t,e,r,n,s,o){function i(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var a=n.kind,l=a==="getter"?"get":a==="setter"?"set":"value",c=!e&&t?n.static?t:t.prototype:null,u=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),f,p=!1,h=r.length-1;h>=0;h--){var v={};for(var m in n)v[m]=m==="access"?{}:n[m];for(var m in n.access)v.access[m]=n.access[m];v.addInitializer=function(x){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(x||null))};var w=(0,r[h])(a==="accessor"?{get:u.get,set:u.set}:u[l],v);if(a==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(f=i(w.get))&&(u.get=f),(f=i(w.set))&&(u.set=f),(f=i(w.init))&&s.unshift(f)}else(f=i(w))&&(a==="field"?s.unshift(f):u[l]=f)}c&&Object.defineProperty(c,n.name,u),p=!0}function Bb(t,e,r){for(var n=arguments.length>2,s=0;s<e.length;s++)r=n?e[s].call(t,r):e[s].call(t);return n?r:void 0}function zb(t){return typeof t=="symbol"?t:"".concat(t)}function Vb(t,e,r){return typeof e=="symbol"&&(e=e.description?"[".concat(e.description,"]"):""),Object.defineProperty(t,"name",{configurable:!0,value:r?"".concat(r," ",e):e})}function Wb(t,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(t,e)}function K(t,e,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(u){try{c(n.next(u))}catch(f){i(f)}}function l(u){try{c(n.throw(u))}catch(f){i(f)}}function c(u){u.done?o(u.value):s(u.value).then(a,l)}c((n=n.apply(t,e||[])).next())})}function Hb(t,e){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,i=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(r=0)),r;)try{if(n=1,s&&(o=c[0]&2?s.return:c[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,c[1])).done)return o;switch(s=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,s=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=e.call(t,r)}catch(u){c=[6,u],s=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}var eu=Object.create?function(t,e,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(e,r);(!s||("get"in s?!e.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,s)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]};function Kb(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&eu(e,t,r)}function fc(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function kp(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n=r.call(t),s,o=[],i;try{for(;(e===void 0||e-- >0)&&!(s=n.next()).done;)o.push(s.value)}catch(a){i={error:a}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return o}function qb(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(kp(arguments[e]));return t}function Gb(){for(var t=0,e=0,r=arguments.length;e<r;e++)t+=arguments[e].length;for(var n=Array(t),s=0,e=0;e<r;e++)for(var o=arguments[e],i=0,a=o.length;i<a;i++,s++)n[s]=o[i];return n}function Rp(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,o;n<s;
vendor: 4,195 bytes, line 246
246n++)(o||!(n in e))&&(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}function Do(t){return this instanceof Do?(this.v=t,this):new Do(t)}function Yb(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),s,o=[];return s=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",i),s[Symbol.asyncIterator]=function(){return this},s;function i(h){return function(v){return Promise.resolve(v).then(h,f)}}function a(h,v){n[h]&&(s[h]=function(m){return new Promise(function(w,x){o.push([h,m,w,x])>1||l(h,m)})},v&&(s[h]=v(s[h])))}function l(h,v){try{c(n[h](v))}catch(m){p(o[0][3],m)}}function c(h){h.value instanceof Do?Promise.resolve(h.value.v).then(u,f):p(o[0][2],h)}function u(h){l("next",h)}function f(h){l("throw",h)}function p(h,v){h(v),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Qb(t){var e,r;return e={},n("next"),n("throw",function(s){throw s}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(s,o){e[s]=t[s]?function(i){return(r=!r)?{value:Do(t[s](i)),done:!1}:o?o(i):i}:o}}function Jb(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof fc=="function"?fc(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=t[o]&&function(i){return new Promise(function(a,l){i=t[o](i),s(a,l,i.done,i.value)})}}function s(o,i,a,l){Promise.resolve(l).then(function(c){o({value:c,done:a})},i)}}function Xb(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var j2=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e},Lf=function(t){return Lf=Object.getOwnPropertyNames||function(e){var r=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[r.length]=n);return r},Lf(t)};function Zb(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r=Lf(t),n=0;n<r.length;n++)r[n]!=="default"&&eu(e,t,r[n]);return j2(e,t),e}function e_(t){return t&&t.__esModule?t:{default:t}}function t_(t,e,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function r_(t,e,r,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(t,r):s?s.value=r:e.set(t,r),r}function n_(t,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof t=="function"?e===t:t.has(e)}function s_(t,e,r){if(e!=null){if(typeof e!="object"&&typeof e!="function")throw new TypeError("Object expected.");var n,s;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=e[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=e[Symbol.dispose],r&&(s=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");s&&(n=function(){try{s.call(this)}catch(o){return Promise.reject(o)}}),t.stack.push({value:e,dispose:n,async:r})}else r&&t.stack.push({async:!0});return e}var N2=typeof SuppressedError=="function"?SuppressedError:function(t,e,r){var n=new Error(r);return n.name="SuppressedError",n.error=t,n.suppressed=e,n};function o_(t){function e(o){t.error=t.hasError?new N2(o,t.error,"An error was suppressed during disposal."):o,t.hasError=!0}var r,n=0;function s(){for(;r=t.stack.pop();)try{if(!r.async&&n===1)return n=0,t.stack.push(r),Promise.resolve().then(s);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(s,function(i){return e(i),s()})}else n|=1}catch(i){e(i)}
246if(n===1)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}return s()}function i_(t,e){return typeof t=="string"&&/^\.\.?\//.test(t)?t.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,s,o,i){return n?e?".jsx":".js":s&&(!o||!i)?r:s+o+"."+i.toLowerCase()+"js"}):t}const O2={__extends:Lb,__assign:At,__rest:Un,__decorate:$b,__param:Fb,__esDecorate:Ub,__runInitializers:Bb,__propKey:zb,__setFunctionName:Vb,__metadata:Wb,__awaiter:K,__generator:Hb,__createBinding:eu,__exportStar:Kb,__values:fc,__read:kp,__spread:qb,__spreadArrays:Gb,__spreadArray:Rp,__await:Do,__asyncGenerator:Yb,__asyncDelegator:Qb,__asyncValues:Jb,__makeTemplateObject:Xb,__importStar:Zb,__importDefault:e_,__classPrivateFieldGet:t_,__classPrivateFieldSet:r_,__classPrivateFieldIn:n_,__addDisposableResource:s_,__disposeResources:o_,__rewriteRelativeImportExtension:i_},A2=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:s_,get __assign(){return At},__asyncDelegator:Qb,__asyncGenerator:Yb,__asyncValues:Jb,__await:Do,__awaiter:K,__classPrivateFieldGet:t_,__classPrivateFieldIn:n_,__classPrivateFieldSet:r_,__createBinding:eu,__decorate:$b,__disposeResources:o_,__esDecorate:Ub,__exportStar:Kb,__extends:Lb,__generator:Hb,__importDefault:e_,__importStar:Zb,__makeTemplateOb
vendor: 5,103 bytes, lines 246-261
246ject:Xb,__metadata:Wb,__param:Fb,__propKey:zb,__read:kp,__rest:Un,__rewriteRelativeImportExtension:i_,__runInitializers:Bb,__setFunctionName:Vb,__spread:qb,__spreadArray:Rp,__spreadArrays:Gb,__values:fc,default:O2},Symbol.toStringTag,{value:"Module"}));var kl="right-scroll-bar-position",Rl="width-before-scroll-bar",I2="with-scroll-bars-hidden",D2="--removed-body-scroll-bar-size";function ad(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function M2(t,e){var r=g.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 L2=typeof window<"u"?g.useLayoutEffect:g.useEffect,Cv=new WeakMap;function $2(t,e){var r=M2(null,function(n){return t.forEach(function(s){return ad(s,n)})});return L2(function(){var n=Cv.get(r);if(n){var s=new Set(n),o=new Set(t),i=r.current;s.forEach(function(a){o.has(a)||ad(a,null)}),o.forEach(function(a){s.has(a)||ad(a,i)})}Cv.set(r,t)},[t]),r}function F2(t){return t}function U2(t,e){e===void 0&&(e=F2);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:t},useMedium:function(o){var i=e(o,n);return r.push(i),function(){r=r.filter(function(a){return a!==i})}},assignSyncMedium:function(o){for(n=!0;r.length;){var i=r;r=[],i.forEach(o)}r={push:function(a){return o(a)},filter:function(){return r}}},assignMedium:function(o){n=!0;var i=[];if(r.length){var a=r;r=[],a.forEach(o),i=r}var l=function(){var u=i;i=[],u.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),r={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),r}}}};return s}function B2(t){t===void 0&&(t={});var e=U2(null);return e.options=At({async:!0,ssr:!1},t),e}var a_=function(t){var e=t.sideCar,r=Un(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 g.createElement(n,At({},r))};a_.isSideCarExport=!0;function z2(t,e){return t.useMedium(e),a_}var l_=B2(),ld=function(){},tu=g.forwardRef(function(t,e){var r=g.useRef(null),n=g.useState({onScrollCapture:ld,onWheelCapture:ld,onTouchMoveCapture:ld}),s=n[0],o=n[1],i=t.forwardProps,a=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,f=t.shards,p=t.sideCar,h=t.noRelative,v=t.noIsolation,m=t.inert,w=t.allowPinchZoom,x=t.as,y=x===void 0?"div":x,b=t.gapMode,_=Un(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,E=$2([r,e]),C=At(At({},_),s);return g.createElement(g.Fragment,null,u&&g.createElement(S,{sideCar:l_,removeScrollBar:c,shards:f,noRelative:h,noIsolation:v,inert:m,setCallbacks:o,allowPinchZoom:!!w,lockRef:r,gapMode:b}),i?g.cloneElement(g.Children.only(a),At(At({},C),{ref:E})):g.createElement(y,At({},C,{className:l,ref:E}),a))});tu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tu.classNames={fullWidth:Rl,zeroRight:kl};var V2=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function W2(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=V2();return e&&t.setAttribute("nonce",e),t}function H2(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function K2(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var q2=function(){var t=0,e=null;return{add:function(r){t==0&&(e=W2())&&(H2(e,r),K2(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},G2=function(){var t=q2();return function(e,r){g.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},c_=function(){var t=G2(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},Y2={left:0,top:0,right:0,gap:0},cd=function(t){return parseInt(t||"",10)||0},Q2=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[cd(r),cd(n),cd(s)]},J2=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Y2;var e=Q2(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])}},X2=c_(),ho="data-scroll-locked",Z2=function(t,e,r,n){var s=t.left,o=t.top,i=t.right,a=t.gap;return r===void 0&&(r="margin"),` 247 .`.concat(I2,` { 248 overflow: hidden `).concat(n,`; 249 padding-right: `).concat(a,"px ").concat(n,`; 250 } 251 body[`).concat(ho,`] { 252 overflow: hidden `).concat(n,`; 253 overscroll-behavior: contain; 254 `).concat([e&&"position: relative ".concat(n,";"),r==="margin"&&` 255 padding-left: `.concat(s,`px; 256 padding-top: `).concat(o,`px; 257 padding-right: `).concat(i,`px; 258 margin-left:0; 259 margin-top:0; 260 margin-right: `).concat(a,"px ").concat(n,`; 261 `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";
261")].filter(Boolean).join(""),` 262 } 263 264 .`).concat(kl,` { 265 right: `).concat(a,"px ").concat(n,`; 266 } 267 268 .`).concat(Rl,` { 269 margin-right: `).concat(a,"px ").concat(n,`; 270 } 271 272 .`).concat(kl," .").concat(kl,` { 273 right: 0 `).concat(n,`; 274 } 275 276 .`).concat(Rl," .").concat(Rl,` { 277 margin-right: 0 `).concat(n,`; 278 } 279 280 body[`).concat(ho,`] { 281 `).concat(D2,": ").concat(a,`px; 282 } 283`)},kv=function(){var t=parseInt(document.body.getAttribute(ho)||"0",10);return isFinite(t)?t:0},eI=function(){g.useEffect(function(){return document.body.setAttribute(ho,(kv()+1).toString()),function(){var t=kv()-1;t<=0?document.body.removeAttribute(ho):document.body.setAttribute(ho,t.toString())}},[])},tI=function(t){var e=t.noRelative,r=t.noImportant,n=t.gapMode,s=n===void 0?"margin":n;eI();var o=g.useMemo(function(){return J2(s)},[s]);return g.createElement(X2,{styles:Z2(o,!e,s,r?"":"!important")})},$f=!1;if(typeof window<"u")try{var el=Object.defineProperty({},"passive",{get:function(){return $f=!0,!0}});window.addEventListener("test",el,el),window.removeEventListener("test",el,el)}catch{$f=!1}var Ms=$f?{passive:!1}:!1,rI=function(t){return t.tagName==="TEXTAREA"},u_=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!rI(t)&&r[e]==="visible")},nI=function(t){return u_(t,"overflowY")},sI=function(t){return u_(t,"overflowX")},Rv=function(t,e){var r=e.ownerDocument,n=e;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=d_(t,n);if(s){var o=f_(t,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},oI=function(t){var e=t.scrollTop,r=t.scrollHeight,n=t.clientHeight;return[e,r,n]},iI=function(t){var e=t.scrollLeft,r=t.scrollWidth,n=t.clientWidth;return[e,r,n]},d_=function(t,e){return t==="v"?nI(e):sI(e)},f_=function(t,e){return t==="v"?oI(e):iI(e)},aI=function(t,e){return t==="h"&&e==="rtl"?-1:1},lI=function(t,e,r,n,s){var o=aI(t,window.getComputedStyle(e).direction),i=o*n,a=r.target,l=e.contains(a),c=!1,u=i>0,f=0,p=0;do{if(!a)break;var h=f_(t,a),v=h[0],m=h[1],w=h[2],x=m-w-o*v;(v||x)&&d_(t,a)&&(f+=x,p+=v);var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(u&&(Math.abs(f)<1||!s)||!u&&(Math.abs(p)<1||!s))&&(c=!0),c},tl=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Pv=function(t){return[t.deltaX,t.deltaY]},Tv=function(t){return t&&"current"in t?t.current:t},cI=function(t,e){return t[0]===e[0]&&t[1]===e[1]},uI=function(t){return` 284 .block-interactivity-`.concat(t,` {pointer-events: none;} 285 .allow-interactivity-`).concat(t,` {pointer-events: all;} 286`)},dI=0,Ls=[];function fI(t){var e=g.useRef([]),r=g.useRef([0,0]),n=g.useRef(),s=g.useState(dI++)[0],o=g.useState(c_)[0],i=g.useRef(t);g.useEffect(function(){i.current=t},[t]),g.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var m=Rp([t.lockRef.current],(t.shards||[]).map(Tv),!0).filter(Boolean);return m.forEach(function(w){return w.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),m.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var a=g.useCallback(function(m,w){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var x=tl(m),y=r.current,b="deltaX"in m?m.deltaX:y[0]-x[0],_="deltaY"in m?m.deltaY:y[1]-x[1],S,E=m.target,C=Math.abs(b)>Math.abs(_)?"h":"v";if("touches"in m&&C==="h"&&E.type==="range")return!1;var k=Rv(C,E);if(!k)return!0;if(k?S=C:(S=C==="v"?"h":"v",k=Rv(C,E)),!k)return!1;if(!n.current&&"changedTouches"in m&&(b||_)&&(n.current=S),!S)return!0;var P=n.current||S;return lI(P,w,m,P==="h"?b:_,!0)},[]),l=g.useCallback(function(m){var w=m;if(!(!Ls.length||Ls[Ls.length-1]!==o)){var x="deltaY"in w?Pv(w):tl(w),y=e.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&cI(S.delta,x)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}
vendor: 19,414 bytes, line 286
286if(!y){var b=(i.current.shards||[]).map(Tv).filter(Boolean).filter(function(S){return S.contains(w.target)}),_=b.length>0?a(w,b[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),c=g.useCallback(function(m,w,x,y){var b={name:m,delta:w,target:x,should:y,shadowParent:hI(x)};e.current.push(b),setTimeout(function(){e.current=e.current.filter(function(_){return _!==b})},1)},[]),u=g.useCallback(function(m){r.current=tl(m),n.current=void 0},[]),f=g.useCallback(function(m){c(m.type,Pv(m),m.target,a(m,t.lockRef.current))},[]),p=g.useCallback(function(m){c(m.type,tl(m),m.target,a(m,t.lockRef.current))},[]);g.useEffect(function(){return Ls.push(o),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Ms),document.addEventListener("touchmove",l,Ms),document.addEventListener("touchstart",u,Ms),function(){Ls=Ls.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,Ms),document.removeEventListener("touchmove",l,Ms),document.removeEventListener("touchstart",u,Ms)}},[]);var h=t.removeScrollBar,v=t.inert;return g.createElement(g.Fragment,null,v?g.createElement(o,{styles:uI(s)}):null,h?g.createElement(tI,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function hI(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const pI=z2(l_,fI);var Pp=g.forwardRef(function(t,e){return g.createElement(tu,At({},t,{ref:e,sideCar:pI}))});Pp.classNames=tu.classNames;var Ff=["Enter"," "],mI=["ArrowDown","PageUp","Home"],h_=["ArrowUp","PageDown","End"],gI=[...mI,...h_],vI={ltr:[...Ff,"ArrowRight"],rtl:[...Ff,"ArrowLeft"]},yI={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_a="Menu",[ea,wI,xI]=ep(_a),[ks,p_]=ft(_a,[xI,Kc,Wo]),ru=Kc(),m_=Wo(),[bI,Rs]=ks(_a),[_I,Sa]=ks(_a),g_=t=>{const{__scopeMenu:e,open:r=!1,children:n,dir:s,onOpenChange:o,modal:i=!0}=t,a=ru(e),[l,c]=g.useState(null),u=g.useRef(!1),f=Et(o),p=Zc(s);return g.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),d.jsx(rN,{...a,children:d.jsx(bI,{scope:e,open:r,onOpenChange:f,content:l,onContentChange:c,children:d.jsx(_I,{scope:e,onClose:g.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:p,modal:i,children:n})})})};g_.displayName=_a;var SI="MenuAnchor",Tp=g.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=ru(r);return d.jsx(Hx,{...s,...n,ref:e})});Tp.displayName=SI;var jp="MenuPortal",[EI,v_]=ks(jp,{forceMount:void 0}),y_=t=>{const{__scopeMenu:e,forceMount:r,children:n,container:s}=t,o=Rs(jp,e);return d.jsx(EI,{scope:e,forceMount:r,children:d.jsx(Rt,{present:r||o.open,children:d.jsx(Fc,{asChild:!0,container:s,children:n})})})};y_.displayName=jp;var Mt="MenuContent",[CI,Np]=ks(Mt),w_=g.forwardRef((t,e)=>{const r=v_(Mt,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,o=Rs(Mt,t.__scopeMenu),i=Sa(Mt,t.__scopeMenu);return d.jsx(ea.Provider,{scope:t.__scopeMenu,children:d.jsx(Rt,{present:n||o.open,children:d.jsx(ea.Slot,{scope:t.__scopeMenu,children:i.modal?d.jsx(kI,{...s,ref:e}):d.jsx(RI,{...s,ref:e})})})})}),kI=g.forwardRef((t,e)=>{const r=Rs(Mt,t.__scopeMenu),n=g.useRef(null),s=ce(e,n);return g.useEffect(()=>{const o=n.current;if(o)return Mb(o)},[]),d.jsx(Op,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:W(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),RI=g.forwardRef((t,e)=>{const r=Rs(Mt,t.__scopeMenu);return d.jsx(Op,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),PI=No("MenuContent.ScrollLock"),Op=g.forwardRef((t,e)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:s,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:h,disableOutsideScroll:v,...m}=t,w=Rs(Mt,r),x=Sa(Mt,r),y=ru(r),b=m_(r),_=wI(r),[S,E]=g.useState(null),C=g.useRef(null),k=ce(e,C,w.onContentChange),P=g.useRef(0),N=g.useRef(""),H=g.useRef(0),A=g.useRef(null),F=g.useRef("right"),O=g.useRef(0),I=v?Pp:g.Fragment,M=v?{as:PI,allowPinchZoom:!0}:void 0,U=R=>{var ne,Er;const L=N.current+R,B=_().filter(Le=>!Le.disabled),z=document.activeElement,Q=(ne=B.find(Le=>Le.ref.current===z))==null?void 0:ne.textValue,X=B.map(Le=>Le.textValue),pe=UI(X,L,Q),Re=(Er=B.find(Le=>Le.textValue===pe))==null?void 0:Er.ref.current;(function Le(ar){N.current=ar,window.clearTimeout(P.current),ar!==""&&(P.current=window.setTimeout(()=>Le(""),1e3))})(L),Re&&setTimeout(()=>Re.focus())};g.useEffect(()=>()=>window.clearTimeout(P.current),[]),Pb();const T=g.useCallback(R=>{var B,z;return F.current===((B=A.current)==null?void 0:B.side)&&zI(R,(z=A.current)==null?void 0:z.area)},[]);return d.jsx(CI,{scope:r,searchRef:N,onItemEnter:g.useCallback(R=>{T(R)&&R.preventDefault()},[T]),onItemLeave:g.useCallback(R=>{var L;T(R)||((L=C.current)==null||L.focus(),E(null))},[T]),onTriggerLeave:g.useCallback(R=>{T(R)&&R.preventDefault()},[T]),pointerGraceTimerRef:H,onPointerGraceIntentChange:g.useCallback(R=>{A.current=R},[]),children:d.jsx(I,{...M,children:d.jsx(Sp,{asChild:!0,trapped:s,onMountAutoFocus:W(o,R=>{var L;R.preventDefault(),(L=C.current)==null||L.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:d.jsx(ma,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:p,onDismiss:h,children:d.jsx(Ep,{asChild:!0,...b,dir:x.dir,orientation:"vertical",loop:n,currentTabStopId:S,onCurrentTabStopIdChange:E,onEntryFocus:W(l,R=>{x.isUsingKeyboardRef.current||R.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(Kx,{role:"menu","aria-orientation":"vertical","data-state":D_(w.open),"data-radix-menu-content":"",dir:x.dir,...y,...m,ref:k,style:{outline:"none",...m.style},onKeyDown:W(m.onKeyDown,R=>{const B=R.target.closest("[data-radix-menu-content]")===R.currentTarget,z=R.ctrlKey||R.altKey||R.metaKey,Q=R.key.length===1;B&&(R.key==="Tab"&&R.preventDefault(),!z&&Q&&U(R.key));const X=C.current;if(R.target!==X||!gI.includes(R.key))return;R.preventDefault();const Re=_().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);h_.includes(R.key)&&Re.reverse(),$I(Re)}),onBlur:W(t.onBlur,R=>{R.currentTarget.contains(R.target)||(window.clearTimeout(P.current),N.current="")}),onPointerMove:W(t.onPointerMove,ta(R=>{const L=R.target,B=O.current!==R.clientX;if(R.currentTarget.contains(L)&&B){const z=R.clientX>O.current?"right":"left";F.current=z,O.current=R.clientX}}))})})})})})})});w_.displayName=Mt;var TI="MenuGroup",Ap=g.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return d.jsx(te.div,{role:"group",...n,ref:e})});Ap.displayName=TI;var jI="MenuLabel",x_=g.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return d.jsx(te.div,{...n,ref:e})});x_.displayName=jI;var hc="MenuItem",jv="menu.itemSelect",nu=g.forwardRef((t,e)=>{const{disabled:r=!1,onSelect:n,...s}=t,o=g.useRef(null),i=Sa(hc,t.__scopeMenu),a=Np(hc,t.__scopeMenu),l=ce(e,o),c=g.useRef(!1),u=()=>{const f=o.current;if(!r&&f){const p=new CustomEvent(jv,{bubbles:!0,cancelable:!0});f.addEventListener(jv,h=>n==null?void 0:n(h),{once:!0}),tp(f,p),p.defaultPrevented?c.current=!1:i.onClose()}};return d.jsx(b_,{...s,ref:l,disabled:r,onClick:W(t.onClick,u),onPointerDown:f=>{var p;(p=t.onPointerDown)==null||p.call(t,f),c.current=!0},onPointerUp:W(t.onPointerUp,f=>{var p;c.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:W(t.onKeyDown,f=>{const p=a.searchRef.current!=="";r||p&&f.key===" "||Ff.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});nu.displayName=hc;var b_=g.forwardRef((t,e)=>{const{__scopeMenu:r,disabled:n=!1,textValue:s,...o}=t,i=Np(hc,r),a=m_(r),l=g.useRef(null),c=ce(e,l),[u,f]=g.useState(!1),[p,h]=g.useState("");return g.useEffect(()=>{const v=l.current;v&&h((v.textContent??"").trim())},[o.children]),d.jsx(ea.ItemSlot,{scope:r,disabled:n,textValue:s??p,children:d.jsx(Cp,{asChild:!0,...a,focusable:!n,children:d.jsx(te.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...o,ref:c,onPointerMove:W(t.onPointerMove,ta(v=>{n?i.onItemLeave(v):(i.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(t.onPointerLeave,ta(v=>i.onItemLeave(v))),onFocus:W(t.onFocus,()=>f(!0)),onBlur:W(t.onBlur,()=>f(!1))})})})}),NI="MenuCheckboxItem",__=g.forwardRef((t,e)=>{const{checked:r=!1,onCheckedChange:n,...s}=t;return d.jsx(R_,{scope:t.__scopeMenu,checked:r,children:d.jsx(nu,{role:"menuitemcheckbox","aria-checked":pc(r)?"mixed":r,...s,ref:e,"data-state":Dp(r),onSelect:W(s.onSelect,()=>n==null?void 0:n(pc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});__.displayName=NI;var S_="MenuRadioGroup",[OI,AI]=ks(S_,{value:void 0,onValueChange:()=>{}}),E_=g.forwardRef((t,e)=>{const{value:r,onValueChange:n,...s}=t,o=Et(n);return d.jsx(OI,{scope:t.__scopeMenu,value:r,onValueChange:o,children:d.jsx(Ap,{...s,ref:e})})});E_.displayName=S_;var C_="MenuRadioItem",k_=g.forwardRef((t,e)=>{const{value:r,...n}=t,s=AI(C_,t.__scopeMenu),o=r===s.value;return d.jsx(R_,{scope:t.__scopeMenu,checked:o,children:d.jsx(nu,{role:"menuitemradio","aria-checked":o,...n,ref:e,"data-state":Dp(o),onSelect:W(n.onSelect,()=>{var i;return(i=s.onValueChange)==null?void 0:i.call(s,r)},{checkForDefaultPrevented:!1})})})});k_.displayName=C_;var Ip="MenuItemIndicator",[R_,II]=ks(Ip,{checked:!1}),P_=g.forwardRef((t,e)=>{const{__scopeMenu:r,forceMount:n,...s}=t,o=II(Ip,r);return d.jsx(Rt,{present:n||pc(o.checked)||o.checked===!0,children:d.jsx(te.span,{...s,ref:e,"data-state":Dp(o.checked)})})});P_.displayName=Ip;var DI="MenuSeparator",T_=g.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t;return d.jsx(te.div,{role:"separator","aria-orientation":"horizontal",...n,ref:e})});T_.displayName=DI;var MI="MenuArrow",j_=g.forwardRef((t,e)=>{const{__scopeMenu:r,...n}=t,s=ru(r);return d.jsx(qx,{...s,...n,ref:e})});j_.displayName=MI;var LI="MenuSub",[O4,N_]=ks(LI),fi="MenuSubTrigger",O_=g.forwardRef((t,e)=>{const r=Rs(fi,t.__scopeMenu),n=Sa(fi,t.__scopeMenu),s=N_(fi,t.__scopeMenu),o=Np(fi,t.__scopeMenu),i=g.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=o,c={__scopeMenu:t.__scopeMenu},u=g.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return g.useEffect(()=>u,[u]),g.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),d.jsx(Tp,{asChild:!0,...c,children:d.jsx(b_,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":s.contentId,"data-state":D_(r.open),...t,ref:$c(e,s.onTriggerChange),onClick:f=>{var p;(p=t.onClick)==null||p.call(t,f),!(t.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:W(t.onPointerMove,ta(f=>{o.onItemEnter(f),!f.defaultPrevented&&!t.disabled&&!r.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:W(t.onPointerLeave,ta(f=>{var h,v;u();const p=(h=r.content)==null?void 0:h.getBoundingClientRect();if(p){const m=(v=r.content)==null?void 0:v.dataset.side,w=m==="right",x=w?-5:5,y=p[w?"left":"right"],b=p[w?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:y,y:p.top},{x:b,y:p.top},{x:b,y:p.bottom},{x:y,y:p.bottom}],side:m}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:W(t.onKeyDown,f=>{var h;const p=o.searchRef.current!=="";t.disabled||p&&f.key===" "||vI[n.dir].includes(f.key)&&(r.onOpenChange(!0),(h=r.content)==null||h.focus(),f.preventDefault())})})})});O_.displayName=fi;var A_="MenuSubContent",I_=g.forwardRef((t,e)=>{const r=v_(Mt,t.__scopeMenu),{forceMount:n=r.forceMount,...s}=t,o=Rs(Mt,t.__scopeMenu),i=Sa(Mt,t.__scopeMenu),a=N_(A_,t.__scopeMenu),l=g.useRef(null),c=ce(e,l);return d.jsx(ea.Provider,{scope:t.__scopeMenu,children:d.jsx(Rt,{present:n||o.open,children:d.jsx(ea.Slot,{scope:t.__scopeMenu,children:d.jsx(Op,{id:a.contentId,"aria-labelledby":a.triggerId,...s,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;i.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:W(t.onFocusOutside,u=>{u.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:W(t.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:W(t.onKeyDown,u=>{var h;const f=u.currentTarget.contains(u.target),p=yI[i.dir].includes(u.key);f&&p&&(o.onOpenChange(!1),(h=a.trigger)==null||h.focus(),u.preventDefault())})})})})})});I_.displayName=A_;function D_(t){return t?"open":"closed"}function pc(t){return t==="indeterminate"}function Dp(t){return pc(t)?"indeterminate":t?"checked":"unchecked"}function $I(t){const e=document.activeElement;for(const r of t)if(r===e||(r.focus(),document.activeElement!==e))return}function FI(t,e){return t.map((r,n)=>t[(e+n)%t.length])}function UI(t,e,r){const s=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,o=r?t.indexOf(r):-1;let i=FI(t,Math.max(o,0));s.length===1&&(i=i.filter(c=>c!==r));const l=i.find(c=>c.toLowerCase().startsWith(s.toLowerCase()));return l!==r?l:void 0}function BI(t,e){const{x:r,y:n}=t;let s=!1;for(let o=0,i=e.length-1;o<e.length;i=o++){const a=e[o],l=e[i],c=a.x,u=a.y,f=l.x,p=l.y;u>n!=p>n&&r<(f-c)*(n-u)/(p-u)+c&&(s=!s)}return s}function zI(t,e){if(!e)return!1;const r={x:t.clientX,y:t.clientY};return BI(r,e)}function ta(t){return e=>e.pointerType==="mouse"?t(e):void 0}var VI=g_,WI=Tp,HI=y_,KI=w_,qI=Ap,GI=x_,YI=nu,QI=__,JI=E_,XI=k_,ZI=P_,eD=T_,tD=j_,rD=O_,nD=I_,su="DropdownMenu",[sD,A4]=ft(su,[p_]),st=p_(),[oD,M_]=sD(su),L_=t=>{const{__scopeDropdownMenu:e,children:r,dir:n,open:s,defaultOpen:o,onOpenChange:i,modal:a=!0}=t,l=st(e),c=g.useRef(null),[u,f]=Ln({prop:s,defaultProp:o??!1,onChange:i,caller:su});return d.jsx(oD,{scope:e,triggerId:ds(),triggerRef:c,contentId:ds(),open:u,onOpenChange:f,onOpenToggle:g.useCallback(()=>f(p=>!p),[f]),modal:a,children:d.jsx(VI,{...l,open:u,onOpenChange:f,dir:n,modal:a,children:r})})};L_.displayName=su;var $_="DropdownMenuTrigger",F_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...s}=t,o=M_($_,r),i=st(r);return d.jsx(WI,{asChild:!0,...i,children:d.jsx(te.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...s,ref:$c(e,o.triggerRef),onPointerDown:W(t.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:W(t.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});F_.displayName=$_;var iD="DropdownMenuPortal",U_=t=>{const{__scopeDropdownMenu:e,...r}=t,n=st(e);return d.jsx(HI,{...n,...r})};U_.displayName=iD;var B_="DropdownMenuContent",z_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=M_(B_,r),o=st(r),i=g.useRef(!1);return d.jsx(KI,{id:s.contentId,"aria-labelledby":s.triggerId,...o,...n,ref:e,onCloseAutoFocus:W(t.onCloseAutoFocus,a=>{var l;i.current||(l=s.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:W(t.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!s.modal||u)&&(i.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});z_.displayName=B_;var aD="DropdownMenuGroup",lD=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(qI,{...s,...n,ref:e})});lD.displayName=aD;var cD="DropdownMenuLabel",V_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(GI,{...s,...n,ref:e})});V_.displayName=cD;var uD="DropdownMenuItem",W_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(YI,{...s,...n,ref:e})});W_.displayName=uD;var dD="DropdownMenuCheckboxItem",H_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(QI,{...s,...n,ref:e})});H_.displayName=dD;var fD="DropdownMenuRadioGroup",hD=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(JI,{...s,...n,ref:e})});hD.displayName=fD;var pD="DropdownMenuRadioItem",K_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(XI,{...s,...n,ref:e})});K_.displayName=pD;var mD="DropdownMenuItemIndicator",q_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(ZI,{...s,...n,ref:e})});q_.displayName=mD;var gD="DropdownMenuSeparator",G_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(eD,{...s,...n,ref:e})});G_.displayName=gD;var vD="DropdownMenuArrow",yD=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(tD,{...s,...n,ref:e})});yD.displayName=vD;var wD="DropdownMenuSubTrigger",Y_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(rD,{...s,...n,ref:e})});Y_.displayName=wD;var xD="DropdownMenuSubContent",Q_=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:r,...n}=t,s=st(r);return d.jsx(nD,{...s,...n,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Q_.displayName=xD;var bD=L_,_D=F_,SD=U_,J_=z_,X_=V_,Z_=W_,e1=H_,t1=K_,r1=q_,n1=G_,s1=Y_,o1=Q_;const ED=bD,CD=_D,kD=g.forwardRef(({className:t,inset:e,children:r,...n},s)=>d.jsxs(s1,{ref:s,className:G("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",e&&"pl-8",t),...n,children:[r,d.jsx(dx,{className:"ml-auto h-4 w-4"})]}));kD.displayName=s1.displayName;const RD=g.forwardRef(({className:t,...e},r)=>d.jsx(o1,{ref:r,className:G("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
286de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));RD.displayName=o1.displayName;const i1=g.forwardRef(({className:t,sideOffset:e=4,...r},n)=>d.jsx(SD,{children:d.jsx(J_,{ref:n,sideOffset:e,className:G("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md 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-[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})}));i1.displayName=J_.displayName;const a1=g.forwardRef(({className:t,inset:e,...r},n)=>d.jsx(Z_,{ref:n,className:G("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e&&"pl-8",t),...r}));a1.displayName=Z_.displayName;const PD=g.forwardRef(({className:t,children:e,checked:r,...n},s)=>d.jsxs(e1,{ref:s,className:G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),checked:r,...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(r1,{children:d.jsx(ux,{className:"h-4 w-4"})})}),e]}));PD.displayName=e1.displayName;const TD=g.forwardRef(({className:t,children:e,...r},n)=>d.jsxs(t1,{ref:n,className:G("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t),...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(r1,{children:d.jsx(fx,{className:"h-2 w-2 fill-current"})})}),e]}));TD.displayName=t1.displayName;const jD=g.forwardRef(({className:t,inset:e,...r},n)=>d.jsx(X_,{ref:n,className:G("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...r}));jD.displayName=X_.displayName;const ND=g.forwardRef(({className:t,...e},r)=>d.jsx(n1,{ref:r,className:G("-mx-1 my-1 h-px bg-muted",t),...e}));ND.displayName=n1.displayName;const l1=()=>{const{i18n:t}=Vo(),e=td.find(n=>n.code===t.language)||td[0],r=n=>{t.changeLanguage(n)};return d.jsxs(ED,{children:[d.jsx(CD,{asChild:!0,children:d.jsxs(ve,{variant:"ghost",size:"sm",className:"flex items-center gap-2 h-9 px-3 focus:ring-0 focus:ring-offset-0 focus:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:bg-transparent",children:[d.jsx(ip,{className:"h-4 w-4"}),d.jsxs("span",{className:"hidden sm:inline",children:[e.flag," ",e.name]}),d.jsx("span",{className:"sm:hidden",children:e.flag})]})}),d.jsx(i1,{align:"end",className:"min-w-[160px]",children:td.map(n=>d.jsxs(a1,{onClick:()=>r(n.code),className:`flex items-center gap-2 cursor-pointer ${t.language===n.code?"bg-accent":""}`,children:[d.jsx("span",{className:"text-lg",children:n.flag}),d.jsx("span",{children:n.name})]},n.code))})]})},OD=()=>{const t=Sr(),{t:e}=Vo();return d.jsxs("div",{className:"min-h-screen relative overflow-hidden",children:[d.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/90 via-primary/70 to-secondary/80"}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-secondary/60 via-trans
286parent to-accent/40"}),d.jsx("div",{className:"absolute inset-0 bg-gradient-to-bl from-transparent via-primary/20 to-secondary/30"}),d.jsx("header",{className:"relative z-50 px-2 sm:px-6 lg:px-8",children:d.jsx("div",{className:"container max-w-7xl mx-auto",children:d.jsxs("div",{className:"flex h-20 items-center justify-between",children:[d.jsx("div",{className:"flex items-center space-x-3",children:d.jsx("img",{src:Zi,alt:"Five Health",className:"h-12 w-auto drop-shadow-lg"})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(l1,{}),d.jsx(ve,{variant:"secondary",className:"bg-white/20 backdrop-blur-sm border-white/30 text-white hover:bg-white/30 hover:scale-105 transition-all duration-300 font-semibold shadow-lg",onClick:()=>t("/auth"),children:e("landing.signIn")})]})]})})}),d.jsx("main",{className:"relative px-4 sm:px-6 pt-8 sm:pt-16 pb-12",children:d.jsxs("div",{className:"container max-w-5xl mx-auto",children:[d.jsxs("div",{className:"text-center mb-8 sm:mb-12 animate-fade-in",children:[d.jsx("div",{className:"flex justify-center mb-6 sm:mb-8",children:d.jsx("img",{src:Zi,alt:"Five Health",className:"h-24 sm:h-32 w-auto drop-shadow-2xl"})}),d.jsxs("h1",{className:"text-4xl sm:text-5xl lg:text-7xl font-extrabold text-white mb-4 sm:mb-6 tracking-tight drop-shadow-lg",children:[e("landing.connectTo"),d.jsx("br",{}),e("landing.community"),d.jsx("br",{}),e("landing.resources")]})]}),d.jsx("p",{className:"text-lg sm:text-xl lg:text-2xl text-white/90 text-center max-w-3xl mx-auto mb-8 sm:mb-12 leading-relaxed font-medium drop-shadow-md px-4",children:e("landing.subtitle")}),d.jsx("div",{className:"flex justify-center mb-12 sm:mb-16",children:d.jsxs(ve,{size:"lg",onClick:()=>t("/categories"),className:"h-14 sm:h-16 px-8 sm:px-10 text-[18px] font-semibold bg-white hover:bg-white/95 transition-all duration-300 shadow-2xl rounded-[5px] group min-w-[200px] capitalize",style:{fontFamily:'"Poppins", sans-serif',color:"#E327CDBF",textShadow:"0px 0px 0px rgba(0, 0, 0, 0.2)"},children:[e("landing.locateResources"),d.jsx(iP,{className:"ml-2 h-5 w-5 group-hover:translate-x-1 transition-transform",style:{color:"#E327CDBF"}})]})}),d.jsxs("div",{className:"grid grid-cols-5 gap-3 sm:gap-6 max-w-2xl mx-auto px-4",children:[d.jsxs("div",{className:"flex flex-col items-center space-y-1 sm:space-y-2 text-white/80 hover:text-white transition-colors",children:[d.jsx("div",{className:"w-10 h-10 sm:w-14 sm:h-14 rounded-full bg-white/20 backdrop-blur-sm flex items-center justify-center hover:scale-110 transition-transform",children:d.jsx(oP,{className:"w-5 h-5 sm:w-7 sm:h-7"})}),d.jsx("span",{className:"text-[10px] sm:text-xs font-semibold",children:e("landing.food")})]}),d.jsxs("div",{className:"flex flex-col items-center space-y-1 sm:space-y-2 text-white/80 hover:text-white transition-colors",children:[d.jsx("div",{className:"w-10 h-10 sm:w-14 sm:h-14 rounded-full bg-white/20 backdrop-blur-sm flex items-center justify-center hover:scale-110 transition-transform",children:d.jsx(pP,{className:"w-5 h-5 sm:w-7 sm:h-7"})}),d.jsx("span",{className:"text-[10px] sm:text-xs font-semibold",children:e("landing.housing")})]}),d.jsxs("div",{className:"flex flex-col items-center space-y-1 sm:space-y-2 text-white/80 hover:text-white transition-colors",children:[d.jsx("div",{className:"w-10 h-10 sm:w-14 sm:h-14 rounded-full bg-white/20 backdrop-blur-sm flex items-center justify-center hover:scale-110 transition-transform",children:d.jsx(wP,{className:"w-5 h-5 sm:w-7 sm:h-7"})}),d.jsx("span",{className:"text-[10px] sm:text-xs font-semibold",children:e("landing.transport")})]}),d.jsxs("div",{className:"flex flex-col items-center space-y-1 sm:space-y-2 text-white/80 hover:text-white transition-colors",children:[d.jsx("div",{className:"w-10 h-10 sm:w-14 sm:h-14 rounded-full bg-white/20 backdrop-blur-sm flex items-center justify-center hover:scale-110 transition-transform",children:d.jsx(hP,{className:"w-5 h-5 sm:w-7 sm:h-7"})}),d.jsx("span",{className:"text-[10px] sm:text-xs font-semibold",children:e("landing.health")})]}),d.jsxs("div",{className:"flex flex-col items-center space-y-1 sm:space-y-2 text-white/80 hover:text-white transition-colors",children:[d.jsx("div",{className:"w-10 h-10 sm:w-14 sm:h-14 roun
286ded-full bg-white/20 backdrop-blur-sm flex items-center justify-center hover:scale-110 transition-transform",children:d.jsx(aP,{className:"w-5 h-5 sm:w-7 sm:h-7"})}),d.jsx("span",{className:"text-[10px] sm:text-xs font-semibold",children:e("landing.jobs")})]})]})]})}),d.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-40 bg-gradient-to-t from-black/5 via-transparent to-transparent pointer-events-none"}),d.jsx("div",{className:"absolute top-0 left-0 right-0 h-40 bg-gradient-to-b from-white/5 via-transparent to-transparent pointer-events-none"})]})},Lt=g.forwardRef(({className:t,...e},r)=>d.jsx("div",{ref:r,className:G("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));Lt.displayName="Card";const Dr=g.forwardRef(({className:t,...e},r)=>d.jsx("div",{ref:r,className:G("flex flex-col space-y-1.5 p-6",t),...e}));Dr.displayName="CardHeader";const Mr=g.forwardRef(({className:t,...e},r)=>d.jsx("h3",{ref:r,className:G("text-2xl font-semibold leading-none tracking-tight",t),...e}));Mr.displayName="CardTitle";const fs=g.forwardRef(({className:t,...e},r)=>d.jsx("p",{ref:r,className:G("text-sm text-muted-foreground",t),...e}));fs.displayName="CardDescription";const tr=g.forwardRef(({className:t,...e},r)=>d.jsx("div",{ref:r,className:G("p-6 pt-0",t),...e}));tr.displayName="CardContent";const AD=g.forwardRef(({className:t,...e},r)=>d.jsx("div",{ref:r,className:G("flex items-center p-6 pt-0",t),...e}));AD.displayName="CardFooter";function Mp(t){const e=g.useRef({value:t,previous:t});return g.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var ou="Checkbox",[ID,I4]=ft(ou),[DD,Lp]=ID(ou);function MD(t){const{__scopeCheckbox:e,checked:r,children:n,defaultChecked:s,disabled:o,form:i,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:f}=t,[p,h]=Ln({prop:r,defaultProp:s??!1,onChange:l,caller:ou}),[v,m]=g.useState(null),[w,x]=g.useState(null),y=g.useRef(!1),b=v?!!i||!!v.closest("form"):!0,_={checked:p,disabled:o,setChecked:h,control:v,setControl:m,name:a,form:i,value:u,hasConsumerStoppedPropagationRef:y,required:c,defaultChecked:Pn(s)?!1:s,isFormControl:b,bubbleInput:w,setBubbleInput:x};return d.jsx(DD,{scope:e,..._,children:LD(f)?f(_):n})}var c1="CheckboxTrigger",u1=g.forwardRef(({__scopeCheckbox:t,onKeyDown:e,onClick:r,...n},s)=>{const{control:o,value:i,disabled:a,checked:l,required:c,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:v}=Lp(c1,t),m=ce(s,u),w=g.useRef(l);return g.useEffect(()=>{const x=o==null?void 0:o.form;if(x){const y=()=>f(w.current);return x.addEventListener("reset",y),()=>x.removeEventListener("reset",y)}},[o,f]),d.jsx(te.button,{type:"button",role:"checkbox","aria-checked":Pn(l)?"mixed":l,"aria-required":c,"data-state":m1(l),"data-disabled":a?"":void 0,disabled:a,value:i,...n,ref:m,onKeyDown:W(e,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:W(r,x=>{f(y=>Pn(y)?!0:!y),v&&h&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})})});u1.displayName=c1;var $p=g.forwardRef((t,e)=>{const{__scopeCheckbox:r,name:n,checked:s,defaultChecked:o,required:i,disabled:a,value:l,onCheckedChange:c,form:u,...f}=t;
286return d.jsx(MD,{__scopeCheckbox:r,checked:s,defaultChecked:o,disabled:a,required:i,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(u1,{...f,ref:e,__scopeCheckbox:r}),p&&d.jsx(p1,{__scopeCheckbox:r})]})})});$p.displayName=ou;var d1="CheckboxIndicator",f1=g.forwardRef((t,e)=>{const{__scopeCheckbox:r,forceMount:n,...s}=t,o=Lp(d1,r);return d.jsx(Rt,{present:n||Pn(o.checked)||o.checked===!0,children:d.jsx(te.span,{"data-state":m1(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});f1.displayName=d1;var h1="CheckboxBubbleInput",p1=g.forwardRef(({__scopeCheckbox:t,...e},r)=>{const{control:n,hasConsumerStoppedPropagationRef:s,checked:o,defaultChecked:i,required:a,disabled:l,name:c,value:u,form:f,bubbleInput:p,setBubbleInput:h}=Lp(h1,t),v=ce(r,h),m=Mp(o),w=Hc(n);g.useEffect(()=>{const y=p;if(!y)return;const b=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(b,"checked").set,E=!s.current;if(m!==o&&S){const C=new Event("click",{bubbles:E});y.indeterminate=Pn(o),S.call(y,Pn(o)?!1:o),y.dispatchEvent(C)}},[p,m,o,s]);const x=g.useRef(Pn(o)?!1:o);return d.jsx(te.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??x.current,required:a,disabled:l,name:c,value:u,form:f,...e,tabIndex:-1,ref:v,style:{...e.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});p1.displayName=h1;function LD(t){return typeof t=="function"}function Pn(t){return t==="indeterminate"}function m1(t){return Pn(t)?"indeterminate":t?"checked":"unchecked"}const g1=g.forwardRef(({className:t,...e},r)=>d.jsx($p,{ref:r,className:G("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:d.jsx(f1,{className:G("flex items-center justify-center text-current"),children:d.jsx(ux,{className:"h-4 w-4"})})}));g1.displayName=$p.displayName;const $D=[{id:"health",label:"Health",icon:"âï¸"},{id:"food",label:"Food",icon:"ð"},{id:"housing",label:"Housing",icon:"ð "},{id:"transportation",label:"Transportation",icon:"ð"},{id:"employment",label:"Employment",icon:"ð¼"}];function FD(t){return t<.1?"Less than 0.1 miles away":`${t.toFixed(1)} miles away`}function v1(t){if(!t)return null;const e=t.replace(/\D/g,"");return e.length===10?`(${e.substring(0,3)}) ${e.substring(3,6)}-${e.substring(6)}`:t}function UD(t,e){if(e&&typeof e=="object"){const n=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"][new Date().getDay()];if(e[n]&&e[n].close){const s=e[n].close;return parseInt(s.split(":")[0])>=17}}if(t){const r=t.toLowerCase();if(r.includes("24")||r.includes("24/7")||r.includes("24 hour"))return!0;const n=r.match(/(\d+)\s*pm/g);if(n)return n.some(s=>{const o=parseInt(s);return o>=5||o===12})}return!1}function Fp(t){return{food:"ð",housing:"ð ",transportation:"ð",health:"âï¸",employment:"ð¼"}[t]}const BD=({category:t,label:e,selected:r,onToggle:n})=>{const s=Fp(t);return d.jsx(Lt,{className:G("relative cursor-pointer transition-all duration-300 ease-out group","border-2 p-6 touch-manipulation active:scale-[0.98]","hover:shadow-xl hover:-translate-y-0.5",r?"border-primary bg-gradient-to-br from-primary/10 via-primary/5 to-transparent shadow-lg ring-2 ring-primary/20":"border-border/50 hover:border-primary/40 bg-white/50 backdrop-blur-sm"),onClick:n,children:d.jsxs("div",{className:"flex items-center space-x-4",children:[d.jsx("div",{className:G("flex h-14 w-14 items-center justify-center rounded-2xl text-2xl transition-all duration-300","shadow-sm",r?"bg-primary text-primary-foreground scale-105 shadow-primary/25":"bg-gradient-to-br from-muted to-muted/70 group-hover:scale-105 group-hover:shadow-md"),children:s}),d.jsx("div",{className:"flex-1",children:d.jsx("h3",{className:G("text-lg font-semibold transition-colors",r?"text-primary":"text-foreground"),children:e})}),d.jsx("div",{className:G("transition-transform duration-300",r&&"scale-110"),children:d.jsx(g1,{checked:r,onCheckedChange:n,className:"h-6 w-6",onClick:o=>o.stopPropagation()})})]})})},mc=({currentStep:t,totalSteps:e,onStepClick:r})=>d.jsxs("div",{className:"flex items-center justify-center gap-2 py-4",children:[Array.from({length:e},(n,s)=>s+1).map(n=>d.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(n),disabled:!r||n>t,className:G("h-2 rounded-full transition-all duration-300",n===t?"w-8 bg-primary":"w-2 bg-muted",n<t&&"bg-primary/50",r&&n<=t&&"cursor-pointer hover:opacity-80",(!r||n>t)&&"cursor-default"),"aria-label":`Step ${n}`},n)),d.jsxs("span",{className:"ml-2 text-sm text-muted-foreground",children:["Step ",t," of ",e]})]}),hs=()=>d.jsx("header",{className:"sticky top-0 z-50 w-full border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:d.jsxs("div",{className:"container flex h-16 items-center justify-between px-4",children:[d.jsx(xa,{to:"/",className:"flex items-center space-x-3 hover:opacity-80 transition-opacity",children:d.jsx("img",{src:Zi,alt:"Five Health",className:"h-10 w-auto"})}),d.jsx(l1,{})]})}),zD=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);
286class Up extends Error{constructor(e,r="FunctionsError",n){super(e),this.name=r,this.context=n}}class VD extends Up{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Nv extends Up{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Ov extends Up{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Uf;(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"})(Uf||(Uf={}));class WD{constructor(e,{headers:r={},customFetch:n,region:s=Uf.Any}={}){this.url=e,this.headers=r,this.region=s,this.fetch=zD(n)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return K(this,arguments,void 0,function*(r,n={}){var s;let o,i;try{const{headers:a,method:l,body:c,signal:u,timeout:f}=n;let p={},{region:h}=n;h||(h=this.region);const v=new URL(`${this.url}/${r}`);h&&h!=="any"&&(p["x-region"]=h,v.searchParams.set("forceFunctionRegion",h));let m;c&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",m=c):typeof c=="string"?(p["Content-Type"]="text/plain",m=c):typeof FormData<"u"&&c instanceof FormData?m=c:(p["Content-Type"]="application/json",m=JSON.stringify(c)):m=c;let w=u;f&&(i=new AbortController,o=setTimeout(()=>i.abort(),f),u?(w=i.signal,u.addEventListener("abort",()=>i.abort())):w=i.signal);const x=yield this.fetch(v.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),a),body:m,signal:w}).catch(S=>{throw new VD(S)}),y=x.headers.get("x-relay-error");if(y&&y==="true")throw new Nv(x);if(!x.ok)throw new Ov(x);let b=((s=x.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return b==="application/json"?_=yield x.json():b==="application/octet-stream"||b==="application/pdf"?_=yield x.blob():b==="text/event-stream"?_=x:b==="multipart/form-data"?_=yield x.formData():_=yield x.text(),{data:_,error:null,response:x}}catch(a){return{data:null,error:a,response:a instanceof Ov||a instanceof Nv?a.context:void 0}}finally{o&&clearTimeout(o)}})}}var et={};const Ho=IE(A2);var rl={},nl={},sl={},ol={},il={},al={},Av;function y1(){if(Av)return al;Av=1,Object.defineProperty(al,"__esModule",{value:!0});class t extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.co
286de=r.code}}return al.default=t,al}var Iv;function w1(){if(Iv)return il;Iv=1,Object.defineProperty(il,"__esModule",{value:!0});const e=Ho.__importDefault(y1());class r{constructor(s){var o,i;this.shouldThrowOnError=!1,this.method=s.method,this.url=s.url,this.headers=new Headers(s.headers),this.schema=s.schema,this.body=s.body,this.shouldThrowOnError=(o=s.shouldThrowOnError)!==null&&o!==void 0?o:!1,this.signal=s.signal,this.isMaybeSingle=(i=s.isMaybeSingle)!==null&&i!==void 0?i:!1,s.fetch?this.fetch=s.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(s,o){return this.headers=new Headers(this.headers),this.headers.set(s,o),this}then(s,o){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 i=this.fetch;let a=i(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async l=>{var c,u,f,p;let h=null,v=null,m=null,w=l.status,x=l.statusText;if(l.ok){if(this.method!=="HEAD"){const S=await l.text();S===""||(this.headers.get("Accept")==="text/csv"||this.headers.get("Accept")&&(!((c=this.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text"))?v=S:v=JSON.parse(S))}const b=(u=this.headers.get("Prefer"))===null||u===void 0?void 0:u.match(/count=(exact|planned|estimated)/),_=(f=l.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");b&&_&&_.length>1&&(m=parseInt(_[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(v)&&(v.length>1?(h={code:"PGRST116",details:`Results contain ${v.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},v=null,m=null,w=406,x="Not Acceptable"):v.length===1?v=v[0]:v=null)}else{const b=await l.text();try{h=JSON.parse(b),Array.isArray(h)&&l.status===404&&(v=[],h=null,w=200,x="OK")}catch{l.status===404&&b===""?(w=204,x="No Content"):h={message:b}}if(h&&this.isMaybeSingle&&(!((p=h==null?void 0:h.details)===null||p===void 0)&&p.includes("0 rows"))&&(h=null,w=200,x="OK"),h&&this.shouldThrowOnError)throw new e.default(h)}return{error:h,data:v,count:m,status:w,statusText:x}});return this.shouldThrowOnError||(a=a.catch(l=>{var c,u,f,p,h,v;let m="";const w=l==null?void 0:l.cause;if(w){const x=(c=w==null?void 0:w.message)!==null&&c!==void 0?c:"",y=(u=w==null?void 0:w.code)!==null&&u!==void 0?u:"";m=`${(f=l==null?void 0:l.name)!==null&&f!==void 0?f:"FetchError"}: ${l==null?void 0:l.message}`,m+=` 287 288Caused by: ${(p=w==null?void 0:w.name)!==null&&p!==void 0?p:"Error"}: ${x}`,y&&(m+=` (${y})`),w!=null&&w.stack&&(m+=` 289${w.stack}`)}else m=(h=l==null?void 0:l.stack)!==null&&h!==void 0?h:"";return{error:{message:`${(v=l==null?void 0:l.name)!==null&&v!==void 0?v:"FetchError"}: ${l==null?void 0:l.message}`,details:m,hint:"",code:""},data:null,count:null,status:0,statusText:""}})),a.then(s,o)}returns(){return this}overrideTypes(){return this}}return il.default=r,il}var Dv;function x1(){if(Dv)return ol;Dv=1,Object.defineProperty(ol,"__esModule",{value:!0});const e=Ho.__importDefault(w1());class r extends e.default{select(s){let o=!1;const i=(s??"*").split("").map(a=>/\s/.test(a)&&!o?"":(a==='"'&&(o=!o),a)).join("");return this.url.searchParams.set("select",i),this.headers.append("Prefer","return=representation"),this}order(s,{ascending:o=!0,nullsFirst:i,foreignTable:a,referencedTable:l=a}={}){const c=l?`${l}.order`:"order",u=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${u?`${u},`:""}${s}.${o?"asc":"desc"}${i===void 0?"":i?".nullsfirst":".nullslast"}`),this}limit(s,{foreignTable:o,referencedTable:i=o}={}){const a=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(a,`${s}`),this}range(s,o,{foreignTable:i,referencedTable:a=i}={}){const l=typeof a>"u"?"offset":`${a}.offset`,c=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${s}`),this.url.searchParams.set(c,`${o-s+1}`),this}abortSignal(s){return this.signal=s,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}
289explain({analyze:s=!1,verbose:o=!1,settings:i=!1,buffers:a=!1,wal:l=!1,format:c="text"}={}){var u;const f=[s?"analyze":null,o?"verbose":null,i?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(u=this.headers.get("Accept"))!==null&&u!==void 0?u:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${c}; for="${p}"; options=${f};`),c==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(s){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${s}`),this}}return ol.default=r,ol}var Mv;function Bp(){if(Mv)return sl;Mv=1,Object.defineProperty(sl,"__esModule",{value:!0});const e=Ho.__importDefault(x1()),r=new RegExp("[,()]");class n extends e.default{eq(o,i){return this.url.searchParams.append(o,`eq.${i}`),this}neq(o,i){return this.url.searchParams.append(o,`neq.${i}`),this}gt(o,i){return this.url.searchParams.append(o,`gt.${i}`),this}gte(o,i){return this.url.searchParams.append(o,`gte.${i}`),this}lt(o,i){return this.url.searchParams.append(o,`lt.${i}`),this}lte(o,i){return this.url.searchParams.append(o,`lte.${i}`),this}like(o,i){return this.url.searchParams.append(o,`like.${i}`),this}likeAllOf(o,i){return this.url.searchParams.append(o,`like(all).{${i.join(",")}}`),this}likeAnyOf(o,i){return this.url.searchParams.append(o,`like(any).{${i.join(",")}}`),this}ilike(o,i){return this.url.searchParams.append(o,`ilike.${i}`),this}ilikeAllOf(o,i){return this.url.searchParams.append(o,`ilike(all).{${i.join(",")}}`),this}ilikeAnyOf(o,i){return this.url.searchParams.append(o,`ilike(any).{${i.join(",")}}`),this}is(o,i){return this.url.searchParams.append(o,`is.${i}`),this}in(o,i){const a=Array.from(new Set(i)).map(l=>typeof l=="string"&&r.test(l)?`"${l}"`:`${l}`).join(",");return this.url.searchParams.append(o,`in.(${a})`),this}contains(o,i){return typeof i=="string"?this.url.searchParams.append(o,`cs.${i}`):Array.isArray(i)?this.url.searchParams.append(o,`cs.{${i.join(",")}}`):this.url.searchParams.append(o,`cs.${JSON.stringify(i)}`),this}containedBy(o,i){return typeof i=="string"?this.url.searchParams.append(o,`cd.${i}`):Array.isArray(i)?this.url.searchParams.append(o,`cd.{${i.join(",")}}`):this.url.searchParams.append(o,`cd.${JSON.stringify(i)}`),this}rangeGt(o,i){return this.url.searchParams.append(o,`sr.${i}`),this}rangeGte(o,i){return this.url.searchParams.append(o,`nxl.${i}`),this}rangeLt(o,i){return this.url.searchParams.append(o,`sl.${i}`),this}rangeLte(o,i){return this.url.searchParams.append(o,`nxr.${i}`),this}rangeAdjacent(o,i){return this.url.searchParams.append(o,`adj.${i}`),this}overlaps(o,i){return typeof i=="string"?this.url.searchParams.append(o,`ov.${i}`):this.url.searchParams.append(o,`ov.{${i.join(",")}}`),this}textSearch(o,i,{config:a,type:l}={}){let c="";l==="plain"?c="pl":l==="phrase"?c="ph":l==="websearch"&&(c="w");const u=a===void 0?"":`(${a})`;return this.url.searchParams.append(o,`${c}fts${u}.${i}`),this}match(o){return Object.entries(o).forEach(([i,a])=>{this.url.searchParams.append(i,`eq.${a}`)}),this}not(o,i,a){return this.url.searchParams.append(o,`not.${i}.${a}`),this}or(o,{foreignTable:i,referencedTable:a=i}={}){const l=a?`${a}.or`:"or";return this.url.searchParams.append(l,`(${o})`),this}filter(o,i,a){return this.url.searchParams.append(o,`${i}.${a}`),this}}return sl.default=n,sl}var Lv;function b1(){if(Lv)return nl;Lv=1,Object.defineProperty(nl,"__esModule",{value:!0});const e=Ho.__importDefault(Bp());class r{constructor(s,{headers:o={},schema:i,fetch:a}){this.url=s,this.headers=new Headers(o),this.schema=i,this.fetch=a}select(s,o){const{head:i=!1,count:a}=o??{},l=i?"HEAD":"GET";let c=!1;const u=(s??"*").split("").map(f=>/\s/.test(f)&&!c?"":(f==='"'&&(c=!c),f)).join("");return this.url.searchParams.set("select",u),a&&this.headers.append("Prefer",`count=${a}`),new e.default({method:l,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch})}insert(s,{count:o,defaultToNull:i=!0}={}){var a;const l="POST";if(o&&this.headers.append("Prefer",`count=${o}`),i||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const c=s.reduce((u,f)=>u.concat(Object.keys(f)),[]);if(c.length>0){const u=[...new Set(c)].map(f=>`"${f}"`);this.url.searchParams.set("columns",u.join(","))}}return new e.default({method:l,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch})}upsert(s,{onConflict:o,ignoreDuplicates:i=!1,count:a,defaultToNull:l=!0}={}){var c;const u="POST";if(this.headers.append("Prefer",`resolution=${i?"ignore":"merge"}-duplicates`),o!==void 0&&this.url.searchParams.set("on_conflict",o),a&&this.headers.append("Prefer",`count=${a}`),l||this.headers.append("Prefer","missing=default"),Array.isArray(s)){const f=s.reduce((p,h)=>p.concat(Object.keys(h)),[]);if(f.length>0){const p=[...new Set(f)].map(h=>`"${h}"`);this.url.searchParams.set("columns",p.join(","))}}return new e.default({method:u,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch})}update(s,{count:o}={}){var i;const a="PATCH";return o&&this.headers.append("Prefer",`count=${o}`),new e.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch})}delete({count:s}={}){var o;const i="DELETE";return s&&this.headers.append("Prefer",`count=${s}`),new e.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}}return nl.default=r,nl}var $v;function HD(){if($v)return rl;
289$v=1,Object.defineProperty(rl,"__esModule",{value:!0});const t=Ho,e=t.__importDefault(b1()),r=t.__importDefault(Bp());class n{constructor(o,{headers:i={},schema:a,fetch:l}={}){this.url=o,this.headers=new Headers(i),this.schemaName=a,this.fetch=l}from(o){const i=new URL(`${this.url}/${o}`);return new e.default(i,{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch})}schema(o){return new n(this.url,{headers:this.headers,schema:o,fetch:this.fetch})}rpc(o,i={},{head:a=!1,get:l=!1,count:c}={}){var u;let f;const p=new URL(`${this.url}/rpc/${o}`);let h;a||l?(f=a?"HEAD":"GET",Object.entries(i).filter(([m,w])=>w!==void 0).map(([m,w])=>[m,Array.isArray(w)?`{${w.join(",")}}`:`${w}`]).forEach(([m,w])=>{p.searchParams.append(m,w)})):(f="POST",h=i);const v=new Headers(this.headers);return c&&v.set("Prefer",`count=${c}`),new r.default({method:f,url:p,headers:v,schema:this.schemaName,body:h,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}}return rl.default=n,rl}Object.defineProperty(et,"__esModule",{value:!0});var _1=et.PostgrestError=O1=et.PostgrestBuilder=j1=et.PostgrestTransformBuilder=P1=et.PostgrestFilterBuilder=k1=et.PostgrestQueryBuilder=E1=et.PostgrestClient=void 0;const Ko=Ho,S1=Ko.__importDefault(HD());var E1=et.PostgrestClient=S1.default;const C1=Ko.__importDefault(b1());var k1=et.PostgrestQueryBuilder=C1.default;const R1=Ko.__importDefault(Bp());var P1=et.PostgrestFilterBuilder=R1.default;const T1=Ko.__importDefault(x1());var j1=et.PostgrestTransformBuilder=T1.default;const N1=Ko.__importDefault(w1());var O1=et.PostgrestBuilder=N1.default;const A1=Ko.__importDefault(y1());_1=et.PostgrestError=A1.default;var I1=et.default={PostgrestClient:S1.default,PostgrestQueryBuilder:C1.default,PostgrestFilterBuilder:R1.default,PostgrestTransformBuilder:T1.default,PostgrestBuilder:N1.default,PostgrestError:A1.default};const KD=by({__proto__:null,get PostgrestBuilder(){return O1},get PostgrestClient(){return E1},get PostgrestError(){return _1},get PostgrestFilterBuilder(){return P1},get PostgrestQueryBuilder(){return k1},get PostgrestTransformBuilder(){return j1},default:I1},[et]),{PostgrestClient:qD,PostgrestQueryBuilder:D4,PostgrestFilterBuilder:M4,PostgrestTransformBuilder:L4,PostgrestBuilder:$4,PostgrestError:F4}=I1||KD;class GD{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."};if(typeof process<"u"){const r=process.versions;if(r&&r.node){const n=r.node,s=parseInt(n.replace(/^v/,"").split(".")[0]);return s>=22?typeof globalThis.WebSocket<"u"?{type:"native",constructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${s} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${s} detected without native WebSocket support.`,workaround:`For Node.js < 22, install "ws" package and provide it via the transport option: 290import ws from "ws" 291new 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+=` 292 293Suggested 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 YD="2.83.0",QD=`realtime-js/${YD}`,D1="1.0.0",JD="2.0.0",Fv=D1,Bf=1e4,XD=1e3,ZD=100;var Qn;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(Qn||(Qn={}));var Ie;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Ie||(Ie={}));var jt;(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"})(jt||(jt={}));var zf;(function(t){t.websocket="websocket"})(zf||(zf={}));var Jn;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(Jn||(Jn={}));class eM{constructor(){this.HEADER_LENGTH=1,this.META_LENGTH=4,this.USER_BROADCAST_PUSH_META_LENGTH=5,this.KINDS={push:0,reply:1,broadcast:2,userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST="broadcast"}encode(e,r){if(this._isArrayBuffer(e.payload))return r(this._binaryEncodePush(e));if(e.event===this.BROADCAST&&!(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))}_binaryEncodePush(e){var r,n;const{event:s,topic:o,payload:i}=e,a=(r=e.ref)!==null&&r!==void 0?r:"",l=(n=e.join_ref)!==null&&n!==void 0?n:"",c=this.META_LENGTH+l.length+a.length+o.length+s.length,u=new ArrayBuffer(this.HEADER_LENGTH+c);let f=new DataView(u),p=0;f.setUint8(p++,this.KINDS.push),f.setUint8(p++,l.length),f.setUint8(p++,a.length),f.setUint8(p++,o.length),f.setUint8(p++,s.length),Array.from(l,v=>f.setUint8(p++,v.charCodeAt(0))),Array.from(a,v=>f.setUint8(p++,v.charCodeAt(0))),Array.from(o,v=>f.setUint8(p++,v.charCodeAt(0))),Array.from(s,v=>f.setUint8(p++,v.charCodeAt(0)));var h=new Uint8Array(u.byteLength+i.byteLength);return h.set(new Uint8Array(u),0),h.set(new Uint8Array(i),u.byteLength),h.buffer}_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,s,o;const i=e.topic,a=(r=e.ref)!==null&&r!==void 0?r:"",l=(n=e.join_ref)!==null&&n!==void 0?n:"",c=e.payload.event,u=(o=(s=e.payload)===null||s===void 0?void 0:s.payload)!==null&&o!==void 0?o:new ArrayBuffer(0),f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+i.length+c.length,p=new ArrayBuffer(this.HEADER_LENGTH+f);let h=new DataView(p),v=0;h.setUint8(v++,this.KINDS.userBroadcastPush),h.setUint8(v++,l.length),h.setUint8(v++,a.length),h.setUint8(v++,i.length),h.setUint8(v++,c.length),h.setUint8(v++,this.BINARY_ENCODING),Array.from(l,w=>
293h.setUint8(v++,w.charCodeAt(0))),Array.from(a,w=>h.setUint8(v++,w.charCodeAt(0))),Array.from(i,w=>h.setUint8(v++,w.charCodeAt(0))),Array.from(c,w=>h.setUint8(v++,w.charCodeAt(0)));var m=new Uint8Array(p.byteLength+u.byteLength);return m.set(new Uint8Array(p),0),m.set(new Uint8Array(u),p.byteLength),m.buffer}_encodeJsonUserBroadcastPush(e){var r,n,s,o;const i=e.topic,a=(r=e.ref)!==null&&r!==void 0?r:"",l=(n=e.join_ref)!==null&&n!==void 0?n:"",c=e.payload.event,u=(o=(s=e.payload)===null||s===void 0?void 0:s.payload)!==null&&o!==void 0?o:{},p=new TextEncoder().encode(JSON.stringify(u)).buffer,h=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+i.length+c.length,v=new ArrayBuffer(this.HEADER_LENGTH+h);let m=new DataView(v),w=0;m.setUint8(w++,this.KINDS.userBroadcastPush),m.setUint8(w++,l.length),m.setUint8(w++,a.length),m.setUint8(w++,i.length),m.setUint8(w++,c.length),m.setUint8(w++,this.JSON_ENCODING),Array.from(l,y=>m.setUint8(w++,y.charCodeAt(0))),Array.from(a,y=>m.setUint8(w++,y.charCodeAt(0))),Array.from(i,y=>m.setUint8(w++,y.charCodeAt(0))),Array.from(c,y=>m.setUint8(w++,y.charCodeAt(0)));var x=new Uint8Array(v.byteLength+p.byteLength);return x.set(new Uint8Array(v),0),x.set(new Uint8Array(p),v.byteLength),x.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,o,i,a,l]=n;return r({join_ref:s,ref:o,topic:i,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.push:return this._decodePush(e,r,s);case this.KINDS.reply:return this._decodeReply(e,r,s);case this.KINDS.broadcast:return this._decodeBroadcast(e,r,s);case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,r,s)}}_decodePush(e,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=r.getUint8(3);let a=this.HEADER_LENGTH+this.META_LENGTH-1;const l=n.decode(e.slice(a,a+s));a=a+s;const c=n.decode(e.slice(a,a+o));a=a+o;const u=n.decode(e.slice(a,a+i));a=a+i;const f=JSON.parse(n.decode(e.slice(a,e.byteLength)));return{join_ref:l,ref:null,topic:c,event:u,payload:f}}_decodeReply(e,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+this.META_LENGTH;const c=n.decode(e.slice(l,l+s));l=l+s;const u=n.decode(e.slice(l,l+o));l=l+o;const f=n.decode(e.slice(l,l+i));l=l+i;const p=n.decode(e.slice(l,l+a));l=l+a;const h=JSON.parse(n.decode(e.slice(l,e.byteLength))),v={status:p,response:h};return{join_ref:c,ref:u,topic:f,event:jt.reply,payload:v}}_decodeBroadcast(e,r,n){const s=r.getUint8(1),o=r.getUint8(2);let i=this.HEADER_LENGTH+2;const a=n.decode(e.slice(i,i+s));i=i+s;const l=n.decode(e.slice(i,i+o));i=i+o;const c=JSON.parse(n.decode(e.slice(i,e.byteLength)));return{join_ref:null,ref:null,topic:a,event:l,payload:c}}_decodeUserBroadcast(e,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=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+o));l=l+o;const f=n.decode(e.slice(l,l+i));l=l+i;const p=e.slice(l,e.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(p)):p,v={type:this.BROADCAST,event:u,payload:h};return i>0&&(v.meta=JSON.parse(f)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST,payload:v}}_isArrayBuffer(e){var r;return e instanceof ArrayBuffer||((r=e==null?void 0:e.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}}class M1{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 me;(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.t
293srange="tsrange",t.tstzrange="tstzrange"})(me||(me={}));const Uv=(t,e,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return e?Object.keys(e).reduce((o,i)=>(o[i]=tM(i,t,e,s),o),{}):{}},tM=(t,e,r,n)=>{const s=e.find(a=>a.name===t),o=s==null?void 0:s.type,i=r[t];return o&&!n.includes(o)?L1(o,i):Vf(i)},L1=(t,e)=>{if(t.charAt(0)==="_"){const r=t.slice(1,t.length);return oM(e,r)}switch(t){case me.bool:return rM(e);case me.float4:case me.float8:case me.int2:case me.int4:case me.int8:case me.numeric:case me.oid:return nM(e);case me.json:case me.jsonb:return sM(e);case me.timestamp:return iM(e);case me.abstime:case me.date:case me.daterange:case me.int4range:case me.int8range:case me.money:case me.reltime:case me.text:case me.time:case me.timestamptz:case me.timetz:case me.tsrange:case me.tstzrange:return Vf(e);default:return Vf(e)}},Vf=t=>t,rM=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},nM=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},sM=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},oM=(t,e)=>{if(typeof t!="string")return t;const r=t.length-1,n=t[r];if(t[0]==="{"&&n==="}"){let o;const i=t.slice(1,r);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>L1(e,a))}return t},iM=t=>typeof t=="string"?t.replace(" ","T"):t,$1=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 ud{constructor(e,r,n={},s=Bf){this.channel=e,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,r){var n;return this._hasReceived(e)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:e,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:e,response:r}){this.recHooks.filter(n=>n.status===e).forEach(n=>n.callback(r))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var Bv;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Bv||(Bv={}));class ki{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:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=ki.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=ki.syncDiff(this.state,l,o,i)}),this.pendingDiffs=[],a()}),this.channel._on(n.diff,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(s):(this.state=ki.syncDiff(this.state,s,o,i),a())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i}
293)}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,r,n,s){const o=this.cloneDeep(e),i=this.transformState(r),a={},l={};return this.map(o,(c,u)=>{i[c]||(l[c]=u)}),this.map(i,(c,u)=>{const f=o[c];if(f){const p=u.map(w=>w.presence_ref),h=f.map(w=>w.presence_ref),v=u.filter(w=>h.indexOf(w.presence_ref)<0),m=f.filter(w=>p.indexOf(w.presence_ref)<0);v.length>0&&(a[c]=v),m.length>0&&(l[c]=m)}else a[c]=u}),this.syncDiff(o,{joins:a,leaves:l},n,s)}static syncDiff(e,r,n,s){const{joins:o,leaves:i}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(o,(a,l)=>{var c;const u=(c=e[a])!==null&&c!==void 0?c:[];if(e[a]=this.cloneDeep(l),u.length>0){const f=e[a].map(h=>h.presence_ref),p=u.filter(h=>f.indexOf(h.presence_ref)<0);e[a].unshift(...p)}n(a,u,l)}),this.map(i,(a,l)=>{let c=e[a];if(!c)return;const u=l.map(f=>f.presence_ref);c=c.filter(f=>u.indexOf(f.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(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):r[n]=s,r},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var zv;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(zv||(zv={}));var Ri;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Ri||(Ri={}));var Pr;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Pr||(Pr={}));class zp{constructor(e,r={config:{}},n){var s,o;if(this.topic=e,this.params=r,this.socket=n,this.bindings={},this.state=Ie.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 ud(this,jt.join,this.params,this.timeout),this.rejoinTimer=new M1(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Ie.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Ie.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Ie.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Ie.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Ie.errored,this.rejoinTimer.scheduleTimeout())}),this._on(jt.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new ki(this),this.broadcastEndpointURL=$1(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(e,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.state==Ie.closed){const{config:{broadcast:i,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[Ri.PRESENCE]&&this.bindings[Ri.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,f={},p={broadcast:i,presence:Object.assign(Object.assign({},a),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(f.access_token=this.socket.accessTokenValue),this._onError(h=>e==null?void 0:e(Pr.CHANNEL_ERROR,h)),this._onClose(()=>e==null?void 0:e(Pr.CLOSED)),this.updateJoinPayload(Object.assign({config:p},f)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var v;if(this.socket.setAuth(),h===void 0){e==null||e(Pr.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,w=(v=m==null?void 0:m.length)!==null&&v!==void 0?v:0,x=[];for(let y=0;y<w;y++){const b=m[y],{filter:{event:_,schema:S,table:E,filter:C}}=b,k=h&&h[y];if(k&&k.event===_&&k.schema===S&&k.table===E&&k.filter===C)x.push(Object.assign(Object.assign({},b),{id:k.id}));else{this.unsubscribe(),this.state=Ie.errored,e==null||e(Pr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=x,e&&e(Pr.SUBSCRIBED);return}}).receive("error",h=>{this.state=Ie.errored,e==null||e(Pr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{e==null||e(Pr.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===Ie.joined&&e===Ri.PRESENCE&&(this.socket.log("channel",`resubscribe to ${this.topic} due to change in presence callbacks on joined channel`),this.unsubscribe().then(()=>this.subscribe())),this._on(e,r,n)}async httpSend(e,r,n={}){var s;const o=this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"";if(r==null)return Promise.reject("Payload is required for httpSend()");const i={method:"POST",headers:{Authorization:o,apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:e,payload:r,private:this.private}]})},a=await this._fetchWithTimeout(this.broadcastEndpointURL,i,(s=n.timeout)!==null&&s!==void 0?s:this.timeout);if(a.status===202)return{success:!0};let l=a.statusText;
293try{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:o,payload:i}=e,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:i,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(o=>{var i,a,l;const c=this._push(e.type,e,r.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(i=this.params)===null||i===void 0?void 0:i.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),c.receive("ok",()=>o("ok")),c.receive("error",()=>o("error")),c.receive("timeout",()=>o("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Ie.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(jt.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new ud(this,jt.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=Ie.closed,this.bindings={}}async _fetchWithTimeout(e,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),i=await this.socket.fetch(e,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),i}_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 ud(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>ZD){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,o;const i=e.toLocaleLowerCase(),{close:a,error:l,leave:c,join:u}=jt;if(n&&[a,l,c,u].indexOf(i)>=0&&n!==this._joinRef())return;let p=this._onMessage(i,r,n);if(r&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(s=this.bindings.postgres_changes)===null||s===void 0||s.filter(h=>{var v,m,w;return((v=h.filter)===null||v===void 0?void 0:v.event)==="*"||((w=(m=h.filter)===null||m===void 0?void 0:m.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===i}).map(h=>h.callback(p,n)):(o=this.bindings[i])===null||o===void 0||o.filter(h=>{var v,m,w,x,y,b;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in h){const _=h.id,S=(v=h.filter)===null||v===void 0?void 0:v.event;return _&&((m=r.ids)===null||m===void 0?void 0:m.includes(_))&&(S==="*"||(S==null?void 0:S.toLocaleLowerCase())===((w=r.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const _=(y=(x=h==null?void 0:h.filter)===null||x===void 0?void 0:x.event)===null||y===void 0?void 0:y.toLocaleLowerCase();return _==="*"||_===((b=r==null?void 0:r.event)===null||b===void 0?void 0:b.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===i}).map(h=>{if(typeof p=="object"&&"ids"in p){const v=p.data,{schema:m,table:w,commit_timestamp:x,type:y,errors:b}=v;p=Object.assign(Object.assign({},{schema:m,table:w,commit_timestamp:x,eventType:y,new:{},old:{},errors:b}),this._getPayloadRecords(v))}h.callback(p,n)})}_isClosed(){return this.state===Ie.closed}_isJoined(){return this.state===Ie.joined}_isJoining(){return this.state===Ie.joining}_isLeaving(){return this.state===Ie.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,r,n){const s=e.toLocaleLowerCase(),o={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(e,r){const n=e.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===n&&zp.isEqual(s.filter,r))})),this}static isEqual(e,r){if(Object.keys(e).length!==Object.keys(r).length)return!1;for(const n in e)if(e[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(jt.close,{},e)}_onError(e){this._on(jt.error,{},r=>e(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Ie.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const r={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(r.new=Uv(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(r.old=Uv(e.columns,e.old_record)),r}}const dd=()=>{},ll={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},aM=[1e3,2e3,5e3,1e4],lM=1e4,cM=` 294 addEventListener("message", (e) => { 295 if (e.data.event === "start") { 296 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 297 } 298 });`;class uM{constructor(e,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=Bf,this.transport=null,this.heartbeatIntervalMs=ll.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=dd,this.ref=0,this.reconnectTimer=null,this.vsn=Fv,this.logger=
298dd,this.conn=null,this.sendBuffer=[],this.serializer=new eM,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._connectionState="disconnected",this._wasManualDisconnect=!1,this._authPromise=null,this._resolveFetch=s=>s?(...o)=>s(...o):(...o)=>fetch(...o),!(!((n=r==null?void 0:r.params)===null||n===void 0)&&n.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=r.params.apikey,this.endPoint=`${e}/${zf.websocket}`,this.httpEndpoint=$1(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=GD.createWebSocket(this.endpointURL())}catch(e){this._setConnectionState("disconnected");const r=e.message;throw r.includes("Node.js")?new Error(`${r} 299 300To use Realtime in Node.js, you need to provide a WebSocket implementation: 301 302Option 1: Use Node.js 22+ which has native WebSocket support 303Option 2: Install and provide the "ws" package: 304 305 npm install ws 306 307 import ws from "ws" 308 const client = new RealtimeClient(url, { 309 ...options, 310 transport: ws 311 })`):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 Qn.connecting:return Jn.Connecting;case Qn.open:return Jn.Open;case Qn.closing:return Jn.Closing;default:return Jn.Closed}}isConnected(){return this.connectionState()===Jn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(e,r={config:{}}){const n=`realtime:${e}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new zp(`realtime:${e}`,r,this);return this.channels.push(o),o}}push(e){const{topic:r,event:n,payload:s,ref:o}=e,i=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${r} ${n} (${o})`,s),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}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.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(XD,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
311heduleTimeout()},ll.HEARTBEAT_TIMEOUT_FALLBACK);return}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")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(c){this.log("error","error in heartbeat callback",c)}r.ref&&r.ref===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null);const{topic:n,event:s,payload:o,ref:i}=r,a=i?`(${i})`:"",l=o.status||"";this.log("receive",`${l} ${n} ${s} ${a}`.trim(),o),this.channels.filter(c=>c._isMember(n)).forEach(c=>c._trigger(s,o,i)),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))}_teardownConnection(){if(this.conn){if(this.conn.readyState===Qn.open||this.conn.readyState===Qn.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.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.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.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_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
311heduleTimeout(),this._triggerStateCallbacks("close",e)}_onConnError(e){this._setConnectionState("disconnected"),this.log("transport",`${e}`),this._triggerChanError(),this._triggerStateCallbacks("error",e)}_triggerChanError(){this.channels.forEach(e=>e._trigger(jt.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([cM],{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;e?r=e:this.accessToken?r=await this.accessToken():r=this.accessTokenValue,this.accessTokenValue!=r&&(this.accessTokenValue=r,this.channels.forEach(n=>{const s={access_token:r,version:QD};r&&n.updateJoinPayload(s),n.joinedOnce&&n._isJoined()&&n._push(jt.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){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 M1(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},ll.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(e){var r,n,s,o,i,a,l,c,u,f,p,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:Bf,this.heartbeatIntervalMs=(s=e==null?void 0:e.heartbeatIntervalMs)!==null&&s!==void 0?s:ll.HEARTBEAT_INTERVAL,this.worker=(o=e==null?void 0:e.worker)!==null&&o!==void 0?o:!1,this.accessToken=(i=e==null?void 0:e.accessToken)!==null&&i!==void 0?i:null,this.heartbeatCallback=(a=e==null?void 0:e.heartbeatCallback)!==null&&a!==void 0?a:dd,this.vsn=(l=e==null?void 0:e.vsn)!==null&&l!==void 0?l:Fv,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:v=>aM[v-1]||lM,this.vsn){case D1:this.encode=(u=e==null?void 0:e.encode)!==null&&u!==void 0?u:(v,m)=>m(JSON.stringify(v)),this.decode=(f=e==null?void 0:e.decode)!==null&&f!==void 0?f:(v,m)=>m(JSON.parse(v));break;case JD:this.encode=(p=e==null?void 0:e.encode)!==null&&p!==void 0?p: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}}}class Vp extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Se(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class dM extends Vp{constructor(e,r,n){super(e),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Wf extends Vp{constructor(e,r){super(e),this.name="StorageUnknownError",this.originalError=r}}const Wp=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),fM=()=>Response,Hf=t=>{if(Array.isArray(t))return t.map(r=>Hf(r));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));e[s]=Hf(n)}),e},hM=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)},fd=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=(t,e,r)=>K(void 0,void 0,void 0,function*(){const n=yield fM();t instanceof n&&!(r!=null&&r.noResolveJson)?t.json().then(s=>{const o=t.status||500,i=(s==null?void 0:s.statusCode)||o+"";e(new dM(fd(s),o,i))}).catch(s=>
311{e(new Wf(fd(s),s))}):e(new Wf(fd(t),t))}),mM=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"||!n?s:(hM(n)?(s.headers=Object.assign({"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),Object.assign(Object.assign({},s),r))};function Ea(t,e,r,n,s,o){return K(this,void 0,void 0,function*(){return new Promise((i,a)=>{t(r,mM(e,n,s,o)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>pM(l,a,n))})})}function ra(t,e,r,n){return K(this,void 0,void 0,function*(){return Ea(t,"GET",e,r,n)})}function Gt(t,e,r,n,s){return K(this,void 0,void 0,function*(){return Ea(t,"POST",e,n,s,r)})}function Kf(t,e,r,n,s){return K(this,void 0,void 0,function*(){return Ea(t,"PUT",e,n,s,r)})}function gM(t,e,r,n){return K(this,void 0,void 0,function*(){return Ea(t,"HEAD",e,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function Hp(t,e,r,n,s){return K(this,void 0,void 0,function*(){return Ea(t,"DELETE",e,n,s,r)})}class vM{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r}then(e,r){return this.execute().then(e,r)}execute(){return K(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Se(e))return{data:null,error:e};throw e}})}}var F1;class yM{constructor(e,r){this.downloadFn=e,this.shouldThrowOnError=r,this[F1]="BlobDownloadBuilder",this.promise=null}asStream(){return new vM(this.downloadFn,this.shouldThrowOnError)}then(e,r){return this.getPromise().then(e,r)}catch(e){return this.getPromise().catch(e)}finally(e){return this.getPromise().finally(e)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return K(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(e){if(this.shouldThrowOnError)throw e;if(Se(e))return{data:null,error:e};throw e}})}}F1=Symbol.toStringTag;const wM={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Vv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class xM{constructor(e,r={},n,s){this.shouldThrowOnError=!1,this.url=e,this.headers=r,this.bucketId=n,this.fetch=Wp(s)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(e,r,n,s){return K(this,void 0,void 0,function*(){try{let o;const i=Object.assign(Object.assign({},Vv),s);let a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&n instanceof Blob?(o=new FormData,o.append("cacheControl",i.cacheControl),l&&o.append("metadata",this.encodeMetadata(l)),o.append("",n)):typeof FormData<"u"&&n instanceof FormData?(o=n,o.has("cacheControl")||o.append("cacheControl",i.cacheControl),l&&!o.has("metadata")&&o.append("metadata",this.encodeMetadata(l))):(o=n,a["cache-control"]=`max-age=${i.cacheControl}`,a["content-type"]=i.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l))),(typeof ReadableStream<"u"&&o instanceof ReadableStream||o&&typeof o=="object"&&"pipe"in o&&typeof o.pipe=="function")&&!i.duplex&&(i.duplex="half")),s!=null&&s.headers&&(a=Object.assign(Object.assign({},a),s.headers));const c=this._removeEmptyFolders(r),u=this._getFinalPath(c),f=yield(e=="PUT"?Kf:Gt)(this.fetch,`${this.url}/object/${u}`,o,Object.assign({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{data:{path:c,id:f.Id,fullPath:f.Key},error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(Se(o))return{data:null,error:o};throw o}})}upload(e,r,n){return K(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,r,n)})}uploadToSignedUrl(e,r,n,s){return K(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(e),i=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${i}`);a.searchParams.set("token",r);try{let l;const c=Object.assign({upsert:Vv.upsert},s),u=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",c.cacheControl)):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType);const f=yield Kf(this.fetch,a.toString(),l,{headers:u});return{data:{path:o,fullPath:f.Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(Se(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e,r){return K(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const s=Object.assign({},this.headers);r!=null&&r.upsert&&(s["x-upsert"]="true");const o=yield Gt(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:s}),i=new URL(this.url+o.url),a=i.searchParams.get("token");if(!a)throw new Vp("No token returned by API");return{data:{signedUrl:i.toString(),path:e,token:a},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Se(n))return{data:null,error:n};throw n}})}update(e,r,n){return K(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,r,n)})}move(e,r,n){return K(this,void 0,void 0,function*(){try{return{data:yield Gt(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(Se(s))return{data:null,error:s};throw s}})}copy(e,r,n){return K(this,void 0,void 0,function*(){try{return{data:{path:(yield Gt(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(Se(s))return{data:null,error:s};throw s}})}createSignedUrl(e,r,n){return K(this,void 0,void 0,function*(){try{let s=this._getFinalPath(e),o=yield Gt(this.fetch,`${this.url}/object/sign/${s}
311`,Object.assign({expiresIn:r},n!=null&&n.transform?{transform:n.transform}:{}),{headers:this.headers});const i=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${i}`)},{data:o,error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(Se(s))return{data:null,error:s};throw s}})}createSignedUrls(e,r,n){return K(this,void 0,void 0,function*(){try{const s=yield Gt(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:e},{headers:this.headers}),o=n!=null&&n.download?`&download=${n.download===!0?"":n.download}`:"";return{data:s.map(i=>Object.assign(Object.assign({},i),{signedUrl:i.signedURL?encodeURI(`${this.url}${i.signedURL}${o}`):null})),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(Se(s))return{data:null,error:s};throw s}})}download(e,r){const s=typeof(r==null?void 0:r.transform)<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString((r==null?void 0:r.transform)||{}),i=o?`?${o}`:"",a=this._getFinalPath(e),l=()=>ra(this.fetch,`${this.url}/${s}/${a}${i}`,{headers:this.headers,noResolveJson:!0});return new yM(l,this.shouldThrowOnError)}info(e){return K(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{const n=yield ra(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:Hf(n),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Se(n))return{data:null,error:n};throw n}})}exists(e){return K(this,void 0,void 0,function*(){const r=this._getFinalPath(e);try{return yield gM(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Se(n)&&n instanceof Wf){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}})}getPublicUrl(e,r){const n=this._getFinalPath(e),s=[],o=r!=null&&r.download?`download=${r.download===!0?"":r.download}`:"";o!==""&&s.push(o);const a=typeof(r==null?void 0:r.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((r==null?void 0:r.transform)||{});l!==""&&s.push(l);let c=s.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${c}`)}}}remove(e){return K(this,void 0,void 0,function*(){try{return{data:yield Hp(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Se(r))return{data:null,error:r};throw r}})}list(e,r,n){return K(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},wM),r),{prefix:e||""});return{data:yield Gt(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},n),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(Se(s))return{data:null,error:s};throw s}})}listV2(e,r){return K(this,void 0,void 0,function*(){try{const n=Object.assign({},e);return{data:yield Gt(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Se(n))return{data:null,error:n};throw n}})}encodeMetadata(e){return JSON.stringify(e)}toBase64(e){return typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(e)}_getFinalPath(e){return`${this.bucketId}/${e.replace(/^\/+/,"")}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const r=[];return e.width&&r.push(`width=${e.width}`),e.height&&r.push(`height=${e.height}`),e.resize&&r.push(`resize=${e.resize}`),e.format&&r.push(`format=${e.format}`),e.quality&&r.push(`quality=${e.quality}`),r.join("&")}}const U1="2.83.0",B1={"X-Client-Info":`storage-js/${U1}`};class bM{constructor(e,r={},n,s){this.shouldThrowOnError=!1;const o=new URL(e);s!=null&&s.useNewHostname&&/supabase\.(co|in|red)$/.test(o.hostname)&&!o.hostname.includes("storage.supabase.")&&(o.hostname=o.hostname.replace("supabase.","storage.supabase.")),this.url=o.href.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},B1),r),this.fetch=Wp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(e){return K(this,void 0,void 0,function*(){try{const r=this.listBucketOptionsToQueryString(e);return{data:yield ra(this.fetch,`${this.url}/bucket${r}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Se(r))return{data:null,error:r};throw r}})}getBucket(e){return K(this,void 0,void 0,function*(){try{return{data:yield ra(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Se(r))return{data:null,error:r};throw r}})}createBucket(e){return K(this,arguments,void 0,function*(r,n={public:!1}){try{return{data:yield Gt(this.fetch,`${this.url}/bucket`,{id:r,name:r,type:n.type,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(Se(s))return{data:null,error:s};throw s}})}updateBucket(e,r){return K(this,void 0,void 0,function*(){try{return{data:yield Kf(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:r.public,file_size_limit:r.fileSizeLimit,allowed_mime_types:r.allowedMimeTypes},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(Se(n))return{data:null,error:n};throw n}})}emptyBucket(e){return K(this,void 0,void 0,function*(){try{return{data:yield Gt(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Se(r))return{data:null,error:r};throw r}})}deleteBucket(e){return K(this,void 0,void 0,function*(){try{return{data:yield Hp(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Se(r))return{data:null,error:r};throw r}})}listBucketOptionsToQueryString(e){const r={};return e&&("limit"in e&&(r.limit=String(e.limit)),"offset"in e&&(r.offset=String(e.offset)),e.search&&(r.search=e.search),e.sortColumn&&(r.sortColumn=e.sortColumn),e.sortOrder&&(r.sortOrder=e.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}}class _M{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},B1),r),this.fetch=Wp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return K(this,void 0,void 0,function*(){try{return{data:yield Gt(this.fetch,`${this.url}/bucket`,{name:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Se(r))return{data:null,error:r};throw r}})}listBuckets(e){return K(this,void 0,void 0,function*(){try{const r=new
311URLSearchParams;(e==null?void 0:e.limit)!==void 0&&r.set("limit",e.limit.toString()),(e==null?void 0:e.offset)!==void 0&&r.set("offset",e.offset.toString()),e!=null&&e.sortColumn&&r.set("sortColumn",e.sortColumn),e!=null&&e.sortOrder&&r.set("sortOrder",e.sortOrder),e!=null&&e.search&&r.set("search",e.search);const n=r.toString(),s=n?`${this.url}/bucket?${n}`:`${this.url}/bucket`;return{data:yield ra(this.fetch,s,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Se(r))return{data:null,error:r};throw r}})}deleteBucket(e){return K(this,void 0,void 0,function*(){try{return{data:yield Hp(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(Se(r))return{data:null,error:r};throw r}})}}const Kp={"X-Client-Info":`storage-js/${U1}`,"Content-Type":"application/json"};class z1 extends Error{constructor(e){super(e),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function yt(t){return typeof t=="object"&&t!==null&&"__isStorageVectorsError"in t}class hd extends z1{constructor(e,r,n){super(e),this.name="StorageVectorsApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class SM extends z1{constructor(e,r){super(e),this.name="StorageVectorsUnknownError",this.originalError=r}}var Wv;(function(t){t.InternalError="InternalError",t.S3VectorConflictException="S3VectorConflictException",t.S3VectorNotFoundException="S3VectorNotFoundException",t.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",t.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",t.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(Wv||(Wv={}));const qp=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)},Hv=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),CM=(t,e,r)=>K(void 0,void 0,void 0,function*(){if(t&&typeof t=="object"&&"status"in t&&"ok"in t&&typeof t.status=="number"&&!(r!=null&&r.noResolveJson)){const s=t.status||500,o=t;if(typeof o.json=="function")o.json().then(i=>{const a=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||s+"";e(new hd(Hv(i),s,a))}).catch(()=>{const i=s+"",a=o.statusText||`HTTP ${s} error`;e(new hd(a,s,i))});else{const i=s+"",a=o.statusText||`HTTP ${s} error`;e(new hd(a,s,i))}}else e(new SM(Hv(t),t))}),kM=(t,e,r,n)=>{const s={method:t,headers:(e==null?void 0:e.headers)||{}};return n?(EM(n)?(s.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),s.body=JSON.stringify(n)):s.body=n,Object.assign(Object.assign({},s),r)):s};function RM(t,e,r,n,s,o){return K(this,void 0,void 0,function*(){return new Promise((i,a)=>{t(r,kM(e,n,s,o)).then(l=>{if(!l.ok)throw l;if(n!=null&&n.noResolveJson)return l;const c=l.headers.get("content-type");return!c||!c.includes("application/json")?{}:l.json()}).then(l=>i(l)).catch(l=>CM(l,a,n))})})}function wt(t,e,r,n,s){return K(this,void 0,void 0,function*(){return RM(t,"POST",e,n,s,r)})}class PM{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},Kp),r),this.fetch=qp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(e){return K(this,void 0,void 0,function*(){try{return{data:(yield wt(this.fetch,`${this.url}/CreateIndex`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}getIndex(e,r){return K(this,void 0,void 0,function*(){try{return{data:yield wt(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:e,indexName:r},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(yt(n))return{data:null,error:n};throw n}})}listIndexes(e){return K(this,void 0,void 0,function*(){try{return{data:yield wt(this.fetch,`${this.url}/ListIndexes`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}deleteIndex(e,r){return K(this,void 0,void 0,function*(){try{return{data:(yield wt(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:e,indexName:r},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(yt(n))return{data:null,error:n};throw n}})}}class TM{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},Kp),r),this.fetch=qp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(e){return K(this,void 0,void 0,function*(){try{if(e.vectors.length<1||e.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield wt(this.fetch,`${this.url}/PutVectors`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}getVectors(e){return K(this,void 0,void 0,function*(){try{return{data:yield wt(this.fetch,`${this.url}/GetVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}listVectors(e){return K(this,void 0,void 0,function*(){try{if(e.segmentCount!==void 0){if(e.segmentCount<1||e.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
311if(e.segmentIndex!==void 0&&(e.segmentIndex<0||e.segmentIndex>=e.segmentCount))throw new Error(`segmentIndex must be between 0 and ${e.segmentCount-1}`)}return{data:yield wt(this.fetch,`${this.url}/ListVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}queryVectors(e){return K(this,void 0,void 0,function*(){try{return{data:yield wt(this.fetch,`${this.url}/QueryVectors`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}deleteVectors(e){return K(this,void 0,void 0,function*(){try{if(e.keys.length<1||e.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield wt(this.fetch,`${this.url}/DeleteVectors`,e,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}}class jM{constructor(e,r={},n){this.shouldThrowOnError=!1,this.url=e.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},Kp),r),this.fetch=qp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(e){return K(this,void 0,void 0,function*(){try{return{data:(yield wt(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}getBucket(e){return K(this,void 0,void 0,function*(){try{return{data:yield wt(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:e},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}listBuckets(){return K(this,arguments,void 0,function*(e={}){try{return{data:yield wt(this.fetch,`${this.url}/ListVectorBuckets`,e,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}deleteBucket(e){return K(this,void 0,void 0,function*(){try{return{data:(yield wt(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:e},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(yt(r))return{data:null,error:r};throw r}})}}class NM extends jM{constructor(e,r={}){super(e,r.headers||{},r.fetch)}from(e){return new OM(this.url,this.headers,e,this.fetch)}}class OM extends PM{constructor(e,r,n,s){super(e,r,s),this.vectorBucketName=n}createIndex(e){const r=Object.create(null,{createIndex:{get:()=>super.createIndex}});return K(this,void 0,void 0,function*(){return r.createIndex.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const e=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return K(this,arguments,void 0,function*(r={}){return e.listIndexes.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName}))})}getIndex(e){const r=Object.create(null,{getIndex:{get:()=>super.getIndex}});return K(this,void 0,void 0,function*(){return r.getIndex.call(this,this.vectorBucketName,e)})}deleteIndex(e){const r=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return K(this,void 0,void 0,function*(){return r.deleteIndex.call(this,this.vectorBucketName,e)})}index(e){return new AM(this.url,this.headers,this.vectorBucketName,e,this.fetch)}}class AM extends TM{constructor(e,r,n,s,o){super(e,r,o),this.vectorBucketName=n,this.indexName=s}putVectors(e){const r=Object.create(null,{putVectors:{get:()=>super.putVectors}});return K(this,void 0,void 0,function*(){return r.putVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(e){const r=Object.create(null,{getVectors:{get:()=>super.getVectors}});return K(this,void 0,void 0,function*(){return r.getVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const e=Object.create(null,{listVectors:{get:()=>super.listVectors}});return K(this,arguments,void 0,function*(r={}){return e.listVectors.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(e){const r=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return K(this,void 0,void 0,function*(){return r.queryVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(e){const r=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return K(this,void 0,void 0,function*(){return r.deleteVectors.call(this,Object.assign(Object.assign({},e),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class IM extends bM{constructor(e,r={},n,s){super(e,r,n,s)}from(e){return new xM(this.url,this.headers,e,this.fetch)}get vectors(){return new NM(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new _M(this.url+"/iceberg",this.headers,this.fetch)}}const DM="2.83.0";let hi="";typeof Deno<"u"?hi="deno":typeof document<"u"?hi="web":typeof navigator<"u"&&navigator.product==="ReactNative"?hi="react-native":hi="node";const MM={"X-Client-Info":`supabase-js-${hi}/${DM}`},LM={headers:MM},$M={schema:"public"},FM={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},UM={},BM=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),zM=()=>Headers,VM=(t,e,r)=>{const n=BM(r),s=zM();return async(o,i)=>{var a;const l=(a=await e())!==null&&a!==void 0?a:t;
311let c=new s(i==null?void 0:i.headers);return c.has("apikey")||c.set("apikey",t),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),n(o,Object.assign(Object.assign({},i),{headers:c}))}};function WM(t){return t.endsWith("/")?t:t+"/"}function HM(t,e){var r,n;const{db:s,auth:o,realtime:i,global:a}=t,{db:l,auth:c,realtime:u,global:f}=e,p={db:Object.assign(Object.assign({},l),s),auth:Object.assign(Object.assign({},c),o),realtime:Object.assign(Object.assign({},u),i),storage:{},global:Object.assign(Object.assign(Object.assign({},f),a),{headers:Object.assign(Object.assign({},(r=f==null?void 0:f.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return t.accessToken?p.accessToken=t.accessToken:delete p.accessToken,p}function KM(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(WM(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const V1="2.83.0",Ws=30*1e3,qf=3,pd=qf*Ws,qM="http://localhost:9999",GM="supabase.auth.token",YM={"X-Client-Info":`gotrue-js/${V1}`},Gf="X-Supabase-Api-Version",W1={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},QM=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,JM=10*60*1e3;class na extends Error{constructor(e,r,n){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function q(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class XM extends na{constructor(e,r,n){super(e,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function ZM(t){return q(t)&&t.name==="AuthApiError"}class Xn extends na{constructor(e,r){super(e),this.name="AuthUnknownError",this.originalError=r}}class Bn extends na{constructor(e,r,n,s){super(e,n,s),this.name=r,this.status=n}}class ht extends Bn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function eL(t){return q(t)&&t.name==="AuthSessionMissingError"}class $s extends Bn{constructor(){super("Auth session or user missing","AuthInvalidToken
311ResponseError",500,void 0)}}class cl extends Bn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ul extends Bn{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 tL(t){return q(t)&&t.name==="AuthImplicitGrantRedirectError"}class Kv extends Bn{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 Yf extends Bn{constructor(e,r){super(e,"AuthRetryableFetchError",r,void 0)}}function md(t){return q(t)&&t.name==="AuthRetryableFetchError"}class qv extends Bn{constructor(e,r,n){super(e,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Qf extends Bn{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const gc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Gv=` 312\r=`.split(""),rL=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<Gv.length;e+=1)t[Gv[e].charCodeAt(0)]=-2;for(let e=0;e<gc.length;e+=1)t[gc[e].charCodeAt(0)]=e;return t})();function Yv(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(gc[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(gc[n]),e.queuedBits-=6}}function H1(t,e,r){const n=rL[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 Qv(t){const e=[],r=i=>{e.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{oL(i,n,r)};for(let i=0;i<t.length;i+=1)H1(t.charCodeAt(i),s,o);return e.join("")}function nL(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 sL(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}nL(n,e)}}function oL(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 po(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};for(let s=0;s<t.length;s+=1)H1(t.charCodeAt(s),r,n);return new Uint8Array(e)}function iL(t){const e=[];return sL(t,r=>e.push(r)),new Uint8Array(e)}function rs(t){const e=[],r={queue:0,queuedBits:0},n=s=>{e.push(s)};return t.forEach(s=>Yv(s,r,n)),Yv(null,r,n),e.join("")}function aL(t){return Math.round(Date.now()/1e3)+t}function lL(){return Symbol("auth-callback")}const Ue=()=>typeof window<"u"&&typeof document<"u",Wn={tested:!1,writable:!1},K1=()=>{if(!Ue())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Wn.tested)return Wn.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Wn.tested=!0,Wn.writable=!0}catch{Wn.tested=!0,Wn.writable=!1}return Wn.writable};function cL(t){const e={},r=new URL(t);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,o)=>{e[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{e[s]=n}),e}const q1=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),uL=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",Hs=async(t,e,r)=>{await t.setItem(e,JSON.stringify(r))},Hn=async(t,e)=>{const r=await t.getItem(e);if(!r)return null;try{return JSON.parse(r)}catch{return r}},en=async(t,e)=>{await t.removeItem(e)};class iu{constructor(){this.promise=new iu.promiseConstructor((e,r)=>{this.resolve=e,this.reject=r})}}iu.promiseConstructor=Promise;function gd(t){const e=t.split(".");if(e.length!==3)throw new Qf("Invalid JWT structure");for(let n=0;n<e.length;n++)if(!QM.test(e[n]))throw new Qf("JWT not in base64url format");return{header:JSON.parse(Qv(e[0])),payload:JSON.parse(Qv(e[1])),signature:po(e[2]),raw:{header:e[0],payload:e[1]}}}async function dL(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function fL(t,e){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await t(o);if(!e(o,null,i)){n(i);return}}catch(i){if(!e(o,i)){s(i);return}}})()})}function hL(t){return("0"+t.toString(16)).substr(-2)}function pL(){const e=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(e),Array.from(e,hL).join("")}async function mL(t){const r=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function gL(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code
312challenge method will default to use plain instead of sha256."),t;const r=await mL(t);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Fs(t,e,r=!1){const n=pL();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Hs(t,`${e}-code-verifier`,s);const o=await gL(n);return[o,n===o?"plain":"s256"]}const vL=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function yL(t){const e=t.headers.get(Gf);if(!e||!e.match(vL))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function wL(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 xL(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 bL=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Us(t){if(!bL.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function vd(){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 _L(t,e){return new Proxy(t,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!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 Jv(t){return JSON.parse(JSON.stringify(t))}const Gn=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),SL=[502,503,504];async function Xv(t){var e;if(!uL(t))throw new Yf(Gn(t),0);if(SL.includes(t.status))throw new Yf(Gn(t),t.status);let r;try{r=await t.json()}catch(o){throw new Xn(Gn(o),o)}let n;const s=yL(t);if(s&&s.getTime()>=W1["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 qv(Gn(r),t.status,((e=r.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(n==="session_not_found")throw new ht}else if(typeof r=="object"&&r&&typeof r.weak_password=="object"&&r.weak_password&&Array.isArray(r.weak_password.reasons)&&r.weak_password.reasons.length&&r.weak_password.reasons.reduce((o,i)=>o&&typeof i=="string",!0))throw new qv(Gn(r),t.status,r.weak_password.reasons);throw new XM(Gn(r),t.status||500,n)}const EL=(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 Y(t,e,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[Gf]||(o[Gf]=W1["2024-01-01"].name),n!=null&&n.jwt&&(o.Authorization=`Bearer ${n.jwt}`);const i=(s=n==null?void 0:n.query)!==null&&s!==void 0?s:{};n!=null&&n.redirectTo&&(i.redirect_to=n.redirectTo);const a=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await CL(t,e,r+a,{headers:o,noResolveJson:n==null?void 0:n.noResolveJson},{},n==null?void 0:n.body);return n!=null&&n.xform?n==null?void 0:n.xform(l):{data:Object.assign({},l),error:null}}async function CL(t,e,r,n,s,o){const i=EL(e,n,s,o);let a;try{a=await t(r,Object.assign({},i))}catch(l){throw console.error(l),new Yf(Gn(l),0)}if(a.ok||await Xv(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await Xv(l)}}function Ht(t){var e;let r=null;PL(t)&&(r=Object.assign({},t),t.expires_at||(r.expires_at=aL(t.expires_in)));const n=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:r,user:n},error:null}}function Zv(t){const e=Ht(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 cn(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function kL(t){return{data:t,error:null}}function RL(t){const{action_link:e,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=t,i=Un(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:o},l=Object.assign({},i);return{data:{properties:a,user:l},error:null}}function ey(t){return t}function PL(t){return t.access_token&&t.refresh_token&&t.expires_in}const yd=["global","local","others"];class TL{constructor({url:e="",headers:r={},fetch:n}){this.url=e,this.headers=r,this.fetch=q1(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)}}
vendor: 4,751 bytes, line 312
312async signOut(e,r=yd[0]){if(yd.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${yd.join(", ")}`);try{return await Y(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(n){if(q(n))return{data:null,error:n};throw n}}async inviteUserByEmail(e,r={}){try{return await Y(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:cn})}catch(n){if(q(n))return{data:{user:null},error:n};throw n}}async generateLink(e){try{const{options:r}=e,n=Un(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 Y(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:RL,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(q(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(e){try{return await Y(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:cn})}catch(r){if(q(r))return{data:{user:null},error:r};throw r}}async listUsers(e){var r,n,s,o,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await Y(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:(o=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:ey});if(u.error)throw u.error;const f=await u.json(),p=(i=u.headers.get("x-total-count"))!==null&&i!==void 0?i: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(v=>{const m=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(v.split(";")[1].split("=")[1]);c[`${w}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(q(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){Us(e);try{return await Y(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:cn})}catch(r){if(q(r))return{data:{user:null},error:r};throw r}}async updateUserById(e,r){Us(e);try{return await Y(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:r,headers:this.headers,xform:cn})}catch(n){if(q(n))return{data:{user:null},error:n};throw n}}async deleteUser(e,r=!1){Us(e);try{return await Y(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:r},xform:cn})}catch(n){if(q(n))return{data:{user:null},error:n};throw n}}async _listFactors(e){Us(e.userId);try{const{data:r,error:n}=await Y(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(q(r))return{data:null,error:r};throw r}}async _deleteFactor(e){Us(e.userId),Us(e.id);try{return{data:await Y(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _listOAuthClients(e){var r,n,s,o,i,a,l;try{const c={nextPage:null,lastPage:0,total:0},u=await Y(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:(o=(s=e==null?void 0:e.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:ey});if(u.error)throw u.error;const f=await u.json(),p=(i=u.headers.get("x-total-count"))!==null&&i!==void 0?i: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(v=>{const m=parseInt(v.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(v.split(";")[1].split("=")[1]);c[`${w}Page`]=m}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(q(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(e){try{return await Y(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _getOAuthClient(e){try{return await Y(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}async _updateOAuthClient(e,r){try{return await Y(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(q(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(e){try{return await Y(this.fetch,"DELET
312E",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(q(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(e){try{return await Y(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(q(r))return{data:null,error:r};throw r}}}function ty(t={}){return{getItem:e=>t[e]||null,setItem:(e,r)=>{t[e]=r},removeItem:e=>{delete t[e]}}}const Bs={debug:!!(globalThis&&K1()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class G1 extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class jL extends G1{}async function NL(t,e,r){Bs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const n=new globalThis.AbortController;return e>0&&setTimeout(()=>{n.abort(),Bs.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await Promise.resolve().then(()=>globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){Bs.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,s.name);try{return await r()}finally{Bs.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,s.name)}}else{if(e===0)throw Bs.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new jL(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(Bs.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await r()}}))}function OL(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Y1(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function AL(t){return parseInt(t,16)}function IL(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,n=>n.toString(16).padStart(2,"0")).join("")}function DL(t){var e;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:a,requestId:l,resources:c,scheme:u,uri:f,version:p}=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(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!f)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(p!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${p}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 313`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const h=Y1(t.address),v=u?`${u}://${n}`:n,m=t.statement?`${t.statement} 314`:"",w=`${v} wants you to sign in with your Ethereum account: 315${h} 316 317${m}`;let x=`URI: ${f} 318Version: ${p} 319Chain ID: ${r}${i?` 320Nonce: ${i}`:""} 321Issued At: ${o.toISOString()}`;if(s&&(x+=` 322Expiration Time: ${s.toISOString()}`),a&&(x+=` 323Not Before: ${a.toISOString()}`),l&&(x+=` 324Request ID: ${l}`),c){let y=` 325Resources:`;for(const b of c){if(!b||typeof b!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${b}`);y+=` 326- ${b}`}x+=y}return`${w} 327${x}`}
327class Ne extends Error{constructor({message:e,code:r,cause:n,name:s}){var o;super(e,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class vc extends Ne{constructor(e,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:e}),this.name="WebAuthnUnknownError",this.originalError=r}}function ML({error:t,options:e}){var r,n,s;const{publicKey:o}=e;if(!o)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Ne({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Ne({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=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Ne({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=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Ne({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 Ne({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Ne({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return o.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Ne({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Ne({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 i=window.location.hostname;if(Q1(i)){if(o.rp.id!==i)return new Ne({message:`The RP ID "${o.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Ne({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 Ne({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 Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function LL({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 Ne({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Ne({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const n=window.location.hostname;if(Q1(n)){if(r.rpId!==n)return new Ne({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Ne({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Ne({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 Ne({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class $L{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 FL=new $L;function UL(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=Un(t,["challenge","user","excludeCredentials"]),o=po(e).buffer,i=Object.assign(Object.assign({},r),{id:po(r.id).buffer}),a=Object.assign(Object.assign({}
327,s),{challenge:o,user:i});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:po(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return a}function BL(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=Un(t,["challenge","allowCredentials"]),s=po(e).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const a=r[i];o.allowCredentials[i]=Object.assign(Object.assign({},a),{id:po(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function zL(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:rs(new Uint8Array(t.response.attestationObject)),clientDataJSON:rs(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function VL(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:rs(new Uint8Array(s.authenticatorData)),clientDataJSON:rs(new Uint8Array(s.clientDataJSON)),signature:rs(new Uint8Array(s.signature)),userHandle:s.userHandle?rs(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(e=r.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function Q1(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function ry(){var t,e;return!!(Ue()&&"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 WL(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new vc("Browser returned unexpected credential type",e)}:{data:null,error:new vc("Empty credential response",e)}}catch(e){return{data:null,error:ML({error:e,options:t})}}}async function HL(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new vc("Browser returned unexpected credential type",e)}:{data:null,error:new vc("Empty credential response",e)}}catch(e){return{data:null,error:LL({error:e,options:t})}}}const KL={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},qL={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function yc(...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 o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))n[o]=i;else if(r(i))n[o]=i;else if(e(i)){const a=n[o];e(a)?n[o]=yc(a,i):n[o]=yc(i)}else n[o]=i}return n}function GL(t,e){return yc(KL,t,e||{})}function YL(t,e){return yc(qL,t,e||{})}class QL{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},o){try{const{data:i,error:a}=await this.client.mfa.challenge({factorId:e,webauthn:r});if(!i)return{data:null,error:a};const l=s??FL.createNewAbortSignal();if(i.webauthn.type==="create"){const{user:c}=i.webauthn.credential_options.publicKey;c.name||(c.name=`${c.id}:${n}`),c.displayName||(c.displayName=c.name)}switch(i.webauthn.type){case"create":{const c=GL(i.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:u,error:f}=await WL({publicKey:c,signal:l});return u?{data:{factorId:e,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:u}},error:null}:{data:null,error:f}}case"request":{const c=YL(i.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:u,error:f}=await HL(Object.assign(Object.assign({},i.webauthn.credential_options),{publicKey:c,signal:l}));return u?{data:{factorId:e,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:u}},error:null}:{data:null,error:f}}}}catch(i){return q(i)?{data:null,error:i}:{data:null,error:new Xn("Unexpected error in challenge",i)}}}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}={}},o){if(!r)return{data:null,error:new na("rpId is required for WebAuthn authentication")};try{if(!ry())return{data:null,error:new Xn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this.challenge({factorId:e,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!i)return{data:null,error:a};const{webauthn:l}=i;return this._verify({factorId:e,challengeId:i.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(i){return q(i)?{data:null,error:i}:{data:null,error:new Xn("Unexpected error in authenticate",i)}}}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}={}},o){if(!r)return{data:null,error:new na("rpId is required for WebAuthn registration")};try{if(!ry())return{data:null,error:new Xn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this._enroll({friendlyName:e});if(!i)return await this.client.mfa.listFactors().then(u=>{var f;return(f=u.data)===null||f===void 0?void 0:f.all.find(p=>p.factor_type==="webauthn"&&p.friendly_name===e&&p.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:i.id,friendlyName:i.friendly_name,webauthn:{rpId:r,rpOrigins:n},signal:s},{create:o});return l?this._verify({factorId:i.id,challengeId:l.challengeId,webauthn:{rpId:r,rpOrigins:n,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(i){return q(i)?{data:null,error:i}:{data:null,error:new Xn("Unexpected error in register",i)}}}}OL();const JL={url:qM,storageKey:GM,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:YM,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function ny(t,e,r){return await r()}const zs={};class sa{get jwks(){var e,r;return(r=(e=zs[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(e){zs[this.storageKey]=Object.assign(Object.assign({},zs[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,r;return(r=(e=zs[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){zs[this.storageKey]=Object.assign(Object.assign({},zs[this.storageKey]),{cachedAt:e})}constructor(e){var r,n,s;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const o=Object.assign(Object.assign({},JL),e);if(this.storageKey=o.storageKey,this.instanceID=(r=sa.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,sa.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&Ue()){const i=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(i),this.logDebugMessages&&console.trace(i)}if(this.persistSession=o.persistSession,this.autoRefreshToken=o.autoRefreshToken,this.admin=new TL({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=q1(o.fetch),this.lock=o.lock||ny,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,o.lock?this.lock=o.lock:Ue()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=NL:this.lock=ny,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 QL(this)}
327,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:K1()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=ty(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=ty(this.memoryStorage)),Ue()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(i){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",i)}(s=this.broadcastChannel)===null||s===void 0||s.addEventListener("message",async i=>{this._debug("received broadcast notification from other tab or client",i),await this._notifyAllSubscribers(i.data.event,i.data.session,!1)})}this.initialize()}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${V1}) ${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(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var e;try{let r={},n="none";if(Ue()&&(r=cL(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Ue()&&this.detectSessionInUrl&&n!=="none"){const{data:s,error:o}=await this._getSessionFromURL(r,n);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),tL(o)){const l=(e=o.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:o}}return await this._removeSession(),{error:o}}const{session:i,redirectType:a}=s;return this._debug("#_initialize()","detected session in URL",i,"redirect type",a),await this._saveSession(i),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(r){return q(r)?this._returnResult({error:r}):this._returnResult({error:new Xn("Unexpected error during initialization",r)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var r,n,s;try{const o=await Y(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:Ht}),{data:i,error:a}=o;if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(q(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(e){var r,n,s;try{let o;if("email"in e){const{email:u,password:f,options:p}=e;let h=null,v=null;this.flowType==="pkce"&&([h,v]=await Fs(this.storage,this.storageKey)),o=await Y(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:u,password:f,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:h,code_challenge_method:v},xform:Ht})}else if("phone"in e){const{phone:u,password:f,options:p}=e;o=await Y(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:f,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},channel:(s=p==null?void 0:p.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:Ht})}else throw new cl("You must provide either an email or phone number and a password");const{data:i,error:a}=o;if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(o){if(q(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(e){try{let r;if("email"in e){const{email:o,password:i,options:a}=e;r=await Y(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Zv})}else if("phone"in e){const{phone:o,password:i,options:a}=e;r=await Y(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:i,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Zv})}else throw new cl("You must provide either an email or phone number and a password");const{data:n,error:s}=r;if(s)return this._returnResult({data:{user:null,session:null},error:s});if(!n||!n.session||!n.user){const o=new $s;return this._returnResult({data:{user:null,session:null},error:o})}return n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:Object.assign({user:n.user,session:n.session},n.weak_password?{weakPassword:n.weak_password}:null),error:s})}catch(r){if(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(e){var r,n,s,o;return await this._handleProviderSignIn(e.provider,{redirectTo:(r=e.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=e.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=e.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=e.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async signInWithWeb3(e){const{chain:r}=e;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,o,i,a,l,c,u,f,p;let h,v;if("message"in e)h=e.message,v=e.signature;else{const{chain:m,wallet:w,statement:x,options:y}=e;let b;if(Ue())if(typeof w=="object")b=w;else{const P=window;if("ethereum"in P&&typeof P.ethereum=="object"&&"request"in P.ethereum&&typeof P.ethereum.request=="function")b=P.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"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");b=w}const _=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href),S=await b.request({method:"eth_requestAccounts"}).then(P=>P).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!S||S.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const E=Y1(S[0]);let C=(n=y==null?void 0:y.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!C){const P=await b.request({method:"eth_chainId"});C=AL(P)}const k={domain:_.host,address:E,statement:x,uri:_.href,version:"1",chainId:C,nonce:(s=y==null?void 0:y.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=y==null?void 0:y.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=y==null?void 0:y.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=y==null?void 0:y.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=y==null?void 0:y.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=y==null?void 0:y.signInWithEthereum)===null||u===void 0?void 0:u.resources};h=DL(k),v=await b.request({method:"personal_sign",params:[IL(h),E]})}try{const{data:m,error:w}=await Y(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:v},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(p=e.options)===null||p===void 0?void 0:p.captchaToken}}:null),xform:Ht});if(w)throw w;if(!m||!m.session||!m.user){const x=new $s;return this._returnResult({data:{user:null,session:null},error:x})}return m.session&&(await this._saveSession(m.session),await this._notifyAllSubscribers("SIGNED_IN",m.session)),this._returnResult({data:Object.assign({},m),error:w})}catch(m){if(q(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(e){var r,n,s,o,i,a,l,c,u,f,p,h;let v,m;if("message"in e)v=e.message,m=e.signature;else{const{chain:w,wallet:x,statement:y,options:b}=e;let _;if(Ue())if(typeof x=="object")_=x;else{const E=window;if("solana"in E&&typeof E.solana=="object"&&("signIn"in E.solana&&typeof E.solana.signIn=="function"||"signMessage"in E.solana&&typeof E.solana.signMessage=="function"))_=E.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof x!="object"||!(b!=null&&b.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=x}const S=new URL((r=b==null?void 0:b.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const E=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},b==null?void 0:b.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),y?{statement:y}:null));let C;if(Array.isArray(E)&&E[0]&&typeof E[0]=="object")C=E[0];else if(E&&typeof E=="object"&&"signedMessage"in E&&"signature"in E)C=E;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in C&&"signature"in C&&(typeof C.signedMessage=="string"||C.signedMessage instanceof Uint8Array)&&C.signature instanceof Uint8Array)v=typeof C.signedMessage=="string"?C.signedMessage:new TextDecoder().decode(C.signedMessage),m=C.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in _)||typeof _.signMessage!="function"||!("publicKey"in _)||typeof _!="object"||!_.publicKey||!("toBase58"in _.publicKey)||typeof _.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");v=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...y?["",y,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(n=b==null?void 0:b.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=b==null?void 0:b.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${b.signInWithSolana.notBefore}`]:[],...!((i=b==null?void 0:b.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${b.signInWithSolana.expirationTime}`]:[],...!((a=b==null?void 0:b.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${b.signInWithSolana.chainId}`]:[],...!((l=b==null?void 0:b.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${b.signInWithSolana.nonce}`]:[],...!((c=b==null?void 0:b.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${b.signInWithSolana.requestId}`]:[],...!((f=(u=b==null?void 0:b.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||f===void 0)&&f.length?["Resources",...b.signInWithSolana.resources.map(C=>
327`- ${C}`)]:[]].join(` 328`);const E=await _.signMessage(new TextEncoder().encode(v),"utf8");if(!E||!(E instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=E}}try{const{data:w,error:x}=await Y(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:v,signature:rs(m)},!((p=e.options)===null||p===void 0)&&p.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Ht});if(x)throw x;if(!w||!w.session||!w.user){const y=new $s;return this._returnResult({data:{user:null,session:null},error:y})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:x})}catch(w){if(q(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(e){const r=await Hn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{const{data:o,error:i}=await Y(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:n},xform:Ht});if(await en(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const a=new $s;return this._returnResult({data:{user:null,session:null,redirectType:null},error:a})}return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),this._returnResult({data:Object.assign(Object.assign({},o),{redirectType:s??null}),error:i})}catch(o){if(q(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(e){try{const{options:r,provider:n,token:s,access_token:o,nonce:i}=e,a=await Y(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:n,id_token:s,access_token:o,nonce:i,gotrue_meta_security:{captcha_token:r==null?void 0:r.captchaToken}},xform:Ht}),{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 $s;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(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(e){var r,n,s,o,i;try{if("email"in e){const{email:a,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Fs(this.storage,this.storageKey));const{error:f}=await Y(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:f})}if("phone"in e){const{phone:a,options:l}=e,{data:c,error:u}=await Y(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:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(i=l==null?void 0:l.channel)!==null&&i!==void 0?i:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new cl("You must provide either an email or phone number.")}catch(a){if(q(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(e){var r,n;try{let s,o;"options"in e&&(s=(r=e.options)===null||r===void 0?void 0:r.redirectTo,o=(n=e.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:a}=await Y(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Ht});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,c=i.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(q(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(e){var r,n,s,o,i;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Fs(this.storage,this.storageKey));const c=await Y(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:kL});return!((o=c.data)===null||o===void 0)&&o.url&&Ue()&&!(!((i=e.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(a){if(q(a))return this._returnResult({data:null,error:a});throw a}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:r},error:n}=e;if(n)throw n;if(!r)throw new ht;const{error:s}=await Y(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(q(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:o}=e,{error:i}=await Y(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in e){const{phone:n,type:s,options:o}=e,{data:i,error:a}=await Y(this.fetch,"POST",r,{headers:this.headers,body:{phone:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:a})}throw new cl("You must provide either an email or phone number and a type")}catch(r){if(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async r=>r))}async _acquireLock(e,r){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await e(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const r=await Hn(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
328id"),await this._removeSession())),!e)return{data:{session:null},error:null};const n=e.expires_at?e.expires_at*1e3-Date.now()<pd:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",e.expires_at),!n){if(this.userStorage){const i=await Hn(this.userStorage,this.storageKey+"-user");i!=null&&i.user?e.user=i.user:e.user=vd()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};e.user=_L(e.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:s,error:o}=await this._callRefreshToken(e.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await Y(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:cn}):await this._useSession(async r=>{var n,s,o;const{data:i,error:a}=r;if(a)throw a;return!(!((n=i.session)===null||n===void 0)&&n.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ht}:await Y(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&o!==void 0?o:void 0,xform:cn})})}catch(r){if(q(r))return eL(r)&&(await this._removeSession(),await en(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(-1,async()=>await this._updateUser(e,r))}async _updateUser(e,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new ht;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await Fs(this.storage,this.storageKey));const{data:c,error:u}=await Y(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:i.access_token,xform:cn});if(u)throw u;return i.user=c.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(q(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ht;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=gd(e.access_token);if(i.exp&&(n=i.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};o=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)throw l;o={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(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return this._returnResult({data:{user:o.user,session:o},error:null})}catch(r){if(q(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async r=>{var n;if(!e){const{data:i,error:a}=r;if(a)throw a;e=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(e!=null&&e.refresh_token))throw new ht;const{data:s,error:o}=await this._callRefreshToken(e.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(q(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(e,r){try{if(!Ue())throw new ul("No browser detected.");
328if(e.error||e.error_description||e.error_code)throw new ul(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 Kv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ul("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 Kv("No code detected.");const{data:y,error:b}=await this._exchangeCodeForSession(e.code);if(b)throw b;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:y.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:c}=e;if(!o||!a||!i||!c)throw new ul("No session defined in URL");const u=Math.round(Date.now()/1e3),f=parseInt(a);let p=u+f;l&&(p=parseInt(l));const h=p-u;h*1e3<=Ws&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${f}s`);const v=p-f;u-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,p,u):u-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,p,u);const{data:m,error:w}=await this._getUser(o);if(w)throw w;const x={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:f,expires_at:p,refresh_token:i,token_type:c,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:e.type},error:null})}catch(n){if(q(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(e){return!!(e.access_token||e.error_description)}async _isPKCECallback(e){const r=await Hn(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&r)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({error:o});const i=(n=s.session)===null||n===void 0?void 0:n.access_token;if(i){const{error:a}=await this.admin.signOut(i,e);if(a&&!(ZM(a)&&(a.status===404||a.status===401||a.status===403)))return this._returnResult({error:a})}return e!=="others"&&(await this._removeSession(),await en(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(e){const r=lL(),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(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(e){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(e))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",e,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(e))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",o),console.error(o)}})}async resetPasswordForEmail(e,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Fs(this.storage,this.storageKey,!0));try{return await Y(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(q(o))return this._returnResult({data:null,error:o});throw o}}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(q(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 o=>{var i,a,l,c,u;const{data:f,error:p}=o;if(p)throw p;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(i=e.options)===null||i===void 0?void 0:i.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 Y(this.fetch,"GET",h,{headers:this.headers,jwt:(u=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(s)throw s;return Ue()&&!(!((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(q(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:o}}=r;if(s)throw s;const{options:i,provider:a,token:l,access_token:c,nonce:u}=e,f=await Y(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(n=o==null?void 0:o.access_token)!==null&&n!==void 0?n:void 0,body:{provider:a,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:Ht}),{data:p,error:h}=f;return h?this._returnResult({data:{user:null,session:null},error:h}):!p||!p.session||!p.user?this._returnResult({data:{user:null,session:null},error:new $s}):(p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers("USER_UPDATED",p.session)),this._returnResult({data:p,error:h}))}catch(s){if(q(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:o,error:i}=r;if(i)throw i;
328return await Y(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(q(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 fL(async s=>(s>0&&await dL(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await Y(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Ht})),(s,o)=>{const i=200*Math.pow(2,s);return o&&md(o)&&Date.now()+i-n<Ws})}catch(n){if(this._debug(r,"error",n),q(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),Ue()&&!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 Hn(this.storage,this.storageKey);if(s&&this.userStorage){let i=await Hn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await Hs(this.userStorage,this.storageKey+"-user",i)),s.user=(e=i==null?void 0:i.user)!==null&&e!==void 0?e:vd()}else if(s&&!s.user&&!s.user){const i=await Hn(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await en(this.storage,this.storageKey+"-user"),await Hs(this.storage,this.storageKey,s)):s.user=vd()}if(this._debug(n,"session from storage",s),!this._isValidSession(s)){this._debug(n,"session is not valid"),s!==null&&await this._removeSession();return}const o=((r=s.expires_at)!==null&&r!==void 0?r:1/0)*1e3-Date.now()<pd;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${pd}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),md(i)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",i),await this._removeSession()))}}else if(s.user&&s.user.__isUserNotAvailableProxy===!0)try{const{data:i,error:a}=await this._getUser(s.access_token);!a&&(i!=null&&i.user)?(s.user=i.user,await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)):this._debug(n,"could not get user data, skipping SIGNED_IN notification")}catch(i){console.error("Error getting user data:",i),this._debug(n,"error getting user data, skipping SIGNED_IN notification",i)}else await this._notifyAllSubscribers("SIGNED_IN",s)}catch(s){this._debug(n,"error",s),console.error(s);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var r,n;if(!e)throw new ht;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new iu;const{data:o,error:i}=await this._refreshAccessToken(e);if(i)throw i;if(!o.session)throw new ht;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={data:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(s,"error",o),q(o)){const i={data:null,error:o};return md(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(e,r,n=!0){const s=`#_notifyAllSubscribers(${e})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:e,session:r});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,r)}catch(l){o.push(l)}});if(await Promise.all(i),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(s,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const r=Object.assign({},e),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Hs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=Jv(s);await Hs(this.storage,this.storageKey,o)}else{const s=Jv(r);await Hs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),await en(this.storage,this.storageKey),await en(this.storage,this.storageKey+"-code-verifier"),await en(this.storage,this.storageKey+"-user"),this.userStorage&&await en(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Ue()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}
328catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Ws);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-e)/Ws);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${Ws}ms, refresh threshold is ${qf} ticks`),s<=qf&&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 G1)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ue()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const r=`#_onVisibilityChanged(${e})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(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[o,i]=await Fs(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(i)}`});s.push(a.toString())}if(n!=null&&n.queryParams){const o=new URLSearchParams(n.queryParams);s.push(o.toString())}return n!=null&&n.skipBrowserRedirect&&s.push(`skip_http_redirect=${n.skipBrowserRedirect}`),`${e}?${s.join("&")}`}async _unenroll(e){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?this._returnResult({data:null,error:o}):await Y(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(q(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:o,error:i}=r;if(i)return this._returnResult({data:null,error:i});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 Y(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(n=o==null?void 0:o.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(q(r))return this._returnResult({data:null,error:r});throw r}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?zL(e.webauthn.credential_response):VL(e.webauthn.credential_response)})}:{code:e.code}),{data:a,error:l}=await Y(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:i,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return 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(q(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)return this._returnResult({data:null,error:o});const i=await Y(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(i.error)return i;const{data:a}=i;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:UL(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:BL(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(q(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 o of(e=r==null?void 0:r.factors)!==null&&e!==void 0?e:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var e,r;const{data:{session:n},error:s}
328=await this.getSession();if(s)return this._returnResult({data:null,error:s});if(!n)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:o}=gd(n.access_token);let i=null;o.aal&&(i=o.aal);let a=i;((r=(e=n.user.factors)===null||e===void 0?void 0:e.filter(u=>u.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(a="aal2");const c=o.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:c},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 Y(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new ht})})}catch(r){if(q(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:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new ht});const i=await Y(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 i.data&&i.data.redirect_url&&Ue()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(q(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:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new ht});const i=await Y(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 i.data&&i.data.redirect_url&&Ue()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(q(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 Y(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 ht})})}catch(e){if(q(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 Y(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:e.clientId},xform:()=>({data:{},error:null})}):this._returnResult({data:null,error:new ht})})}catch(r){if(q(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:o,error:i}=await Y(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(i)throw i;return!o.keys||o.keys.length===0||(this.jwks=o,this.jwks_cached_at=s,n=o.keys.find(a=>a.kid===e),!n)?null:n}async getClaims(e,r={}){try{let n=e;if(!n){const{data:h,error:v}
328=await this.getSession();if(v||!h.session)return this._returnResult({data:null,error:v});n=h.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:l}}=gd(n);r!=null&&r.allowExpired||wL(o.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:o,header:s,signature:i},error:null}}const u=xL(s.alg),f=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,f,i,iL(`${a}.${l}`)))throw new Qf("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if(q(n))return this._returnResult({data:null,error:n});throw n}}}sa.nextInstanceID={};const XL=sa;class ZL extends XL{constructor(e){super(e)}}class e${constructor(e,r,n){var s,o,i;this.supabaseUrl=e,this.supabaseKey=r;const a=KM(e);if(!r)throw new Error("supabaseKey is required.");this.realtimeUrl=new URL("realtime/v1",a),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",a),this.storageUrl=new URL("storage/v1",a),this.functionsUrl=new URL("functions/v1",a);const l=`sb-${a.hostname.split(".")[0]}-auth-token`,c={db:$M,realtime:UM,auth:Object.assign(Object.assign({},FM),{storageKey:l}),global:LM},u=HM(n??{},c);this.storageKey=(s=u.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=u.global.headers)!==null&&o!==void 0?o:{},u.accessToken?(this.accessToken=u.accessToken,this.auth=new Proxy({},{get:(f,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((i=u.auth)!==null&&i!==void 0?i:{},this.headers,u.global.fetch),this.fetch=VM(r,this._getAccessToken.bind(this),u.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},u.realtime)),this.accessToken&&this.accessToken().then(f=>this.realtime.setAuth(f)).catch(f=>console.warn("Failed to set initial Realtime auth token:",f)),this.rest=new qD(new URL("rest/v1",a).href,{headers:this.headers,schema:u.db.schema,fetch:this.fetch}),this.storage=new IM(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),u.accessToken||this._listenForAuthEvents()}get functions(){return new WD(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(e,r,n)}channel(e,r={config:{}}){return this.realtime.channel(e,r)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var e,r;if(this.accessToken)return await this.accessToken();const{data:n}=await this.auth.getSession();return(r=(e=n.session)===null||e===void 0?void 0:e.access_token)!==null&&r!==void 0?r:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:s,userStorage:o,storageKey:i,flowType:a,lock:l,debug:c,throwOnError:u},f,p){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new ZL({url:this.authUrl.href,headers:Object.assign(Object.assign({},h),f),storageKey:i,autoRefreshToken:e,persistSession:r,detectSessionInUrl:n,storage:s,userStorage:o,flowType:a,lock:l,debug:c,throwOnError:u,fetch:p,hasCustomAuthorizationHeader:Object.keys(this.headers).some(v=>v.toLowerCase()==="authorization")})}_initRealtimeClient(e){return new uM(this.realtimeUrl.href,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(e,r,n){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):e==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const t$=(t,e,r)=>new e$(t,e,r);function r$(){if(typeof window<"u"||typeof process>"u")return!1;const t=process.version;if(t==null)return!1;const e=t.match(/^v(\d+)\./);return e?parseInt(e[1],10)<=18:!1}r$()&&console.warn("â ï¸ Node.js 18 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to N
328ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");const n$="https://jzovjonatjopakfxpljk.supabase.co",s$="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imp6b3Zqb25hdGpvcGFrZnhwbGprIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjU4NTA2ODMsImV4cCI6MjA4MTQyNjY4M30.yGZHC2USYws5aADc9AKexfDZ00F4hiN0H5ABZ8cx08o",le=t$(n$,s$,{auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),sy="five_health_session_token",xr={async getOrCreateSession(){let t=localStorage.getItem(sy);if(t){const{data:n,error:s}=await le.from("sessions").select("id").eq("session_token",t).single();if(n&&!s)return await le.from("sessions").update({last_seen_at:new Date().toISOString()}).eq("session_token",t),t}t=this.generateToken();const e=navigator.userAgent,{error:r}=await le.from("sessions").insert({session_token:t,user_agent:e,first_seen_at:new Date().toISOString(),last_seen_at:new Date().toISOString()});return r||(localStorage.setItem(sy,t),await this.logEvent(t,"session_created")),t},generateToken(){return`${Date.now()}-${Math.random().toString(36).substring(2,15)}`},async logEvent(t,e,r,n,s){try{const{data:o}=await le.from("sessions").select("id").eq("session_token",t).single();if(!o)return;const i={session_id:o.id,event_type:e};s&&(i.screening_id=s),n&&(i.resource_id=n),r&&(i.metadata=r),await le.from("events").insert(i)}catch(o){console.error("Failed to log event:",o)}}},o$=()=>{const[t,e]=g.useState([]),[r,n]=g.useState(""),s=Sr(),{toast:o}=Lc(),{t:i}=Vo();g.useEffect(()=>{window.scrollTo(0,0),xr.getOrCreateSession().then(u=>{n(u)})},[]);const a=u=>{e(f=>{const p=f.includes(u)?f.filter(h=>h!==u):[...f,u];return r&&!f.includes(u)&&xr.logEvent(r,"category_selected",{category:u}),p})},l=u=>i(`categories.${u}`),c=()=>{if(t.length===0){o({title:i("categories.selectAtLeast"),description:i("categories.chooseHelp"),variant:"destructive"});return}s("/zip-code",{state:{selectedCategories:t,sessionToken:r}})};return d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(hs,{}),d.jsxs("main",{className:"container max-w-2xl mx-auto px-4 py-6 sm:py-8",children:[d.jsx(mc,{currentStep:1,totalSteps:3}),d.jsxs("div",{className:"text-center mb-6 sm:mb-8",children:[d.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-bold mb-2 sm:mb-3 bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent",children:i("categories.title")}),d.jsx("p",{className:"text-muted-foreground text-base sm:text-lg",children:i("categories.subtitle")})]}),d.jsx("div",{className:"space-y-3 sm:space-y-4 mb-6 sm:mb-8",children:$D.map(u=>d.jsx(BD,{category:u.id,label:l(u.id),selected:t.includes(u.id),onToggle:()=>a(u.id)},u.id))}),d.jsx(ve,{onClick:c,className:"w-full h-12 sm:h-14 text-base sm:text-lg font-semibold",size:"lg",children:i("categories.continue")}),d.jsx("p",{className:"text-center text-sm text-muted-foreground mt-4 sm:mt-6",children:t.length>0?i("categories.selected",{count:t.length}):i("categories.noSelection")})]})]})},yn=g.forwardRef(({className:t,type:e,...r},n)=>d.jsx("input",{type:e,className:G("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}));yn.displayName="Input";var i$="Label",J1=g.forwardRef((t,e)=>d.jsx(te.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())}}));J1.displayName=i$;var X1=J1;const a$=va("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),lt=g.forwardRef(({className:t,...e},r)=>d.jsx(X1,{ref:r,className:G(a$(),t),...e}));lt.displayName=X1.displayName;const wd=new Map;async function l$(t){if(wd.has(t))return wd.get(t);try{const e=await fetch(`https://api.zippopotam.us/us/${t}`);if(!e.ok)return console.error(`Geocoding failed for zip code ${t}: ${e.status}`),null;const r=await e.json();if(!r.places||r.places.length===0)return console.error(`No places found for zip code ${t}`),null;const n=r.places[0],s={latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude),city:n["place name"],state:n["state abbreviation"]};return wd.set(t,s),s}catch(e){return console.error(`Error geocoding zip code ${t}:`,e),null}}const c$=[{value:3,label:"3 miles"},{value:5,label:"5 miles"},{value:10,label:"10 miles"}],Z1=3,u$=()=>{var x,y;const[t,e]=g.useState(""),[r,n]=g.useState(Z1),[s,o]=g.useState(!1),[i,a]=g.useState(""),l=Sr(),c=Fn(),{toast:u}=Lc(),{t:f}=Vo(),p=((x=c.state)==null?void 0:x.selectedCategories)||[],h=((y=c.state)==null?void 0:y.sessionToken)||"";if(g.useEffect(()=>{window.scrollTo(0,0)},[]),!p.length)return l("/"),null;const v=b=>{const _=b.trim();return/^\d{5}$/.test(_)},m=b=>{const _=b.target.value.replace(/\D/g,"").substring(0,5);e(_),i&&a("")},w=async b=>{if(b.preventDefault(),!v(t)){a(f("zipCode.invalidZip"));return}o(!0);try{const{data:_}=await le.from("sessions").select("id").eq("session_token",h).single();if(!_)throw new Error("Session not found");const{data:S,error:E}=await le.from("screenings").insert({session_id:_.id,zip_code:t,selected_categories:p,started_at:new Date().toISOString()}).select().single();if(E)throw E;await xr.logEvent(h,"zip_submitted",{zip_code:t,radius:r,categories:p},void 0,S==null?void 0:S.id),l("/results",{state:{selectedCategories:p,zipCode:t,radius:r,sessionToken:h,screeningId:S==null?void 0:S.id}})}catch(_){console.error("Error creating screening:",_),u({title:f("common.somethingWrong"),description:f("common.tryAgain"),variant:"destructive"})}finally{o(!1)}};return d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(hs,{}),d.jsxs("main",{className:"container max-w-2xl mx-auto px-4 py-6 sm:py-8",children:[d.jsxs(xa,{to:"/categories",className:"inline-flex items-center text-sm text-muted-foreground hover:text-foreground mb-2",children:[d.jsx(op,{className:"h-4 w-4 mr-1"}),f("zipCode.backToCategories")]}),d.jsx(mc,{currentStep:2,totalSteps:3,onStepClick:b=>{b===1&&l("/categories",{state:{sessionToken:h}})}}),d.jsxs("div",{className:"text-center mb-6 sm:mb-8",children:[d.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-bold mb-2 sm:mb-3",children:f("zipCode.title")}),d.jsx("p",{className:"text-muted-foreground text-base sm:text-lg",children:f("zipCode.subtitle")})]}),d.jsxs("form",{onSubmit:w,className:"space-y-5 sm:space-y-6",children:[d.jsxs("div",{children:[d.jsx(lt,{htmlFor:"zipCode",className:"text-base",children:f("zipCode.label")}),d.jsx(yn,{id:"zipCode",type:"text",inputMode:"numeric",pattern:"[0-9]*",placeholder:f("zipCode.placeholder"),value:t,onChange:m,className:`mt-2 h-12 sm:h-14 text-lg text-center ${i?"border-destructive":""}`,maxLength:5,autoFocus:!0}),i&&d.jsx("p",{className:"text-sm text-destructive mt-2",children:i})]}),d.jsxs("div",{children:[d.jsx(lt,{htmlFor:"radius",className:"text-base",children:f("zipCode.radiu
328sLabel")}),d.jsx("div",{className:"flex gap-2 mt-2",children:c$.map(b=>d.jsx(ve,{type:"button",variant:r===b.value?"default":"outline",size:"sm",className:"flex-1 h-10 sm:h-12 text-sm sm:text-base",onClick:()=>n(b.value),children:b.label},b.value))})]}),d.jsx(ve,{type:"submit",className:"w-full h-12 sm:h-14 text-base sm:text-lg font-semibold",size:"lg",disabled:s||t.length!==5,children:f(s?"zipCode.finding":"zipCode.findResources")})]}),d.jsx("div",{className:"mt-6 sm:mt-8 p-4 bg-muted/30 rounded-lg",children:d.jsx("p",{className:"text-sm text-center text-muted-foreground",children:f("zipCode.privacyNote")})})]})]})},d$=va("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Tn({className:t,variant:e,...r}){return d.jsx("div",{className:G(d$({variant:e}),t),...r})}const f$=({resource:t,sessionToken:e,screeningId:r})=>{const{t:n}=Vo(),s=()=>{xr.logEvent(e,"call_clicked",{resource_name:t.organization_name},t.id,r)},o=async u=>{try{await navigator.clipboard.writeText(u),oe.success(n("resourceCard.copiedLink"))}catch{oe.error(n("resourceCard.copyFailed"))}},i=()=>{try{return window.self!==window.top}catch{return!0}},a=async()=>{xr.logEvent(e,"directions_clicked",{resource_name:t.organization_name},t.id,r);const f=`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(`${t.address}, ${t.zip_code}`)}`;if(i()){await o(f);return}window.open(f,"_blank","noopener,noreferrer")||await o(f)},l=()=>{xr.logEvent(e,"resource_viewed",{resource_name:t.organization_name},t.id,r)},c=u=>n(`categories.${u}`);return d.jsxs(Lt,{className:"overflow-hidden transition-shadow hover:shadow-md",children:[d.jsx(Dr,{className:"pb-3",children:d.jsxs("div",{className:"flex items-start justify-between gap-2",children:[d.jsx("div",{className:"flex items-start gap-2 flex-1",children:d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx(Mr,{className:"text-base sm:text-lg break-words",children:t.organization_name}),d.jsxs("div",{className:"flex flex-wrap gap-2 mt-2",children:[d.jsx(Tn,{variant:"secondary",className:"capitalize text-xs",children:c(t.primary_category)}),t.distance!==void 0&&d.jsx(Tn,{variant:"outline",className:"text-xs",children:FD(t.distance)})]})]})}),d.jsx("img",{src:Zi,alt:"Five Health",className:"h-6 sm:h-8 w-auto flex-shrink-0"})]})}),d.jsxs(tr,{className:"space-y-3",children:[t.description&&d.jsx("p",{className:"text-xs sm:text-sm text-muted-foreground line-clamp-2",children:t.description}),d.jsxs("div",{className:"space-y-2 text-xs sm:text-sm",children:[t.address&&d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(Hi,{className:"h-4 w-4 mt-0.5 flex-shrink-0 text-muted-foreground"}),d.jsxs("span",{className:"break-words",children:[t.address,", ",t.zip_code]})]}),t.phone&&d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(ec,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"}),d.jsx("a",{href:`tel:${t.phone}`,className:"hover:underline",onClick:s,children:v1(t.phone)})]}),t.website&&d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(ip,{className:"h-4 w-4 mt-0.5 flex-shrink-0 text-muted-foreground"}),d.jsx("a",{href:t.website,target:"_blank",rel:"noopener noreferrer",className:"hover:underline break-all text-primary",children:n("resourceCard.visitWebsite")})]}),t.hours_raw&&d.jsxs("div",{className:"flex items-start gap-2",children:[d.jsx(hx,{className:"h-4 w-4 mt-0.5 flex-shrink-0 text-muted-foreground"}),d.jsx("span",{className:"break-words",children:t.hours_raw})]})]}),d.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 pt-2",children:[t.phone&&d.jsx(ve,{onClick:s,className:"flex-1 h-11 sm:h-10",variant:"default",asChild:!0,children:d.jsxs("a",{href:`tel:${t.phone}`,children:[d.jsx(ec,{className:"h-4 w-4 mr-2"}),n("resourceCard.callNow")]})}),d.jsxs(ve,{onClick:a,className:"flex-1 h-11 sm:h-10",variant:"outline",children:[d.jsx(Hi,{className:"h-4 w-4 mr-2"}),n("resourceCard.directions")]})]}),d.jsxs(xa,{to:`/resource/${t.id}`,onClick:l,className:"flex items-center justify-center gap-1 text-sm text-primary hover:underline py-2",children:[n("resourceCard.viewDetails"),d.jsx(dx,{className:"h-4 w-4"})]})]})]})};var au="Switch",[h$,U4]=ft(au),[p$,m$]=h$(au),eS=g.forwardRef((t,e)=>{const{__scopeSwitch:r,name:n,checked:s,defaultChecked:o,required:i,disabled:a,value:l="on",onCheckedChange:c,form:u,...f}=t,[p,h]=g.useState(null),v=ce(e,b=>h(b)),m=g.useRef(!1),w=p?u||!!p.closest("form"):!0,[x,y]=Ln({prop:s,defaultProp:o??!1,onChange:c,caller:au});return d.jsxs(p$,{scope:r,checked:x,disabled:a,children:[d.jsx(te.button,{type:"button",role:"switch","aria-checked":x,"aria-required":i,"data-state":sS(x),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:v,onClick:W(t.onClick,b=>{y(_=>!_),w&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})}),w&&d.jsx(nS,{control:p,bubbles:!m.current,name:n,value:l,checked:x,required:i,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});eS.displayName=au;var tS="SwitchThumb",rS=g.forwardRef((t,e)=>{const{__scopeSwitch:r,...n}=t,s=m$(tS,r);return d.jsx(te.span,{"data-state":sS(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:e})});
328rS.displayName=tS;var g$="SwitchBubbleInput",nS=g.forwardRef(({__scopeSwitch:t,control:e,checked:r,bubbles:n=!0,...s},o)=>{const i=g.useRef(null),a=ce(i,o),l=Mp(r),c=Hc(e);return g.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[l,r,n]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:a,style:{...s.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});nS.displayName=g$;function sS(t){return t?"checked":"unchecked"}var oS=eS,v$=rS;const iS=g.forwardRef(({className:t,...e},r)=>d.jsx(oS,{className:G("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...e,ref:r,children:d.jsx(v$,{className:G("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));iS.displayName=oS.displayName;const y$=()=>{var N,H,A,F,O;const[t,e]=g.useState(new Map),[r,n]=g.useState(!0),[s,o]=g.useState(!1),[i,a]=g.useState(!1),[l,c]=g.useState(new Set),u=Fn(),f=Sr(),{toast:p}=Lc(),{t:h}=Vo(),v=((N=u.state)==null?void 0:N.selectedCategories)||[],m=((H=u.state)==null?void 0:H.zipCode)||"",w=((A=u.state)==null?void 0:A.radius)||Z1,x=((F=u.state)==null?void 0:F.sessionToken)||"",y=((O=u.state)==null?void 0:O.screeningId)||"";g.useEffect(()=>{if(window.scrollTo(0,0),!v.length||!m){f("/");return}b()},[]);const b=async()=>{n(!0),a(!1);try{const I=await l$(m);if(!I){a(!0),p({title:h("results.unableToFind"),description:h("results.tryDifferentZip"),variant:"destructive"}),e(new Map);return}const{data:M,error:U}=await le.rpc("fetch_resources_by_radius",{user_lat:I.latitude,user_lon:I.longitude,radius_miles:w,category_filter:v});if(U)throw U;const T=new Map;v.forEach(R=>{const L=(M||[]).filter(B=>B.primary_category===R);T.set(R,L)}),e(T),await xr.logEvent(x,"results_viewed",{categories:v,zip_code:m,radius:w,total_results:(M==null?void 0:M.length)||0},void 0,y),y&&await le.from("screenings").update({completed_at:new Date().toISOString()}).eq("id",y)}catch(I){console.error("Error fetching resources:",I),p({title:h("results.errorFetching"),description:h("results.tryAgain"),variant:"destructive"})}finally{n(!1)}},_=I=>{o(I),xr.logEvent(x,I?"filter_applied":"filter_cleared",{filter:"after_5pm"},void 0,y)},S=I=>s?I.filter(M=>UD(M.hours_raw,M.hours_parsed)):I,E=I=>h(`categories.${I}`),C=I=>{c(M=>{const U=new Set(M);return U.has(I)?U.delete(I):U.add(I),U})},k=Array.from(t.values()).reduce((I,M)=>I+M.length,0),P=Array.from(t.entries()).reduce((I,[M,U])=>I+S(U).length,0);return r?d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(hs,{}),d.jsxs("div",{className:"container max-w-4xl mx-auto px-4 py-6 sm:py-8",children:[d.jsx(mc,{currentStep:3,totalSteps:3}),d.jsx("div",{className:"flex items-center justify-center py-12",children:d.jsxs("div",{className:"text-center",children:[d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto mb-4"}),d.jsx("p",{className:"text-muted-foreground",children:h("results.findingResources")})]})})]})]}):d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(hs,{}),d.jsxs("main",{className:"container max-w-4xl mx-auto px-4 py-6 sm:py-8",children:[d.jsxs(xa,{to:"/",className:"inline-flex items-center text-sm text-muted-foreground hover:text-foreground mb-2",children:[d.jsx(op,{className:"h-4 w-4 mr-1"}),h("results.startNewSearch")]}),d.jsx(mc,{currentStep:3,totalSteps:3,onStepClick:I=>{I===1?f("/categories"):I===2&&f("/zip-code",{state:{selectedCategories:v,sessionToken:x}})}}),d.jsxs("div",{className:"mb-6 sm:mb-8",children:[d.jsx("h1",{className:"text-2xl sm:text-3xl md:text-4xl font-bold mb-2",children:h("results.title",{radius:w})}),d.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[d.jsx(Hi,{className:"h-4 w-4"}),d.jsx("span",{children:h("results.of",{zipCode:m})})]}),d.jsx("p",{className:"text-muted-foreground mt-2 text-sm sm:text-base",children:h("results.found",{count:k,categories:v.length})})]}),d.jsxs("div",{className:"flex items-center gap-3 p-3 sm:p-4 bg-muted/30 rounded-lg mb-6 sm:mb-8",children:[d.jsx(fP,{className:"h-5 w-5 text-muted-foreground flex-shrink-0"}),d.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[d.jsx(iS,{id:"after5pm",checked:s,onCheckedChange:_}),d.jsx(lt,{htmlFor:"after5pm",className:"cursor-pointer font-normal text-sm sm:text-base",children:h("results.filterLabel")})]})]}),d.jsx("div",{className:"space-y-8 sm:space-y-10",children:v.map(I=>{const M=t.get(I)||[],U=S(M),T=l.has(I);return d.jsxs("div",{id:`category-${I}`,children:[d.jsxs("div",{className:"flex items-center gap-3 mb-4 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>C(I),children:[d.jsx("span",{className:"text-2xl sm:text-3xl",children:Fp(I)}),d.jsx("h2",{className:"text-xl sm:text-2xl font-bold capitalize flex-1",children:E(I)}),d.jsxs("span",{className:"text-sm text-muted-foreground",children:["(",U.length,")"]}),T?d.jsx(lP,{className:"h-6 w-6 text-muted-foreground"}):d.jsx(cP,{className:"h-6 w-6 text-muted-foreground"})]}),!T&&(U.length===0?d.jsx("div",{className:"p-6 sm:p-8 text-center bg-muted/20 rounded-lg",children:s?d.jsxs("div",{children:[d.jsx("p",{className:"text-muted-foreground mb-2",children:h("results.noOpenAfter5")}),d.jsx(ve,{variant:"link",onClick:()=>_(!1),className:"text-primary",children:h("results.removeFilter")})]}):d.jsx("p",{className:"text-muted-foreground",children:h("results.noResources",{category:E(I)})})}):d.jsx("div",{className:"grid gap-4 sm:grid-cols-1 lg:grid-cols-2",children:U.map(R=>d.jsx(f$,{resource:R,sessionToken:x,screeningId:y},R.id))}))]},I)})}),P===0&&k>0&&s&&d.jsxs("div",{className:"mt-6 sm:mt-8 p-4 sm:p-6 text-center bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg",children:[d.jsx("p",{className:"text-yellow-900 dark:text-yellow-200 mb-3 text-sm sm:text-base",children:h("results.allFiltered")}),d.jsx(ve,{onClick:()=>_(!1),variant:"outline",children:h("results.clearFilter")})]})]})]})},w$=()=>{const{id:t}=bO(),[e]=GO(),[r,n]=g.useState(null),[s,o]=g.useState(!0),i=Sr(),a=e.get("session")||"",l=e.get("screening")||void 0;g.useEffect(()=>{t&&c()},[t]);const c=async()=>
328{if(t){o(!0);try{const{data:m,error:w}=await le.from("resources").select("*").eq("id",t).single();if(w)throw w;n(m)}catch(m){console.error("Error fetching resource:",m)}finally{o(!1)}}},u=()=>!r||!r.address?"#":`https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(`${r.address}, ${r.zip_code}`)}`,f=async m=>{try{await navigator.clipboard.writeText(m),oe.success("Map link copied! Paste it in your browser to open directions")}catch{oe.error("Failed to copy link")}},p=()=>{try{return window.self!==window.top}catch{return!0}},h=async m=>{if(m.preventDefault(),!r)return;if(!r.address){oe.error("Address not available for this resource");return}a&&xr.logEvent(a,"directions_clicked",{resource_name:r.organization_name},r.id,l);const w=u();if(p()){await f(w);return}window.open(w,"_blank","noopener,noreferrer")||await f(w)},v=()=>{!r||!a||xr.logEvent(a,"call_clicked",{resource_name:r.organization_name},r.id,l)};return s?d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(hs,{}),d.jsx("div",{className:"container max-w-4xl mx-auto px-4 py-4",children:d.jsx("div",{className:"flex items-center justify-center py-12",children:d.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary"})})})]}):r?d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(hs,{}),d.jsxs("main",{className:"container max-w-4xl mx-auto px-4 py-4",children:[d.jsxs(ve,{variant:"ghost",onClick:()=>i(-1),className:"mb-6",children:[d.jsx(op,{className:"h-4 w-4 mr-2"}),"Back to results"]}),d.jsxs(Lt,{children:[d.jsx(Dr,{children:d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("span",{className:"text-4xl",children:Fp(r.primary_category)}),d.jsxs("div",{className:"flex-1",children:[d.jsx(Mr,{className:"text-2xl mb-2",children:r.organization_name}),d.jsx(Tn,{variant:"secondary",className:"capitalize",children:r.primary_category})]})]})}),d.jsxs(tr,{className:"space-y-6",children:[r.description&&d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold mb-2",children:"About"}),d.jsx("p",{className:"text-muted-foreground",children:r.description})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold mb-3",children:"Contact Information"}),d.jsxs("div",{className:"space-y-3",children:[r.address&&d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(Hi,{className:"h-5 w-5 mt-0.5 text-muted-foreground flex-shrink-0"}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"Address"}),d.jsxs("p",{className:"text-muted-foreground",children:[r.address,", ",r.zip_code]})]})]}),r.phone&&d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(ec,{className:"h-5 w-5 mt-0.5 text-muted-foreground flex-shrink-0"}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"Phone"}),d.jsx("a",{href:`tel:${r.phone}`,className:"text-primary hover:underline",children:v1(r.phone)})]})]}),r.website&&d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(ip,{className:"h-5 w-5 mt-0.5 text-muted-foreground flex-shrink-0"}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"Website"}),d.jsx("a",{href:r.website,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline break-all",children:r.website})]})]}),r.hours_raw&&d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx(hx,{className:"h-5 w-5 mt-0.5 text-muted-foreground flex-shrink-0"}),d.jsxs("div",{children:[d.jsx("p",{className:"font-medium",children:"Hours"}),d.jsx("p",{className:"text-muted-foreground whitespace-pre-wrap",children:r.hours_raw})]})]})]})]}),r.services&&d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold mb-2",children:"Services"}),d.jsx("p",{className:"text-muted-foreground",children:r.services})]}),r.what_to_bring&&d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx(yf,{className:"h-5 w-5 text-muted-foreground"}),d.jsx("h3",{className:"font-semibold",children:"What to Bring"})]}),d.jsx("p",{className:"text-muted-foreground",children:r.what_to_bring})]}),r.eligibility&&d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx(yf,{className:"h-5 w-5 text-muted-foreground"}),d.jsx("h3",{className:"font-semibold",children:"Eligibility"})]}),d.jsx("p",{className:"text-muted-foreground",children:r.eligibility})]}),r.languages&&d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[d.jsx(mP,{className:"h-5 w-5 text-muted-foreground"}),d.jsx("h3",{className:"font-semibold",children:"Languages"})]}),d.jsx("p",{className:"text-muted-foreground",children:r.languages})]}),d.jsxs("div",{className:"flex flex-col gap-3 pt-4",children:[r.phone&&d.jsx(ve,{asChild:!0,className:"w-full h-12 rounded-full text-base font-semibold",size:"lg",children:d.jsxs("a",{href:`tel:${r.phone}`,onClick:v,children:[d.jsx(ec,{className:"h-5 w-5 mr-2"}),"Call Now"]})}),r.address&&d.jsx(ve,{asChild:!0,variant:"outline",className:"w-full h-12 rounded-full text-base font-semibold border-2",size:"lg",children:d.jsxs("a",{href:u(),target:"_blank",rel:"noopener noreferrer",onClick:h,children:[d.jsx(Hi,{className:"h-5 w-5 mr-2"}),"Get Directions"]})})]})]})]})]})]}):d.jsxs("div",{className:"min-h-screen bg-background",children:[d.jsx(hs,{}),d.jsxs("div",{className:"container max-w-4xl mx-auto px-4 py-4",children:[d.jsx("p",{className:"text-center text-muted-foreground",children:"Resource not found"}),d.jsx("div",{className:"text-center mt-4",children:d.jsx(ve,{onClick:()=>i(-1),children:"Go Back"})})]})]})},x$=va("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Gp=g.forwardRef(({className:t,variant:e,...r},n)=>d.jsx("div",{ref:n,role:"alert",className:G(x$({variant:e}),t),...r}));Gp.displayName="Alert";const b$=g.forwardRef(({className:t,...e},r)=>d.jsx("h5",{ref:r,className:G("mb-1 font-medium leading-none tracking-tight",t),...e}));b$.displayName="AlertTitle";const Yp=g.forwardRef(({className:t,...e},r)=>d.jsx("div",{ref:r,className:G("text-sm [&_p]:leading-relaxed",t),...e}));Yp.displayName="AlertDescription";const _$=()=>{const[t,e]=g.useState(!0),[r,n]=g.useState(!1),[s,o]=g.useState(""),[i,a]=g.useState(""),[l,c]=g.useState(!1),u=Sr();g.useEffect(()=>{(async()=>{const{data:{session:m}}=await le.auth.getSession();m&&u("/admin")})(),new URLSearchParams(window.location.hash.substring(1)).get("type")==="recovery"&&oe.info("Please enter your new password below")},[u]);const f=async p=>{p.preventDefault(),c(!0);try{if(r){const{error:h}=await le.auth.resetPasswordForEmail(s,{redirectTo:`${window.location.origin}/auth`});if(h)throw h;oe.success("Password reset email sent! Check your inbox."),n(!1),o("")}else if(t){const h=new URLSearchParams(window.location.hash.substring(1)),v=h.get("access_token");if(h.get("type")==="recovery"&&v){const{error:w}=await le.auth.updateUser({password:i});if(w)throw w;oe.success("Password updated successfully! You can now sign in."),window.location.hash="",a(""),u("/admin")}else{const{error:w}=await le.auth.signInWithPassword({email:s,password:i});if(w)throw w;oe.success("Logged in successfully!"),u("/admin")}}else{const{data:h,error:v}=await le.auth.signUp({email:s,password:i,options:{emailRedirectTo:`${window.location.origin}/admin`}});if(v)throw v;if(h.user){const{error:m}=await le.from("user_roles").insert({user_id:h.user.id,role:"user"});
328m&&console.error("Role assignment error:",m)}oe.success("Account created! You can now log in."),e(!0)}}catch(h){oe.error(h.message||"An error occurred")}finally{c(!1)}};return d.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center bg-background p-4",children:[d.jsx(xa,{to:"/",className:"mb-8 hover:opacity-80 transition-opacity",children:d.jsx("img",{src:Zi,alt:"Five Health",className:"h-12 w-auto"})}),d.jsxs(Lt,{className:"w-full max-w-md",children:[d.jsxs(Dr,{children:[d.jsx("div",{className:"flex items-center justify-center mb-2",children:d.jsx(tc,{className:"h-8 w-8 text-primary"})}),d.jsx(Mr,{className:"text-center",children:r?"Reset Password":t?"Admin Login":"Create Admin Account"}),d.jsx(fs,{className:"text-center",children:r?"Enter your email to receive a password reset link":t?"Sign in to access the admin dashboard":"Sign up for admin access"})]}),d.jsxs(tr,{children:[!t&&!r&&d.jsxs(Gp,{className:"mb-4 border-primary/50 bg-primary/5",children:[d.jsx(yf,{className:"h-4 w-4 text-primary"}),d.jsxs(Yp,{className:"text-sm",children:[d.jsx("strong",{children:"Admin Access:"})," The first user to sign up automatically receives admin privileges. Subsequent admins can be assigned through the User Management dashboard."]})]}),d.jsxs("form",{onSubmit:f,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(lt,{htmlFor:"email",children:"Email"}),d.jsx(yn,{id:"email",type:"email",value:s,onChange:p=>o(p.target.value),placeholder:"[email protected]",required:!0})]}),!r&&d.jsxs("div",{className:"space-y-2",children:[d.jsx(lt,{htmlFor:"password",children:new URLSearchParams(window.location.hash.substring(1)).get("type")==="recovery"?"New Password":"Password"}),d.jsx(yn,{id:"password",type:"password",value:i,onChange:p=>a(p.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0,minLength:6})]}),d.jsxs(ve,{type:"submit",className:"w-full",disabled:l,children:[l&&d.jsx(Ar,{className:"mr-2 h-4 w-4 animate-spin"}),r?"Send Reset Link":new URLSearchParams(window.location.hash.substring(1)).get("type")==="recovery"?"Update Password":t?"Sign In":"Sign Up"]})]}),d.jsxs("div",{className:"mt-4 space-y-2 text-center",children:[t&&!r&&d.jsx(ve,{variant:"link",onClick:()=>n(!0),className:"text-sm text-muted-foreground hover:text-primary",children:"Forgot password?"}),r?d.jsx(ve,{variant:"link",onClick:()=>{n(!1),o("")},className:"text-sm",children:"Back to sign in"}):d.jsx(ve,{variant:"link",onClick:()=>e(!t),className:"text-sm",children:t?"Need an account? Sign up":"Already have an account? Sign in"})]})]})]})]})},S$="FIVE_HEALTH_SETUP_2024",E$=()=>{const[t,e]=g.useState(""),[r,n]=g.useState(""),[s,o]=g.useState(""),[i,a]=g.useState(""),[l,c]=g.useState(!1),[u,f]=g.useState(!0),[p,h]=g.useState(!1),v=Sr();g.useEffect(()=>{m()},[]);const m=async()=>{try{const{data:x,error:y}=await le.from("user_roles").select("id").eq("role","admin").limit(1);if(y)throw y;x&&x.length>0&&(h(!0),oe.info("Admin account already exists. Redirecting to login..."),setTimeout(()=>v("/auth"),2e3))}catch(x){console.error("Error checking setup status:",x),oe.error("Error checking setup status")}finally{f(!1)}},w=async x=>{if(x.preventDefault(),t!==S$){oe.error("Invalid setup key");return}if(s!==i){oe.error("Passwords do not match");return}if(s.length<6){oe.error("Password must be at least 6 characters");return}c(!0);try{const{data:y,error:b}=await le.auth.signUp({email:r,password:s,options:{emailRedirectTo:`${window.location.origin}/admin`}});if(b)throw b;if(!y.user)throw new Error("User creation failed");const{error:_}=await le.from("user_roles").insert({user_id:y.user.id,role:"admin"});if(_)throw _;oe.success("Admin account created successfully! Redirecting...");const{error:S}=await le.auth.signInWithPassword({email:r,password:s});if(S)throw S;setTimeout(()=>v("/admin"),1500)}catch(y){console.error("Setup error:",y),oe.error(y.message||"Failed to create admin account")}finally{c(!1)}};return u?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:d.jsx(Ar,{className:"h-8 w-8 animate-spin text-primary"})}):p?d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:d.jsx(Lt,{className:"w-full max-w-md",children:d.jsx(tr,{className:"pt-6",children:d.jsxs("div",{className:"text-center",children:[d.jsx(tc,{
vendor: 12,751 bytes, lines 328-332
328className:"h-12 w-12 text-primary mx-auto mb-4"}),d.jsx("h2",{className:"text-xl font-semibold mb-2",children:"Setup Already Complete"}),d.jsx("p",{className:"text-muted-foreground",children:"An admin account already exists. Redirecting to login..."})]})})})}):d.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:d.jsxs(Lt,{className:"w-full max-w-md",children:[d.jsxs(Dr,{children:[d.jsx("div",{className:"flex items-center justify-center mb-2",children:d.jsx(tc,{className:"h-10 w-10 text-primary"})}),d.jsx(Mr,{className:"text-center text-2xl",children:"Initial Admin Setup"}),d.jsx(fs,{className:"text-center",children:"Create the first administrator account for Five Health"})]}),d.jsxs(tr,{children:[d.jsxs(Gp,{className:"mb-4 border-amber-500/50 bg-amber-500/5",children:[d.jsx(uP,{className:"h-4 w-4 text-amber-500"}),d.jsxs(Yp,{className:"text-sm",children:[d.jsx("strong",{children:"One-Time Setup:"})," This page is only accessible when no admin accounts exist. You will need the setup key to proceed."]})]}),d.jsxs("form",{onSubmit:w,className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(lt,{htmlFor:"setupKey",className:"flex items-center gap-2",children:[d.jsx(gP,{className:"h-4 w-4"}),"Setup Key"]}),d.jsx(yn,{id:"setupKey",type:"password",value:t,onChange:x=>e(x.target.value),placeholder:"Enter setup key",required:!0}),d.jsx("p",{className:"text-xs text-muted-foreground",children:"Contact your system administrator for the setup key"})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(lt,{htmlFor:"email",children:"Admin Email"}),d.jsx(yn,{id:"email",type:"email",value:r,onChange:x=>n(x.target.value),placeholder:"[email protected]",required:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(lt,{htmlFor:"password",children:"Password"}),d.jsx(yn,{id:"password",type:"password",value:s,onChange:x=>o(x.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0,minLength:6})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(lt,{htmlFor:"confirmPassword",children:"Confirm Password"}),d.jsx(yn,{id:"confirmPassword",type:"password",value:i,onChange:x=>a(x.target.value),placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",required:!0,minLength:6})]}),d.jsxs(ve,{type:"submit",className:"w-full",disabled:l,children:[l&&d.jsx(Ar,{className:"mr-2 h-4 w-4 animate-spin"}),"Create Admin Account"]})]}),d.jsx("div",{className:"mt-6 pt-6 border-t",children:d.jsxs("p",{className:"text-sm text-center text-muted-foreground",children:["Already have an account?"," ",d.jsx(ve,{variant:"link",className:"p-0 h-auto font-semibold",onClick:()=>v("/auth"),children:"Sign in here"})]})})]})]})})};var Qp="Radio",[C$,aS]=ft(Qp),[k$,R$]=C$(Qp),lS=g.forwardRef((t,e)=>{const{__scopeRadio:r,name:n,checked:s=!1,required:o,disabled:i,value:a="on",onCheck:l,form:c,...u}=t,[f,p]=g.useState(null),h=ce(e,w=>p(w)),v=g.useRef(!1),m=f?c||!!f.closest("form"):!0;return d.jsxs(k$,{scope:r,checked:s,disabled:i,children:[d.jsx(te.button,{type:"button",role:"radio","aria-checked":s,"data-state":fS(s),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:h,onClick:W(t.onClick,w=>{s||l==null||l(),m&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})}),m&&d.jsx(dS,{control:f,bubbles:!v.current,name:n,value:a,checked:s,required:o,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});lS.displayName=Qp;var cS="RadioIndicator",uS=g.forwardRef((t,e)=>{const{__scopeRadio:r,forceMount:n,...s}=t,o=R$(cS,r);return d.jsx(Rt,{present:n||o.checked,children:d.jsx(te.span,{"data-state":fS(o.checked),"data-disabled":o.disabled?"":void 0,...s,ref:e})})});uS.displayName=cS;var P$="RadioBubbleInput",dS=g.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:n=!0,...s},o)=>{const i=g.useRef(null),a=ce(i,o),l=Mp(r),c=Hc(e);return g.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==r&&h){const v=new Event("click",{bubbles:n});h.call(u,r),u.dispatchEvent(v)}},[l,r,n]),d.jsx(te.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...s,tabIndex:-1,ref:a,style:{...s.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});dS.displayName=P$;function fS(t){return t?"checked":"unchecked"}var T$=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],lu="RadioGroup",[j$,B4]=ft(lu,[Wo,aS]),hS=Wo(),pS=aS(),[N$,O$]=j$(lu),mS=g.forwardRef((t,e)=>{const{__scopeRadioGroup:r,name:n,defaultValue:s,value:o,required:i=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:f,...p}=t,h=hS(r),v=Zc(c),[m,w]=Ln({prop:o,defaultProp:s??null,onChange:f,caller:lu});return d.jsx(N$,{scope:r,name:n,required:i,disabled:a,value:m,onValueChange:w,children:d.jsx(Ep,{asChild:!0,...h,orientation:l,dir:v,loop:u,children:d.jsx(te.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:v,...p,ref:e})})})});mS.displayName=lu;var gS="RadioGroupItem",vS=g.forwardRef((t,e)=>{const{__scopeRadioGroup:r,disabled:n,...s}=t,o=O$(gS,r),i=o.disabled||n,a=hS(r),l=pS(r),c=g.useRef(null),u=ce(e,c),f=o.value===s.value,p=g.useRef(!1);return g.useEffect(()=>{const h=m=>{T$.includes(m.key)&&(p.current=!0)},v=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",v),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",v)}},[]),d.jsx(Cp,{asChild:!0,...a,focusable:!i,active:f,children:d.jsx(lS,{disabled:i,required:o.required,checked:f,...l,...s,name:o.name,ref:u,onCheck:()=>o.onValueChange(s.value),onKeyDown:W(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:W(s.onFocus,()=>{var h;p.current&&((h=c.current)==null||h.click())})})})});vS.displayName=gS;var A$="RadioGroupIndicator",yS=g.forwardRef((t,e)=>{const{__scopeRadioGroup:r,...n}=t,s=pS(r);return d.jsx(uS,{...s,...n,ref:e})});yS.displayName=A$;var wS=mS,xS=vS,I$=yS;const bS=g.forwardRef(({className:t,...e},r)=>d.jsx(wS,{className:G("grid gap-2",t),...e,ref:r}));bS.displayName=wS.displayName;const Jf=g.forwardRef(({className:t,...e},r)=>d.jsx(xS,{ref:r,className:G("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:d.jsx(I$,{className:"flex items-center justify-center",children:d.jsx(fx,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Jf.displayName=xS.displayName;var cu="Dialog",[_S,SS]=ft(cu),[D$,or]=_S(cu),ES=t=>{const{__scopeDialog:e,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=t,a=g.useRef(null),l=g.useRef(null),[c,u]=Ln({prop:n,defaultProp:s??!1,onChange:o,caller:cu});return d.jsx(D$,{scope:e,triggerRef:a,contentRef:l,contentId:ds(),titleId:ds(),descriptionId:ds(),open:c,onOpenChange:u,onOpenToggle:g.useCallback(()=>u(f=>!f),[u]),modal:i,children:r})};ES.displayName=cu;var CS="DialogTrigger",kS=g.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or(CS,r),o=ce(e,s.triggerRef);return d.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Zp(s.open),...n,ref:o,onClick:W(t.onClick,s.onOpenToggle)})});kS.displayName=CS;var Jp="DialogPortal",[M$,RS]=_S(Jp,{forceMount:void 0}),PS=t=>{const{__scopeDialog:e,forceMount:r,children:n,container:s}=t,o=or(Jp,e);return d.jsx(M$,{scope:e,forceMount:r,children:g.Children.map(n,i=>d.jsx(Rt,{present:r||o.open,children:d.jsx(Fc,{asChild:!0,container:s,children:i})}))})};PS.displayName=Jp;var wc="DialogOverlay",TS=g.forwardRef((t,e)=>{const r=RS(wc,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,o=or(wc,t.__scopeDialog);return o.modal?d.jsx(Rt,{present:n||o.open,children:d.jsx($$,{...s,ref:e})}):null});TS.displayName=wc;var L$=No("DialogOverlay.RemoveScroll"),$$=g.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or(wc,r);return d.jsx(Pp,{as:L$,allowPinchZoom:!0,shards:[s.contentRef],children:d.jsx(te.div,{"data-state":Zp(s.open),...n,ref:e,style:{pointerEvents:"auto",...n.style}})})}),bs="DialogContent",jS=g.forwardRef((t,e)=>{const r=RS(bs,t.__scopeDialog),{forceMount:n=r.forceMount,...s}=t,o=or(bs,t.__scopeDialog);return d.jsx(Rt,{present:n||o.open,children:o.modal?d.jsx(F$,{...s,ref:e}):d.jsx(U$,{...s,ref:e})})});jS.displayName=bs;var F$=g.forwardRef((t,e)=>{const r=or(bs,t.__scopeDialog),n=g.useRef(null),s=ce(e,r.contentRef,n);return g.useEffect(()=>{const o=n.current;if(o)return Mb(o)},[]),d.jsx(NS,{...t,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(t.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:W(t.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:W(t.onFocusOutside,o=>o.preventDefault())})}),U$=g.forwardRef((t,e)=>{const r=or(bs,t.__scopeDialog),n=g.useRef(!1),s=g.useRef(!1);return d.jsx(NS,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=t.onCloseAutoFocus)==null||i.call(t,o),o.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((c=r.triggerRef.current)==null?void 0:c.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),NS=g.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=t,a=or(bs,r),l=g.useRef(null),c=ce(e,l);return Pb(),d.jsxs(d.Fragment,{children:[d.jsx(Sp,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:d.jsx(ma,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Zp(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(z$,{titleId:a.titleId}),d.jsx(W$,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Xp="DialogTitle",OS=g.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or(Xp,r);return d.jsx(te.h2,{id:s.titleId,...n,ref:e})});OS.displayName=Xp;var AS="DialogDescription",IS=g.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or(AS,r);return d.jsx(te.p,{id:s.descriptionId,...n,ref:e})});IS.displayName=AS;var DS="DialogClose",MS=g.forwardRef((t,e)=>{const{__scopeDialog:r,...n}=t,s=or(DS,r);return d.jsx(te.button,{type:"button",...n,ref:e,onClick:W(t.onClick,()=>s.onOpenChange(!1))})});MS.displayName=DS;function Zp(t){return t?"open":"closed"}var LS="DialogTitleWarning",[B$,$S]=dR(LS,{contentName:bs,titleName:Xp,docsSlug:"dialog"}),z$=({titleId:t})=>{const e=$S(LS),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. 329 330If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. 331 332For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return g.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},V$="DialogDescriptionWarning",W$=({contentRef:t,descriptionId:e})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${$S(V$).contentName}}.`;return g.useEffect(()=>{var o;const s=(o=t.current)==null?void 0:o.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(n))},[n,t,e]),null},H$=ES,K$=kS,q$=PS,G$=TS,Y$=jS,Q$=OS,J$=IS,FS=MS,US="AlertDialog",[X$,z4]=ft(US,[SS]),Hr=SS(),BS=t=>{const{__scopeAlertDialog:e,...r}=t,n=Hr(e);return d.jsx(H$,{...n,...r,modal:!0})};BS.displayName=US;var Z$="AlertDialogTrigger",zS=g.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,s=Hr(r);return d.jsx(K$,{...s,...n,ref:e})});zS.displayName=Z$;var eF="AlertDialogPortal",VS=t=>{const{__scopeAlertDialog:e,...r}=t,n=Hr(e);return d.jsx(q$,{...n,...r})};VS.displayName=eF;var tF="AlertDialogOverlay",WS=g.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,s=Hr(r);return d.jsx(G$,{...s,...n,ref:e})});WS.displayName=tF;var mo="AlertDialogContent",[rF,nF]=X$(mo),sF=$0("AlertDialogContent"),HS=g.forwardRef((t,e)=>{const{__scopeAlertDialog:r,children:n,...s}=t,o=Hr(r),i=g.useRef(null),a=ce(e,i),l=g.useRef(null);return d.jsx(B$,{contentName:mo,titleName:KS,docsSlug:"alert-dialog",children:d.jsx(rF,{scope:r,cancelRef:l,children:d.jsxs(Y$,{role:"alertdialog",...o,...s,ref:a,onOpenAutoFocus:W(s.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)==null||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>
332c.preventDefault(),children:[d.jsx(sF,{children:n}),d.jsx(iF,{contentRef:i})]})})})});HS.displayName=mo;var KS="AlertDialogTitle",qS=g.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,s=Hr(r);return d.jsx(Q$,{...s,...n,ref:e})});qS.displayName=KS;var GS="AlertDialogDescription",YS=g.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,s=Hr(r);return d.jsx(J$,{...s,...n,ref:e})});YS.displayName=GS;var oF="AlertDialogAction",QS=g.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,s=Hr(r);return d.jsx(FS,{...s,...n,ref:e})});QS.displayName=oF;var JS="AlertDialogCancel",XS=g.forwardRef((t,e)=>{const{__scopeAlertDialog:r,...n}=t,{cancelRef:s}=nF(JS,r),o=Hr(r),i=ce(e,s);return d.jsx(FS,{...o,...n,ref:i})});XS.displayName=JS;var iF=({contentRef:t})=>{const e=`\`${mo}\` requires a description for the component to be accessible for screen reader users. 333 334You can add a description to the \`${mo}\` by passing a \`${GS}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 335 336Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${mo}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 337 338For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return g.useEffect(()=>{var n;document.getElementById((n=t.current)==null?void 0:n.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},aF=BS,lF=zS,cF=VS,ZS=WS,eE=HS,tE=QS,rE=XS,nE=qS,sE=YS;const oy=aF,iy=lF,uF=cF,oE=g.forwardRef(({className:t,...e},r)=>d.jsx(ZS,{className:G("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}));oE.displayName=ZS.displayName;const Xf=g.forwardRef(({className:t,...e},r)=>d.jsxs(uF,{children:[d.jsx(oE,{}),d.jsx(eE,{ref:r,className:G("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),...e})]}));Xf.displayName=eE.displayName;const Zf=({className:t,...e})=>d.jsx("div",{className:G("flex flex-col space-y-2 text-center sm:text-left",t),...e});Zf.displayName="AlertDialogHeader";const eh=({className:t,...e})=>d.jsx("div",{className:G("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});eh.displayName="AlertDialogFooter";const th=g.forwardRef(({className:t,...e},r)=>d.jsx(nE,{ref:r,className:G("text-lg font-semibold",t),...e}));th.displayName=nE.displayName;const rh=g.forwardRef(({className:t,...e},r)=>d.jsx(sE,{ref:r,className:G("text-sm text-muted-foreground",t),...e}));rh.displayName=sE.displayName;const nh=g.forwardRef(({className:t,...e},r)=>d.jsx(tE,{ref:r,className:G(_p(),t),...e}));nh.displayName=tE.displayName;const sh=g.forwardRef(({className:t,...e},r)=>d.jsx(rE,{ref:r,className:G(_p({variant:"outline"}),"mt-2 sm:mt-0",t),...e}));sh.displayName=rE.displayName;const em=g.forwardRef(({className:t,...e},r)=>d.jsx("div",{className:"relative w-full overflow-auto",children:d.jsx("table",{ref:r,className:G("w-full caption-bottom text-sm",t),...e})}));em.displayName="Table";const tm=g.forwardRef(({className:t,...e},r)=>d.jsx("thead",{ref:r,className:G("[&_tr]:border-b",t),...e}));tm.displayName="TableHeader";const rm=g.forwardRef(({className:t,...e},r)=>d.jsx("tbody",{ref:r,className:G("[&_tr:last-child]:border-0",t),...e}));rm.displayName="TableBody";const dF=g.forwardRef(({className:t,...e},r)=>d.jsx("tfoot",{ref:r,className:G("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));dF.displayName="TableFooter";const oa=g.forwardRef(({className:t,...e},r)=>d.jsx("tr",{ref:r,className:G("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",t),...e}));oa.displayName="TableRow";const mt=g.forwardRef(({className:t,...e},r)=>d.jsx("th",{ref:r,className:G("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));mt.displayName="TableHead";const gt=g.forwardRef(({className:t,...e},r)=>d.jsx("td",{ref:r,className:G("p-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));gt.displayName="TableCell";const fF=g.forwardRef(({className:t,...e},r)=>d.jsx("caption",{ref:r,className:G("mt-4 text-sm text-muted-foreground",t),...e}));fF.displayName="TableCaption";function ir(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function _s(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const iE=6048e5,hF=864e5;let pF={};function uu(){return pF}function ia(t,e){var a,l,c,u;const r=uu(),n=(e==null?void 0:e.weekStartsOn)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((u=(c=r.locale)==null?void 0:c.options)==null?void 0:u.weekStartsOn)??0,s=ir
vendor: 18,981 bytes, line 338
338(t),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function xc(t){return ia(t,{weekStartsOn:1})}function aE(t){const e=ir(t),r=e.getFullYear(),n=_s(t,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=xc(n),o=_s(t,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=xc(o);return e.getTime()>=s.getTime()?r+1:e.getTime()>=i.getTime()?r:r-1}function ay(t){const e=ir(t);return e.setHours(0,0,0,0),e}function ly(t){const e=ir(t),r=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return r.setUTCFullYear(e.getFullYear()),+t-+r}function mF(t,e){const r=ay(t),n=ay(e),s=+r-ly(r),o=+n-ly(n);return Math.round((s-o)/hF)}function gF(t){const e=aE(t),r=_s(t,0);return r.setFullYear(e,0,4),r.setHours(0,0,0,0),xc(r)}function vF(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function yF(t){if(!vF(t)&&typeof t!="number")return!1;const e=ir(t);return!isNaN(Number(e))}function wF(t){const e=ir(t),r=_s(t,0);return r.setFullYear(e.getFullYear(),0,1),r.setHours(0,0,0,0),r}const xF={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},bF=(t,e,r)=>{let n;const s=xF[t];return typeof s=="string"?n=s:e===1?n=s.one:n=s.other.replace("{{count}}",e.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function xd(t){return(e={})=>{const r=e.width?String(e.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}const _F={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},SF={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},EF={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},CF={date:xd({formats:_F,defaultWidth:"full"}),time:xd({formats:SF,defaultWidth:"full"}),dateTime:xd({formats:EF,defaultWidth:"full"})},kF={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},RF=(t,e,r,n)=>kF[t];function ii(t){return(e,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&t.formattingValues){const i=t.defaultFormattingWidth||t.defaultWidth,a=r!=null&&r.width?String(r.width):i;s=t.formattingValues[a]||t.formattingValues[i]}else{const i=t.defaultWidth,a=r!=null&&r.width?String(r.width):t.defaultWidth;s=t.values[a]||t.values[i]}const o=t.argumentCallback?t.argumentCallback(e):e;return s[o]}}const PF={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},TF={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jF={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},NF={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},OF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},AF={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},IF=(t,e)=>{const r=Number(t),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},DF={ordinalNumber:IF,era:ii({values:PF,defaultWidth:"wide"}),quarter:ii({values:TF,defaultWidth:"wide",argumentCallback:t=>t-1}),month:ii({values:jF,defaultWidth:"wide"}),day:ii({values:NF,defaultWidth:"wide"}),dayPeriod:ii({values:OF,defaultWidth:"wide",formattingValues:AF,defaultFormattingWidth:"wide"})};function ai(t){return(e,r={})=>{const n=r.width,s=n&&t.matchPatterns[n]||t.matchPatterns[t.defaultMatchWidth],o=e.match(s);if(!o)return null;const i=o[0],a=n&&t.parsePatterns[n]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(a)?LF(a,f=>f.test(i)):MF(a,f=>f.test(i));let c;c=t.valueCallback?t.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;const u=e.slice(i.length);return{value:c,rest:u}}}function MF(t,e){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&e(t[r]))return r}function LF(t,e){for(let r=0;r<t.length;r++)if(e(t[r]))return r}function $F(t){return(e,r={})=>{const n=e.match(t.matchPattern);if(!n)return null;const s=n[0],o=e.match(t.parsePattern);if(!o)return null;let i=t.valueCallback?t.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const a=e.slice(s.length);return{value:i,rest:a}}}const FF=/^(\d+)(th|st|nd|rd)?/i,UF=/\d+/i,BF={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zF={any:[/^b/i,/^(a|c)/i]},VF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},WF={any:[/1/i,/2/i,/3/i,/4/i]},HF={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},KF={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},qF={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},GF={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},YF={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},QF={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},JF={ordinalNumber:$F({matchPattern:FF,parsePattern:UF,valueCallback:t=>parseInt(t,10)}),era:ai({matchPatterns:BF,defaultMatchWidth:"wide",parsePatterns:zF,defaultParseWidth:"any"}),quarter:ai({matchPatterns:VF,defaultMatchWidth:"wide",parsePatterns:WF,defaultParseWidth:"any",valueCallback:t=>t+1}),month:ai({matchPatterns:HF,defaultMatchWidth:"wide",parsePatterns:KF,defaultParseWidth:"any"}),day:ai({matchPatterns:qF,defaultMatchWidth:"wide",parsePatterns:GF,defaultParseWidth:"any"}),dayPeriod:ai({matchPatterns:YF,defaultMatchWidth:"any",parsePatterns:QF,defaultParseWidth:"any"})},XF={code:"en-US",formatDistance:bF,formatLong:CF,formatRelative:RF,localize:DF,match:JF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ZF(t){const e=ir(t);return mF(e,wF(e))+1}function e4(t){const e=ir(t),r=+xc(e)-+gF(e);return Math.round(r/iE)+1}function lE(t,e){var u,f,p,h;const r=ir(t),n=r.getFullYear(),s=uu(),o=(e==null?void 0:e.firstWeekContainsDate)??((f=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??s.firstWeekContainsDate??((h=(p=s.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=_s(t,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const a=ia(i,e),l=_s(t,0);l.setFullYear(n,0,o),l.setHours(0,0,0,0);const c=ia(l,e);return r.getTime()>=a.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function t4(t,e){var a,l,c,u;const r=uu(),n=(e==null?void 0:e.firstWeekContainsDate)??((l=(a=e==null?void 0:e.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(c=r.locale)==null?void 0:c.options)==null?void 0:u.firstWeekContainsDate)??1,s=lE(t,e),o=_s(t,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),ia(o,e)}function r4(t,e){const r=ir(t),n=+ia(r,e)-+t4(r,e);return Math.round(n/iE)+1}function de(t,e){const r=t<0?"-":"",n=Math.abs(t).toString().padStart(e,"0");return r+n}const tn={y(t,e){const r=t.getFullYear(),n=r>0?r:1-r;return de(e==="yy"?n%100:n,e.length)},M(t,e){const r=t.getMonth();return e==="M"?String(r+1):de(r+1,2)},d(t,e){return de(t.getDate(),e.length)},a(t,e){const r=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(t,e){return de(t.getHours()%12||12,e.length)},H(t,e){return de(t.getHours(),e.length)},m(t,e){return de(t.getMinutes(),e.length)},s(t,e){return de(t.getSeconds(),e.length)},S(t,e){const r=e.length,n=t.getMilliseconds(),s=Math.trunc(n*Math.pow(10,r-3));return de(s,e.length)}},Vs={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},cy={G:function(t,e,r){const n=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(t,e,r){if(e==="yo"){const n=t.getFullYear(),s=n>0?n:1-n;return r.ordinalNumber(s,{unit:"year"})}return tn.y(t,e)},Y:function(t,e,r,n){const s=lE(t,n),o=s>0?s:1-s;if(e==="YY"){const i=o%100;return de(i,2)}return e==="Yo"?r.ordinalNumber(o,{unit:"year"}):de(o,e.length)},R:function(t,e){const r=aE(t);return de(r,e.length)},u:function(t,e){const r=t.getFullYear();return de(r,e.length)},Q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(n);case"QQ":return de(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(t,e,r){const n=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(n);case"qq":return de(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(t,e,r){const n=t.getMonth();switch(e){case"M":case"MM":return tn.M(t,e);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(t,e,r){const n=t.getMonth();switch(e){case"L":return String(n+1);case"LL":return de(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(t,e,r,n){const s=r4(t,n);return e==="wo"?r.ordinalNumber(s,{unit:"week"}):de(s,e.length)},I:function(t,e,r){const n=e4(t);return e==="Io"?r.ordinalNumber(n,{unit:"week"}):de(n,e.length)},d:function(t,e,r){return e==="do"?r.ordinalNumber(t.getDate(),{unit:"date"}):tn.d(t,e)},D:function(t,e,r){const n=ZF(t);return e==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):de(n,e.length)},E:function(t,e,r){const n=t.getDay();switch(e){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(t,e,r,n){const s=t.getDay(),o=(s-n.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return de(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,r,n){const s=t.getDay(),o=(s-n.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return de(o,e.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,r){const n=t.getDay(),s=n===0?7:n;switch(e){case"i":return String(s);case"ii":return de(s,e.length);case"io":return r.ordinalNumber(s,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(t,e,r){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,r){const n=t.getHours();let s;switch(n===12?s=Vs.noon:n===0?s=Vs.midnight:s=n/12>=1?"pm":"am",e){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,r){const n=t.getHours();let s;switch(n>=17?s=Vs.evening:n>=12?s=Vs.afternoon:n>=4?s=Vs.morning:s=Vs.night,e){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,r){if(e==="ho"){let n=t.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return tn.h(t,e)},H:function(t,e,r){return e==="Ho"?r.ordinalNumber(t.getHours(),{unit:"hour"}):tn.H(t,e)},K:function(t,e,r){const n=t.getHours()%12;return e==="Ko"?r.ordinalNumber(n,{unit:"hour"}):de(n,e.length)},k:function(t,e,r){let n=t.getHours();return n===0&&(n=24),e==="ko"?r.ordinalNumber(n,{unit:"hour"}):de(n,e.length)},m:function(t,e,r){return e==="mo"?r.ordinalNumber(t.getMinutes(),{unit:"minute"}):tn.m(t,e)},s:function(t,e,r){return e==="so"?r.ordinalNumber(t.getSeconds(),{unit:"second"}):tn.s(t,e)},S:function(t,e){return tn.S(t,e)},X:function(t,e,r){const n=t.getTimezoneOffset();if(n===0)return"Z";switch(e){case"X":return dy(n);case"XXXX":case"XX":return Yn(n);case"XXXXX":case"XXX":default:return Yn(n,":")}},x:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"x":return dy(n);case"xxxx":case"xx":return Yn(n);case"xxxxx":case"xxx":default:return Yn(n,":")}},O:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+uy(n,":");case"OOOO":default:return"GMT"+Yn(n,":")}},z:function(t,e,r){const n=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+uy(n,":");case"zzzz":default:return"GMT"+Yn(n,":")}},t:function(t,e,r){const n=Math.trunc(t.getTime()/1e3);return de(n,e.length)},T:function(t,e,r){const n=t.getTime();return de(n,e.length)}};function uy(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),s=Math.trunc(n/60),o=n%60;return o===0?r+String(s):r+String(s)+e+de(o,2)}function dy(t,e){return t%60===0?(t>0?"-":"+")+de(Math.abs(t)/60,2):Yn(t,e)}function Yn(t,e=""){const r=t>0?"-":"+",n=Math.abs(t),s=de(Math.trunc(n/60),2),o=de(n%60,2);return r+s+e+o}const fy=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},cE=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},n4=(t,e)=>{const r=t.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return fy(t,e);let o;switch(n){case"P":o=e.dateTime({width:"short"});break;case"PP":o=e.dateTime({width:"medium"});break;case"PPP":o=e.dateTime({width:"long"});break;case"PPPP":default:o=e.dateTime({width:"full"});break}return o.replace("{{date}}",fy(n,e)).replace("{{time}}",cE(s,e))},s4={p:cE,P:n4},o4=/^D+$/,i4=/^Y+$/,a4=["D","DD","YY","YYYY"];function l4(t){return o4.test(t)}function c4(t){return i4.test(t)}function u4(t,e,r){const n=d4(t,e,r);if(console.warn(n),a4.includes(t))throw new RangeError(n)}function d4(t,e,r){const n=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const f4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,h4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,p4=/^'([^]*?)'?$/,m4=/''/g,g4=/[a-zA-Z]/;function uE(t,e,r){var u,f,p,h;const n=uu(),s=n.locale??XF,o=n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=n.weekStartsOn??((h=(p=n.locale)==null?void 0:p.options)==null?void 0:h.weekStartsOn)??0,a=ir(t);if(!yF(a))throw new RangeError("Invalid time value");
338let l=e.match(h4).map(v=>{const m=v[0];if(m==="p"||m==="P"){const w=s4[m];return w(v,s.formatLong)}return v}).join("").match(f4).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const m=v[0];if(m==="'")return{isToken:!1,value:v4(v)};if(cy[m])return{isToken:!0,value:v};if(m.match(g4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:v}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:i,locale:s};return l.map(v=>{if(!v.isToken)return v.value;const m=v.value;(c4(m)||l4(m))&&u4(m,e,String(t));const w=cy[m[0]];return w(a,m,s.localize,c)}).join("")}function v4(t){const e=t.match(p4);return e?e[1].replace(m4,"'"):t}var du="Tabs",[y4,V4]=ft(du,[Wo]),dE=Wo(),[w4,nm]=y4(du),fE=g.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:a,activationMode:l="automatic",...c}=t,u=Zc(a),[f,p]=Ln({prop:n,onChange:s,defaultProp:o??"",caller:du});return d.jsx(w4,{scope:r,baseId:ds(),value:f,onValueChange:p,orientation:i,dir:u,activationMode:l,children:d.jsx(te.div,{dir:u,"data-orientation":i,...c,ref:e})})});fE.displayName=du;var hE="TabsList",pE=g.forwardRef((t,e)=>{const{__scopeTabs:r,loop:n=!0,...s}=t,o=nm(hE,r),i=dE(r);return d.jsx(Ep,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:n,children:d.jsx(te.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:e})})});pE.displayName=hE;var mE="TabsTrigger",gE=g.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...o}=t,i=nm(mE,r),a=dE(r),l=wE(i.baseId,n),c=xE(i.baseId,n),u=n===i.value;return d.jsx(Cp,{asChild:!0,...a,focusable:!s,active:u,children:d.jsx(te.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,...o,ref:e,onMouseDown:W(t.onMouseDown,f=>{!s&&f.button===0&&f.ctrlKey===!1?i.onValueChange(n):f.preventDefault()}),onKeyDown:W(t.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(n)}),onFocus:W(t.onFocus,()=>{const f=i.activationMode!=="manual";!u&&!s&&f&&i.onValueChange(n)})})})});gE.displayName=mE;var vE="TabsContent",yE=g.forwardRef((t,e)=>{const{__scopeTabs:r,value:n,forceMount:s,children:o,...i}=t,a=nm(vE,r),l=wE(a.baseId,n),c=xE(a.baseId,n),u=n===a.value,f=g.useRef(u);return g.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),d.jsx(Rt,{present:s||u,children:({present:p})=>d.jsx(te.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:c,tabIndex:0,...i,ref:e,style:{...t.style,animationDuration:f.current?"0s":void 0},children:p&&o})})});yE.displayName=vE;function wE(t,e){return`${t}-trigger-${e}`}function xE(t,e){return`${t}-content-${e}`}var x4=fE,bE=pE,_E=gE,SE=yE;const b4=x4,EE=g.forwardRef(({className:t,...e},r)=>d.jsx(bE,{ref:r,className:G("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));EE.displayName=bE.displayName;const Pl=g.forwardRef(({className:t,...e},r)=>d.jsx(_E,{ref:r,className:G("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}));Pl.displayName=_E.displayName;const Tl=g.forwardRef(({className:t,...e},r)=>d.jsx(SE,{ref:r,className:G("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));Tl.displayName=SE.displayName;const _4=()=>{const[t,e]=g.useState([]),[r,n]=g.useState(!0),[s,o]=g.useState(null);g.useEffect(()=>{i()},[]);const i=async()=>{n(!0);try{const{data:c,error:u}=await le.from("profiles").select("*").order("created_at",{ascending:!1});if(u)throw u;const{data:f,error:p}=await le.from("user_roles").select("*");if(p)throw p;const h=(c||[]).map(v=>({...v,roles:(f||[]).filter(m=>m.user_id===v.id).map(m=>m.role)}));e(h)}catch(c){console.error("Error loading users:",c),oe.error(c.message||"Failed to load users")}finally{n(!1)}},a=async(c,u)=>{o(c);try{if(u){const{error:f}=await le.from("user_roles").delete().eq("user_id",c).eq("role","admin");if(f)throw f;oe.success("Admin privileges removed")}else{const{error:f}=await le.from("user_roles").insert({user_id:c,role:"admin"});if(f)throw f;oe.success("Admin privileges granted")}i()}catch(f){console.error("Error toggling admin role:",f),oe.error(f.message||"Failed to update role")}finally{o(null)}},l=c=>t.filter(f=>f.roles.includes("admin")).length>1||!c.roles.includes("admin");return r?d.jsx(Lt,{children:d.jsx(tr,{className:"flex items-center justify-center py-12",children:d.jsx(Ar,{className:"h-8 w-8 animate-spin"})})}):d.jsxs(Lt,{children:[d.jsxs(Dr,{children:[d.jsxs(Mr,{className:"flex items-center gap-2",children:[d.jsx(Rg,{className:"h-5 w-5"}),"User Management"]}),d.jsx(fs,{children:"View all users, assign admin roles, and manage permissions"})]}),d.jsx(tr,{children:t.length===0?d.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[d.jsx(Rg,{className:"mx-auto h-12 w-12 mb-2 opacity-50"}),d.jsx("p",{children:"No users found"})]}
338):d.jsxs(em,{children:[d.jsx(tm,{children:d.jsxs(oa,{children:[d.jsx(mt,{children:"Email"}),d.jsx(mt,{children:"Roles"}),d.jsx(mt,{children:"Joined"}),d.jsx(mt,{className:"text-right",children:"Actions"})]})}),d.jsx(rm,{children:t.map(c=>{const u=c.roles.includes("admin"),f=s===c.id;return d.jsxs(oa,{children:[d.jsx(gt,{className:"font-medium",children:c.email}),d.jsx(gt,{children:d.jsxs("div",{className:"flex gap-1",children:[c.roles.map(p=>d.jsx(Tn,{variant:p==="admin"?"default":"secondary",children:p},p)),c.roles.length===0&&d.jsx(Tn,{variant:"outline",children:"No roles"})]})}),d.jsx(gt,{children:uE(new Date(c.created_at),"MMM d, yyyy")}),d.jsx(gt,{className:"text-right",children:d.jsx(ve,{size:"sm",variant:u?"outline":"default",onClick:()=>a(c.id,u),disabled:f||!l(c)&&u,title:!l(c)&&u?"Cannot remove the last admin":void 0,children:f?d.jsx(Ar,{className:"h-4 w-4 animate-spin"}):u?d.jsxs(d.Fragment,{children:[d.jsx(yP,{className:"mr-2 h-4 w-4"}),"Remove Admin"]}):d.jsxs(d.Fragment,{children:[d.jsx(tc,{className:"mr-2 h-4 w-4"}),"Make Admin"]})})})]},c.id)})})]})})]})},S4=()=>{const[t,e]=g.useState(null),[r,n]=g.useState(!1),[s,o]=g.useState(null),[i,a]=g.useState([]),[l,c]=g.useState(!0),[u,f]=g.useState(!1),[p,h]=g.useState(!1),[v,m]=g.useState(null),w=Sr();g.useEffect(()=>{x(),y()},[]);const x=async()=>{const{data:{session:k}}=await le.auth.getSession();if(!k){w("/auth");return}const{data:P}=await le.from("user_roles").select("role").eq("user_id",k.user.id).eq("role","admin").single();if(!P){oe.error("Access denied: Admin role required"),await le.auth.signOut(),w("/auth");return}f(!0),c(!1)},y=async()=>{const{data:k,error:P}=await le.from("resource_uploads").select("*").order("started_at",{ascending:!1}).limit(20);if(P){console.error("Error loading history:",P);return}a(k||[])},b=k=>{if(console.log("File input changed:",k.target.files),k.target.files&&k.target.files[0]){const P=k.target.files[0];if(console.log("File selected:",P.name,P.size),!P.name.toLowerCase().endsWith(".csv")){oe.error("Please select a valid CSV file"),e(null),k.target.value="";return}e(P),oe.success(`File selected: ${P.name}`)}else console.log("No file selected"),e(null)},_=async()=>{if(console.log("handleUpload started - file:",t==null?void 0:t.name,"mode:",s),!t){oe.error("Please select a CSV file");return}if(!s){oe.error("Please select an upload mode (Replace All Data or Append Data)");return}n(!0);try{console.log("Reading file content...");const k=await t.text();console.log("File content read, invoking import-csv function...");const{data:P,error:N}=await le.functions.invoke("import-csv",{body:{csvContent:k,mode:s}});if(N)throw console.error("Import function error:",N),N;console.log("Import successful:",P);const H=s==="full_replace"?"replaced":"appended";P.errorCount>0?oe.warning(`Import completed with warnings: ${P.createdCount} resources created, ${P.updatedCount} updated, ${P.errorCount} rows had errors (${H} mode).`):oe.success(`Import successful! ${P.createdCount} resources created, ${P.updatedCount} updated (${H} mode).`),e(null);const A=document.getElementById("csv-file");A&&(A.value=""),y()}catch(k){console.error("Upload failed:",k),oe.error(k.message||"Upload failed. Please check the console for details.")}finally{n(!1),console.log("handleUpload finished")}},S=async()=>{h(!0);try{const{error:k}=await le.from("resources").delete().neq("id","00000000-0000-0000-0000-000000000000");if(k)throw k;oe.success("All resources deleted successfully"),y()}catch(k){console.error("Delete failed:",k),oe.error(k.message||"Failed to delete data")}finally{h(!1)}},E=async k=>{m(k);try{const{error:P}=await le.from("resource_uploads").delete().eq("id",k);if(P)throw P;oe.success("Upload record deleted successfully"),y()}catch(P){console.error("Delete upload failed:",P),oe.error(P.message||"Failed to delete upload record")}finally{m(null)}},C=async()=>{await le.auth.signOut(),w("/auth")};return l?d.jsx("div",{className:"min-h-screen flex items-center justify-center",children:d.jsx(Ar,{className:"h-8 w-8 animate-spin"})}):u?d.jsx("div",{className:"min-h-screen bg-background p-6",children:d.jsxs("div",{className:"max-w-6xl mx-auto
338space-y-6",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-3xl font-bold",children:"Admin Dashboard"}),d.jsx("p",{className:"text-muted-foreground",children:"Manage resources, users, and view upload history"})]}),d.jsxs(ve,{variant:"outline",onClick:C,children:[d.jsx(vP,{className:"mr-2 h-4 w-4"}),"Logout"]})]}),d.jsxs(b4,{defaultValue:"csv-upload",className:"w-full",children:[d.jsxs(EE,{className:"grid w-full grid-cols-3",children:[d.jsx(Pl,{value:"csv-upload",children:"CSV Upload"}),d.jsx(Pl,{value:"users",children:"User Management"}),d.jsx(Pl,{value:"danger",children:"Danger Zone"})]}),d.jsxs(Tl,{value:"csv-upload",className:"space-y-6",children:[d.jsxs(Lt,{children:[d.jsxs(Dr,{children:[d.jsx(Mr,{children:"Upload CSV File"}),d.jsx(fs,{children:"Upload a CSV file containing community resources to import into the database"})]}),d.jsxs(tr,{className:"space-y-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(lt,{htmlFor:"csv-file",children:"Select CSV File"}),d.jsx("input",{id:"csv-file",type:"file",accept:".csv",onChange:b,disabled:r,className:"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
338ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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&&d.jsxs("p",{className:"text-sm text-muted-foreground",children:["Selected: ",t.name," (",(t.size/1024).toFixed(2)," KB)"]})]}),d.jsxs("div",{className:"space-y-3",children:[d.jsx(lt,{children:"Upload Mode"}),d.jsxs(bS,{value:s||"",onValueChange:k=>o(k),children:[d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(Jf,{value:"full_replace",id:"replace"}),d.jsx(lt,{htmlFor:"replace",className:"font-normal cursor-pointer",children:"Replace All Data - Delete all existing resources and import new ones"})]}),d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(Jf,{value:"incremental",id:"append"}),d.jsx(lt,{htmlFor:"append",className:"font-normal cursor-pointer",children:"Append Data - Add new resources and update existing ones (matched by Resource ID)"})]})]})]}),d.jsxs(ve,{onClick:_,disabled:!t||!s||r,className:"w-full sm:w-auto",children:[r&&d.jsx(Ar,{className:"mr-2 h-4 w-4 animate-spin"}),r?"Processing large file (this may take a minute)...":d.jsxs(d.Fragment,{children:[d.jsx(xP,{className:"mr-2 h-4 w-4"})," Upload & Import"]})]}),(!t||!s)&&d.jsxs("p",{className:"text-sm text-muted-foreground",children:[!t&&!s&&"Please select a CSV file and upload mode to enable upload",!t&&s&&"Please select a CSV file to enable upload",t&&!s&&"Please select an upload mode to enable upload"]})]})]}),d.jsxs(Lt,{children:[d.jsxs(Dr,{children:[d.jsx(Mr,{children:"Upload History"}),d.jsx(fs,{children:"Recent CSV upload and import operations"})]}),d.jsx(tr,{children:i.length===0?d.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[d.jsx(dP,{className:"mx-auto h-12 w-12 mb-2 opacity-50"}),d.jsx("p",{children:"No upload history yet"})]}):d.jsxs(em,{children:[d.jsx(tm,{children:d.jsxs(oa,{children:[d.jsx(mt,{children:"Date"}),d.jsx(mt,{children:"Type"}),d.jsx(mt,{children:"Total Rows"}),d.jsx(mt,{children:"Created"}),d.jsx(mt,{children:"Updated"}),d.jsx(mt,{children:"Errors"}),d.jsx(mt,{children:"Status"}),d.jsx(mt,{className:"text-right",children:"Actions"})]})}),d.jsx(rm,{children:i.map(k=>d.jsxs(oa,{children:[d.jsx(gt,{children:uE(new Date(k.started_at),"MMM d, yyyy HH:mm")}),d.jsx(gt,{children:d.jsx(Tn,{variant:"outline",children:k.upload_type})}),d.jsx(gt,{children:k.total_rows||0}),d.jsx(gt,{children:k.created_count||0}),d.jsx(gt,{children:k.updated_count||0}),d.jsx(gt,{children:k.error_count?d.jsx("span",{className:"text-destructive",children:k.error_count}):0}),d.jsx(gt,{children:k.completed_at?d.jsx(Tn,{variant:"default",children:"Completed"}):d.jsx(Tn,{variant:"secondary",children:"In Progress"})}),d.jsx(gt,{className:"text-right",children:d.jsxs(oy,{children:[d.jsx(iy,{asChild:!0,children:d.jsx(ve,{variant:"ghost",size:"sm",disabled:v===k.id,children:v===k.id?d.jsx(Ar,{className:"h-4 w-4 animate-spin"}):d.jsx(Ku,{className:"h-4 w-4"})})}),d.jsxs(Xf,{children:[d.jsxs(Zf,{children:[d.jsx(th,{children:"Delete Upload Record?"}),d.jsx(rh,{children:"This will delete the upload history record only. The resources that were imported will remain in the database. This action cannot be undone."})]}),d.jsxs(eh,{children:[d.jsx(sh,{children:"Cancel"}),d.jsx(nh,{onClick:()=>E(k.id),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Record"})]})]})]})})]},k.id))})]})})]})]}),d.jsx(Tl,{value:"users",children:d.jsx(_4,{})}),d.jsx(Tl,{value:"danger",children:d.jsxs(Lt,{className:"border-destructive",children:[d.jsxs(Dr,{children:[d.jsxs(Mr,{className:"text-destructive flex items-center gap-2",children:[d.jsx(Ku,{className:"h-5 w-5"}),"Danger Zone"]}),d.jsx(fs,{children:"Irreversible actions that will permanently delete data"})]}),d.jsx(tr,{className:"space-y-4",children:d.jsx("div",{className:"rounded-lg border border-destructive/50 p-4 space-y-4",children:d.jsxs("div",{children:[d.jsx("h3",{className:"font-semibold text-foreground mb-2",children:"Delete All Resources"}),d.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"This will permanently delete all resources from the database. This action cannot be undone."}),d.jsxs(oy,{children:[d.jsx(iy,{asChild:!0,children:d.jsx(ve,{variant:"destructive",disabled:p,children:p?d.jsxs(d.Fragment,{children:[d.jsx(Ar,{className:"mr-2 h-4 w-4 animate-spin"}),"Deleting..."]}):d.jsxs(d.Fragment,{children:[d.jsx(Ku,{className:"mr-2 h-4 w-4"}),"Delete All Data"]})})}),d.jsxs(Xf,{children:[d.jsxs(Zf,{children:[d.jsx(th,{children:"Are you absolutely sure?"}),d.jsx(rh,{children:"This action cannot be undone. This will permanently delete all resources from the database."})]}),d.jsxs(eh,{children:[d.jsx(sh,{children:"Cancel"}),d.jsx(nh,{onClick:S,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Yes, delete everything"})]})]})]})]})})})]})})]})]})}):null},E4=()=>{const t=Fn();return g.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),d.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:d.jsxs("div",{className:"text-center",children:[d.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),d.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),d.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},C4=new WN,k4=()=>d.jsx(KN,{client:C4,children:d.jsxs(xN,{children:[d.jsx(nT,{}),d.jsx(DT,{}),d.jsx(WO,{children:d.jsxs(MO,{children:[d.jsx(cr,{path:"/",element:d.jsx(OD,{})}),d.jsx(cr,{path:"/categories",element:d.jsx(o$,{})}),d.jsx(cr,{path:"/zip-code",element:d.jsx(u$,{})}),d.jsx(cr,{path:"/results",element:d.jsx(y$,{})}),d.jsx(cr,{path:"/resource/:id",element:d.jsx(w$,{})}),d.jsx(cr,{path:"/auth",element:d.jsx(_$,{})}),d.jsx(cr,{path:"/admin/setup",element:d.jsx(E$,{})}),d.jsx(cr,{path:"/admin",element:d.jsx(S4,{})}),d.jsx(cr,{path:"*",element:d.jsx(E4,{})})]})})]})});M0(document.getElementById("root")).render(d.jsx(k4,{}));
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.