PageSourceSearch

https://tgi-feedback-flow.lovable.app/assets/index-BmOIYzB5.js

js tgi-feedback-flow.lovable.app collected 2026-10-03 03:49:29 UTC 612,167 bytes, 243 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Portal-DDGOLGRU.js","assets/MFAEnrollment-C9tRC3Q0.js","assets/check-CFYag2xS.js","assets/shield-BeJ--4pP.js","assets/MFAVerification-DKYKCTBl.js","assets/clearmark-logo-CUW6QzRv.js","assets/Feedback-BG15_WCC.js","assets/avatar-CI1rT9IH.js","assets/searchSanitize-Cb7lx-XP.js","assets/select-BONTE_PJ.js","assets/textarea-DxHDSqSr.js","assets/useTeamRecognition-D428rFCz.js","assets/chevron-right-CglDVxLj.js","assets/message-square-2VuJoB3_.js","assets/lock-CNcGsAsw.js","assets/calendar-BoCFKBi9.js","assets/Auth-COnx-10l.js","assets/mail-CjRi5ODS.js","assets/log-in-C6qMrnbS.js","assets/Admin-C3cuGPVz.js","assets/SalesLeadsContent-B5660iTK.js","assets/useCases-Cyr4sNNj.js","assets/table-C3kZF6qW.js","assets/tgif-logo--bZg4Cx6.js","assets/EmojiRatingDisplay-B6SUK9vH.js","assets/phone-C_cj4_xP.js","assets/star-C43x7tIb.js","assets/triangle-alert-ByYgQZ14.js","assets/formatDistanceToNow-D1rdIJ7C.js","assets/user-DqVOdoHx.js","assets/users-CDKFb_so.js","assets/badge-DymVRyv9.js","assets/building-2-B8pjp7eS.js","assets/arrow-right-CsGuzofL.js","assets/useSalesLeads-CU7y4onC.js","assets/useUserStores-DiGqP75-.js","assets/AreaChart-DrZq-hXf.js","assets/progress-DvlK7lnS.js","assets/sticky-note-CtG8muTM.js","assets/map-pin-DUqSn2Fx.js","assets/activity-DTVLTLQ7.js","assets/useReplyTemplates-C2DXR0PB.js","assets/useUsers-BIH09vDL.js","assets/RatingStars-HpfKvbdX.js","assets/user-check-tr6WYZcC.js","assets/Store-Bdf7Ar19.js","assets/headphones-C78c5zqm.js","assets/SlaCountdownBadge-DdrftA9y.js","assets/Region-Dw5l_y3N.js","assets/FeedbackDetail-D1jew8Ft.js","assets/KeywordsBadges-B5F0vx5j.js","assets/useMentionables-CdSpbY6-.js","assets/arrow-left-Behw2FIK.js","assets/ExternalReviewDetail-Bsap-DLG.js","assets/TrainingGuide-BRLCEOKE.js","assets/DataHealthDashboard-CtoWumsl.js","assets/SalesLeadDetail-48kfxKEp.js","assets/ResetPassword-CgemMCMY.js"])))=>i.map(i=>d[i]);
2var Ap=e=>{throw TypeError(e)};var qu=(e,t,r)=>t.has(e)||Ap("Cannot "+r);var E=(e,t,r)=>(qu(e,t,"read from private field"),r?r.call(e):t.get(e)),q=(e,t,r)=>t.has(e)?Ap("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),F=(e,t,r,n)=>(qu(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),X=(e,t,r)=>(qu(e,t,"access private method"),r);var ga=(e,t,r,n)=>({set _(s){F(e,t,s,r)},get _(){return E(e,t,n)}});function Iv(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const s in n)if(s!=="default"&&!(s in e)){const o=Object.getOwnPropertyDescriptor(n,s);o&&Object.defineProperty(e,s,o.get?o:{enumerable:!0,get:()=>n[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))n(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(s){if(s.ep)return;s.ep=!0;const o=r(s);fetch(s.href,o)}})();var MD=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yS(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var Lv={exports:{}},ou={},Mv={exports:{}},te={};
vendor: 9,528 bytes, lines 2-26
2/**
3 * @license React
4 * react.production.min.js
5 *
6 * Copyright (c) Facebook, Inc. and its affiliates.
7 *
8 * This source code is licensed under the MIT license found in the
9 * LICENSE file in the root directory of this source tree.
10 */var ta=Symbol.for("react.element"),wS=Symbol.for("react.portal"),bS=Symbol.for("react.fragment"),xS=Symbol.for("react.strict_mode"),_S=Symbol.for("react.profiler"),SS=Symbol.for("react.provider"),ES=Symbol.for("react.context"),kS=Symbol.for("react.forward_ref"),CS=Symbol.for("react.suspense"),TS=Symbol.for("react.memo"),PS=Symbol.for("react.lazy"),jp=Symbol.iterator;function RS(e){return e===null||typeof e!="object"?null:(e=jp&&e[jp]||e["@@iterator"],typeof e=="function"?e:null)}var $v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Fv=Object.assign,Uv={};function No(e,t,r){this.props=e,this.context=t,this.refs=Uv,this.updater=r||$v}No.prototype.isReactComponent={};No.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};No.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zv(){}zv.prototype=No.prototype;function zh(e,t,r){this.props=e,this.context=t,this.refs=Uv,this.updater=r||$v}var Bh=zh.prototype=new zv;Bh.constructor=zh;Fv(Bh,No.prototype);Bh.isPureReactComponent=!0;var Np=Array.isArray,Bv=Object.prototype.hasOwnProperty,Wh={current:null},Wv={key:!0,ref:!0,__self:!0,__source:!0};function Vv(e,t,r){var n,s={},o=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Bv.call(t,n)&&!Wv.hasOwnProperty(n)&&(s[n]=t[n]);var a=arguments.length-2;if(a===1)s.children=r;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];s.children=l}if(e&&e.defaultProps)for(n in a=e.defaultProps,a)s[n]===void 0&&(s[n]=a[n]);return{$$typeof:ta,type:e,key:o,ref:i,props:s,_owner:Wh.current}}function OS(e,t){return{$$typeof:ta,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Vh(e){return typeof e=="object"&&e!==null&&e.$$typeof===ta}function AS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Ip=/\/+/g;function Ku(e,t){return typeof e=="object"&&e!==null&&e.key!=null?AS(""+e.key):t.toString(36)}function el(e,t,r,n,s){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case ta:case wS:i=!0}}if(i)return i=e,s=s(i),e=n===""?"."+Ku(i,0):n,Np(s)?(r="",e!=null&&(r=e.replace(Ip,"$&/")+"/"),el(s,t,r,"",function(u){return u})):s!=null&&(Vh(s)&&(s=OS(s,r+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(Ip,"$&/")+"/")+e)),t.push(s)),1;if(i=0,n=n===""?".":n+":",Np(e))for(var a=0;a<e.length;a++){o=e[a];var l=n+Ku(o,a);i+=el(o,t,r,l,s)}else if(l=RS(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=n+Ku(o,a++),i+=el(o,t,r,l,s);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function va(e,t,r){if(e==null)return e;var n=[],s=0;return el(e,n,"","",function(o){return t.call(r,o,s++)}),n}function jS(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var nt={current:null},tl={transition:null},NS={ReactCurrentDispatcher:nt,ReactCurrentBatchConfig:tl,ReactCurrentOwner:Wh};function Hv(){throw Error("act(...) is not supported in production builds of React.")}te.Children={map:va,forEach:function(e,t,r){va(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return va(e,function(){t++}),t},toArray:function(e){return va(e,function(t){return t})||[]},only:function(e){if(!Vh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Component=No;te.Fragment=bS;te.Profiler=_S;te.PureComponent=zh;te.StrictMode=xS;te.Suspense=CS;te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=NS;te.act=Hv;te.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Fv({},e.props),s=e.key,o=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,i=Wh.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Bv.call(t,l)&&!Wv.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];n.children=a}return{$$typeof:ta,type:e.type,key:s,ref:o,props:n,_owner:i}};te.createContext=function(e){return e={$$typeof:ES,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:SS,_context:e},e.Consumer=e};te.createElement=Vv;te.createFactory=function(e){var t=Vv.bind(null,e);return t.type=e,t};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:kS,render:e}};te.isValidElement=Vh;te.lazy=function(e){return{$$typeof:PS,_payload:{_status:-1,_result:e},_init:jS}};te.memo=function(e,t){return{$$typeof:TS,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=tl.transition;tl.transition={};try{e()}finally{tl.transition=t}};te.unstable_act=Hv;te.useCallback=function(e,t){return nt.current.useCallback(e,t)};te.useContext=function(e){return nt.current.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e){return nt.current.useDeferredValue(e)};te.useEffect=function(e,t){return nt.current.useEffect(e,t)};te.useId=function(){return nt.current.useId()};te.useImperativeHandle=function(e,t,r){return nt.current.useImperativeHandle(e,t,r)};te.useInsertionEffect=function(e,t){return nt.current.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return nt.current.useLayoutEffect(e,t)};te.useMemo=function(e,t){return nt.current.useMemo(e,t)};te.useReducer=function(e,t,r){return nt.current.useReducer(e,t,r)};te.useRef=function(e){return nt.current.useRef(e)};te.useState=function(e){return nt.current.useState(e)};te.useSyncExternalStore=function(e,t,r){return nt.current.useSyncExternalStore(e,t,r)};te.useTransition=function(){return nt.current.useTransition()};te.version="18.3.1";Mv.exports=te;var p=Mv.exports;const L=Dv(p),Hh=Iv({__proto__:null,default:L},[p]);/**
11 * @license React
12 * react-jsx-runtime.production.min.js
13 *
14 * Copyright (c) Facebook, Inc. and its affiliates.
15 *
16 * This source code is licensed under the MIT license found in the
17 * LICENSE file in the root directory of this source tree.
18 */var IS=p,DS=Symbol.for("react.element"),LS=Symbol.for("react.fragment"),MS=Object.prototype.hasOwnProperty,$S=IS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,FS={key:!0,ref:!0,__self:!0,__source:!0};function qv(e,t,r){var n,s={},o=null,i=null;r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)MS.call(t,n)&&!FS.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:DS,type:e,key:o,ref:i,props:s,_owner:$S.current}}ou.Fragment=LS;ou.jsx=qv;ou.jsxs=qv;Lv.exports=ou;var x=Lv.exports,Kv={exports:{}},St={},Gv={exports:{}},Qv={};/**
19 * @license React
20 * scheduler.production.min.js
21 *
22 * Copyright (c) Facebook, Inc. and its affiliates.
23 *
24 * This source code is licensed under the MIT license found in the
25 * LICENSE file in the root directory of this source tree.
26 */(function(e){function t(A,N){var $=A.length;A.push(N);e:for(;0<$;){var Q=$-1>>>1,V=A[Q];if(0<s(V,N))A[Q]=N,A[$]=V,$=Q;else break e}}function r(A){return A.length===0?null:A[0]}function n(A){if(A.length===0)return null;var N=A[0],$=A.pop();if($!==N){A[0]=$;e:for(var Q=0,V=A.length,ee=V>>>1;Q<ee;){var re=2*(Q+1)-1,Pe=A[re],We=re+1,ie=A[We];if(0>s(Pe,$))We<V&&0>s(ie,Pe)?(A[Q]=ie,A[We]=$,Q=We):(A[Q]=Pe,A[re]=$,Q=re);else if(We<V&&0>s(ie,$))A[Q]=ie,A[We]=$,Q=We;else break e}}return N}function s(A,N){var $=A.sortIndex-N.sortIndex;return $!==0?$:A.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,b=!1,m=!1,w=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var N=r(u);N!==null;){if(N.callback===null)n(u);else if(N.startTime<=A)n(u),N.sortIndex=N.expirationTime,t(l,N);else break;N=r(u)}}function _(A){if(m=!1,y(A),!b)if(r(l)!==null)b=!0,z(S);else{var N=r(u);N!==null&&G(_,N.startTime-A)}}function S(A,N){b=!1,m&&(m=!1,v(T),T=-1),h=!0;var $=f;try{for(y(N),d=r(l);d!==null&&(!(d.expirationTime>N)||A&&!j());){var Q=d.callback;
vendor: 9,158 bytes, lines 26-35
26if(typeof Q=="function"){d.callback=null,f=d.priorityLevel;var V=Q(d.expirationTime<=N);N=e.unstable_now(),typeof V=="function"?d.callback=V:d===r(l)&&n(l),y(N)}else n(l);d=r(l)}if(d!==null)var ee=!0;else{var re=r(u);re!==null&&G(_,re.startTime-N),ee=!1}return ee}finally{d=null,f=$,h=!1}}var k=!1,C=null,T=-1,P=5,R=-1;function j(){return!(e.unstable_now()-R<P)}function O(){if(C!==null){var A=e.unstable_now();R=A;var N=!0;try{N=C(!0,A)}finally{N?M():(k=!1,C=null)}}else k=!1}var M;if(typeof g=="function")M=function(){g(O)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,H=I.port2;I.port1.onmessage=O,M=function(){H.postMessage(null)}}else M=function(){w(O,0)};function z(A){C=A,k||(k=!0,M())}function G(A,N){T=w(function(){A(e.unstable_now())},N)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(A){A.callback=null},e.unstable_continueExecution=function(){b||h||(b=!0,z(S))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(A){switch(f){case 1:case 2:case 3:var N=3;break;default:N=f}var $=f;f=N;try{return A()}finally{f=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,N){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var $=f;f=A;try{return N()}finally{f=$}},e.unstable_scheduleCallback=function(A,N,$){var Q=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?Q+$:Q):$=Q,A){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=$+V,A={id:c++,callback:N,priorityLevel:A,startTime:$,expirationTime:V,sortIndex:-1},$>Q?(A.sortIndex=$,t(u,A),r(l)===null&&A===r(u)&&(m?(v(T),T=-1):m=!0,G(_,$-Q))):(A.sortIndex=V,t(l,A),b||h||(b=!0,z(S))),A},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(A){var N=f;return function(){var $=f;f=N;try{return A.apply(this,arguments)}finally{f=$}}}})(Qv);Gv.exports=Qv;var US=Gv.exports;/**
27 * @license React
28 * react-dom.production.min.js
29 *
30 * Copyright (c) Facebook, Inc. and its affiliates.
31 *
32 * This source code is licensed under the MIT license found in the
33 * LICENSE file in the root directory of this source tree.
34 */var zS=p,_t=US;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Yv=new Set,_i={};function ys(e,t){_o(e,t),_o(e+"Capture",t)}function _o(e,t){for(_i[e]=t,e=0;e<t.length;e++)Yv.add(t[e])}var Rr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yc=Object.prototype.hasOwnProperty,BS=/^[: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]*$/,Dp={},Lp={};function WS(e){return Yc.call(Lp,e)?!0:Yc.call(Dp,e)?!1:BS.test(e)?Lp[e]=!0:(Dp[e]=!0,!1)}function VS(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function HS(e,t,r,n){if(t===null||typeof t>"u"||VS(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function st(e,t,r,n,s,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=s,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Be[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Be[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Be[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Be[e]=new st(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Be[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Be[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Be[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Be[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Be[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var qh=/[\-:]([a-z])/g;function Kh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(qh,Kh);Be[t]=new st(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(qh,Kh);Be[t]=new st(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(qh,Kh);Be[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Be[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Be.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Be[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function Gh(e,t,r,n){var s=Be.hasOwnProperty(t)?Be[t]:null;(s!==null?s.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(HS(t,r,s,n)&&(r=null),n||s===null?WS(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):s.mustUseProperty?e[s.propertyName]=r===null?s.type===3?!1:"":r:(t=s.attributeName,n=s.attributeNamespace,r===null?e.removeAttribute(t):(s=s.type,r=s===3||s===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var Dr=zS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ya=Symbol.for("react.element"),Us=Symbol.for("react.portal"),zs=Symbol.for("react.fragment"),Qh=Symbol.for("react.strict_mode"),Jc=Symbol.for("react.profiler"),Jv=Symbol.for("react.provider"),Xv=Symbol.for("react.context"),Yh=Symbol.for("react.forward_ref"),Xc=Symbol.for("react.suspense"),Zc=Symbol.for("react.suspense_list"),Jh=Symbol.for("react.memo"),Qr=Symbol.for("react.lazy"),Zv=Symbol.for("react.offscreen"),Mp=Symbol.iterator;function qo(e){return e===null||typeof e!="object"?null:(e=Mp&&e[Mp]||e["@@iterator"],typeof e=="function"?e:null)}var Se=Object.assign,Gu;function si(e){if(Gu===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Gu=t&&t[1]||""}return`
35`+Gu+e}var Qu=!1;function Yu(e,t){if(!e||Qu)return"";Qu=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}
vendor: 4,643 bytes, lines 35-38
35catch(u){if(u&&n&&typeof u.stack=="string"){for(var s=u.stack.split(`
36`),o=n.stack.split(`
37`),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=`
38`+s[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=a);break}}}finally{Qu=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?si(e):""}function qS(e){switch(e.tag){case 5:return si(e.type);case 16:return si("Lazy");case 13:return si("Suspense");case 19:return si("SuspenseList");case 0:case 2:case 15:return e=Yu(e.type,!1),e;case 11:return e=Yu(e.type.render,!1),e;case 1:return e=Yu(e.type,!0),e;default:return""}}function ed(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case zs:return"Fragment";case Us:return"Portal";case Jc:return"Profiler";case Qh:return"StrictMode";case Xc:return"Suspense";case Zc:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Xv:return(e.displayName||"Context")+".Consumer";case Jv:return(e._context.displayName||"Context")+".Provider";case Yh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Jh:return t=e.displayName||null,t!==null?t:ed(e.type)||"Memo";case Qr:t=e._payload,e=e._init;try{return ed(e(t))}catch{}}return null}function KS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ed(t);case 8:return t===Qh?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function En(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ey(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function GS(e){var t=ey(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wa(e){e._valueTracker||(e._valueTracker=GS(e))}function ty(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=ey(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function wl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function td(e,t){var r=t.checked;return Se({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function $p(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=En(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ry(e,t){t=t.checked,t!=null&&Gh(e,"checked",t,!1)}function rd(e,t){ry(e,t);var r=En(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nd(e,t.type,r):t.hasOwnProperty("defaultValue")&&nd(e,t.type,En(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fp(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}
vendor: 9,447 bytes, line 38
38function nd(e,t,r){(t!=="number"||wl(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var oi=Array.isArray;function Xs(e,t,r,n){if(e=e.options,t){t={};for(var s=0;s<r.length;s++)t["$"+r[s]]=!0;for(r=0;r<e.length;r++)s=t.hasOwnProperty("$"+e[r].value),e[r].selected!==s&&(e[r].selected=s),s&&n&&(e[r].defaultSelected=!0)}else{for(r=""+En(r),t=null,s=0;s<e.length;s++){if(e[s].value===r){e[s].selected=!0,n&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function sd(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(D(91));return Se({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Up(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(D(92));if(oi(r)){if(1<r.length)throw Error(D(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:En(r)}}function ny(e,t){var r=En(t.value),n=En(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function zp(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function sy(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function od(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sy(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ba,oy=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,s){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ba=ba||document.createElement("div"),ba.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ba.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Si(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var ci={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},QS=["Webkit","ms","Moz","O"];Object.keys(ci).forEach(function(e){QS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ci[t]=ci[e]})});function iy(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||ci.hasOwnProperty(e)&&ci[e]?(""+t).trim():t+"px"}function ay(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,s=iy(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,s):e[r]=s}}var YS=Se({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 id(e,t){if(t){if(YS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function ad(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ld=null;function Xh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ud=null,Zs=null,eo=null;function Bp(e){if(e=sa(e)){if(typeof ud!="function")throw Error(D(280));var t=e.stateNode;t&&(t=cu(t),ud(e.stateNode,e.type,t))}}function ly(e){Zs?eo?eo.push(e):eo=[e]:Zs=e}function uy(){if(Zs){var e=Zs,t=eo;if(eo=Zs=null,Bp(e),t)for(e=0;e<t.length;e++)Bp(t[e])}}function cy(e,t){return e(t)}function dy(){}var Ju=!1;function hy(e,t,r){if(Ju)return e(t,r);Ju=!0;try{return cy(e,t,r)}finally{Ju=!1,(Zs!==null||eo!==null)&&(dy(),uy())}}function Ei(e,t){var r=e.stateNode;if(r===null)return null;var n=cu(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(D(231,t,typeof r));return r}var cd=!1;if(Rr)try{var Ko={};Object.defineProperty(Ko,"passive",{get:function(){cd=!0}}),window.addEventListener("test",Ko,Ko),window.removeEventListener("test",Ko,Ko)}catch{cd=!1}function JS(e,t,r,n,s,o,i,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var di=!1,bl=null,xl=!1,dd=null,XS={onError:function(e){di=!0,bl=e}};function ZS(e,t,r,n,s,o,i,a,l){di=!1,bl=null,JS.apply(XS,arguments)}function e1(e,t,r,n,s,o,i,a,l){if(ZS.apply(this,arguments),di){if(di){var u=bl;di=!1,bl=null}else throw Error(D(198));xl||(xl=!0,dd=u)}}function ws(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function fy(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Wp(e){if(ws(e)!==e)throw Error(D(188))}function t1(e){var t=e.alternate;if(!t){if(t=ws(e),t===null)throw Error(D(188));return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var o=s.alternate;if(o===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===o.child){for(o=s.child;o;){if(o===r)return Wp(s),e;if(o===n)return Wp(s),t;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?e:t}function py(e){return e=t1(e),e!==null?my(e):null}function my(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=my(e);if(t!==null)return t;e=e.sibling}return null}var gy=_t.unstable_scheduleCallback,Vp=_t.unstable_cancelCallback,r1=_t.unstable_shouldYield,n1=_t.unstable_requestPaint,Te=_t.unstable_now,s1=_t.unstable_getCurrentPriorityLevel,Zh=_t.unstable_ImmediatePriority,vy=_t.unstable_UserBlockingPriority,_l=_t.unstable_NormalPriority,o1=_t.unstable_LowPriority,yy=_t.unstable_IdlePriority,iu=null,dr=null;function i1(e){if(dr&&typeof dr.onCommitFiberRoot=="function")try{dr.onCommitFiberRoot(iu,e,void 0,(e.current.flags&128)===128)}catch{}}var Yt=Math.clz32?Math.clz32:u1,a1=Math.log,l1=Math.LN2;function u1(e){return e>>>=0,e===0?32:31-(a1(e)/l1|0)|0}var xa=64,_a=4194304;function ii(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Sl(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,o=e.pingedLanes,i=r&268435455;if(i!==0){var a=i&~s;a!==0?n=ii(a):(o&=i,o!==0&&(n=ii(o)))}else i=r&~s,i!==0?n=ii(i):o!==0&&(n=ii(o));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,o=t&-t,s>=o||s===16&&(o&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-Yt(t),s=1<<r,n|=e[r],t&=~s;return n}function c1(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function d1(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,s=e.expirationTimes,o=e.pendingLanes;0<o;){var i=31-Yt(o),a=1<<i,l=s[i];l===-1?(!(a&r)||a&n)&&(s[i]=c1(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function hd(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function wy(){var e=xa;return xa<<=1,!(xa&4194240)&&(xa=64),e}function Xu(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}
vendor: 4,087 bytes, line 38
38function ra(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yt(t),e[t]=r}function h1(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-Yt(r),o=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~o}}function ef(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-Yt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var ue=0;function by(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var xy,tf,_y,Sy,Ey,fd=!1,Sa=[],pn=null,mn=null,gn=null,ki=new Map,Ci=new Map,Jr=[],f1="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 Hp(e,t){switch(e){case"focusin":case"focusout":pn=null;break;case"dragenter":case"dragleave":mn=null;break;case"mouseover":case"mouseout":gn=null;break;case"pointerover":case"pointerout":ki.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ci.delete(t.pointerId)}}function Go(e,t,r,n,s,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:o,targetContainers:[s]},t!==null&&(t=sa(t),t!==null&&tf(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function p1(e,t,r,n,s){switch(t){case"focusin":return pn=Go(pn,e,t,r,n,s),!0;case"dragenter":return mn=Go(mn,e,t,r,n,s),!0;case"mouseover":return gn=Go(gn,e,t,r,n,s),!0;case"pointerover":var o=s.pointerId;return ki.set(o,Go(ki.get(o)||null,e,t,r,n,s)),!0;case"gotpointercapture":return o=s.pointerId,Ci.set(o,Go(Ci.get(o)||null,e,t,r,n,s)),!0}return!1}function ky(e){var t=Kn(e.target);if(t!==null){var r=ws(t);if(r!==null){if(t=r.tag,t===13){if(t=fy(r),t!==null){e.blockedOn=t,Ey(e.priority,function(){_y(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function rl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=pd(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);ld=n,r.target.dispatchEvent(n),ld=null}else return t=sa(r),t!==null&&tf(t),e.blockedOn=r,!1;t.shift()}return!0}function qp(e,t,r){rl(e)&&r.delete(t)}function m1(){fd=!1,pn!==null&&rl(pn)&&(pn=null),mn!==null&&rl(mn)&&(mn=null),gn!==null&&rl(gn)&&(gn=null),ki.forEach(qp),Ci.forEach(qp)}function Qo(e,t){e.blockedOn===t&&(e.blockedOn=null,fd||(fd=!0,_t.unstable_scheduleCallback(_t.unstable_NormalPriority,m1)))}function Ti(e){function t(s){return Qo(s,e)}if(0<Sa.length){Qo(Sa[0],e);for(var r=1;r<Sa.length;r++){var n=Sa[r];n.blockedOn===e&&(n.blockedOn=null)}}for(pn!==null&&Qo(pn,e),mn!==null&&Qo(mn,e),gn!==null&&Qo(gn,e),ki.forEach(t),Ci.forEach(t),r=0;r<Jr.length;r++)n=Jr[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Jr.length&&(r=Jr[0],r.blockedOn===null);)ky(r),r.blockedOn===null&&Jr.shift()}var to=Dr.ReactCurrentBatchConfig,El=!0;function g1(e,t,r,n){var s=ue,o=to.transition;to.transition=null;try{ue=1,rf(e,t,r,n)}finally{ue=s,to.transition=o}}function v1(e,t,r,n){var s=ue,o=to.transition;to.transition=null;try{ue=4,rf(e,t,r,n)}finally{ue=s,to.transition=o}}function rf(e,t,r,n){if(El){var s=pd(e,t,r,n);if(s===null)lc(e,t,n,kl,r),Hp(e,n);else if(p1(s,e,t,r,n))n.stopPropagation();else if(Hp(e,n),t&4&&-1<f1.indexOf(e)){for(;s!==null;){var o=sa(s);if(o!==null&&xy(o),o=pd(e,t,r,n),o===null&&lc(e,t,n,kl,r),o===s)break;s=o}s!==null&&n.stopPropagation()}else lc(e,t,n,null,r)}}var kl=null;function pd(e,t,r,n){if(kl=null,e=Xh(n),e=Kn(e),e!==null)if(t=ws(e),t===null)e=null;else if(r=t.tag,r===13){if(e=fy(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return kl=e,null}
vendor: 10,401 bytes, line 38
38function Cy(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(s1()){case Zh:return 1;case vy:return 4;case _l:case o1:return 16;case yy:return 536870912;default:return 16}default:return 16}}var dn=null,nf=null,nl=null;function Ty(){if(nl)return nl;var e,t=nf,r=t.length,n,s="value"in dn?dn.value:dn.textContent,o=s.length;for(e=0;e<r&&t[e]===s[e];e++);var i=r-e;for(n=1;n<=i&&t[r-n]===s[o-n];n++);return nl=s.slice(e,1<n?1-n:void 0)}function sl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ea(){return!0}function Kp(){return!1}function Et(e){function t(r,n,s,o,i){this._reactName=r,this._targetInst=s,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ea:Kp,this.isPropagationStopped=Kp,this}return Se(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Ea)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Ea)},persist:function(){},isPersistent:Ea}),t}var Io={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sf=Et(Io),na=Se({},Io,{view:0,detail:0}),y1=Et(na),Zu,ec,Yo,au=Se({},na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:of,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Yo&&(Yo&&e.type==="mousemove"?(Zu=e.screenX-Yo.screenX,ec=e.screenY-Yo.screenY):ec=Zu=0,Yo=e),Zu)},movementY:function(e){return"movementY"in e?e.movementY:ec}}),Gp=Et(au),w1=Se({},au,{dataTransfer:0}),b1=Et(w1),x1=Se({},na,{relatedTarget:0}),tc=Et(x1),_1=Se({},Io,{animationName:0,elapsedTime:0,pseudoElement:0}),S1=Et(_1),E1=Se({},Io,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),k1=Et(E1),C1=Se({},Io,{data:0}),Qp=Et(C1),T1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},P1={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"},R1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=R1[e])?!!t[e]:!1}function of(){return O1}var A1=Se({},na,{key:function(e){if(e.key){var t=T1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=sl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?P1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:of,charCode:function(e){return e.type==="keypress"?sl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?sl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),j1=Et(A1),N1=Se({},au,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yp=Et(N1),I1=Se({},na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:of}),D1=Et(I1),L1=Se({},Io,{propertyName:0,elapsedTime:0,pseudoElement:0}),M1=Et(L1),$1=Se({},au,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),F1=Et($1),U1=[9,13,27,32],af=Rr&&"CompositionEvent"in window,hi=null;Rr&&"documentMode"in document&&(hi=document.documentMode);var z1=Rr&&"TextEvent"in window&&!hi,Py=Rr&&(!af||hi&&8<hi&&11>=hi),Jp=" ",Xp=!1;function Ry(e,t){switch(e){case"keyup":return U1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bs=!1;function B1(e,t){switch(e){case"compositionend":return Oy(t);case"keypress":return t.which!==32?null:(Xp=!0,Jp);case"textInput":return e=t.data,e===Jp&&Xp?null:e;default:return null}}function W1(e,t){if(Bs)return e==="compositionend"||!af&&Ry(e,t)?(e=Ty(),nl=nf=dn=null,Bs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Py&&t.locale!=="ko"?null:t.data;default:return null}}var V1={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 Zp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!V1[e.type]:t==="textarea"}function Ay(e,t,r,n){ly(n),t=Cl(t,"onChange"),0<t.length&&(r=new sf("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var fi=null,Pi=null;function H1(e){By(e,0)}function lu(e){var t=Hs(e);if(ty(t))return e}function q1(e,t){if(e==="change")return t}var jy=!1;if(Rr){var rc;if(Rr){var nc="oninput"in document;if(!nc){var em=document.createElement("div");em.setAttribute("oninput","return;"),nc=typeof em.oninput=="function"}rc=nc}else rc=!1;jy=rc&&(!document.documentMode||9<document.documentMode)}function tm(){fi&&(fi.detachEvent("onpropertychange",Ny),Pi=fi=null)}function Ny(e){if(e.propertyName==="value"&&lu(Pi)){var t=[];Ay(t,Pi,e,Xh(e)),hy(H1,t)}}function K1(e,t,r){e==="focusin"?(tm(),fi=t,Pi=r,fi.attachEvent("onpropertychange",Ny)):e==="focusout"&&tm()}function G1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lu(Pi)}function Q1(e,t){if(e==="click")return lu(t)}function Y1(e,t){if(e==="input"||e==="change")return lu(t)}function J1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xt=typeof Object.is=="function"?Object.is:J1;function Ri(e,t){if(Xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!Yc.call(t,s)||!Xt(e[s],t[s]))return!1}return!0}function rm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nm(e,t){var r=rm(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=rm(r)}}function Iy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dy(){for(var e=window,t=wl();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=wl(e.document)}return t}function lf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function X1(e){var t=Dy(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Iy(r.ownerDocument.documentElement,r)){if(n!==null&&lf(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=r.textContent.length,o=Math.min(n.start,s);n=n.end===void 0?o:Math.min(n.end,s),!e.extend&&o>n&&(s=n,n=o,o=s),s=nm(r,o);var i=nm(r,n);s&&i&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),o>n?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Z1=Rr&&"documentMode"in document&&11>=document.documentMode,Ws=null,md=null,pi=null,gd=!1;function sm(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;gd||Ws==null||Ws!==wl(n)||(n=Ws,"selectionStart"in n&&lf(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focu
vendor: 4,501 bytes, line 38
38sNode:n.focusNode,focusOffset:n.focusOffset}),pi&&Ri(pi,n)||(pi=n,n=Cl(md,"onSelect"),0<n.length&&(t=new sf("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=Ws)))}function ka(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vs={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionend:ka("Transition","TransitionEnd")},sc={},Ly={};Rr&&(Ly=document.createElement("div").style,"AnimationEvent"in window||(delete Vs.animationend.animation,delete Vs.animationiteration.animation,delete Vs.animationstart.animation),"TransitionEvent"in window||delete Vs.transitionend.transition);function uu(e){if(sc[e])return sc[e];if(!Vs[e])return e;var t=Vs[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Ly)return sc[e]=t[r];return e}var My=uu("animationend"),$y=uu("animationiteration"),Fy=uu("animationstart"),Uy=uu("transitionend"),zy=new Map,om="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 Pn(e,t){zy.set(e,t),ys(t,[e])}for(var oc=0;oc<om.length;oc++){var ic=om[oc],eE=ic.toLowerCase(),tE=ic[0].toUpperCase()+ic.slice(1);Pn(eE,"on"+tE)}Pn(My,"onAnimationEnd");Pn($y,"onAnimationIteration");Pn(Fy,"onAnimationStart");Pn("dblclick","onDoubleClick");Pn("focusin","onFocus");Pn("focusout","onBlur");Pn(Uy,"onTransitionEnd");_o("onMouseEnter",["mouseout","mouseover"]);_o("onMouseLeave",["mouseout","mouseover"]);_o("onPointerEnter",["pointerout","pointerover"]);_o("onPointerLeave",["pointerout","pointerover"]);ys("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ys("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ys("onBeforeInput",["compositionend","keypress","textInput","paste"]);ys("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ys("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ys("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ai="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(" "),rE=new Set("cancel close invalid load scroll toggle".split(" ").concat(ai));function im(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,e1(n,t,void 0,e),e.currentTarget=null}function By(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],s=n.event;n=n.listeners;e:{var o=void 0;if(t)for(var i=n.length-1;0<=i;i--){var a=n[i],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&s.isPropagationStopped())break e;im(s,a,u),o=l}else for(i=0;i<n.length;i++){if(a=n[i],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&s.isPropagationStopped())break e;im(s,a,u),o=l}}}if(xl)throw e=dd,xl=!1,dd=null,e}function me(e,t){var r=t[xd];r===void 0&&(r=t[xd]=new Set);var n=e+"__bubble";r.has(n)||(Wy(t,e,2,!1),r.add(n))}function ac(e,t,r){var n=0;t&&(n|=4),Wy(r,e,n,t)}var Ca="_reactListening"+Math.random().toString(36).slice(2);function Oi(e){if(!e[Ca]){e[Ca]=!0,Yv.forEach(function(r){r!=="selectionchange"&&(rE.has(r)||ac(r,!1,e),ac(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ca]||(t[Ca]=!0,ac("selectionchange",!1,t))}}function Wy(e,t,r,n){switch(Cy(t)){case 1:var s=g1;break;case 4:s=v1;break;default:s=rf}r=s.bind(null,t,r,e),s=void 0,!cd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),n?s!==void 0?e.addEventListener(t,r,{capture:!0,passive:s}):e.addEventListener(t,r,!0):s!==void 0?e.addEventListener(t,r,{passive:s}):e.addEventListener(t,r,!1)}function lc(e,t,r,n,s){var o=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var i=n.tag;if(i===3||i===4){var a=n.stateNode.containerInfo;
vendor: 23,405 bytes, lines 38-39
38if(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=Kn(a),i===null)return;if(l=i.tag,l===5||l===6){n=o=i;continue e}a=a.parentNode}}n=n.return}hy(function(){var u=o,c=Xh(r),d=[];e:{var f=zy.get(e);if(f!==void 0){var h=sf,b=e;switch(e){case"keypress":if(sl(r)===0)break e;case"keydown":case"keyup":h=j1;break;case"focusin":b="focus",h=tc;break;case"focusout":b="blur",h=tc;break;case"beforeblur":case"afterblur":h=tc;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=Gp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=b1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=D1;break;case My:case $y:case Fy:h=S1;break;case Uy:h=M1;break;case"scroll":h=y1;break;case"wheel":h=F1;break;case"copy":case"cut":case"paste":h=k1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Yp}var m=(t&4)!==0,w=!m&&e==="scroll",v=m?f!==null?f+"Capture":null:f;m=[];for(var g=u,y;g!==null;){y=g;var _=y.stateNode;if(y.tag===5&&_!==null&&(y=_,v!==null&&(_=Ei(g,v),_!=null&&m.push(Ai(g,_,y)))),w)break;g=g.return}0<m.length&&(f=new h(f,b,null,r,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&r!==ld&&(b=r.relatedTarget||r.fromElement)&&(Kn(b)||b[Or]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(b=r.relatedTarget||r.toElement,h=u,b=b?Kn(b):null,b!==null&&(w=ws(b),b!==w||b.tag!==5&&b.tag!==6)&&(b=null)):(h=null,b=u),h!==b)){if(m=Gp,_="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=Yp,_="onPointerLeave",v="onPointerEnter",g="pointer"),w=h==null?f:Hs(h),y=b==null?f:Hs(b),f=new m(_,g+"leave",h,r,c),f.target=w,f.relatedTarget=y,_=null,Kn(c)===u&&(m=new m(v,g+"enter",b,r,c),m.target=y,m.relatedTarget=w,_=m),w=_,h&&b)t:{for(m=h,v=b,g=0,y=m;y;y=Ts(y))g++;for(y=0,_=v;_;_=Ts(_))y++;for(;0<g-y;)m=Ts(m),g--;for(;0<y-g;)v=Ts(v),y--;for(;g--;){if(m===v||v!==null&&m===v.alternate)break t;m=Ts(m),v=Ts(v)}m=null}else m=null;h!==null&&am(d,f,h,m,!1),b!==null&&w!==null&&am(d,w,b,m,!0)}}e:{if(f=u?Hs(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var S=q1;else if(Zp(f))if(jy)S=Y1;else{S=G1;var k=K1}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(S=Q1);if(S&&(S=S(e,u))){Ay(d,S,r,c);break e}k&&k(e,f,u),e==="focusout"&&(k=f._wrapperState)&&k.controlled&&f.type==="number"&&nd(f,"number",f.value)}switch(k=u?Hs(u):window,e){case"focusin":(Zp(k)||k.contentEditable==="true")&&(Ws=k,md=u,pi=null);break;case"focusout":pi=md=Ws=null;break;case"mousedown":gd=!0;break;case"contextmenu":case"mouseup":case"dragend":gd=!1,sm(d,r,c);break;case"selectionchange":if(Z1)break;case"keydown":case"keyup":sm(d,r,c)}var C;if(af)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Bs?Ry(e,r)&&(T="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(T="onCompositionStart");T&&(Py&&r.locale!=="ko"&&(Bs||T!=="onCompositionStart"?T==="onCompositionEnd"&&Bs&&(C=Ty()):(dn=c,nf="value"in dn?dn.value:dn.textContent,Bs=!0)),k=Cl(u,T),0<k.length&&(T=new Qp(T,e,null,r,c),d.push({event:T,listeners:k}),C?T.data=C:(C=Oy(r),C!==null&&(T.data=C)))),(C=z1?B1(e,r):W1(e,r))&&(u=Cl(u,"onBeforeInput"),0<u.length&&(c=new Qp("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=C))}By(d,t)})}function Ai(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Cl(e,t){for(var r=t+"Capture",n=[];e!==null;){var s=e,o=s.stateNode;s.tag===5&&o!==null&&(s=o,o=Ei(e,r),o!=null&&n.unshift(Ai(e,o,s)),o=Ei(e,t),o!=null&&n.push(Ai(e,o,s))),e=e.return}return n}function Ts(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function am(e,t,r,n,s){for(var o=t._reactName,i=[];r!==null&&r!==n;){var a=r,l=a.alternate,u=a.stateNode;if(l!==null&&l===n)break;a.tag===5&&u!==null&&(a=u,s?(l=Ei(r,o),l!=null&&i.unshift(Ai(r,l,a))):s||(l=Ei(r,o),l!=null&&i.push(Ai(r,l,a)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var nE=/\r\n?/g,sE=/\u0000|\uFFFD/g;function lm(e){return(typeof e=="string"?e:""+e).replace(nE,`
39`).replace(sE,"")}function Ta(e,t,r){if(t=lm(t),lm(e)!==t&&r)throw Error(D(425))}function Tl(){}var vd=null,yd=null;function wd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bd=typeof setTimeout=="function"?setTimeout:void 0,oE=typeof clearTimeout=="function"?clearTimeout:void 0,um=typeof Promise=="function"?Promise:void 0,iE=typeof queueMicrotask=="function"?queueMicrotask:typeof um<"u"?function(e){return um.resolve(null).then(e).catch(aE)}:bd;function aE(e){setTimeout(function(){throw e})}function uc(e,t){var r=t,n=0;do{var s=r.nextSibling;if(e.removeChild(r),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(n===0){e.removeChild(s),Ti(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=s}while(r);Ti(t)}function vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function cm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Do=Math.random().toString(36).slice(2),ur="__reactFiber$"+Do,ji="__reactProps$"+Do,Or="__reactContainer$"+Do,xd="__reactEvents$"+Do,lE="__reactListeners$"+Do,uE="__reactHandles$"+Do;function Kn(e){var t=e[ur];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Or]||r[ur]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=cm(e);e!==null;){if(r=e[ur])return r;e=cm(e)}return t}e=r,r=e.parentNode}return null}function sa(e){return e=e[ur]||e[Or],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Hs(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(D(33))}function cu(e){return e[ji]||null}var _d=[],qs=-1;function Rn(e){return{current:e}}function ge(e){0>qs||(e.current=_d[qs],_d[qs]=null,qs--)}function fe(e,t){qs++,_d[qs]=e.current,e.current=t}var kn={},Qe=Rn(kn),ct=Rn(!1),ls=kn;function So(e,t){var r=e.type.contextTypes;if(!r)return kn;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},o;for(o in r)s[o]=t[o];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function dt(e){return e=e.childContextTypes,e!=null}function Pl(){ge(ct),ge(Qe)}function dm(e,t,r){if(Qe.current!==kn)throw Error(D(168));fe(Qe,t),fe(ct,r)}function Vy(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error(D(108,KS(e)||"Unknown",s));return Se({},r,n)}function Rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||kn,ls=Qe.current,fe(Qe,e),fe(ct,ct.current),!0}function hm(e,t,r){var n=e.stateNode;if(!n)throw Error(D(169));r?(e=Vy(e,t,ls),n.__reactInternalMemoizedMergedChildContext=e,ge(ct),ge(Qe),fe(Qe,e)):ge(ct),fe(ct,r)}var _r=null,du=!1,cc=!1;function Hy(e){_r===null?_r=[e]:_r.push(e)}function cE(e){du=!0,Hy(e)}function On(){if(!cc&&_r!==null){cc=!0;var e=0,t=ue;try{var r=_r;for(ue=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}_r=null,du=!1}catch(s){throw _r!==null&&(_r=_r.slice(e+1)),gy(Zh,On),s}finally{ue=t,cc=!1}}return null}var Ks=[],Gs=0,Ol=null,Al=0,Rt=[],Ot=0,us=null,kr=1,Cr="";function Un(e,t){Ks[Gs++]=Al,Ks[Gs++]=Ol,Ol=e,Al=t}function qy(e,t,r){Rt[Ot++]=kr,Rt[Ot++]=Cr,Rt[Ot++]=us,us=e;var n=kr;e=Cr;var s=32-Yt(n)-1;n&=~(1<<s),r+=1;var o=32-Yt(t)+s;if(30<o){var i=s-s%5;o=(n&(1<<i)-1).toString(32),n>>=i,s-=i,kr=1<<32-Yt(t)+s|r<<s|n,Cr=o+e}else kr=1<<o|r<<s|n,Cr=e}function uf(e){e.return!==null&&(Un(e,1),qy(e,1,0))}function cf(e){for(;e===Ol;)Ol=Ks[--Gs],Ks[Gs]=null,Al=Ks[--Gs],Ks[Gs]=null;for(;e===us;)us=Rt[--Ot],Rt[Ot]=null,Cr=Rt[--Ot],Rt[Ot]=null,kr=Rt[--Ot],Rt[Ot]=null}var bt=null,wt=null,ye=!1,Qt=null;function Ky(e,t){var r=jt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function fm(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,bt=e,wt=vn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,bt=e,wt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=us!==null?{id:kr,overflow:Cr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=jt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,bt=e,wt=null,!0):!1;default:return!1}}function Sd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ed(e){if(ye){var t=wt;if(t){var r=t;if(!fm(e,t)){if(Sd(e))throw Error(D(418));t=vn(r.nextSibling);var n=bt;t&&fm(e,t)?Ky(n,r):(e.flags=e.flags&-4097|2,ye=!1,bt=e)}}else{if(Sd(e))throw Error(D(418));e.flags=e.flags&-4097|2,ye=!1,bt=e}}}function pm(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;bt=e}function Pa(e){if(e!==bt)return!1;if(!ye)return pm(e),ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!wd(e.type,e.memoizedProps)),t&&(t=wt)){if(Sd(e))throw Gy(),Error(D(418));for(;t;)Ky(e,t),t=vn(t.nextSibling)}if(pm(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(D(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){wt=vn(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}wt=null}}else wt=bt?vn(e.stateNode.nextSibling):null;return!0}function Gy(){for(var e=wt;e;)e=vn(e.nextSibling)}function Eo(){wt=bt=null,ye=!1}function df(e){Qt===null?Qt=[e]:Qt.push(e)}var dE=Dr.ReactCurrentBatchConfig;function Jo(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(D(309));var n=r.stateNode}if(!n)throw Error(D(147,e));var s=n,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(i){var a=s.refs;i===null?delete a[o]:a[o]=i},t._stringRef=o,t)}if(typeof e!="string")throw Error(D(284));if(!r._owner)throw Error(D(290,e))}return e}function Ra(e,t){throw e=Object.prototype.toString.call(t),Error(D(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function mm(e){var t=e._init;return t(e._payload)}function Qy(e){function t(v,g){if(e){var y=v.deletions;y===null?(v.deletions=[g],v.flags|=16):y.push(g)}}function r(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function n(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function s(v,g){return v=xn(v,g),v.index=0,v.sibling=null,v}function o(v,g,y){return v.index=y,e?(y=v.alternate,y!==null?(y=y.index,y<g?(v.flags|=2,g):y):(v.flags|=2,g)):(v.flags|=1048576,g)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,g,y,_){return g===null||g.tag!==6?(g=vc(y,v.mode,_),g.return=v,g):(g=s(g,y),g.return=v,g)}function l(v,g,y,_){var S=y.type;return S===zs?c(v,g,y.props.children,_,y.key):g!==null&&(g.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Qr&&mm(S)===g.type)?(_=s(g,y.props),_.ref=Jo(v,g,y),_.return=v,_):(_=dl(y.type,y.key,y.props,null,v.mode,_),_.ref=Jo(v,g,y),_.return=v,_)}function u(v,g,y,_){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=yc(y,v.mode,_),g.return=v,g):(g=s(g,y.children||[]),g.return=v,g)}function c(v,g,y,_,S){return g===null||g.tag!==7?(g=as(y,v.mode,_,S),g.return=v,g):(g=s(g,y),g.return=v,g)}function d(v,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=vc(""+g,v.mode,y),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ya:return y=dl(g.type,g.key,g.props,null,v.mode,y),y.ref=Jo(v,null,g),y.return=v,y;case Us:return g=yc(g,v.mode,y),g.return=v,g;case Qr:var _=g._init;return d(v,_(g._payload),y)}if(oi(g)||qo(g))return g=as(g,v.mode,y,null),g.return=v,g;Ra(v,g)}return null}function f(v,g,y,_){var S=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return S!==null?null:a(v,g,""+y,_);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case ya:return y.key===S?l(v,g,y,_):null;case Us:return y.key===S?u(v,g,y,_):null;case Qr:return S=y._init,f(v,g,S(y._payload),_)}if(oi(y)||qo(y))return S!==null?null:c(v,g,y,_,null);Ra(v,y)}return null}function h(v,g,y,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return v=v.get(y)||null,a(g,v,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ya:return v=v.get(_.key===null?y:_.key)||null,l(g,v,_,S);case Us:return v=v.get(_.key===null?y:_.key)||null,u(g,v,_,S);case Qr:var k=_._init;return h(v,g,y,k(_._payload),S)}if(oi(_)||qo(_))return v=v.get(y)||null,c(g,v,_,S,null);Ra(g,_)}return null}function b(v,g,y,_){for(var S=null,k=null,C=g,T=g=0,P=null;C!==null&&T<y.length;T++){C.index>T?(P=C,C=null):P=C.sibling;var R=f(v,C,y[T],_);if(R===null){C===null&&(C=P);break}e&&C&&R.alternate===null&&t(v,C),g=o(R,g,T),k===null?S=R:k.sibling=R,k=R,C=P}if(T===y.length)return r(v,C),ye&&Un(v,T),S;if(C===null){for(;T<y.length;T++)C=d(v,y[T],_),C!==null&&(g=o(C,g,T),k===null?S=C:k.sibling=C,k=C);return ye&&Un(v,T),S}for(C=n(v,C);T<y.length;T++)P=h(C,v,T,y[T],_),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?T:P.key),g=o(P,g,T),k===null?S=P:k.sibling=P,k=P);return e&&C.forEach(function(j){return t(v,j)}),ye&&Un(v,T),S}function m(v,g,y,_){var S=qo(y);if(typeof S!="function")throw Error(D(150));if(y=S.call(y),y==null)throw Error(D(151));for(var k=S=null,C=g,T=g=0,P=null,R=y.next();C!==null&&!R.done;T++,R=y.next()){C.index>T?(P=C,C=null):P=C.sibling;var j=f(v,C,R.value,_);if(j===null){C===null&&(C=P);break}e&&C&&j.alternate===null&&t(v,C),g=o(j,g,T),k===null?S=j:k.sibling=j,k=j,C=P}if(R.done)return r(v,C),ye&&Un(v,T),S;if(C===null){for(;!R.done;T++,R=y.next())R=d(v,R.value,_),R!==null&&(g=o(R,g,T),k===null?S=R:k.sibling=R,k=R);return ye&&Un(v,T),S}for(C=n(v,C);!R.done;T++,R=y.next())R=h(C,v,T,R.value,_),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?T:R.key),g=o(R,g,T),k===null?S=R:k.sibling=R,k=R);return e&&C.forEach(function(O){return t(v,O)}),ye&&Un(v,T),S}function w(v,g,y,_){if(typeof y=="object"&&y!==null&&y.type===zs&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ya:e:{for(var S=y.key,k=g;k!==null;){if(k.key===S){if(S=y.type,S===zs){if(k.tag===7){r(v,k.sibling),g=s(k,y.props.children),g.return=v,v=g;break e}}else if(k.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Qr&&mm(S)===k.type){r(v,k.sibling),g=s(k,y.props),g.ref=Jo(v,k,y),g.return=v,v=g;break e}r(v,k);break}else t(v,k);k=k.sibling}y.type===zs?(g=as(y.props.children,v.mode,_,y.key),g.return=v,v=g):(_=dl(y.type,y.key,y.props,null,v.mode,_),_.ref=Jo(v,g,y),_.return=v,v=_)}return i(v);case Us:e:{for(k=y.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){r(v,g.sibling),g=s(g,y.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else t(v,g);g=g.sibling}g=yc(y,v.mode,_),g.return=v,v=g}return i(v);case Qr:return k=y._init,w(v,g,k(y._payload),_)}if(oi(y))return b(v,g,y,_);if(qo(y))return m(v,g,y,_);Ra(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(r(v,g.sibling),g=s(g,y),g.return=v,v=g):(r(v,g),g=vc(y,v.mode,_),g.return=v,v=g),i(v)):r(v,g)}return w}var ko=Qy(!0),Yy=Qy(!1),jl=Rn(null),Nl=null,Qs=null,hf=null;function ff(){hf=Qs=Nl=null}function pf(e){var t=jl.current;ge(jl),e._currentValue=t}function kd(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function ro(e,t){Nl=e,hf=Qs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ut=!0),e.firstContext=null)}function It(e){var t=e._currentValue;if(hf!==e)if(e={context:e,memoizedValue:t,next:null},Qs===null){if(Nl===null)throw Error(D(308));Qs=e,Nl.dependencies={lanes:0,firstContext:e}}else Qs=Qs.next=e;return t}var Gn=null;function mf(e){Gn===null?Gn=[e]:Gn.push(e)}function Jy(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,mf(t)):(r.next=s.next,s.next=r),t.interleaved=r,Ar(e,n)}function Ar(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Yr=!1;function gf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xy(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Tr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yn(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,se&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,Ar(e,r)}return s=n.interleaved,s===null?(t.next=t,mf(n)):(t.next=s.next,s.next=t),n.interleaved=t,Ar(e,r)}function ol(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ef(e,r)}}function gm(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,o=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};o===null?s=o=i:o=o.next=i,r=r.next}while(r!==null);o===null?s=o=t:o=o.next=t}else s=o=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:o,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Il(e,t,r,n){var s=e.updateQueue;Yr=!1;var o=s.firstBaseUpdate,i=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,i===null?o=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==i&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=s.baseState;i=0,c=u=l=null,a=o;do{var f=a.lane,h=a.eventTime;if((n&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var b=e,m=a;switch(f=t,h=r,m.tag){case 1:if(b=m.payload,typeof b=="function"){d=b.call(h,d,f);break e}d=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=m.payload,f=typeof b=="function"?b.call(h,d,f):b,f==null)break e;d=Se({},d,f);break e;case 2:Yr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=s.effects,f===null?s.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,i|=f;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;f=a,a=f.next,f.next=null,s.lastBaseUpdate=f,s.shared.pending=null}}while(!0);if(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do i|=s.lane,s=s.next;while(s!==t)}else o===null&&(s.shared.lanes=0);ds|=i,e.lanes=i,e.memoizedState=d}}function vm(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,n=r,typeof s!="function")throw Error(D(191,s));s.call(n)}}}var oa={},hr=Rn(oa),Ni=Rn(oa),Ii=Rn(oa);function Qn(e){if(e===oa)throw Error(D(174));return e}function vf(e,t){switch(fe(Ii,t),fe(Ni,e),fe(hr,oa),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:od(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=od(t,e)}ge(hr),fe(hr,t)}function Co(){ge(hr),ge(Ni),ge(Ii)}function Zy(e){Qn(Ii.current);var t=Qn(hr.current),r=od(t,e.type);t!==r&&(fe(Ni,e),fe(hr,r))}function yf(e){Ni.current===e&&(ge(hr),ge(Ni))}var xe=Rn(0);function Dl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var dc=[];function wf(){for(var e=0;e<dc.length;e++)dc[e]._workInProgressVersionPrimary=null;dc.length=0}var il=Dr.ReactCurrentDispatcher,hc=Dr.ReactCurrentBatchConfig,cs=0,_e=null,Ne=null,Le=null,Ll=!1,mi=!1,Di=0,hE=0;function Ve(){throw Error(D(321))}function bf(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Xt(e[r],t[r]))return!1;return!0}function xf(e,t,r,n,s,o){if(cs=o,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,il.current=e===null||e.memoizedState===null?gE:vE,e=r(n,s),mi){o=0;do{if(mi=!1,Di=0,25<=o)throw Error(D(301));o+=1,Le=Ne=null,t.updateQueue=null,il.current=yE,e=r(n,s)}while(mi)}if(il.current=Ml,t=Ne!==null&&Ne.next!==null,cs=0,Le=Ne=_e=null,Ll=!1,t)throw Error(D(300));return e}function _f(){var e=Di!==0;return Di=0,e}function or(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?_e.memoizedState=Le=e:Le=Le.next=e,Le}function Dt(){if(Ne===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=Le===null?_e.memoizedState:Le.next;if(t!==null)Le=t,Ne=e;else{if(e===null)throw Error(D(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},Le===null?_e.memoizedState=Le=e:Le=Le.next=e}return Le}function Li(e,t){return typeof t=="function"?t(e):t}function fc(e){var t=Dt(),r=t.queue;if(r===null)throw Error(D(311));r.lastRenderedReducer=e;var n=Ne,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,u=o;do{var c=u.lane;if((cs&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,i=n):l=l.next=d,_e.lanes|=c,ds|=c}u=u.next}while(u!==null&&u!==o);l===null?i=n:l.next=a,Xt(n,t.memoizedState)||(ut=!0),t.memoizedState=n,t.baseState=i,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do o=s.lane,_e.lanes|=o,ds|=o,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);
vendor: 4,900 bytes, line 39
39return[t.memoizedState,r.dispatch]}function pc(e){var t=Dt(),r=t.queue;if(r===null)throw Error(D(311));r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,o=t.memoizedState;if(s!==null){r.pending=null;var i=s=s.next;do o=e(o,i.action),i=i.next;while(i!==s);Xt(o,t.memoizedState)||(ut=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),r.lastRenderedState=o}return[o,n]}function e0(){}function t0(e,t){var r=_e,n=Dt(),s=t(),o=!Xt(n.memoizedState,s);if(o&&(n.memoizedState=s,ut=!0),n=n.queue,Sf(s0.bind(null,r,n,e),[e]),n.getSnapshot!==t||o||Le!==null&&Le.memoizedState.tag&1){if(r.flags|=2048,Mi(9,n0.bind(null,r,n,s,t),void 0,null),$e===null)throw Error(D(349));cs&30||r0(r,t,s)}return s}function r0(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=_e.updateQueue,t===null?(t={lastEffect:null,stores:null},_e.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function n0(e,t,r,n){t.value=r,t.getSnapshot=n,o0(t)&&i0(e)}function s0(e,t,r){return r(function(){o0(t)&&i0(e)})}function o0(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Xt(e,r)}catch{return!0}}function i0(e){var t=Ar(e,1);t!==null&&Jt(t,e,1,-1)}function ym(e){var t=or();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Li,lastRenderedState:e},t.queue=e,e=e.dispatch=mE.bind(null,_e,e),[t.memoizedState,e]}function Mi(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=_e.updateQueue,t===null?(t={lastEffect:null,stores:null},_e.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function a0(){return Dt().memoizedState}function al(e,t,r,n){var s=or();_e.flags|=e,s.memoizedState=Mi(1|t,r,void 0,n===void 0?null:n)}function hu(e,t,r,n){var s=Dt();n=n===void 0?null:n;var o=void 0;if(Ne!==null){var i=Ne.memoizedState;if(o=i.destroy,n!==null&&bf(n,i.deps)){s.memoizedState=Mi(t,r,o,n);return}}_e.flags|=e,s.memoizedState=Mi(1|t,r,o,n)}function wm(e,t){return al(8390656,8,e,t)}function Sf(e,t){return hu(2048,8,e,t)}function l0(e,t){return hu(4,2,e,t)}function u0(e,t){return hu(4,4,e,t)}function c0(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function d0(e,t,r){return r=r!=null?r.concat([e]):null,hu(4,4,c0.bind(null,t,e),r)}function Ef(){}function h0(e,t){var r=Dt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&bf(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function f0(e,t){var r=Dt();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&bf(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function p0(e,t,r){return cs&21?(Xt(r,t)||(r=wy(),_e.lanes|=r,ds|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ut=!0),e.memoizedState=r)}function fE(e,t){var r=ue;ue=r!==0&&4>r?r:4,e(!0);var n=hc.transition;hc.transition={};try{e(!1),t()}finally{ue=r,hc.transition=n}}function m0(){return Dt().memoizedState}function pE(e,t,r){var n=bn(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},g0(e))v0(t,r);else if(r=Jy(e,t,r,n),r!==null){var s=rt();Jt(r,e,n,s),y0(r,t,n)}}function mE(e,t,r){var n=bn(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(g0(e))v0(t,s);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,r);if(s.hasEagerState=!0,s.eagerState=a,Xt(a,i)){var l=t.interleaved;l===null?(s.next=s,mf(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}r=Jy(e,t,s,n),r!==null&&(s=rt(),Jt(r,e,n,s),y0(r,t,n))}}function g0(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function v0(e,t){mi=Ll=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function y0(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,ef(e,r)}}var Ml={readContext:It,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useInsertionEffect:Ve,useLayoutEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useMutableSource:Ve,useSyncExternalStore:Ve,useId:Ve,unstable_isNewReconciler:!1},gE={readContext:It,useCallback:function(e,t){return or().memoizedState=[e,t===void 0?null:t],e},useContext:It,useEffect:wm,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,al(4194308,4,c0.bind(null,t,e),r)},useLayoutEffect:function(e,t){return al(4194308,4,e,t)},useInsertionEffect:function(e,t){return al(4,2,e,t)},useMemo:function(e,t){var r=or();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=or();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=pE.bind(null,_e,e),[n.memoizedState,e]}
vendor: 5,805 bytes, lines 39-41
39,useRef:function(e){var t=or();return e={current:e},t.memoizedState=e},useState:ym,useDebugValue:Ef,useDeferredValue:function(e){return or().memoizedState=e},useTransition:function(){var e=ym(!1),t=e[0];return e=fE.bind(null,e[1]),or().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=_e,s=or();if(ye){if(r===void 0)throw Error(D(407));r=r()}else{if(r=t(),$e===null)throw Error(D(349));cs&30||r0(n,t,r)}s.memoizedState=r;var o={value:r,getSnapshot:t};return s.queue=o,wm(s0.bind(null,n,o,e),[e]),n.flags|=2048,Mi(9,n0.bind(null,n,o,r,t),void 0,null),r},useId:function(){var e=or(),t=$e.identifierPrefix;if(ye){var r=Cr,n=kr;r=(n&~(1<<32-Yt(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Di++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=hE++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vE={readContext:It,useCallback:h0,useContext:It,useEffect:Sf,useImperativeHandle:d0,useInsertionEffect:l0,useLayoutEffect:u0,useMemo:f0,useReducer:fc,useRef:a0,useState:function(){return fc(Li)},useDebugValue:Ef,useDeferredValue:function(e){var t=Dt();return p0(t,Ne.memoizedState,e)},useTransition:function(){var e=fc(Li)[0],t=Dt().memoizedState;return[e,t]},useMutableSource:e0,useSyncExternalStore:t0,useId:m0,unstable_isNewReconciler:!1},yE={readContext:It,useCallback:h0,useContext:It,useEffect:Sf,useImperativeHandle:d0,useInsertionEffect:l0,useLayoutEffect:u0,useMemo:f0,useReducer:pc,useRef:a0,useState:function(){return pc(Li)},useDebugValue:Ef,useDeferredValue:function(e){var t=Dt();return Ne===null?t.memoizedState=e:p0(t,Ne.memoizedState,e)},useTransition:function(){var e=pc(Li)[0],t=Dt().memoizedState;return[e,t]},useMutableSource:e0,useSyncExternalStore:t0,useId:m0,unstable_isNewReconciler:!1};function Wt(e,t){if(e&&e.defaultProps){t=Se({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Cd(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Se({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var fu={isMounted:function(e){return(e=e._reactInternals)?ws(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=rt(),s=bn(e),o=Tr(n,s);o.payload=t,r!=null&&(o.callback=r),t=yn(e,o,s),t!==null&&(Jt(t,e,s,n),ol(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=rt(),s=bn(e),o=Tr(n,s);o.tag=1,o.payload=t,r!=null&&(o.callback=r),t=yn(e,o,s),t!==null&&(Jt(t,e,s,n),ol(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=rt(),n=bn(e),s=Tr(r,n);s.tag=2,t!=null&&(s.callback=t),t=yn(e,s,n),t!==null&&(Jt(t,e,n,r),ol(t,e,n))}};function bm(e,t,r,n,s,o,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,o,i):t.prototype&&t.prototype.isPureReactComponent?!Ri(r,n)||!Ri(s,o):!0}function w0(e,t,r){var n=!1,s=kn,o=t.contextType;return typeof o=="object"&&o!==null?o=It(o):(s=dt(t)?ls:Qe.current,n=t.contextTypes,o=(n=n!=null)?So(e,s):kn),t=new t(r,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=fu,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=o),t}function xm(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&fu.enqueueReplaceState(t,t.state,null)}function Td(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},gf(e);var o=t.contextType;typeof o=="object"&&o!==null?s.context=It(o):(o=dt(t)?ls:Qe.current,s.context=So(e,o)),s.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Cd(e,t,o,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&fu.enqueueReplaceState(s,s.state,null),Il(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function To(e,t){try{var r="",n=t;do r+=qS(n),n=n.return;while(n);var s=r}catch(o){s=`
40Error generating stack: `+o.message+`
41`+o.stack}return{value:e,source:t,stack:s,digest:null}}function mc(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Pd(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var wE=typeof WeakMap=="function"?WeakMap:Map;function b0(e,t,r){r=Tr(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Fl||(Fl=!0,$d=n),Pd(e,t)},r}function x0(e,t,r){r=Tr(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){Pd(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(r.callback=function(){Pd(e,t),typeof n!="function"&&(wn===null?wn=new Set([this]):wn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function _m(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new wE;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=NE.bind(null,e,t,r),t.then(e,e))}function Sm(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Em(e,t,r,n,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Tr(-1,1),t.tag=2,yn(r,t,1))),r.lanes|=1),e)}var bE=Dr.ReactCurrentOwner,ut=!1;
vendor: 5,177 bytes, line 41
41function Xe(e,t,r,n){t.child=e===null?Yy(t,null,r,n):ko(t,e.child,r,n)}function km(e,t,r,n,s){r=r.render;var o=t.ref;return ro(t,s),n=xf(e,t,r,n,o,s),r=_f(),e!==null&&!ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,jr(e,t,s)):(ye&&r&&uf(t),t.flags|=1,Xe(e,t,n,s),t.child)}function Cm(e,t,r,n,s){if(e===null){var o=r.type;return typeof o=="function"&&!jf(o)&&o.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=o,_0(e,t,o,n,s)):(e=dl(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&s)){var i=o.memoizedProps;if(r=r.compare,r=r!==null?r:Ri,r(i,n)&&e.ref===t.ref)return jr(e,t,s)}return t.flags|=1,e=xn(o,n),e.ref=t.ref,e.return=t,t.child=e}function _0(e,t,r,n,s){if(e!==null){var o=e.memoizedProps;if(Ri(o,n)&&e.ref===t.ref)if(ut=!1,t.pendingProps=n=o,(e.lanes&s)!==0)e.flags&131072&&(ut=!0);else return t.lanes=e.lanes,jr(e,t,s)}return Rd(e,t,r,n,s)}function S0(e,t,r){var n=t.pendingProps,s=n.children,o=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},fe(Js,mt),mt|=r;else{if(!(r&1073741824))return e=o!==null?o.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,fe(Js,mt),mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=o!==null?o.baseLanes:r,fe(Js,mt),mt|=n}else o!==null?(n=o.baseLanes|r,t.memoizedState=null):n=r,fe(Js,mt),mt|=n;return Xe(e,t,s,r),t.child}function E0(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Rd(e,t,r,n,s){var o=dt(r)?ls:Qe.current;return o=So(t,o),ro(t,s),r=xf(e,t,r,n,o,s),n=_f(),e!==null&&!ut?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,jr(e,t,s)):(ye&&n&&uf(t),t.flags|=1,Xe(e,t,r,s),t.child)}function Tm(e,t,r,n,s){if(dt(r)){var o=!0;Rl(t)}else o=!1;if(ro(t,s),t.stateNode===null)ll(e,t),w0(t,r,n),Td(t,r,n,s),n=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=It(u):(u=dt(r)?ls:Qe.current,u=So(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==n||l!==u)&&xm(t,i,n,u),Yr=!1;var f=t.memoizedState;i.state=f,Il(t,n,i,s),l=t.memoizedState,a!==n||f!==l||ct.current||Yr?(typeof c=="function"&&(Cd(t,r,c,n),l=t.memoizedState),(a=Yr||bm(t,r,a,n,f,l,u))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),i.props=n,i.state=l,i.context=u,n=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,Xy(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Wt(t.type,a),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=It(l):(l=dt(r)?ls:Qe.current,l=So(t,l));var h=r.getDerivedStateFromProps;(c=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==d||f!==l)&&xm(t,i,n,l),Yr=!1,f=t.memoizedState,i.state=f,Il(t,n,i,s);var b=t.memoizedState;a!==d||f!==b||ct.current||Yr?(typeof h=="function"&&(Cd(t,r,h,n),b=t.memoizedState),(u=Yr||bm(t,r,u,n,f,b,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,b,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,b,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=b),i.props=n,i.state=b,i.context=l,n=u):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),n=!1)}return Od(e,t,r,n,o,s)}function Od(e,t,r,n,s,o){E0(e,t);var i=(t.flags&128)!==0;if(!n&&!i)return s&&hm(t,r,!1),jr(e,t,o);n=t.stateNode,bE.current=t;var a=i&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&i?(t.child=ko(t,e.child,null,o),t.child=ko(t,null,a,o)):Xe(e,t,a,o),t.memoizedState=n.state,s&&hm(t,r,!0),t.child}function k0(e){var t=e.stateNode;t.pendingContext?dm(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dm(e,t.context,!1),vf(e,t.containerInfo)}function Pm(e,t,r,n,s){return Eo(),df(s),t.flags|=256,Xe(e,t,r,n),t.child}var Ad={dehydrated:null,treeContext:null,retryLane:0};
vendor: 6,093 bytes, line 41
41function jd(e){return{baseLanes:e,cachePool:null,transitions:null}}function C0(e,t,r){var n=t.pendingProps,s=xe.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),fe(xe,s&1),e===null)return Ed(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=n.children,e=n.fallback,o?(n=t.mode,o=t.child,i={mode:"hidden",children:i},!(n&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=gu(i,n,0,null),e=as(e,n,r,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=jd(r),t.memoizedState=Ad,e):kf(t,i));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return xE(e,t,i,n,a,s,r);if(o){o=n.fallback,i=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:n.children};return!(i&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=xn(s,l),n.subtreeFlags=s.subtreeFlags&14680064),a!==null?o=xn(a,o):(o=as(o,i,r,null),o.flags|=2),o.return=t,n.return=t,n.sibling=o,t.child=n,n=o,o=t.child,i=e.child.memoizedState,i=i===null?jd(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~r,t.memoizedState=Ad,n}return o=e.child,e=o.sibling,n=xn(o,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function kf(e,t){return t=gu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Oa(e,t,r,n){return n!==null&&df(n),ko(t,e.child,null,r),e=kf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xE(e,t,r,n,s,o,i){if(r)return t.flags&256?(t.flags&=-257,n=mc(Error(D(422))),Oa(e,t,i,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=n.fallback,s=t.mode,n=gu({mode:"visible",children:n.children},s,0,null),o=as(o,s,i,null),o.flags|=2,n.return=t,o.return=t,n.sibling=o,t.child=n,t.mode&1&&ko(t,e.child,null,i),t.child.memoizedState=jd(i),t.memoizedState=Ad,o);if(!(t.mode&1))return Oa(e,t,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=mc(o,n,void 0),Oa(e,t,i,n)}if(a=(i&e.childLanes)!==0,ut||a){if(n=$e,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,Ar(e,s),Jt(n,e,s,-1))}return Af(),n=mc(Error(D(421))),Oa(e,t,i,n)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=IE.bind(null,e),s._reactRetry=t,null):(e=o.treeContext,wt=vn(s.nextSibling),bt=t,ye=!0,Qt=null,e!==null&&(Rt[Ot++]=kr,Rt[Ot++]=Cr,Rt[Ot++]=us,kr=e.id,Cr=e.overflow,us=t),t=kf(t,n.children),t.flags|=4096,t)}function Rm(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),kd(e.return,t,r)}function gc(e,t,r,n,s){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=n,o.tail=r,o.tailMode=s)}function T0(e,t,r){var n=t.pendingProps,s=n.revealOrder,o=n.tail;if(Xe(e,t,n.children,r),n=xe.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Rm(e,r,t);else if(e.tag===19)Rm(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(fe(xe,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Dl(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),gc(t,!1,s,r,o);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Dl(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}gc(t,!0,r,null,o);break;case"together":gc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ll(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function jr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ds|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,r=xn(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=xn(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function _E(e,t,r){switch(t.tag){case 3:k0(t),Eo();break;case 5:Zy(t);break;case 1:dt(t.type)&&Rl(t);break;case 4:vf(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;fe(jl,n._currentValue),n._currentValue=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(fe(xe,xe.current&1),t.flags|=128,null):r&t.child.childLanes?C0(e,t,r):(fe(xe,xe.current&1),e=jr(e,t,r),e!==null?e.sibling:null);fe(xe,xe.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return T0(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),fe(xe,xe.current),n)break;return null;case 22:case 23:return t.lanes=0,S0(e,t,r)}return jr(e,t,r)}var P0,Nd,R0,O0;P0=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Nd=function(){};R0=function(e,t,r,n){var s=e.memoizedProps;if(s!==n){e=t.stateNode,Qn(hr.current);var o=null;switch(r){case"input":s=td(e,s),n=td(e,n),o=[];break;case"select":s=Se({},s,{value:void 0}),n=Se({},n,{value:void 0}),o=[];break;
vendor: 4,763 bytes, line 41
41case"textarea":s=sd(e,s),n=sd(e,n),o=[];break;default:typeof s.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Tl)}id(r,n);var i;r=null;for(u in s)if(!n.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(i in a)a.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(_i.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in n){var l=n[u];if(a=s!=null?s[u]:void 0,n.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="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(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(_i.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&me("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}r&&(o=o||[]).push("style",r);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};O0=function(e,t,r,n){r!==n&&(t.flags|=4)};function Xo(e,t){if(!ye)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function He(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function SE(e,t,r){var n=t.pendingProps;switch(cf(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return He(t),null;case 1:return dt(t.type)&&Pl(),He(t),null;case 3:return n=t.stateNode,Co(),ge(ct),ge(Qe),wf(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Pa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qt!==null&&(zd(Qt),Qt=null))),Nd(e,t),He(t),null;case 5:yf(t);var s=Qn(Ii.current);if(r=t.type,e!==null&&t.stateNode!=null)R0(e,t,r,n,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(D(166));return He(t),null}if(e=Qn(hr.current),Pa(t)){n=t.stateNode,r=t.type;var o=t.memoizedProps;switch(n[ur]=t,n[ji]=o,e=(t.mode&1)!==0,r){case"dialog":me("cancel",n),me("close",n);break;case"iframe":case"object":case"embed":me("load",n);break;case"video":case"audio":for(s=0;s<ai.length;s++)me(ai[s],n);break;case"source":me("error",n);break;case"img":case"image":case"link":me("error",n),me("load",n);break;case"details":me("toggle",n);break;case"input":$p(n,o),me("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!o.multiple},me("invalid",n);break;case"textarea":Up(n,o),me("invalid",n)}id(r,o),s=null;for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];i==="children"?typeof a=="string"?n.textContent!==a&&(o.suppressHydrationWarning!==!0&&Ta(n.textContent,a,e),s=["children",a]):typeof a=="number"&&n.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Ta(n.textContent,a,e),s=["children",""+a]):_i.hasOwnProperty(i)&&a!=null&&i==="onScroll"&&me("scroll",n)}switch(r){case"input":wa(n),Fp(n,o,!0);break;case"textarea":wa(n),zp(n);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(n.onclick=Tl)}n=s,t.updateQueue=n,n!==null&&(t.flags|=4)}else{i=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=sy(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=i.createElement(r,{is:n.is}):(e=i.createElement(r),r==="select"&&(i=e,n.multiple?i.multiple=!0:n.size&&(i.size=n.size))):e=i.createElementNS(e,r),e[ur]=t,e[ji]=n,P0(e,t,!1,!1),t.stateNode=e;e:{switch(i=ad(r,n),r){case"dialog":me("cancel",e),me("close",e),s=n;break;case"iframe":case"object":case"embed":me("load",e),s=n;break;case"video":case"audio":for(s=0;s<ai.length;s++)me(ai[s],e);s=n;break;case"source":me("error",e),s=n;break;case"img":case"image":case"link":me("error",e),me("load",e),s=n;break;case"details":me("toggle",e),s=n;break;case"input":$p(e,n),s=td(e,n),me("invalid",e);break;case"option":s=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},s=Se({},n,{value:void 0}),me("invalid",e);break;
vendor: 23,992 bytes, line 41
41case"textarea":Up(e,n),s=sd(e,n),me("invalid",e);break;default:s=n}id(r,s),a=s;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?ay(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&oy(e,l)):o==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&Si(e,l):typeof l=="number"&&Si(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(_i.hasOwnProperty(o)?l!=null&&o==="onScroll"&&me("scroll",e):l!=null&&Gh(e,o,l,i))}switch(r){case"input":wa(e),Fp(e,n,!1);break;case"textarea":wa(e),zp(e);break;case"option":n.value!=null&&e.setAttribute("value",""+En(n.value));break;case"select":e.multiple=!!n.multiple,o=n.value,o!=null?Xs(e,!!n.multiple,o,!1):n.defaultValue!=null&&Xs(e,!!n.multiple,n.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Tl)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return He(t),null;case 6:if(e&&t.stateNode!=null)O0(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(D(166));if(r=Qn(Ii.current),Qn(hr.current),Pa(t)){if(n=t.stateNode,r=t.memoizedProps,n[ur]=t,(o=n.nodeValue!==r)&&(e=bt,e!==null))switch(e.tag){case 3:Ta(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ta(n.nodeValue,r,(e.mode&1)!==0)}o&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ur]=t,t.stateNode=n}return He(t),null;case 13:if(ge(xe),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ye&&wt!==null&&t.mode&1&&!(t.flags&128))Gy(),Eo(),t.flags|=98560,o=!1;else if(o=Pa(t),n!==null&&n.dehydrated!==null){if(e===null){if(!o)throw Error(D(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(D(317));o[ur]=t}else Eo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;He(t),o=!1}else Qt!==null&&(zd(Qt),Qt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||xe.current&1?De===0&&(De=3):Af())),t.updateQueue!==null&&(t.flags|=4),He(t),null);case 4:return Co(),Nd(e,t),e===null&&Oi(t.stateNode.containerInfo),He(t),null;case 10:return pf(t.type._context),He(t),null;case 17:return dt(t.type)&&Pl(),He(t),null;case 19:if(ge(xe),o=t.memoizedState,o===null)return He(t),null;if(n=(t.flags&128)!==0,i=o.rendering,i===null)if(n)Xo(o,!1);else{if(De!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Dl(e),i!==null){for(t.flags|=128,Xo(o,!1),n=i.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)o=r,e=n,o.flags&=14680066,i=o.alternate,i===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=i.childLanes,o.lanes=i.lanes,o.child=i.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=i.memoizedProps,o.memoizedState=i.memoizedState,o.updateQueue=i.updateQueue,o.type=i.type,e=i.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return fe(xe,xe.current&1|2),t.child}e=e.sibling}o.tail!==null&&Te()>Po&&(t.flags|=128,n=!0,Xo(o,!1),t.lanes=4194304)}else{if(!n)if(e=Dl(i),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Xo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ye)return He(t),null}else 2*Te()-o.renderingStartTime>Po&&r!==1073741824&&(t.flags|=128,n=!0,Xo(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(r=o.last,r!==null?r.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Te(),t.sibling=null,r=xe.current,fe(xe,n?r&1|2:r&1),t):(He(t),null);case 22:case 23:return Of(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?mt&1073741824&&(He(t),t.subtreeFlags&6&&(t.flags|=8192)):He(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function EE(e,t){switch(cf(t),t.tag){case 1:return dt(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Co(),ge(ct),ge(Qe),wf(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return yf(t),null;case 13:if(ge(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Eo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(xe),null;case 4:return Co(),null;case 10:return pf(t.type._context),null;case 22:case 23:return Of(),null;case 24:return null;default:return null}}var Aa=!1,Ge=!1,kE=typeof WeakSet=="function"?WeakSet:Set,U=null;function Ys(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){ke(e,t,n)}else r.current=null}function Id(e,t,r){try{r()}catch(n){ke(e,t,n)}}var Om=!1;function CE(e,t){if(vd=El,e=Dy(),lf(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var s=n.anchorOffset,o=n.focusNode;n=n.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break e}var i=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==r||s!==0&&d.nodeType!==3||(a=i+s),d!==o||n!==0&&d.nodeType!==3||(l=i+n),d.nodeType===3&&(i+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===r&&++u===s&&(a=i),f===o&&++c===n&&(l=i),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}r=a===-1||l===-1?null:{start:a,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(yd={focusedElem:e,selectionRange:r},El=!1,U=t;U!==null;)if(t=U,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,U=e;else for(;U!==null;){t=U;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var m=b.memoizedProps,w=b.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Wt(t.type,m),w);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(_){ke(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,U=e;break}U=t.return}return b=Om,Om=!1,b}function gi(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var o=s.destroy;s.destroy=void 0,o!==void 0&&Id(t,r,o)}s=s.next}while(s!==n)}}function pu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Dd(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function A0(e){var t=e.alternate;t!==null&&(e.alternate=null,A0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ur],delete t[ji],delete t[xd],delete t[lE],delete t[uE])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function j0(e){return e.tag===5||e.tag===3||e.tag===4}function Am(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||j0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ld(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Tl));else if(n!==4&&(e=e.child,e!==null))for(Ld(e,t,r),e=e.sibling;e!==null;)Ld(e,t,r),e=e.sibling}function Md(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Md(e,t,r),e=e.sibling;e!==null;)Md(e,t,r),e=e.sibling}var Ue=null,Kt=!1;function Br(e,t,r){for(r=r.child;r!==null;)N0(e,t,r),r=r.sibling}function N0(e,t,r){if(dr&&typeof dr.onCommitFiberUnmount=="function")try{dr.onCommitFiberUnmount(iu,r)}catch{}switch(r.tag){case 5:Ge||Ys(r,t);case 6:var n=Ue,s=Kt;Ue=null,Br(e,t,r),Ue=n,Kt=s,Ue!==null&&(Kt?(e=Ue,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ue.removeChild(r.stateNode));break;case 18:Ue!==null&&(Kt?(e=Ue,r=r.stateNode,e.nodeType===8?uc(e.parentNode,r):e.nodeType===1&&uc(e,r),Ti(e)):uc(Ue,r.stateNode));break;case 4:n=Ue,s=Kt,Ue=r.stateNode.containerInfo,Kt=!0,Br(e,t,r),Ue=n,Kt=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)&&Id(r,t,i),s=s.next}while(s!==n)}Br(e,t,r);break;case 1:if(!Ge&&(Ys(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(a){ke(r,t,a)}Br(e,t,r);break;case 21:Br(e,t,r);break;case 22:r.mode&1?(Ge=(n=Ge)||r.memoizedState!==null,Br(e,t,r),Ge=n):Br(e,t,r);break;default:Br(e,t,r)}}function jm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new kE),t.forEach(function(n){var s=DE.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Ut(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var o=e,i=t,a=i;e:for(;a!==null;){switch(a.tag){case 5:Ue=a.stateNode,Kt=!1;break e;case 3:Ue=a.stateNode.containerInfo,Kt=!0;break e;case 4:Ue=a.stateNode.containerInfo,Kt=!0;break e}a=a.return}if(Ue===null)throw Error(D(160));N0(o,i,s),Ue=null,Kt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){ke(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)I0(t,e),t=t.sibling}function I0(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ut(t,e),sr(e),n&4){try{gi(3,e,e.return),pu(3,e)}catch(m){ke(e,e.return,m)}try{gi(5,e,e.return)}catch(m){ke(e,e.return,m)}}break;case 1:Ut(t,e),sr(e),n&512&&r!==null&&Ys(r,r.return);break;case 5:if(Ut(t,e),sr(e),n&512&&r!==null&&Ys(r,r.return),e.flags&32){var s=e.stateNode;try{Si(s,"")}catch(m){ke(e,e.return,m)}}if(n&4&&(s=e.stateNode,s!=null)){var o=e.memoizedProps,i=r!==null?r.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&ry(s,o),ad(a,i);var u=ad(a,o);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?ay(s,d):c==="dangerouslySetInnerHTML"?oy(s,d):c==="children"?Si(s,d):Gh(s,c,d,u)}switch(a){case"input":rd(s,o);break;case"textarea":ny(s,o);break;case"select":var f=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?Xs(s,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?Xs(s,!!o.multiple,o.defaultValue,!0):Xs(s,!!o.multiple,o.multiple?[]:"",!1))}s[ji]=o}catch(m){ke(e,e.return,m)}}break;case 6:if(Ut(t,e),sr(e),n&4){if(e.stateNode===null)throw Error(D(162));s=e.stateNode,o=e.memoizedProps;try{s.nodeValue=o}catch(m){ke(e,e.return,m)}}break;case 3:if(Ut(t,e),sr(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ti(t.containerInfo)}catch(m){ke(e,e.return,m)}break;case 4:Ut(t,e),sr(e);break;case 13:Ut(t,e),sr(e),s=e.child,s.flags&8192&&(o=s.memoizedState!==null,s.stateNode.isHidden=o,!o||s.alternate!==null&&s.alternate.memoizedState!==null||(Pf=Te())),n&4&&jm(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(Ge=(u=Ge)||c,Ut(t,e),Ge=u):Ut(t,e),sr(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(U=e,c=e.child;c!==null;){for(d=U=c;U!==null;){switch(f=U,h=f.child,f.tag){case 0:case 11:case 14:case 15:gi(4,f,f.return);break;case 1:Ys(f,f.return);var b=f.stateNode;if(typeof b.componentWillUnmount=="function"){n=f,r=f.return;try{t=n,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(m){ke(n,r,m)}}break;case 5:Ys(f,f.return);break;case 22:if(f.memoizedState!==null){Im(d);continue}}h!==null?(h.return=f,U=h):Im(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(o=s.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=iy("display",i))}catch(m){ke(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){ke(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ut(t,e),sr(e),n&4&&jm(e);break;case 21:break;default:Ut(t,e),sr(e)}}function sr(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(j0(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&&(Si(s,""),n.flags&=-33);var o=Am(e);Md(e,o,s);break;case 3:case 4:var i=n.stateNode.containerInfo,a=Am(e);Ld(e,a,i);break;default:throw Error(D(161))}}catch(l){ke(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function TE(e,t,r){U=e,D0(e)}function D0(e,t,r){for(var n=(e.mode&1)!==0;U!==null;){var s=U,o=s.child;if(s.tag===22&&n){var i=s.memoizedState!==null||Aa;if(!i){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ge;a=Aa;var u=Ge;if(Aa=i,(Ge=l)&&!u)for(U=s;U!==null;)i=U,l=i.child,i.tag===22&&i.memoizedState!==null?Dm(s):l!==null?(l.return=i,U=l):Dm(s);for(;o!==null;)U=o,D0(o),o=o.sibling;U=s,Aa=a,Ge=u}Nm(e)}else s.subtreeFlags&8772&&o!==null?(o.return=s,U=o):Nm(e)}}function Nm(e){for(;U!==null;){var t=U;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ge||pu(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Ge)if(r===null)n.componentDidMount();else{var s=t.elementType===t.type?r.memoizedProps:Wt(t.type,r.memoizedProps);n.componentDidUpdate(s,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&vm(t,o,n);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}vm(t,i,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;var l=t.memoizedProps;switch(t.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(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Ti(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(D(163))}Ge||t.flags&512&&Dd(t)}catch(f){ke(t,t.return,f)}}if(t===e){U=null;break}if(r=t.sibling,r!==null){r.return=t.return,U=r;break}U=t.return}}function Im(e){for(;U!==null;){var t=U;if(t===e){U=null;break}var r=t.sibling;if(r!==null){r.return=t.return,U=r;break}U=t.return}}function Dm(e){for(;U!==null;){var t=U;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{pu(4,t)}catch(l){ke(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var s=t.return;try{n.componentDidMount()}catch(l){ke(t,s,l)}}var o=t.return;try{Dd(t)}catch(l){ke(t,o,l)}break;case 5:var i=t.return;try{Dd(t)}catch(l){ke(t,i,l)}}}catch(l){ke(t,t.return,l)}if(t===e){U=null;break}var a=t.sibling;if(a!==null){a.return=t.return,U=a;break}U=t.return}}var PE=Math.ceil,$l=Dr.ReactCurrentDispatcher,Cf=Dr.ReactCurrentOwner,Nt=Dr.ReactCurrentBatchConfig,se=0,$e=null,Oe=null,ze=0,mt=0,Js=Rn(0),De=0,$i=null,ds=0,mu=0,Tf=0,vi=null,lt=null,Pf=0,Po=1/0,br=null,Fl=!1,$d=null,wn=null,ja=!1,hn=null,Ul=0,yi=0,Fd=null,ul=-1,cl=0;function rt(){return se&6?Te():ul!==-1?ul:ul=Te()}function bn(e){return e.mode&1?se&2&&ze!==0?ze&-ze:dE.transition!==null?(cl===0&&(cl=wy()),cl):(e=ue,e!==0||(e=window.event,e=e===void 0?16:Cy(e.type)),e):1}function Jt(e,t,r,n){if(50<yi)throw yi=0,Fd=null,Error(D(185));ra(e,r,n),(!(se&2)||e!==$e)&&(e===$e&&(!(se&2)&&(mu|=r),De===4&&Xr(e,ze)),ht(e,n),r===1&&se===0&&!(t.mode&1)&&(Po=Te()+500,du&&On()))}function ht(e,t){var r=e.callbackNode;d1(e,t);var n=Sl(e,e===$e?ze:0);if(n===0)r!==null&&Vp(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&Vp(r),t===1)e.tag===0?cE(Lm.bind(null,e)):Hy(Lm.bind(null,e)),iE(function(){!(se&6)&&On()}),r=null;else{switch(by(n)){case 1:r=Zh;break;case 4:r=vy;break;case 16:r=_l;break;case 536870912:r=yy;break;default:r=_l}r=W0(r,L0.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function L0(e,t){if(ul=-1,cl=0,se&6)throw Error(D(327));var r=e.callbackNode;if(no()&&e.callbackNode!==r)return null;var n=Sl(e,e===$e?ze:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=zl(e,n);else{t=n;var s=se;se|=2;var o=$0();($e!==e||ze!==t)&&(br=null,Po=Te()+500,is(e,t));do try{AE();break}catch(a){M0(e,a)}while(!0);ff(),$l.current=o,se=s,Oe!==null?t=0:($e=null,ze=0,t=De)}if(t!==0){if(t===2&&(s=hd(e),s!==0&&(n=s,t=Ud(e,s))),t===1)throw r=$i,is(e,0),Xr(e,n),ht(e,Te()),r;if(t===6)Xr(e,n);else{if(s=e.current.alternate,!(n&30)&&!RE(s)&&(t=zl(e,n),t===2&&(o=hd(e),o!==0&&(n=o,t=Ud(e,o))),t===1))throw r=$i,is(e,0),Xr(e,n),ht(e,Te()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error(D(345));case 2:zn(e,lt,br);break;case 3:if(Xr(e,n),(n&130023424)===n&&(t=Pf+500-Te(),10<t)){if(Sl(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){rt(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=bd(zn.bind(null,e,lt,br),t);break}zn(e,lt,br);break;case 4:if(Xr(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var i=31-Yt(n);o=1<<i,i=t[i],i>s&&(s=i),n&=~o}if(n=s,n=Te()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*PE(n/1960))-n,10<n){e.timeoutHandle=bd(zn.bind(null,e,lt,br),n);break}zn(e,lt,br);break;case 5:zn(e,lt,br);break;default:throw Error(D(329))}}}return ht(e,Te()),e.callbackNode===r?L0.bind(null,e):null}function Ud(e,t){var r=vi;return e.current.memoizedState.isDehydrated&&(is(e,t).flags|=256),e=zl(e,t),e!==2&&(t=lt,lt=r,t!==null&&zd(t)),e}function zd(e){lt===null?lt=e:lt.push.apply(lt,e)}function RE(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],o=s.getSnapshot;s=s.value;try{if(!Xt(o(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Xr(e,t){for(t&=~Tf,t&=~mu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Yt(t),n=1<<r;e[r]=-1,t&=~n}}function Lm(e){if(se&6)throw Error(D(327));no();var t=Sl(e,0);if(!(t&1))return ht(e,Te()),null;var r=zl(e,t);if(e.tag!==0&&r===2){var n=hd(e);n!==0&&(t=n,r=Ud(e,n))}if(r===1)throw r=$i,is(e,0),Xr(e,t),ht(e,Te()),r;if(r===6)throw Error(D(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,zn(e,lt,br),ht(e,Te()),null}function Rf(e,t){var r=se;se|=1;try{return e(t)}finally{se=r,se===0&&(Po=Te()+500,du&&On())}}function hs(e){hn!==null&&hn.tag===0&&!(se&6)&&no();var t=se;se|=1;var r=Nt.transition,n=ue;try{if(Nt.transition=null,ue=1,e)return e()}finally{ue=n,Nt.transition=r,se=t,!(se&6)&&On()}}function Of(){mt=Js.current,ge(Js)}function is(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,oE(r)),Oe!==null)for(r=Oe.return;r!==null;){var n=r;switch(cf(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Pl();break;case 3:Co(),ge(ct),ge(Qe),wf();break;case 5:yf(n);break;case 4:Co();break;case 13:ge(xe);break;case 19:ge(xe);break;case 10:pf(n.type._context);break;case 22:case 23:Of()}r=r.return}if($e=e,Oe=e=xn(e.current,null),ze=mt=t,De=0,$i=null,Tf=mu=ds=0,lt=vi=null,Gn!==null){for(t=0;t<Gn.length;t++)if(r=Gn[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,o=r.pending;if(o!==null){var i=o.next;o.next=s,n.next=i}r.pending=n}Gn=null}return e}function M0(e,t){do{var r=Oe;try{if(ff(),il.current=Ml,Ll){for(var n=_e.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Ll=!1}if(cs=0,Le=Ne=_e=null,mi=!1,Di=0,Cf.current=null,r===null||r.return===null){De=1,$i=t,Oe=null;break}e:{var o=e,i=r.return,a=r,l=t;if(t=ze,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Sm(i);if(h!==null){h.flags&=-257,Em(h,i,a,o,t),h.mode&1&&_m(o,u,t),t=h,l=u;var b=t.updateQueue;if(b===null){var m=new Set;m.add(l),t.updateQueue=m}else b.add(l);break e}else{if(!(t&1)){_m(o,u,t),Af();break e}l=Error(D(426))}}else if(ye&&a.mode&1){var w=Sm(i);if(w!==null){!(w.flags&65536)&&(w.flags|=256),Em(w,i,a,o,t),df(To(l,a));break e}}o=l=To(l,a),De!==4&&(De=2),vi===null?vi=[o]:vi.push(o),o=i;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=b0(o,l,t);gm(o,v);break e;case 1:a=l;var g=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(wn===null||!wn.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var _=x0(o,a,t);gm(o,_);break e}}o=o.return}while(o!==null)}U0(r)}catch(S){t=S,Oe===r&&r!==null&&(Oe=r=r.return);continue}break}while(!0)}function $0(){var e=$l.current;return $l.current=Ml,e===null?Ml:e}function Af(){(De===0||De===3||De===2)&&(De=4),$e===null||!(ds&268435455)&&!(mu&268435455)||Xr($e,ze)}function zl(e,t){var r=se;se|=2;var n=$0();($e!==e||ze!==t)&&(br=null,is(e,t));do try{OE();break}catch(s){M0(e,s)}while(!0);if(ff(),se=r,$l.current=n,Oe!==null)throw Error(D(261));return $e=null,ze=0,De}function OE(){for(;Oe!==null;)F0(Oe)}function AE(){for(;Oe!==null&&!r1();)F0(Oe)}function F0(e){var t=B0(e.alternate,e,mt);e.memoizedProps=e.pendingProps,t===null?U0(e):Oe=t,Cf.current=null}function U0(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=EE(r,t),r!==null){r.flags&=32767,Oe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{De=6,Oe=null;return}}else if(r=SE(r,t,mt),r!==null){Oe=r;return}if(t=t.sibling,t!==null){Oe=t;return}Oe=t=e}while(t!==null);De===0&&(De=5)}function zn(e,t,r){var n=ue,s=Nt.transition;try{Nt.transition=null,ue=1,jE(e,t,r,n)}finally{Nt.transition=s,ue=n}return null}function jE(e,t,r,n){do no();while(hn!==null);if(se&6)throw Error(D(327));r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(D(177));e.callbackNode=null,e.callbackPriority=0;var o=r.lanes|r.childLanes;if(h1(e,o),e===$e&&(Oe=$e=null,ze=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||ja||(ja=!0,W0(_l,function(){return no(),null})),o=(r.flags&15990)!==0,r.subtreeFlags&15990||o){o=Nt.transition,Nt.transition=null;var i=ue;ue=1;var a=se;se|=4,Cf.current=null,CE(e,r),I0(r,e),X1(yd),El=!!vd,yd=vd=null,e.current=r,TE(r),n1(),se=a,ue=i,Nt.transition=o}else e.current=r;if(ja&&(ja=!1,hn=e,Ul=s),o=e.pendingLanes,o===0&&(wn=null),i1(r.stateNode),ht(e,Te()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Fl)throw Fl=!1,e=$d,$d=null,e;return Ul&1&&e.tag!==0&&no(),o=e.pendingLanes,o&1?e===Fd?yi++:(yi=0,Fd=e):yi=0,On(),null}function no(){if(hn!==null){var e=by(Ul),t=Nt.transition,r=ue;try{if(Nt.transition=null,ue=16>e?16:e,hn===null)var n=!1;else{if(e=hn,hn=null,Ul=0,se&6)throw Error(D(331));var s=se;for(se|=4,U=e.current;U!==null;){var o=U,i=o.child;
vendor: 1,766 bytes, line 41
41if(U.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(U=u;U!==null;){var c=U;switch(c.tag){case 0:case 11:case 15:gi(8,c,o)}var d=c.child;if(d!==null)d.return=c,U=d;else for(;U!==null;){c=U;var f=c.sibling,h=c.return;if(A0(c),c===u){U=null;break}if(f!==null){f.return=h,U=f;break}U=h}}}var b=o.alternate;if(b!==null){var m=b.child;if(m!==null){b.child=null;do{var w=m.sibling;m.sibling=null,m=w}while(m!==null)}}U=o}}if(o.subtreeFlags&2064&&i!==null)i.return=o,U=i;else e:for(;U!==null;){if(o=U,o.flags&2048)switch(o.tag){case 0:case 11:case 15:gi(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,U=v;break e}U=o.return}}var g=e.current;for(U=g;U!==null;){i=U;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,U=y;else e:for(i=g;U!==null;){if(a=U,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:pu(9,a)}}catch(S){ke(a,a.return,S)}if(a===i){U=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,U=_;break e}U=a.return}}if(se=s,On(),dr&&typeof dr.onPostCommitFiberRoot=="function")try{dr.onPostCommitFiberRoot(iu,e)}catch{}n=!0}return n}finally{ue=r,Nt.transition=t}}return!1}function Mm(e,t,r){t=To(r,t),t=b0(e,t,1),e=yn(e,t,1),t=rt(),e!==null&&(ra(e,1,t),ht(e,t))}function ke(e,t,r){if(e.tag===3)Mm(e,e,r);else for(;t!==null;){if(t.tag===3){Mm(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(wn===null||!wn.has(n))){e=To(r,e),e=x0(t,e,1),t=yn(t,e,1),e=rt(),t!==null&&(ra(t,1,e),ht(t,e));break}}t=t.return}}function NE(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=rt(),e.pingedLanes|=e.suspendedLanes&r,$e===e&&(ze&r)===r&&(De===4||De===3&&(ze&130023424)===ze&&500>Te()-Pf?is(e,0):Tf|=r),ht(e,t)}
vendor: 4,454 bytes, line 41
41function z0(e,t){t===0&&(e.mode&1?(t=_a,_a<<=1,!(_a&130023424)&&(_a=4194304)):t=1);var r=rt();e=Ar(e,t),e!==null&&(ra(e,t,r),ht(e,r))}function IE(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),z0(e,r)}function DE(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(D(314))}n!==null&&n.delete(t),z0(e,r)}var B0;B0=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ct.current)ut=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return ut=!1,_E(e,t,r);ut=!!(e.flags&131072)}else ut=!1,ye&&t.flags&1048576&&qy(t,Al,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;ll(e,t),e=t.pendingProps;var s=So(t,Qe.current);ro(t,r),s=xf(null,t,n,e,s,r);var o=_f();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dt(n)?(o=!0,Rl(t)):o=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,gf(t),s.updater=fu,t.stateNode=s,s._reactInternals=t,Td(t,n,e,r),t=Od(null,t,n,!0,o,r)):(t.tag=0,ye&&o&&uf(t),Xe(null,t,s,r),t=t.child),t;case 16:n=t.elementType;e:{switch(ll(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=ME(n),e=Wt(n,e),s){case 0:t=Rd(null,t,n,e,r);break e;case 1:t=Tm(null,t,n,e,r);break e;case 11:t=km(null,t,n,e,r);break e;case 14:t=Cm(null,t,n,Wt(n.type,e),r);break e}throw Error(D(306,n,""))}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Wt(n,s),Rd(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Wt(n,s),Tm(e,t,n,s,r);case 3:e:{if(k0(t),e===null)throw Error(D(387));n=t.pendingProps,o=t.memoizedState,s=o.element,Xy(e,t),Il(t,n,null,r);var i=t.memoizedState;if(n=i.element,o.isDehydrated)if(o={element:n,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){s=To(Error(D(423)),t),t=Pm(e,t,n,r,s);break e}else if(n!==s){s=To(Error(D(424)),t),t=Pm(e,t,n,r,s);break e}else for(wt=vn(t.stateNode.containerInfo.firstChild),bt=t,ye=!0,Qt=null,r=Yy(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Eo(),n===s){t=jr(e,t,r);break e}Xe(e,t,n,r)}t=t.child}return t;case 5:return Zy(t),e===null&&Ed(t),n=t.type,s=t.pendingProps,o=e!==null?e.memoizedProps:null,i=s.children,wd(n,s)?i=null:o!==null&&wd(n,o)&&(t.flags|=32),E0(e,t),Xe(e,t,i,r),t.child;case 6:return e===null&&Ed(t),null;case 13:return C0(e,t,r);case 4:return vf(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=ko(t,null,n,r):Xe(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Wt(n,s),km(e,t,n,s,r);case 7:return Xe(e,t,t.pendingProps,r),t.child;case 8:return Xe(e,t,t.pendingProps.children,r),t.child;case 12:return Xe(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,s=t.pendingProps,o=t.memoizedProps,i=s.value,fe(jl,n._currentValue),n._currentValue=i,o!==null)if(Xt(o.value,i)){if(o.children===s.children&&!ct.current){t=jr(e,t,r);break e}}else for(o=t.child,o!==null&&(o.return=t);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=Tr(-1,r&-r),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=r,l=o.alternate,l!==null&&(l.lanes|=r),kd(o.return,r,t),a.lanes|=r;break}l=l.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(D(341));i.lanes|=r,a=i.alternate,a!==null&&(a.lanes|=r),kd(i,r,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Xe(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,ro(t,r),s=It(s),n=n(s),t.flags|=1,Xe(e,t,n,r),t.child;case 14:return n=t.type,s=Wt(n,t.pendingProps),s=Wt(n.type,s),Cm(e,t,n,s,r);case 15:return _0(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Wt(n,s),ll(e,t),t.tag=1,dt(n)?(e=!0,Rl(t)):e=!1,ro(t,r),w0(t,n,s),Td(t,n,s,r),Od(null,t,n,!0,e,r);case 19:return T0(e,t,r);case 22:return S0(e,t,r)}throw Error(D(156,t.tag))};function W0(e,t){return gy(e,t)}function LE(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.t
vendor: 4,415 bytes, line 41
41ype=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,r,n){return new LE(e,t,r,n)}function jf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ME(e){if(typeof e=="function")return jf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Yh)return 11;if(e===Jh)return 14}return 2}function xn(e,t){var r=e.alternate;return r===null?(r=jt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function dl(e,t,r,n,s,o){var i=2;if(n=e,typeof e=="function")jf(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case zs:return as(r.children,s,o,t);case Qh:i=8,s|=8;break;case Jc:return e=jt(12,r,t,s|2),e.elementType=Jc,e.lanes=o,e;case Xc:return e=jt(13,r,t,s),e.elementType=Xc,e.lanes=o,e;case Zc:return e=jt(19,r,t,s),e.elementType=Zc,e.lanes=o,e;case Zv:return gu(r,s,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Jv:i=10;break e;case Xv:i=9;break e;case Yh:i=11;break e;case Jh:i=14;break e;case Qr:i=16,n=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=jt(i,r,t,s),t.elementType=e,t.type=n,t.lanes=o,t}function as(e,t,r,n){return e=jt(7,e,n,t),e.lanes=r,e}function gu(e,t,r,n){return e=jt(22,e,n,t),e.elementType=Zv,e.lanes=r,e.stateNode={isHidden:!1},e}function vc(e,t,r){return e=jt(6,e,null,t),e.lanes=r,e}function yc(e,t,r){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function $E(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Xu(0),this.expirationTimes=Xu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xu(0),this.identifierPrefix=n,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Nf(e,t,r,n,s,o,i,a,l){return e=new $E(e,t,r,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=jt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},gf(o),e}function FE(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Us,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function V0(e){if(!e)return kn;e=e._reactInternals;e:{if(ws(e)!==e||e.tag!==1)throw Error(D(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(D(171))}if(e.tag===1){var r=e.type;if(dt(r))return Vy(e,r,t)}return t}function H0(e,t,r,n,s,o,i,a,l){return e=Nf(r,n,!0,e,s,o,i,a,l),e.context=V0(null),r=e.current,n=rt(),s=bn(r),o=Tr(n,s),o.callback=t??null,yn(r,o,s),e.current.lanes=s,ra(e,s,n),ht(e,n),e}function vu(e,t,r,n){var s=t.current,o=rt(),i=bn(s);return r=V0(r),t.context===null?t.context=r:t.pendingContext=r,t=Tr(o,i),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=yn(s,t,i),e!==null&&(Jt(e,s,i,o),ol(e,s,i)),i}function Bl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function $m(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function If(e,t){$m(e,t),(e=e.alternate)&&$m(e,t)}function UE(){return null}var q0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Df(e){this._internalRoot=e}yu.prototype.render=Df.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(D(409));vu(e,t,null,null)};
41yu.prototype.unmount=Df.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hs(function(){vu(null,e,null,null)}),t[Or]=null}};function yu(e){this._internalRoot=e}yu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sy();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Jr.length&&t!==0&&t<Jr[r].priority;r++);Jr.splice(r,0,e),r===0&&ky(e)}};function Lf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function wu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Fm(){}function zE(e,t,r,n,s){if(s){if(typeof n=="function"){var o=n;n=function(){var u=Bl(i);o.call(u)}}var i=H0(t,n,e,0,null,!1,!1,"",Fm);return e._reactRootContainer=i,e[Or]=i.current,Oi(e.nodeType===8?e.parentNode:e),hs(),i}for(;s=e.lastChild;)e.removeChild(s);if(typeof n=="function"){var a=n;n=function(){var u=Bl(l);a.call(u)}}var l=Nf(e,0,!1,null,null,!1,!1,"",Fm);return e._reactRootContainer=l,e[Or]=l.current,Oi(e.nodeType===8?e.parentNode:e),hs(function(){vu(t,l,r,n)}),l}function bu(e,t,r,n,s){var o=r._reactRootContainer;if(o){var i=o;if(typeof s=="function"){var a=s;s=function(){var l=Bl(i);a.call(l)}}vu(t,i,e,s)}else i=zE(r,t,e,s,n);return Bl(i)}xy=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=ii(t.pendingLanes);r!==0&&(ef(t,r|1),ht(t,Te()),!(se&6)&&(Po=Te()+500,On()))}break;case 13:hs(function(){var n=Ar(e,1);if(n!==null){var s=rt();Jt(n,e,1,s)}}),If(e,1)}};tf=function(e){if(e.tag===13){var t=Ar(e,134217728);if(t!==null){var r=rt();Jt(t,e,134217728,r)}If(e,134217728)}};_y=function(e){if(e.tag===13){var t=bn(e),r=Ar(e,t);if(r!==null){var n=rt();Jt(r,e,t,n)}If(e,t)}};Sy=function(){return ue};Ey=function(e,t){var r=ue;try{return ue=e,t()}finally{ue=r}};ud=function(e,t,r){switch(t){case"input":if(rd(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var s=cu(n);if(!s)throw Error(D(90));ty(n),rd(n,s)}}}break;case"textarea":ny(e,r);break;case"select":t=r.value,t!=null&&Xs(e,!!r.multiple,t,!1)}};cy=Rf;dy=hs;var BE={usingClientEntryPoint:!1,Events:[sa,Hs,cu,ly,uy,Rf]},Zo={findFiberByHostInstance:Kn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},WE={bundleType:Zo.bundleType,version:Zo.version,rendererPackageName:Zo.rendererPackageName,rendererConfig:Zo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Dr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=py(e),e===null?null:e.stateNode},findFiberByHostInstance:Zo.findFiberByHostInstance||UE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Na=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Na.isDisabled&&Na.supportsFiber)try{iu=Na.inject(WE),dr=Na}catch{}}St.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=BE;St.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Lf(t))throw Error(D(200));return FE(e,t,null,r)};St.createRoot=function(e,t){if(!Lf(e))throw Error(D(299));var r=!1,n="",s=q0;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Nf(e,1,!1,null,null,r,!1,n,s),e[Or]=t.current,Oi(e.nodeType===8?e.parentNode:e),new Df(t)};St.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(D(188)):(e=Object.keys(e).join(","),Error(D(268,e)));return e=py(t),e=e===null?null:e.stateNode,e};St.flushSync=function(e){return hs(e)};St.hydrate=function(e,t,r){if(!wu(t))throw Error(D(200));return bu(null,e,t,!0,r)};St.hydrateRoot=function(e,t,r){if(!Lf(e))throw Error(D(405));var n=r!=null&&r.hydratedSources||null,s=!1,o="",i=q0;if(r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(o=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=H0(t,null,e,1,r??null,s,!1,o,i),e[Or]=t.current,Oi(e),n)for(e=0;e<n.length;e++)r=n[e],s=r._getVersion,s=s(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,s]:t.mutableSourceEagerHydrationData.push(r,s);return new yu(t)};St.render=function(e,t,r){if(!wu(t))throw Error(D(200));return bu(null,e,t,!1,r)};St.unmountComponentAtNode=function(e){if(!wu(e))throw Error(D(40));return e._reactRootContainer?(hs(function(){bu(null,null,e,!1,function(){e._reactRootContainer=null,e[Or]=null})}),!0):!1};St.unstable_batchedUpdates=Rf;St.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!wu(r))throw Error(D(200));if(e==null||e._reactInternals===void 0)throw Error(D(38));return bu(e,t,r,!1,n)};St.version="18.3.1-next-f1338f8080-20240426";function K0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(K0)}catch(e){console.error(e)}}K0(),Kv.exports=St;var ia=Kv.exports;const G0=Dv(ia);var Q0,Um=ia;Q0=Um.createRoot,Um.hydrateRoot;const VE="modulepreload",HE=function(e){return"/"+e},zm={},ft=function(t,r,n){let s=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(r.map(l=>{if(l=HE(l),l in zm)return;zm[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":VE,u||(d.as="script"),d.crossOrigin="",d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(i){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i}return s.then(i=>{for(const a of i||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},qE=1,KE=1e6;let wc=0;function GE(){return wc=(wc+1)%Number.MAX_SAFE_INTEGER,wc.toString()}const bc=new Map,Bm=e=>{if(bc.has(e))return;const t=setTimeout(()=>{bc.delete(e),wi({type:"REMOVE_TOAST",toastId:e})},KE);bc.set(e,t)},QE=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,qE)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;
41return r?Bm(r):e.toasts.forEach(n=>{Bm(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},hl=[];let fl={toasts:[]};function wi(e){fl=QE(fl,e),hl.forEach(t=>{t(fl)})}function Bd({...e}){const t=GE(),r=s=>wi({type:"UPDATE_TOAST",toast:{...s,id:t}}),n=()=>wi({type:"DISMISS_TOAST",toastId:t});return wi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:s=>{s||n()}}}),{id:t,dismiss:n,update:r}}function Y0(){const[e,t]=p.useState(fl);return p.useEffect(()=>(hl.push(t),()=>{const r=hl.indexOf(t);r>-1&&hl.splice(r,1)}),[e]),{...e,toast:Bd,dismiss:r=>wi({type:"DISMISS_TOAST",toastId:r})}}function Z(e,t,{checkForDefaultPrevented:r=!0}={}){return function(s){if(e==null||e(s),r===!1||!s.defaultPrevented)return t==null?void 0:t(s)}}function Wm(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function J0(...e){return t=>{let r=!1;const n=e.map(s=>{const o=Wm(s,t);return!r&&typeof o=="function"&&(r=!0),o});if(r)return()=>{for(let s=0;s<n.length;s++){const o=n[s];typeof o=="function"?o():Wm(e[s],null)}}}}function Ce(...e){return p.useCallback(J0(...e),e)}function YE(e,t){const r=p.createContext(t),n=o=>{const{children:i,...a}=o,l=p.useMemo(()=>a,Object.values(a));return x.jsx(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function s(o){const i=p.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[n,s]}function An(e,t=[]){let r=[];function n(o,i){const a=p.createContext(i),l=r.length;r=[...r,i];const u=d=>{var v;const{scope:f,children:h,...b}=d,m=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,w=p.useMemo(()=>b,Object.values(b));return x.jsx(m.Provider,{value:w,children:h})};u.displayName=o+"Provider";function c(d,f){var m;const h=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,b=p.useContext(h);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,c]}const s=()=>{const o=r.map(i=>p.createContext(i));return function(a){const l=(a==null?void 0:a[e])||o;return p.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return s.scopeName=e,[n,JE(s,...t)]}function JE(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(o){const i=n.reduce((a,{useScope:l,scopeName:u})=>{const d=l(o)[`__scope${u}`];return{...a,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function Fi(e){const t=ZE(e),r=p.forwardRef((n,s)=>{const{children:o,...i}=n,a=p.Children.toArray(o),l=a.find(tk);if(l){const u=l.props.children,c=a.map(d=>d===l?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:d);return x.jsx(t,{...i,ref:s,children:p.isValidElement(u)?p.cloneElement(u,void 0,c):null})}return x.jsx(t,{...i,ref:s,children:o})});return r.displayName=`${e}.Slot`,r}var XE=Fi("Slot");function ZE(e){const t=p.forwardRef((r,n)=>{const{children:s,...o}=r;if(p.isValidElement(s)){const i=nk(s),a=rk(o,s.props);return s.type!==p.Fragment&&(a.ref=n?J0(n,i):i),p.cloneElement(s,a)}return p.Children.count(s)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var X0=Symbol("radix.slottable");function ek(e){const t=({children:r})=>x.jsx(x.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=X0,t}function tk(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===X0}function rk(e,t){const r={...t};for(const n in t){const s=e[n],o=t[n];/^on[A-Z]/.test(n)?s&&o?r[n]=(...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{...e,...r}}function nk(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Z0(e){const t=e+"CollectionProvider",[r,n]=An(t),[s,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{const{scope:w,children:v}=m,g=L.useRef(null),y=L.useRef(new Map).current;return x.jsx(s,{scope:w,itemMap:y,collectionRef:g,children:v})};i.displayName=t;const a=e+"CollectionSlot",l=Fi(a),u=L.forwardRef((m,w)=>{const{scope:v,children:g}=m,y=o(a,v),_=Ce(w,y.collectionRef);return x.jsx(l,{ref:_,children:g})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Fi(c),h=L.forwardRef((m,w)=>{const{scope:v,children:g,...y}=m,_=L.useRef(null),S=Ce(w,_),k=o(c,v);return L.useEffect(()=>(k.itemMap.set(_,{ref:_,...y}),()=>
vendor: 9,145 bytes, line 41
41void k.itemMap.delete(_))),x.jsx(f,{[d]:"",ref:S,children:g})});h.displayName=c;function b(m){const w=o(e+"CollectionConsumer",m);return L.useCallback(()=>{const g=w.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(w.itemMap.values()).sort((k,C)=>y.indexOf(k.ref.current)-y.indexOf(C.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},b,n]}var sk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],oe=sk.reduce((e,t)=>{const r=Fi(`Primitive.${t}`),n=p.forwardRef((s,o)=>{const{asChild:i,...a}=s,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(l,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function ew(e,t){e&&ia.flushSync(()=>e.dispatchEvent(t))}function Me(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function ok(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e);p.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var ik="DismissableLayer",Wd="dismissableLayer.update",ak="dismissableLayer.pointerDownOutside",lk="dismissableLayer.focusOutside",Vm,tw=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xu=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:o,onInteractOutside:i,onDismiss:a,...l}=e,u=p.useContext(tw),[c,d]=p.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=p.useState({}),b=Ce(t,C=>d(C)),m=Array.from(u.layers),[w]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(w),g=c?m.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,_=g>=v,S=ck(C=>{const T=C.target,P=[...u.branches].some(R=>R.contains(T));!_||P||(s==null||s(C),i==null||i(C),C.defaultPrevented||a==null||a())},f),k=dk(C=>{const T=C.target;[...u.branches].some(R=>R.contains(T))||(o==null||o(C),i==null||i(C),C.defaultPrevented||a==null||a())},f);return ok(C=>{g===u.layers.size-1&&(n==null||n(C),!C.defaultPrevented&&a&&(C.preventDefault(),a()))},f),p.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Vm=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Hm(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Vm)}},[c,f,r,u]),p.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Hm())},[c,u]),p.useEffect(()=>{const C=()=>h({});return document.addEventListener(Wd,C),()=>document.removeEventListener(Wd,C)},[]),x.jsx(oe.div,{...l,ref:b,style:{pointerEvents:y?_?"auto":"none":void 0,...e.style},onFocusCapture:Z(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Z(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Z(e.onPointerDownCapture,S.onPointerDownCapture)})});xu.displayName=ik;var uk="DismissableLayerBranch",rw=p.forwardRef((e,t)=>{const r=p.useContext(tw),n=p.useRef(null),s=Ce(t,n);return p.useEffect(()=>{const o=n.current;if(o)return r.branches.add(o),()=>{r.branches.delete(o)}},[r.branches]),x.jsx(oe.div,{...e,ref:s})});rw.displayName=uk;function ck(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e),n=p.useRef(!1),s=p.useRef(()=>{});return p.useEffect(()=>{const o=a=>{if(a.target&&!n.current){let l=function(){nw(ak,r,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=l,t.addEventListener("click",s.current,{once:!0})):l()}else t.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",o),t.removeEventListener("click",s.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function dk(e,t=globalThis==null?void 0:globalThis.document){const r=Me(e),n=p.useRef(!1);return p.useEffect(()=>{const s=o=>{o.target&&!n.current&&nw(lk,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Hm(){const e=new CustomEvent(Wd);document.dispatchEvent(e)}function nw(e,t,r,{discrete:n}){const s=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?ew(s,o):s.dispatchEvent(o)}var hk=xu,fk=rw,pr=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},pk="Portal",Mf=p.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[s,o]=p.useState(!1);pr(()=>o(!0),[]);const i=r||s&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?G0.createPortal(x.jsx(oe.div,{...n,ref:t}),i):null});Mf.displayName=pk;function mk(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var tr=e=>{const{present:t,children:r}=e,n=gk(t),s=typeof r=="function"?r({present:n.isPresent}):p.Children.only(r),o=Ce(n.ref,vk(s));return typeof r=="function"||n.isPresent?p.cloneElement(s,{ref:o}):null};tr.displayName="Presence";function gk(e){const[t,r]=p.useState(),n=p.useRef(null),s=p.useRef(e),o=p.useRef("none"),i=e?"mounted":"unmounted",[a,l]=mk(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=Ia(n.current);o.current=a==="mounted"?u:"none"},[a]),pr(()=>{const u=n.current,c=s.current;if(c!==e){const f=o.current,h=Ia(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,l]),pr(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const m=Ia(n.current).includes(h.animationName);if(h.target===t&&m&&(l("ANIMATION_END"),!s.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=h=>{h.target===t&&(o.current=Ia(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:p.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Ia(e){return(e==null?void 0:e.animationName)||"none"}function vk(e){var n,s;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var yk=Hh[" useInsertionEffect ".trim().toString()]||pr;function aa({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[s,o,i]=wk({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:s;{const c=p.useRef(e!==void 0);p.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,n])}const u=p.useCallback(c=>{var d;if(a){const f=bk(c)?c(e):c;f!==e&&((d=i.current)==null||d.call(i,f))}else o(c)},[a,e,o,i]);return[l,u]}function wk({defaultProp:e,onChange:t}){const[r,n]=p.useState(e),s=p.useRef(r),o=p.useRef(t);return yk(()=>{o.current=t},[t]),p.useEffect(()=>{var i;s.current!==r&&((i=o.current)==null||i.call(o,r),s.current=r)},[r,s]),[r,n,o]}function bk(e){return typeof e=="function"}var xk=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"}),_k="VisuallyHidden",_u=p.forwardRef((e,t)=>x.jsx(oe.span,{...e,ref:t,style:{...xk,...e.style}}));_u.displayName=_k;var Sk=_u,$f="ToastProvider",[Ff,Ek,kk]=Z0("Toast"),[sw,$D]=An("Toast",[kk]),[Ck,Su]=sw($f),ow=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:s="right",swipeThreshold:o=50,children:i}=e,[a,l]=p.useState(null),[u,c]=p.useState(0),d=p.useRef(!1),f=p.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${$f}\`. Expected non-empty \`string\`.`),x.jsx(Ff.Provider,{scope:t,children:x.jsx(Ck,{scope:t,label:r,duration:n,swipeDirection:s,swipeThreshold:o,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:p.useCallback(()=>c(h=>h+1),[]),onToastRemove:p.useCallback(()=>c(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};ow.displayName=$f;var iw="ToastViewport",Tk=["F8"],Vd="toast.viewportPause",Hd="toast.viewportResume",aw=
41p.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:n=Tk,label:s="Notifications ({hotkey})",...o}=e,i=Su(iw,r),a=Ek(r),l=p.useRef(null),u=p.useRef(null),c=p.useRef(null),d=p.useRef(null),f=Ce(t,d,i.onViewportChange),h=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=i.toastCount>0;p.useEffect(()=>{const w=v=>{var y;n.length!==0&&n.every(_=>v[_]||v.code===_)&&((y=d.current)==null||y.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[n]),p.useEffect(()=>{const w=l.current,v=d.current;if(b&&w&&v){const g=()=>{if(!i.isClosePausedRef.current){const k=new CustomEvent(Vd);v.dispatchEvent(k),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){const k=new CustomEvent(Hd);v.dispatchEvent(k),i.isClosePausedRef.current=!1}},_=k=>{!w.contains(k.relatedTarget)&&y()},S=()=>{w.contains(document.activeElement)||y()};return w.addEventListener("focusin",g),w.addEventListener("focusout",_),w.addEventListener("pointermove",g),w.addEventListener("pointerleave",S),window.addEventListener("blur",g),window.addEventListener("focus",y),()=>{w.removeEventListener("focusin",g),w.removeEventListener("focusout",_),w.removeEventListener("pointermove",g),w.removeEventListener("pointerleave",S),window.removeEventListener("blur",g),window.removeEventListener("focus",y)}}},[b,i.isClosePausedRef]);const m=p.useCallback(({tabbingDirection:w})=>{const g=a().map(y=>{const _=y.ref.current,S=[_,...Uk(_)];return w==="forwards"?S:S.reverse()});return(w==="forwards"?g.reverse():g).flat()},[a]);return p.useEffect(()=>{const w=d.current;if(w){const v=g=>{var S,k,C;const y=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!y){const T=document.activeElement,P=g.shiftKey;if(g.target===w&&P){(S=u.current)==null||S.focus();return}const O=m({tabbingDirection:P?"backwards":"forwards"}),M=O.findIndex(I=>I===T);xc(O.slice(M+1))?g.preventDefault():P?(k=u.current)==null||k.focus():(C=c.current)==null||C.focus()}};return w.addEventListener("keydown",v),()=>w.removeEventListener("keydown",v)}},[a,m]),x.jsxs(fk,{ref:l,role:"region","aria-label":s.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&x.jsx(qd,{ref:u,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"forwards"});xc(w)}}),x.jsx(Ff.Slot,{scope:r,children:x.jsx(oe.ol,{tabIndex:-1,...o,ref:f})}),b&&x.jsx(qd,{ref:c,onFocusFromOutsideViewport:()=>{const w=m({tabbingDirection:"backwards"});xc(w)}})]})});aw.displayName=iw;var lw="ToastFocusProxy",qd=p.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:n,...s}=e,o=Su(lw,r);return x.jsx(_u,{"aria-hidden":!0,tabIndex:0,...s,ref:t,style:{position:"fixed"},onFocus:i=>{var u;const a=i.relatedTarget;!((u=o.viewport)!=null&&u.contains(a))&&n()}})});qd.displayName=lw;var la="Toast",Pk="toast.swipeStart",Rk="toast.swipeMove",Ok="toast.swipeCancel",Ak="toast.swipeEnd",uw=p.forwardRef((e,t)=>{const{forceMount:r,open:n,defaultOpen:s,onOpenChange:o,...i}=e,[a,l]=aa({prop:n,defaultProp:s??!0,onChange:o,caller:la});return x.jsx(tr,{present:r||a,children:x.jsx(Ik,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:Me(e.onPause),onResume:Me(e.onResume),onSwipeStart:Z(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Z(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:Z(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Z(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});uw.displayName=la;var[jk,Nk]=sw(la,{onClose(){}}),Ik=p.forwardRef((e,t)=>
41{const{__scopeToast:r,type:n="foreground",duration:s,open:o,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...b}=e,m=Su(la,r),[w,v]=p.useState(null),g=Ce(t,I=>v(I)),y=p.useRef(null),_=p.useRef(null),S=s||m.duration,k=p.useRef(0),C=p.useRef(S),T=p.useRef(0),{onToastAdd:P,onToastRemove:R}=m,j=Me(()=>{var H;(w==null?void 0:w.contains(document.activeElement))&&((H=m.viewport)==null||H.focus()),i()}),O=p.useCallback(I=>{!I||I===1/0||(window.clearTimeout(T.current),k.current=new Date().getTime(),T.current=window.setTimeout(j,I))},[j]);p.useEffect(()=>{const I=m.viewport;if(I){const H=()=>{O(C.current),u==null||u()},z=()=>{const G=new Date().getTime()-k.current;C.current=C.current-G,window.clearTimeout(T.current),l==null||l()};return I.addEventListener(Vd,z),I.addEventListener(Hd,H),()=>{I.removeEventListener(Vd,z),I.removeEventListener(Hd,H)}}},[m.viewport,S,l,u,O]),p.useEffect(()=>{o&&!m.isClosePausedRef.current&&O(S)},[o,S,m.isClosePausedRef,O]),p.useEffect(()=>(P(),()=>R()),[P,R]);const M=p.useMemo(()=>w?gw(w):null,[w]);return m.viewport?x.jsxs(x.Fragment,{children:[M&&x.jsx(Dk,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:M}),x.jsx(jk,{scope:r,onClose:j,children:ia.createPortal(x.jsx(Ff.ItemSlot,{scope:r,children:x.jsx(hk,{asChild:!0,onEscapeKeyDown:Z(a,()=>{m.isFocusedToastEscapeKeyDownRef.current||j(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:x.jsx(oe.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":o?"open":"closed","data-swipe-direction":m.swipeDirection,...b,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Z(e.onKeyDown,I=>{I.key==="Escape"&&(a==null||a(I.nativeEvent),I.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,j()))}),onPointerDown:Z(e.onPointerDown,I=>{I.button===0&&(y.current={x:I.clientX,y:I.clientY})}),onPointerMove:Z(e.onPointerMove,I=>{if(!y.current)return;const H=I.clientX-y.current.x,z=I.clientY-y.current.y,G=!!_.current,A=["left","right"].includes(m.swipeDirection),N=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,$=A?N(0,H):0,Q=A?0:N(0,z),V=I.pointerType==="touch"?10:2,ee={x:$,y:Q},re={originalEvent:I,delta:ee};G?(_.current=ee,Da(Rk,d,re,{discrete:!1})):qm(ee,m.swipeDirection,V)?(_.current=ee,Da(Pk,c,re,{discrete:!1}),I.target.setPointerCapture(I.pointerId)):(Math.abs(H)>V||Math.abs(z)>V)&&(y.current=null)}),onPointerUp:Z(e.onPointerUp,I=>{const H=_.current,z=I.target;if(z.hasPointerCapture(I.pointerId)&&z.releasePointerCapture(I.pointerId),_.current=null,y.current=null,H){const G=I.currentTarget,A={originalEvent:I,delta:H};qm(H,m.swipeDirection,m.swipeThreshold)?Da(Ak,h,A,{discrete:!0}):Da(Ok,f,A,{discrete:!0}),G.addEventListener("click",N=>N.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),Dk=e=>{const{__scopeToast:t,children:r,...n}=e,s=Su(la,t),[o,i]=p.useState(!1),[a,l]=p.useState(!1);return $k(()=>i(!0)),p.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:x.jsx(Mf,{asChild:!0,children:x.jsx(_u,{...n,children:o&&x.jsxs(x.Fragment,{children:[s.label," ",r]})})})},Lk="ToastTitle",cw=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return x.jsx(oe.div,{...n,ref:t})});cw.displayName=Lk;var Mk="ToastDescription",dw=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e;return x.jsx(oe.div,{...n,ref:t})});dw.displayName=Mk;var hw="ToastAction",fw=p.forwardRef((e,t)=>{const{altText:r,...n}=e;return r.trim()?x.jsx(mw,{altText:r,asChild:!0,children:x.jsx(Uf,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${hw}\`. Expected non-empty \`string\`.`),null)});fw.displayName=hw;var pw="ToastClose",Uf=p.forwardRef((e,t)=>{const{__scopeToast:r,...n}=e,s=Nk(pw,r);return x.jsx(mw,{asChild:!0,children:x.jsx(oe.button,{type:"button",...n,ref:t,onClick:Z(e.onClick,s.onClose)})})});Uf.displayName=pw;var mw=p.forwardRef((e,t)=>{const{__scopeToast:r,altText:n,...s}=e;return x.jsx(oe.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...s,ref:t})});function gw(e){const t=[];
vendor: 8,821 bytes, lines 41-121
41return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Fk(n)){const s=n.ariaHidden||n.hidden||n.style.display==="none",o=n.dataset.radixToastAnnounceExclude==="";if(!s)if(o){const i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...gw(n))}}),t}function Da(e,t,r,{discrete:n}){const s=r.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&s.addEventListener(e,t,{once:!0}),n?ew(s,o):s.dispatchEvent(o)}var qm=(e,t,r=0)=>{const n=Math.abs(e.x),s=Math.abs(e.y),o=n>s;return t==="left"||t==="right"?o&&n>r:!o&&s>r};function $k(e=()=>{}){const t=Me(e);pr(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Fk(e){return e.nodeType===e.ELEMENT_NODE}function Uk(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function xc(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var zk=ow,vw=aw,yw=uw,ww=cw,bw=dw,xw=fw,_w=Uf;function Sw(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(r=Sw(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ew(){for(var e,t,r=0,n="",s=arguments.length;r<s;r++)(e=arguments[r])&&(t=Sw(e))&&(n&&(n+=" "),n+=t);return n}const Km=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Gm=Ew,zf=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Gm(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:s,defaultVariants:o}=t,i=Object.keys(s).map(u=>{const c=r==null?void 0:r[u],d=o==null?void 0:o[u];if(c===null)return null;const f=Km(c)||Km(d);return s[u][f]}),a=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(b=>{let[m,w]=b;return Array.isArray(w)?w.includes({...o,...a}[m]):{...o,...a}[m]===w})?[...u,d,f]:u},[]);return Gm(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};/**
42 * @license lucide-react v0.462.0 - ISC
43 *
44 * This source code is licensed under the ISC license.
45 * See the LICENSE file in the root directory of this source tree.
46 */const Bk=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),kw=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim();/**
47 * @license lucide-react v0.462.0 - ISC
48 *
49 * This source code is licensed under the ISC license.
50 * See the LICENSE file in the root directory of this source tree.
51 */var Wk={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"};/**
52 * @license lucide-react v0.462.0 - ISC
53 *
54 * This source code is licensed under the ISC license.
55 * See the LICENSE file in the root directory of this source tree.
56 */const Vk=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:s="",children:o,iconNode:i,...a},l)=>p.createElement("svg",{ref:l,...Wk,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:kw("lucide",s),...a},[...i.map(([u,c])=>p.createElement(u,c)),...Array.isArray(o)?o:[o]]));/**
57 * @license lucide-react v0.462.0 - ISC
58 *
59 * This source code is licensed under the ISC license.
60 * See the LICENSE file in the root directory of this source tree.
61 */const kt=(e,t)=>{const r=p.forwardRef(({className:n,...s},o)=>p.createElement(Vk,{ref:o,iconNode:t,className:kw(`lucide-${Bk(e)}`,n),...s}));return r.displayName=`${e}`,r};/**
62 * @license lucide-react v0.462.0 - ISC
63 *
64 * This source code is licensed under the ISC license.
65 * See the LICENSE file in the root directory of this source tree.
66 */const _c=kt("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
67 * @license lucide-react v0.462.0 - ISC
68 *
69 * This source code is licensed under the ISC license.
70 * See the LICENSE file in the root directory of this source tree.
71 */const Qm=kt("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
72 * @license lucide-react v0.462.0 - ISC
73 *
74 * This source code is licensed under the ISC license.
75 * See the LICENSE file in the root directory of this source tree.
76 */const Hk=kt("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
77 * @license lucide-react v0.462.0 - ISC
78 *
79 * This source code is licensed under the ISC license.
80 * See the LICENSE file in the root directory of this source tree.
81 */const qk=kt("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"}]]);/**
82 * @license lucide-react v0.462.0 - ISC
83 *
84 * This source code is licensed under the ISC license.
85 * See the LICENSE file in the root directory of this source tree.
86 */const Ym=kt("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
87 * @license lucide-react v0.462.0 - ISC
88 *
89 * This source code is licensed under the ISC license.
90 * See the LICENSE file in the root directory of this source tree.
91 */const Jm=kt("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
92 * @license lucide-react v0.462.0 - ISC
93 *
94 * This source code is licensed under the ISC license.
95 * See the LICENSE file in the root directory of this source tree.
96 */const Kk=kt("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
97 * @license lucide-react v0.462.0 - ISC
98 *
99 * This source code is licensed under the ISC license.
100 * See the LICENSE file in the root directory of this source tree.
101 */const Gk=kt("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
102 * @license lucide-react v0.462.0 - ISC
103 *
104 * This source code is licensed under the ISC license.
105 * See the LICENSE file in the root directory of this source tree.
106 */const Qk=kt("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
107 * @license lucide-react v0.462.0 - ISC
108 *
109 * This source code is licensed under the ISC license.
110 * See the LICENSE file in the root directory of this source tree.
111 */const Yk=kt("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
112 * @license lucide-react v0.462.0 - ISC
113 *
114 * This source code is licensed under the ISC license.
115 * See the LICENSE file in the root directory of this source tree.
116 */const Kd=kt("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
117 * @license lucide-react v0.462.0 - ISC
118 *
119 * This source code is licensed under the ISC license.
120 * See the LICENSE file in the root directory of this source tree.
121 */const Xm=kt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
vendor: 12,627 bytes, lines 121-126
121],["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"}]]);/**
122 * @license lucide-react v0.462.0 - ISC
123 *
124 * This source code is licensed under the ISC license.
125 * See the LICENSE file in the root directory of this source tree.
126 */const Eu=kt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Bf="-",Jk=e=>{const t=Zk(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const a=i.split(Bf);return a[0]===""&&a.length!==1&&a.shift(),Cw(a,t)||Xk(i)},getConflictingClassGroupIds:(i,a)=>{const l=r[i]||[];return a&&n[i]?[...l,...n[i]]:l}}},Cw=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),s=n?Cw(e.slice(1),n):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(Bf);return(i=t.validators.find(({validator:a})=>a(o)))==null?void 0:i.classGroupId},Zm=/^\[(.+)\]$/,Xk=e=>{if(Zm.test(e)){const t=Zm.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Zk=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return tC(Object.entries(e.classGroups),r).forEach(([o,i])=>{Gd(i,n,o,t)}),n},Gd=(e,t,r,n)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:eg(t,s);o.classGroupId=r;return}if(typeof s=="function"){if(eC(s)){Gd(s(n),t,r,n);return}t.validators.push({validator:s,classGroupId:r});return}Object.entries(s).forEach(([o,i])=>{Gd(i,eg(t,o),r,n)})})},eg=(e,t)=>{let r=e;return t.split(Bf).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},eC=e=>e.isThemeGetter,tC=(e,t)=>t?e.map(([r,n])=>{const s=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([i,a])=>[t+i,a])):o);return[r,s]}):e,rC=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const s=(o,i)=>{r.set(o,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(o){let i=r.get(o);if(i!==void 0)return i;if((i=n.get(o))!==void 0)return s(o,i),i},set(o,i){r.has(o)?r.set(o,i):s(o,i)}}},Tw="!",nC=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,s=t[0],o=t.length,i=a=>{const l=[];let u=0,c=0,d;for(let w=0;w<a.length;w++){let v=a[w];if(u===0){if(v===s&&(n||a.slice(w,w+o)===t)){l.push(a.slice(c,w)),c=w+o;continue}if(v==="/"){d=w;continue}}v==="["?u++:v==="]"&&u--}const f=l.length===0?a:a.substring(c),h=f.startsWith(Tw),b=h?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:m}};return r?a=>r({className:a,parseClassName:i}):i},sC=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},oC=e=>({cache:rC(e.cacheSize),parseClassName:nC(e),...Jk(e)}),iC=/\s+/,aC=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:s}=t,o=[],i=e.trim().split(iC);let a="";for(let l=i.length-1;l>=0;l-=1){const u=i[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=r(u);let b=!!h,m=n(b?f.substring(0,h):f);if(!m){if(!b){a=u+(a.length>0?" "+a:a);continue}if(m=n(f),!m){a=u+(a.length>0?" "+a:a);continue}b=!1}const w=sC(c).join(":"),v=d?w+Tw:w,g=v+m;if(o.includes(g))continue;o.push(g);const y=s(m,b);for(let _=0;_<y.length;++_){const S=y[_];o.push(v+S)}a=u+(a.length>0?" "+a:a)}return a};function lC(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Pw(t))&&(n&&(n+=" "),n+=r);return n}const Pw=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Pw(e[n]))&&(r&&(r+=" "),r+=t);return r};function uC(e,...t){let r,n,s,o=i;function i(l){const u=t.reduce((c,d)=>d(c),e());return r=oC(u),n=r.cache.get,s=r.cache.set,o=a,a(l)}function a(l){const u=n(l);if(u)return u;const c=aC(l,r);return s(l,c),c}return function(){return o(lC.apply(null,arguments))}}const pe=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Rw=/^\[(?:([a-z-]+):)?(.+)\]$/i,cC=/^\d+\/\d+$/,dC=new Set(["px","full","screen"]),hC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fC=/\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$/,pC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,mC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,gC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,yr=e=>so(e)||dC.has(e)||cC.test(e),Wr=e=>Lo(e,"length",EC),so=e=>!!e&&!Number.isNaN(Number(e)),Sc=e=>Lo(e,"number",so),ei=e=>!!e&&Number.isInteger(Number(e)),vC=e=>e.endsWith("%")&&so(e.slice(0,-1)),J=e=>Rw.test(e),Vr=e=>hC.test(e),yC=new Set(["length","size","percentage"]),wC=e=>Lo(e,yC,Ow),bC=e=>Lo(e,"position",Ow),xC=new Set(["image","url"]),_C=e=>Lo(e,xC,CC),SC=e=>Lo(e,"",kC),ti=()=>!0,Lo=(e,t,r)=>{const n=Rw.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},EC=e=>fC.test(e)&&!pC.test(e),Ow=()=>!1,kC=e=>mC.test(e),CC=e=>gC.test(e),TC=()=>{const e=pe("colors"),t=pe("spacing"),r=pe("blur"),n=pe("brightness"),s=pe("borderColor"),o=pe("borderRadius"),i=pe("borderSpacing"),a=pe("borderWidth"),l=pe("contrast"),u=pe("grayscale"),c=pe("hueRotate"),d=pe("invert"),f=pe("gap"),h=pe("gradientColorStops"),b=pe("gradientColorStopPositions"),m=pe("inset"),w=pe("margin"),v=pe("opacity"),g=pe("padding"),y=pe("saturate"),_=pe("scale"),S=pe("sepia"),k=pe("skew"),C=pe("space"),T=pe("translate"),P=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",J,t],O=()=>[J,t],M=()=>["",yr,Wr],I=()=>["auto",so,J],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],z=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],N=()=>["","0",J],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Q=()=>[so,J];return{cacheSize:500,separator:":",theme:{colors:[ti],spacing:[yr,Wr],blur:["none","",Vr,J],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Vr,J],borderSpacing:O(),borderWidth:M(),contrast:Q(),grayscale:N(),hueRotate:Q(),invert:N(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[vC,Wr],inset:j(),margin:j(),opacity:Q(),padding:O(),saturate:Q(),scale:Q(),sepia:N(),skew:Q(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[Vr]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),J]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],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]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ei,J]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",ei,J]}],"grid-cols":[{"grid-cols":[ti]}],"col-start-end":[{col:["auto",{span:["full",ei,J]},J]}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":[ti]}],"row-start-end":[{row:["auto",{span:[ei,J]},J]}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[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",J,t]}],"min-w":[{"min-w":[J,t,"min","max","fit"]}],"max-w":[{"max-w":[J,t,"none","full","min","max","fit","prose",{screen:[Vr]},Vr]}],h:[{h:[J,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[J,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[J,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Vr,Wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Sc]}],"font-family":[{font:[ti]}],"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",J]}],"line-clamp":[{"line-clamp":["none",so,Sc]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",yr,J]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",yr,Wr]}],"underline-offset":[{"underline-offset":["auto",yr,J]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],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",J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),bC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_C]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}
vendor: 4,877 bytes, line 126
126],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"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":[v]}],"border-style":[{border:[...z(),"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":[v]}],"divide-style":[{divide:z()}],"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:["",...z()]}],"outline-offset":[{"outline-offset":[yr,J]}],"outline-w":[{outline:[yr,Wr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:M()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[yr,Wr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Vr,SC]}],"shadow-color":[{shadow:[ti]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Vr,J]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],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":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"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",J]}],duration:[{duration:Q()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:Q()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[ei,J]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}
126],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",J]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[yr,Wr,Sc]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},PC=uC(TC);function de(...e){return PC(Ew(e))}const RC=zk,Aw=p.forwardRef(({className:e,...t},r)=>x.jsx(vw,{ref:r,className:de("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Aw.displayName=vw.displayName;const OC=zf("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"}}),jw=p.forwardRef(({className:e,variant:t,...r},n)=>x.jsx(yw,{ref:n,className:de(OC({variant:t}),e),...r}));jw.displayName=yw.displayName;const AC=p.forwardRef(({className:e,...t},r)=>x.jsx(xw,{ref:r,className:de("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));AC.displayName=xw.displayName;const Nw=p.forwardRef(({className:e,...t},r)=>x.jsx(_w,{ref:r,className:de("absolute right-2 top-2 rounded-md p-1 text-foreground
126/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:x.jsx(Eu,{className:"h-4 w-4"})}));Nw.displayName=_w.displayName;const Iw=p.forwardRef(({className:e,...t},r)=>x.jsx(ww,{ref:r,className:de("text-sm font-semibold",e),...t}));Iw.displayName=ww.displayName;const Dw=p.forwardRef(({className:e,...t},r)=>x.jsx(bw,{ref:r,className:de("text-sm opacity-90",e),...t}));Dw.displayName=bw.displayName;function jC(){const{toasts:e}=Y0();return x.jsxs(RC,{children:[e.map(function({id:t,title:r,description:n,action:s,...o}){return x.jsxs(jw,{...o,children:[x.jsxs("div",{className:"grid gap-1",children:[r&&x.jsx(Iw,{children:r}),n&&x.jsx(Dw,{children:n})]}),s,x.jsx(Nw,{})]},t)}),x.jsx(Aw,{})]})}var tg=["light","dark"],NC="(prefers-color-scheme: dark)",IC=p.createContext(void 0),DC={setTheme:e=>{},themes:[]},LC=()=>{var e;return(e=p.useContext(IC))!=null?e:DC};p.memo(({forcedTheme:e,storageKey:t,attribute:r,enableSystem:n,enableColorScheme:s,defaultTheme:o,value:i,attrs:a,nonce:l})=>{let u=o==="system",c=r==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${a.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${r}',s='setAttribute';`,d=s?tg.includes(o)&&o?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${o}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(b,m=!1,w=!0)=>{let v=i?i[b]:b,g=m?b+"|| ''":`'${v}'`,y="";return s&&w&&!m&&tg.includes(b)&&(y+=`d.style.colorScheme = '${b}';`),r==="class"?m||v?y+=`c.add(${g})`:y+="null":v&&(y+=`d[s](n,${g})`),y},h=e?`!function(){${c}${f(e)}}()`:n?`!function(){try{${c}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${NC}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${i?`var x=${JSON.stringify(i)};`:""}${f(i?"x[e]":"e",!0)}}${u?"":"else{"+f(o,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${c}var e=localStorage.getItem('${t}');if(e){${i?`var x=${JSON.stringify(i)};`:""}${f(i?"x[e]":"e",!0)}}else{${f(o,!1,!1)};}${d}}catch(t){}}();`;return p.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var MC=e=>{switch(e){case"success":return UC;case"info":return BC;case"warning":return zC;case"error":return WC;default:return null}},$C=Array(12).fill(0),FC=({visible:e,className:t})=>L.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},L.createElement("div",{className:"sonner-spinner"},$C.map((r,n)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),UC=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),zC=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.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"})),BC=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),WC=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.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"})),VC=L.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"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),HC=()=>{let[e,t]=L.useState(document.hidden);return L.useEffect(()=>{let r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e},Qd=1,qC=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
126{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:r,...n}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Qd++,o=this.toasts.find(a=>a.id===s),i=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),o?this.toasts=this.toasts.map(a=>a.id===s?(this.publish({...a,...e,id:s,title:r}),{...a,...e,id:s,dismissible:i,title:r}):a):this.addToast({title:r,...n,dismissible:i,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>
126this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let n=e instanceof Promise?e:e(),s=r!==void 0,o,i=n.then(async l=>{if(o=["resolve",l],L.isValidElement(l))s=!1,this.create({id:r,type:"default",message:l});else if(GC(l)&&!l.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:r,type:"error",message:u,description:c})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(l):t.success,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"success",message:u,description:c})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(l):t.error,c=typeof t.description=="function"?await t.description(l):t.description;this.create({id:r,type:"error",message:u,description:c})}}).finally(()=>{var l;s&&(this.dismiss(r),r=void 0),(l=t.finally)==null||l.call(t)}),a=()=>new Promise((l,u)=>i.then(()=>o[0]==="reject"?u(o[1]):l(o[1])).catch(u));return typeof r!="string"&&typeof r!="number"?{unwrap:a}:Object.assign(r,{unwrap:a})},this.custom=(e,t)=>{let r=(t==null?void 0:t.id)||Qd++;return this.create({jsx:e(r),id:r,...t}),r},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},at=new qC,KC=(e,t)=>{let r=(t==null?void 0:t.id)||Qd++;return at.addToast({title:e,...t,id:r}),r},GC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",QC=KC,YC=()=>at.toasts,JC=()=>at.getActiveToasts(),FD=Object.assign(QC,{success:at.success,info:at.info,warning:at.warning,error:at.error,custom:at.custom,message:at.message,promise:at.promise,dismiss:at.dismiss,loading:at.loading},{getHistory:YC,getToasts:JC});function XC(e,{insertAt:t}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t==="top"&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}XC(`: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;
126left: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}
126: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%);
126--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%)}
127`);function La(e){return e.label!==void 0}var ZC=3,eT="32px",tT="16px",rg=4e3,rT=356,nT=14,sT=20,oT=200;function zt(...e){return e.filter(Boolean).join(" ")}function iT(e){let[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}var aT=e=>{var t,r,n,s,o,i,a,l,u,c,d;let{invert:f,toast:h,unstyled:b,interacting:m,setHeights:w,visibleToasts:v,heights:g,index:y,toasts:_,expanded:S,removeToast:k,defaultRichColors:C,closeButton:T,style:P,cancelButtonStyle:R,actionButtonStyle:j,className:O="",descriptionClassName:M="",duration:I,position:H,gap:z,loadingIcon:G,expandByDefault:A,classNames:N,icons:$,closeButtonAriaLabel:Q="Close toast",pauseWhenPageIsHidden:V}=e,[ee,re]=L.useState(null),[Pe,We]=L.useState(null),[ie,xs]=L.useState(!1),[Lr,Dn]=L.useState(!1),[Mr,_s]=L.useState(!1),[$r,fa]=L.useState(!1),[Bu,pa]=L.useState(!1),[Wu,Vo]=L.useState(0),[Ss,kp]=L.useState(0),Ho=L.useRef(h.duration||I||rg),Cp=L.useRef(null),Ln=L.useRef(null),uS=y===0,cS=y+1<=v,Ct=h.type,Es=h.dism
127issible!==!1,dS=h.className||"",hS=h.descriptionClassName||"",ma=L.useMemo(()=>g.findIndex(Y=>Y.toastId===h.id)||0,[g,h.id]),fS=L.useMemo(()=>{var Y;return(Y=h.closeButton)!=null?Y:T},[h.closeButton,T]),Tp=L.useMemo(()=>h.duration||I||rg,[h.duration,I]),Vu=L.useRef(0),ks=L.useRef(0),Pp=L.useRef(0),Cs=L.useRef(null),[pS,mS]=H.split("-"),Rp=L.useMemo(()=>g.reduce((Y,ce,ve)=>ve>=ma?Y:Y+ce.height,0),[g,ma]),Op=HC(),gS=h.invert||f,Hu=Ct==="loading";ks.current=L.useMemo(()=>ma*z+Rp,[ma,Rp]),L.useEffect(()=>{Ho.current=Tp},[Tp]),L.useEffect(()=>{xs(!0)},[]),L.useEffect(()=>{let Y=Ln.current;if(Y){let ce=Y.getBoundingClientRect().height;return kp(ce),w(ve=>[{toastId:h.id,height:ce,position:h.position},...ve]),()=>w(ve=>ve.filter(Mt=>Mt.toastId!==h.id))}},[w,h.id]),L.useLayoutEffect(()=>{if(!ie)return;let Y=Ln.current,ce=Y.style.height;Y.style.height="auto";let ve=Y.getBoundingClientRect().height;Y.style.height=ce,kp(ve),w(Mt=>Mt.find($t=>$t.toastId===h.id)?Mt.map($t=>$t.toastId===h.id?{...$t,height:ve}:$t):[{toastId:h.id,height:ve,position:h.position},...Mt])},[ie,h.title,h.description,w,h.id]);let Fr=L.useCallback(()=>{Dn(!0),Vo(ks.current),w(Y=>Y.filter(ce=>ce.toastId!==h.id)),setTimeout(()=>{k(h)},oT)},[h,k,w,ks]);L.useEffect(()=>{if(h.promise&&Ct==="loading"||h.duration===1/0||h.type==="loading")return;let Y;return S||m||V&&Op?(()=>{if(Pp.current<Vu.current){let ce=new Date().getTime()-Vu.current;Ho.current=Ho.current-ce}Pp.current=new Date().getTime()})():Ho.current!==1/0&&(Vu.current=new Date().getTime(),Y=setTimeout(()=>{var ce;(ce=h.onAutoClose)==null||ce.call(h,h),Fr()},Ho.current)),()=>clearTimeout(Y)},[S,m,h,Ct,V,Op,Fr]),L.useEffect(()=>{h.delete&&Fr()},[Fr,h.delete]);function vS(){var Y,ce,ve;return $!=null&&$.loading?L.createElement("div",{className:zt(N==null?void 0:N.loader,(Y=h==null?void 0:h.classNames)==null?void 0:Y.loader,"sonner-loader"),"data-visible":Ct==="loading"},$.loading):G?L.createElement("div",{className:zt(N==null?void 0:N.loader,(ce=h==null?void 0:h.classNames)==null?void 0:ce.loader,"sonner-loader"),"data-visible":Ct==="loading"},G):L.createElement(FC,{className:zt(N==null?void 0:N.loader,(ve=h==null?void 0:h.classNames)==null?void 0:ve.loader),visible:Ct==="loading"})}return L.createElement("li",{tabIndex:0,ref:Ln,className:zt(O,dS,N==null?void 0:N.toast,(t=h==null?void 0:h.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[Ct],(r=h==null?void 0:h.classNames)==null?void 0:r[Ct]),"data-sonner-toast":"","data-rich-colors":(n=h.richColors)!=null?n:C,"data-styled":!(h.jsx||h.unstyled||b),"data-mounted":ie,"data-promise":!!h.promise,"data-swiped":Bu,"data-removed":Lr,"data-visible":cS,"data-y-position":pS,"data-x-position":mS,"data-index":y,"data-front":uS,"data-swiping":Mr,"data-dismissible":Es,"data-type":Ct,"data-invert":gS,"data-swipe-out":$r,"data-swipe-direction":Pe,"data-expanded":!!(S||A&&ie),style:{"--index":y,"--toasts-before":y,"--z-index":_.length-y,"--offset":`${Lr?Wu:ks.current}px`,"--initial-height":A?"auto":`${Ss}px`,...P,...h.style},onDragEnd:()=>{_s(!1),re(null),Cs.current=null},onPointerDown:Y=>{Hu||!Es||(Cp.current=new Date,Vo(ks.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(_s(!0),Cs.current={x:Y.clientX,y:Y.clientY}))},onPointerUp:()=>{var Y,ce,ve,Mt;if($r||!Es)return;Cs.current=null;let $t=Number(((Y=Ln.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ur=Number(((ce=Ln.current)==null?void 0:ce.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mn=new Date().getTime()-((ve=Cp.current)==null?void 0:ve.getTime()),Ft=ee==="x"?$t:Ur,zr=Math.abs(Ft)/Mn;if(Math.abs(Ft)>=sT||zr>.11){Vo(ks.current),(Mt=h.onDismiss)==null||Mt.call(h,h),We(ee==="x"?$t>0?"right":"left":Ur>0?"down":"up"),Fr(),fa(!0),pa(!1);return}_s(!1),re(null)},onPointerMove:Y=>{var ce,ve,Mt,$t;if(!Cs.current||!Es||((ce=window.getSelection())==null?void 0:ce.toString().length)>0)return;let Ur=Y.clientY-Cs.current.y,Mn=Y.clientX-Cs.current.x,Ft=(ve=e.swipeDirections)!=null?ve:iT(H);!ee&&(Math.abs(Mn)>1||Math.abs(Ur)>1)&&re(Math.abs(Mn)>Math.abs(Ur)?"x":"y");let zr={x:0,y:0};ee==="y"?(Ft.includes("top")||Ft.includes("bottom"))&&(Ft.includes("top")&&Ur<0||Ft.includes("bottom")&&Ur>0)&&(zr.y=Ur):ee==="x"&&(Ft.includes("left")||Ft.includes("right"))&&(Ft.includes("left")&&Mn<0||Ft.includes("right")&&Mn>0)&&(zr.x=Mn),(Math.abs(zr.x)>0||Math.abs(zr.y)>0)&&pa(!0),(Mt=Ln.current)==null||Mt.style.setProperty("--swipe-amount-x",`${zr.x}px`),($t=Ln.current)==null||$t.style.setProperty("--swipe-amount-y",`${zr.y}px`)}},fS&&!h.jsx?L.createElement("button",{"aria-label":Q,"data-disabled":Hu,"data-close-button":!0,onClick:Hu||!Es?()=>{}:()=>{var Y;Fr(),(Y=h.onDismiss)==null||Y.call(h,h)},className:zt(N==null?void 0:N.closeButton,(s=h==null?void 0:h.classNames)==null?void 0:s.closeButton)},(o=$==null?void 0:$.close)!=null?o:VC):null,h.jsx||p.isValidElement(h.title)?h.jsx?h.jsx:typeof h.title=="function"?h.title():h.title:L.createElement(L.Fragment,null,Ct||h.icon||h.promise?L.createElement("div",{"data-icon":"",className:zt(N==null?void 0:N.icon,(i=h==null?void 0:h.classNames)==null?void 0:i.icon)},h.promise||h.type==="loading"&&!h.icon?h.icon||vS():null,h.type!=="loading"?h.icon||($==null?void 0:$[Ct])||MC(Ct):null):null,
127L.createElement("div",{"data-content":"",className:zt(N==null?void 0:N.content,(a=h==null?void 0:h.classNames)==null?void 0:a.content)},L.createElement("div",{"data-title":"",className:zt(N==null?void 0:N.title,(l=h==null?void 0:h.classNames)==null?void 0:l.title)},typeof h.title=="function"?h.title():h.title),h.description?L.createElement("div",{"data-description":"",className:zt(M,hS,N==null?void 0:N.description,(u=h==null?void 0:h.classNames)==null?void 0:u.description)},typeof h.description=="function"?h.description():h.description):null),p.isValidElement(h.cancel)?h.cancel:h.cancel&&La(h.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:h.cancelButtonStyle||R,onClick:Y=>{var ce,ve;La(h.cancel)&&Es&&((ve=(ce=h.cancel).onClick)==null||ve.call(ce,Y),Fr())},className:zt(N==null?void 0:N.cancelButton,(c=h==null?void 0:h.classNames)==null?void 0:c.cancelButton)},h.cancel.label):null,p.isValidElement(h.action)?h.action:h.action&&La(h.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:h.actionButtonStyle||j,onClick:Y=>{var ce,ve;La(h.action)&&((ve=(ce=h.action).onClick)==null||ve.call(ce,Y),!Y.defaultPrevented&&Fr())},className:zt(N==null?void 0:N.actionButton,(d=h==null?void 0:h.classNames)==null?void 0:d.actionButton)},h.action.label):null))};function ng(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function lT(e,t){let r={};return[e,t].forEach((n,s)=>{let o=s===1,i=o?"--mobile-offset":"--offset",a=o?tT:eT;function l(u){["top","right","bottom","left"].forEach(c=>{r[`${i}-${c}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?r[`${i}-${u}`]=a:r[`${i}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):l(a)}),r}var uT=p.forwardRef(function(e,t){let{invert:r,position:n="bottom-right",hotkey:s=["altKey","KeyT"],expand:o,closeButton:i,className:a,offset:l,mobileOffset:u,theme:c="light",richColors:d,duration:f,style:h,visibleToasts:b=ZC,toastOptions:m,dir:w=ng(),gap:v=nT,loadingIcon:g,icons:y,containerAriaLabel:_="Notifications",pauseWhenPageIsHidden:S}=e,[k,C]=L.useState([]),T=L.useMemo(()=>Array.from(new Set([n].concat(k.filter(V=>V.position).map(V=>V.position)))),[k,n]),[P,R]=L.useState([]),[j,O]=L.useState(!1),[M,I]=L.useState(!1),[H,z]=L.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=L.useRef(null),A=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=L.useRef(null),$=L.useRef(!1),Q=L.useCallback(V=>{C(ee=>{var re;return(re=ee.find(Pe=>Pe.id===V.id))!=null&&re.delete||at.dismiss(V.id),ee.filter(({id:Pe})=>Pe!==V.id)})},[]);return L.useEffect(()=>at.subscribe(V=>{if(V.dismiss){C(ee=>ee.map(re=>re.id===V.id?{...re,delete:!0}:re));return}setTimeout(()=>{G0.flushSync(()=>{C(ee=>{let re=ee.findIndex(Pe=>Pe.id===V.id);return re!==-1?[...ee.slice(0,re),{...ee[re],...V},...ee.slice(re+1)]:[V,...ee]})})})}),[]),L.useEffect(()=>{if(c!=="system"){z(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?z("dark"):z("light")),typeof window>"u")return;let V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:ee})=>{z(ee?"dark":"light")})}catch{V.addListener(({matches:re})=>{try{z(re?"dark":"light")}catch(Pe){console.error(Pe)}})}},[c]),L.useEffect(()=>{k.length<=1&&O(!1)},[k]),L.useEffect(()=>{let V=ee=>{var re,Pe;s.every(We=>ee[We]||ee.code===We)&&(O(!0),(re=G.current)==null||re.focus()),ee.code==="Escape"&&(document.activeElement===G.current||(Pe=G.current)!=null&&Pe.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),L.useEffect(()=>{if(G.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,$.current=!1)}},[G.current]),L.createElement("section",{ref:t,"aria-label":`${_} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((V,ee)=>{var re;let[Pe,We]=V.split("-");return k.length?L.createElement("ol",{key:V,dir:w==="auto"?ng():w,tabIndex:-1,ref:G,className:a,"data-sonner-toaster":!0,"data-theme":H,"data-y-position":Pe,"data-lifted":j&&k.length>1&&!o,"data-x-position":We,style:{"--front-toast-height":`${((re=P[0])==null?void 0:re.height)||0}px`,"--width":`${rT}px`,"--gap":`${v}px`,...h,...lT(l,u)},onBlur:ie=>{$.current&&!ie.currentTarget.contains(ie.relatedTarget)&&($.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||$.current||($.current=!0,N.current=ie.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{M||O(!1)},onDragEnd:()=>O(!1),onPointerDown:ie=>{ie.target instanceof HTMLElement&&ie.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},k.filter(ie=>!ie.position&&ee===0||ie.position===V).map((ie,xs)=>{var Lr,Dn;return L.createElement(aT,{key:ie.id,icons:y,index:xs,toast:ie,defaultRichColors:d,duration:(Lr=m==null?void 0:m.duration)!=null?Lr:f,className:m==null?void 0:m.className,descriptionClassName:m==null?void 0:m.descriptionClassName,invert:r,visibleToasts:b,closeButton:(Dn=m==null?void 0:m.closeButton)!=null?Dn:i,interacting:M,position:V,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:Q,toasts:k.filter(Mr=>Mr.position==ie.position),heights:P.filter(Mr=>Mr.position==ie.position),setHeights:R,expandByDefault:o,gap:v,loadingIcon:g,expanded:j,pauseWhenPageIsHidden:S,swipeDirections:e.swipeDirections})})):null}))});const cT=({...e})=>{const{theme:t="system"}=LC();return x.jsx(uT,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var dT=Hh[" useId ".trim().toString()]||(()=>{}),hT=0;function oo(e){const[t,r]=p.useState(dT());return pr(()=>{e||r(n=>n??String(hT++))},[e]),e||(t?`radix-${t}`:"")}
vendor: 10,879 bytes, line 127
127const fT=["top","right","bottom","left"],Cn=Math.min,gt=Math.max,Wl=Math.round,Ma=Math.floor,fr=e=>({x:e,y:e}),pT={left:"right",right:"left",bottom:"top",top:"bottom"},mT={start:"end",end:"start"};function Yd(e,t,r){return gt(e,Cn(t,r))}function Nr(e,t){return typeof e=="function"?e(t):e}function Ir(e){return e.split("-")[0]}function Mo(e){return e.split("-")[1]}function Wf(e){return e==="x"?"y":"x"}function Vf(e){return e==="y"?"height":"width"}const gT=new Set(["top","bottom"]);function cr(e){return gT.has(Ir(e))?"y":"x"}function Hf(e){return Wf(cr(e))}function vT(e,t,r){r===void 0&&(r=!1);const n=Mo(e),s=Hf(e),o=Vf(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=Vl(i)),[i,Vl(i)]}function yT(e){const t=Vl(e);return[Jd(e),t,Jd(t)]}function Jd(e){return e.replace(/start|end/g,t=>mT[t])}const sg=["left","right"],og=["right","left"],wT=["top","bottom"],bT=["bottom","top"];function xT(e,t,r){switch(e){case"top":case"bottom":return r?t?og:sg:t?sg:og;case"left":case"right":return t?wT:bT;default:return[]}}function _T(e,t,r,n){const s=Mo(e);let o=xT(Ir(e),r==="start",n);return s&&(o=o.map(i=>i+"-"+s),t&&(o=o.concat(o.map(Jd)))),o}function Vl(e){return e.replace(/left|right|bottom|top/g,t=>pT[t])}function ST(e){return{top:0,right:0,bottom:0,left:0,...e}}function Lw(e){return typeof e!="number"?ST(e):{top:e,right:e,bottom:e,left:e}}function Hl(e){const{x:t,y:r,width:n,height:s}=e;return{width:n,height:s,top:r,left:t,right:t+n,bottom:r+s,x:t,y:r}}function ig(e,t,r){let{reference:n,floating:s}=e;const o=cr(t),i=Hf(t),a=Vf(i),l=Ir(t),u=o==="y",c=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,f=n[a]/2-s[a]/2;let h;switch(l){case"top":h={x:c,y:n.y-s.height};break;case"bottom":h={x:c,y:n.y+n.height};break;case"right":h={x:n.x+n.width,y:d};break;case"left":h={x:n.x-s.width,y:d};break;default:h={x:n.x,y:n.y}}switch(Mo(t)){case"start":h[i]-=f*(r&&u?-1:1);break;case"end":h[i]+=f*(r&&u?-1:1);break}return h}const ET=async(e,t,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(t));let u=await i.getElementRects({reference:e,floating:t,strategy:s}),{x:c,y:d}=ig(u,n,l),f=n,h={},b=0;for(let m=0;m<a.length;m++){const{name:w,fn:v}=a[m],{x:g,y,data:_,reset:S}=await v({x:c,y:d,initialPlacement:n,placement:f,strategy:s,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});c=g??c,d=y??d,h={...h,[w]:{...h[w],..._}},S&&b<=50&&(b++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:c,y:d}=ig(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:s,middlewareData:h}};async function Ui(e,t){var r;t===void 0&&(t={});const{x:n,y:s,platform:o,rects:i,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Nr(t,e),b=Lw(h),w=a[f?d==="floating"?"reference":"floating":d],v=Hl(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:u,rootBoundary:c,strategy:l})),g=d==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),_=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},S=Hl(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-S.top+b.top)/_.y,bottom:(S.bottom-v.bottom+b.bottom)/_.y,left:(v.left-S.left+b.left)/_.x,right:(S.right-v.right+b.right)/_.x}}const kT=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:s,rects:o,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=Nr(e,t)||{};if(u==null)return{};const d=Lw(c),f={x:r,y:n},h=Hf(s),b=Vf(h),m=await i.getDimensions(u),w=h==="y",v=w?"top":"left",g=w?"bottom":"right",y=w?"clientHeight":"clientWidth",_=o.reference[b]+o.reference[h]-f[h]-o.floating[b],S=f[h]-o.reference[h],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let C=k?k[y]:0;(!C||!await(i.isElement==null?void 0:i.isElement(k)))&&(C=a.floating[y]||o.floating[b]);const T=_/2-S/2,P=C/2-m[b]/2-1,R=Cn(d[v],P),j=Cn(d[g],P),O=R,M=C-m[b]-j,I=C/2-m[b]/2+T,H=Yd(O,I,M),z=!l.arrow&&Mo(s)!=null&&I!==H&&o.reference[b]/2-(I<O?R:j)-m[b]/2<0,G=z?I<O?I-O:I-M:0;return{[h]:f[h]+G,data:{[h]:H,centerOffset:I-H-G,...z&&{alignmentOffset:G}},reset:z}}}),CT=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:s,middlewareData:o,rects:i,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:m=!0,...w}=Nr(e,t);if((r=o.arrow)!=null&&r.alignmentOffset)return{};const v=Ir(s),g=cr(a),y=Ir(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=f||(y||!m?[Vl(a)]:yT(a)),k=b!=="none";!f&&k&&S.push(..._T(a,m,b,_));const C=[a,...S],T=await Ui(t,w),P=[];let R=((n=o.flip)==null?void 0:n.overflows)||[];if(c&&P.push(T[v]),d){const I=vT(s,i,_);P.push(T[I[0]],T[I[1]])}if(R=[...R,{placement:s,overflows:P}],!P.every(I=>I<=0)){var j,O;const I=(((j=o.flip)==null?void 0:j.index)||0)+1,H=C[I];if(H&&(!(d==="alignment"?g!==cr(H):!1)||R.every(A=>A.overflows[0]>0&&cr(A.placement)===g)))return{data:{index:I,overflows:R},reset:{placement:H}};let z=(O=R.filter(G=>G.overflows[0]<=0).sort((G,A)=>G.overflows[1]-A.overflows[1])[0])==null?void 0:O.placement;if(!z)switch(h){case"bestFit":{var M;const G=(M=R.filter(A=>{if(k){const N=cr(A.placement);return N===g||N==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(N=>N>0).reduce((N,$)=>N+$,0)]).sort((A,N)=>A[1]-N[1])[0])==null?void 0:M[0];G&&(z=G);break}case"initialPlacement":z=a;break}if(s!==z)return{reset:{placement:z}}}return{}}}};function ag(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function lg(e){return fT.some(t=>e[t]>=0)}const TT=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...s}=Nr(e,t);switch(n){case"referenceHidden":{const o=await Ui(t,{...s,elementContext:"reference"}),i=ag(o,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:lg(i)}}}case"escaped":{const o=await Ui(t,{...s,altBoundary:!0}),i=ag(o,r.floating);return{data:{escapedOffsets:i,escaped:lg(i)}}}default:return{}}}}},Mw=new Set(["left","top"]);async function PT(e,t){const{placement:r,platform:n,elements:s}=e,o=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=Ir(r),a=Mo(r),l=cr(r)==="y",u=Mw.has(i)?-1:1,c=o&&l?-1:1,d=Nr(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof b=="number"&&(h=a==="end"?b*-1:b),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const RT=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:s,y:o,placement:i,middlewareData:a}=t,l=await PT(t,e);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}}}}},OT=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:s}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:w=>{let{x:v,y:g}=w;return{x:v,y:g}}},...l}=Nr(e,t),u={x:r,y:n},c=await Ui(t,l),d=cr(Ir(s)),f=Wf(d);let h=u[f],b=u[d];if(o){const w=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=h+c[w],y=h-c[v];h=Yd(g,h,y)}if(i){const w=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=b+c[w],y=b-c[v];b=Yd(g,b,y)}const m=a.fn({...t,[f]:h,[d]:b});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:o,[d]:i}}}}}},AT=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:s,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=Nr(e,t),c={x:r,y:n},d=cr(s),f=Wf(d);let h=c[f],b=c[d];const m=Nr(a,t),w=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const y=f==="y"?"height":"width",_=o.reference[f]-o.floating[y]+w.mainAxis,S=o.reference[f]+o.reference[y]-w.mainAxis;h<_?h=_:h>S&&(h=S)}if(u){var v,g;const y=f==="y"?"width":"height",_=Mw.has(Ir(s)),S=o.reference[d]-o.floating[y]+(_&&((v=i.offset)==null?void 0:v[d])||0)+(_?0:w.crossAxis),k=o.reference[d]+o.reference[y]+(_?0:((g=i.offset)==null?void 0:g[d])||0)-(_?w.crossAxis:0);b<S?b=S:b>k&&(b=k)}return{[f]:h,[d]:b}}}},jT=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:s,rects:o,platform:i,elements:a}=t,{apply:l=()=>{},...u}=Nr(e,t),c=await Ui(t,u),d=Ir(s),f=Mo(s),h=cr(s)==="y",{width:b,height:m}=o.floating;let w,v;d==="top"||d==="bottom"?(w=d,v=f===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,w=f==="end"?"top":"bottom");const g=m-c.top-c.bottom,y=b-c.left-c.right,_=Cn(m-c[w],g),S=Cn(b-c[v],y),k=!t.middlewareData.shift;let C=_,T=S;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(T=y),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(C=g),k&&!f){const R=gt(c.left,0),j=gt(c.right,0),O=gt(c.top,0),M=gt(c.bottom,0);h?T=b-2*(R!==0||j!==0?R+j:gt(c.left,c.right)):C=m-2*(O!==0||M!==0?O+M:gt(c.top,c.bottom))}await l({...t,availableWidth:T,availableHeight:C});const P=await i.getDimensions(a.floating);return b!==P.width||m!==P.height?{reset:{rects:!0}}:{}}}};function ku(){return typeof window<"u"}function $o(e){return $w(e)?(e.nodeName||"").toLowerCase():"#document"}function xt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function gr(e){var t;return(t=($w(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function $w(e){return ku()?e instanceof Node||e instanceof xt(e).Node:!1}function Zt(e){return ku()?e instanceof Element||e instanceof xt(e).Element:!1}function mr(e){return ku()?e instanceof HTMLElement||e instanceof xt(e).HTMLElement:!1}function ug(e){return!ku()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xt(e).ShadowRoot}const NT=new Set(["inline","contents"]);function ua(e){const{overflow:t,overflowX:r,overflowY:n,display:s}=er(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!NT.has(s)}const IT=new Set(["table","td","th"]);function DT(e){return IT.has($o(e))}const LT=[":popover-open",":modal"];function Cu(e){return LT.some(t=>{try{return e.matches(t)}catch{return!1}})}const MT=["transform","translate","scale","rotate","perspective"],$T=["transform","translate","scale","rotate","perspective","filter"],FT=["paint","layout","strict","content"];
vendor: 5,011 bytes, line 127
127function qf(e){const t=Kf(),r=Zt(e)?er(e):e;return MT.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||$T.some(n=>(r.willChange||"").includes(n))||FT.some(n=>(r.contain||"").includes(n))}function UT(e){let t=Tn(e);for(;mr(t)&&!Ro(t);){if(qf(t))return t;if(Cu(t))return null;t=Tn(t)}return null}function Kf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const zT=new Set(["html","body","#document"]);function Ro(e){return zT.has($o(e))}function er(e){return xt(e).getComputedStyle(e)}function Tu(e){return Zt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Tn(e){if($o(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ug(e)&&e.host||gr(e);return ug(t)?t.host:t}function Fw(e){const t=Tn(e);return Ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:mr(t)&&ua(t)?t:Fw(t)}function zi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const s=Fw(e),o=s===((n=e.ownerDocument)==null?void 0:n.body),i=xt(s);if(o){const a=Xd(i);return t.concat(i,i.visualViewport||[],ua(s)?s:[],a&&r?zi(a):[])}return t.concat(s,zi(s,[],r))}function Xd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Uw(e){const t=er(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const s=mr(e),o=s?e.offsetWidth:r,i=s?e.offsetHeight:n,a=Wl(r)!==o||Wl(n)!==i;return a&&(r=o,n=i),{width:r,height:n,$:a}}function Gf(e){return Zt(e)?e:e.contextElement}function io(e){const t=Gf(e);if(!mr(t))return fr(1);const r=t.getBoundingClientRect(),{width:n,height:s,$:o}=Uw(t);let i=(o?Wl(r.width):r.width)/n,a=(o?Wl(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const BT=fr(0);function zw(e){const t=xt(e);return!Kf()||!t.visualViewport?BT:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WT(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==xt(e)?!1:t}function fs(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect(),o=Gf(e);let i=fr(1);t&&(n?Zt(n)&&(i=io(n)):i=io(e));const a=WT(o,r,n)?zw(o):fr(0);let l=(s.left+a.x)/i.x,u=(s.top+a.y)/i.y,c=s.width/i.x,d=s.height/i.y;if(o){const f=xt(o),h=n&&Zt(n)?xt(n):n;let b=f,m=Xd(b);for(;m&&n&&h!==b;){const w=io(m),v=m.getBoundingClientRect(),g=er(m),y=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*w.x,_=v.top+(m.clientTop+parseFloat(g.paddingTop))*w.y;l*=w.x,u*=w.y,c*=w.x,d*=w.y,l+=y,u+=_,b=xt(m),m=Xd(b)}}return Hl({width:c,height:d,x:l,y:u})}function Qf(e,t){const r=Tu(e).scrollLeft;return t?t.left+r:fs(gr(e)).left+r}function Bw(e,t,r){r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-(r?0:Qf(e,n)),o=n.top+t.scrollTop;return{x:s,y:o}}function VT(e){let{elements:t,rect:r,offsetParent:n,strategy:s}=e;const o=s==="fixed",i=gr(n),a=t?Cu(t.floating):!1;if(n===i||a&&o)return r;let l={scrollLeft:0,scrollTop:0},u=fr(1);const c=fr(0),d=mr(n);if((d||!d&&!o)&&(($o(n)!=="body"||ua(i))&&(l=Tu(n)),mr(n))){const h=fs(n);u=io(n),c.x=h.x+n.clientLeft,c.y=h.y+n.clientTop}const f=i&&!d&&!o?Bw(i,l,!0):fr(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function HT(e){return Array.from(e.getClientRects())}function qT(e){const t=gr(e),r=Tu(e),n=e.ownerDocument.body,s=gt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=gt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Qf(e);const a=-r.scrollTop;return er(n).direction==="rtl"&&(i+=gt(t.clientWidth,n.clientWidth)-s),{width:s,height:o,x:i,y:a}}function KT(e,t){const r=xt(e),n=gr(e),s=r.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(s){o=s.width,i=s.height;const u=Kf();(!u||u&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:i,x:a,y:l}}const GT=new Set(["absolute","fixed"]);function QT(e,t){const r=fs(e,!0,t==="fixed"),n=r.top+e.clientTop,s=r.left+e.clientLeft,o=mr(e)?io(e):fr(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,l=s*o.x,u=n*o.y;return{width:i,height:a,x:l,y:u}}function cg(e,t,r){let n;if(t==="viewport")n=KT(e,r);else if(t==="document")n=qT(gr(e));else if(Zt(t))n=QT(t,r);else{const s=zw(e);n={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Hl(n)}function Ww(e,t){const r=Tn(e);return r===t||!Zt(r)||Ro(r)?!1:er(r).position==="fixed"||Ww(r,t)}function YT(e,t){const r=t.get(e);if(r)return r;let n=zi(e,[],!1).filter(a=>Zt(a)&&$o(a)!=="body"),s=null;const o=er(e).position==="fixed";let i=o?Tn(e):e;for(;Zt(i)&&!Ro(i);){const a=er(i),l=qf(i);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&GT.has(s.position)||ua(i)&&!l&&Ww(e,i))?n=n.filter(c=>c!==i):s=a,i=Tn(i)}return t.set(e,n),n}function JT(e){let{element:t,boundary:r,rootBoundary:n,strategy:s}=e;const i=[...r==="clippingAncestors"?Cu(t)?[]:YT(t,this._c):[].concat(r),n],a=i[0],l=i.reduce((u,c)=>{const d=cg(t,c,s);
vendor: 9,966 bytes, line 127
127return u.top=gt(d.top,u.top),u.right=Cn(d.right,u.right),u.bottom=Cn(d.bottom,u.bottom),u.left=gt(d.left,u.left),u},cg(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XT(e){const{width:t,height:r}=Uw(e);return{width:t,height:r}}function ZT(e,t,r){const n=mr(t),s=gr(t),o=r==="fixed",i=fs(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=fr(0);function u(){l.x=Qf(s)}if(n||!n&&!o)if(($o(t)!=="body"||ua(s))&&(a=Tu(t)),n){const h=fs(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else s&&u();o&&!n&&s&&u();const c=s&&!n&&!o?Bw(s,a):fr(0),d=i.left+a.scrollLeft-l.x-c.x,f=i.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:i.width,height:i.height}}function Ec(e){return er(e).position==="static"}function dg(e,t){if(!mr(e)||er(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return gr(e)===r&&(r=r.ownerDocument.body),r}function Vw(e,t){const r=xt(e);if(Cu(e))return r;if(!mr(e)){let s=Tn(e);for(;s&&!Ro(s);){if(Zt(s)&&!Ec(s))return s;s=Tn(s)}return r}let n=dg(e,t);for(;n&&DT(n)&&Ec(n);)n=dg(n,t);return n&&Ro(n)&&Ec(n)&&!qf(n)?r:n||UT(e)||r}const eP=async function(e){const t=this.getOffsetParent||Vw,r=this.getDimensions,n=await r(e.floating);return{reference:ZT(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function tP(e){return er(e).direction==="rtl"}const rP={convertOffsetParentRelativeRectToViewportRelativeRect:VT,getDocumentElement:gr,getClippingRect:JT,getOffsetParent:Vw,getElementRects:eP,getClientRects:HT,getDimensions:XT,getScale:io,isElement:Zt,isRTL:tP};function Hw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nP(e,t){let r=null,n;const s=gr(e);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 u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(a||t(),!f||!h)return;const b=Ma(d),m=Ma(s.clientWidth-(c+f)),w=Ma(s.clientHeight-(d+h)),v=Ma(c),y={rootMargin:-b+"px "+-m+"px "+-w+"px "+-v+"px",threshold:gt(0,Cn(1,l))||1};let _=!0;function S(k){const C=k[0].intersectionRatio;if(C!==l){if(!_)return i();C?i(!1,C):n=setTimeout(()=>{i(!1,1e-7)},1e3)}C===1&&!Hw(u,e.getBoundingClientRect())&&i(),_=!1}try{r=new IntersectionObserver(S,{...y,root:s.ownerDocument})}catch{r=new IntersectionObserver(S,y)}r.observe(e)}return i(!0),o}function sP(e,t,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,u=Gf(e),c=s||o?[...u?zi(u):[],...zi(t)]:[];c.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),o&&v.addEventListener("resize",r)});const d=u&&a?nP(u,r):null;let f=-1,h=null;i&&(h=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),r()}),u&&!l&&h.observe(u),h.observe(t));let b,m=l?fs(e):null;l&&w();function w(){const v=fs(e);m&&!Hw(m,v)&&r(),m=v,b=requestAnimationFrame(w)}return r(),()=>{var v;c.forEach(g=>{s&&g.removeEventListener("scroll",r),o&&g.removeEventListener("resize",r)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(b)}}const oP=RT,iP=OT,aP=CT,lP=jT,uP=TT,hg=kT,cP=AT,dP=(e,t,r)=>{const n=new Map,s={platform:rP,...r},o={...s.platform,_c:n};return ET(e,t,{...s,platform:o})};var hP=typeof document<"u",fP=function(){},pl=hP?p.useLayoutEffect:fP;function ql(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!ql(e[n],t[n]))return!1;return!0}if(s=Object.keys(e),r=s.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,s[n]))return!1;for(n=r;n--!==0;){const o=s[n];if(!(o==="_owner"&&e.$$typeof)&&!ql(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function qw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fg(e,t){const r=qw(e);return Math.round(t*r)/r}function kc(e){const t=p.useRef(e);return pl(()=>{t.current=e}),t}function pP(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=p.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(n);ql(f,n)||h(n);const[b,m]=p.useState(null),[w,v]=p.useState(null),g=p.useCallback(A=>{A!==k.current&&(k.current=A,m(A))},[]),y=p.useCallback(A=>{A!==C.current&&(C.current=A,v(A))},[]),_=o||b,S=i||w,k=p.useRef(null),C=p.useRef(null),T=p.useRef(c),P=l!=null,R=kc(l),j=kc(s),O=kc(u),M=p.useCallback(()=>{if(!k.current||!C.current)return;const A={placement:t,strategy:r,middleware:f};j.current&&(A.platform=j.current),dP(k.current,C.current,A).then(N=>{const $={...N,isPositioned:O.current!==!1};I.current&&!ql(T.current,$)&&(T.current=$,ia.flushSync(()=>{d($)}))})},[f,t,r,j,O]);pl(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(A=>({...A,isPositioned:!1})))},[u]);const I=p.useRef(!1);pl(()=>(I.current=!0,()=>{I.current=!1}),[]),pl(()=>{if(_&&(k.current=_),S&&(C.current=S),_&&S){if(R.current)return R.current(_,S,M);M()}},[_,S,M,R,P]);const H=p.useMemo(()=>({reference:k,floating:C,setReference:g,setFloating:y}),[g,y]),z=p.useMemo(()=>({reference:_,floating:S}),[_,S]),G=p.useMemo(()=>{const A={position:r,left:0,top:0};if(!z.floating)return A;const N=fg(z.floating,c.x),$=fg(z.floating,c.y);return a?{...A,transform:"translate("+N+"px, "+$+"px)",...qw(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:N,top:$}},[r,a,z.floating,c.x,c.y]);return p.useMemo(()=>({...c,update:M,refs:H,elements:z,floatingStyles:G}),[c,M,H,z,G])}const mP=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:s}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?hg({element:n.current,padding:s}).fn(r):{}:n?hg({element:n,padding:s}).fn(r):{}}}},gP=(e,t)=>({...oP(e),options:[e,t]}),vP=(e,t)=>({...iP(e),options:[e,t]}),yP=(e,t)=>({...cP(e),options:[e,t]}),wP=(e,t)=>({...aP(e),options:[e,t]}),bP=(e,t)=>({...lP(e),options:[e,t]}),xP=(e,t)=>({...uP(e),options:[e,t]}),_P=(e,t)=>({...mP(e),options:[e,t]});var SP="Arrow",Kw=p.forwardRef((e,t)=>{const{children:r,width:n=10,height:s=5,...o}=e;return x.jsx(oe.svg,{...o,ref:t,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});Kw.displayName=SP;var EP=Kw;function kP(e){const[t,r]=p.useState(void 0);return pr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const o=s[0];let i,a;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;r({width:i,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Yf="Popper",[Gw,Qw]=An(Yf),[CP,Yw]=Gw(Yf),Jw=e=>{const{__scopePopper:t,children:r}=e,[n,s]=p.useState(null);return x.jsx(CP,{scope:t,anchor:n,onAnchorChange:s,children:r})};Jw.displayName=Yf;var Xw="PopperAnchor",Zw=p.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...s}=e,o=Yw(Xw,r),i=p.useRef(null),a=Ce(t,i);return p.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||i.current)}),n?null:x.jsx(oe.div,{...s,ref:a})});Zw.displayName=Xw;var Jf="PopperContent",[TP,PP]=Gw(Jf),eb=p.forwardRef((e,t)=>{var ie,xs,Lr,Dn,Mr,_s;const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:o="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:b,...m}=e,w=Yw(Jf,r),[v,g]=p.useState(null),y=Ce(t,$r=>g($r)),[_,S]=p.useState(null),k=kP(_),C=(k==null?void 0:k.width)??0,T=(k==null?void 0:k.height)??0,P=n+(o!=="center"?"-"+o:""),R=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},j=Array.isArray(u)?u:[u],O=j.length>0,M={padding:R,boundary:j.filter(OP),altBoundary:O},{refs:I,floatingStyles:H,placement:z,isPositioned:G,middlewareData:A}=pP({strategy:"fixed",placement:P,whileElementsMounted:(...$r)=>sP(...$r,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[gP({mainAxis:s+T,alignmentAxis:i}),l&&vP({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?yP():void 0,...M}),l&&wP({...M}),bP({...M,apply:({elements:$r,rects:fa,availableWidth:Bu,availableHeight:pa})=>{const{width:Wu,height:Vo}=fa.reference,Ss=$r.floating.style;Ss.setProperty("--radix-popper-available-width",`${Bu}px`),Ss.setProperty("--radix-popper-available-height",`${pa}px`),Ss.setProperty("--radix-popper-anchor-width",`${Wu}px`),Ss.setProperty("--radix-popper-anchor-height",`${Vo}px`)}}),_&&_P({element:_,padding:a}),AP({arrowWidth:C,arrowHeight:T}),f&&xP({strategy:"referenceHidden",...M})]}),[N,$]=nb(z),Q=Me(b);pr(()=>{G&&(Q==null||Q())},[G,Q]);const V=(ie=A.arrow)==null?void 0:ie.x,ee=(xs=A.arrow)==null?void 0:xs.y,re=((Lr=A.arrow)==null?void 0:Lr.centerOffset)!==0,[Pe,We]=p.useState();return pr(()=>{v&&We(window.getComputedStyle(v).zIndex)},[v]),x.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:G?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[(Dn=A.transformOrigin)==null?void 0:Dn.x,(Mr=A.transformOrigin)==null?void 0:Mr.y].join(" "),...((_s=A.hide)==null?void 0:_s.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(TP,{scope:r,placedSide:N,onArrowChange:S,arrowX:V,arrowY:ee,shouldHideArrow:re,children:x.jsx(oe.div,{"data-side":N,"data-align":$,...m,ref:y,style:{...m.style,animation:G?void 0:"none"}})})})});
vendor: 4,374 bytes, line 127
127eb.displayName=Jf;var tb="PopperArrow",RP={top:"bottom",right:"left",bottom:"top",left:"right"},rb=p.forwardRef(function(t,r){const{__scopePopper:n,...s}=t,o=PP(tb,n),i=RP[o.placedSide];return x.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:x.jsx(EP,{...s,ref:r,style:{...s.style,display:"block"}})})});rb.displayName=tb;function OP(e){return e!==null}var AP=e=>({name:"transformOrigin",options:e,fn(t){var w,v,g;const{placement:r,rects:n,middlewareData:s}=t,i=((w=s.arrow)==null?void 0:w.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=nb(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(((v=s.arrow)==null?void 0:v.x)??0)+a/2,h=(((g=s.arrow)==null?void 0:g.y)??0)+l/2;let b="",m="";return u==="bottom"?(b=i?d:`${f}px`,m=`${-l}px`):u==="top"?(b=i?d:`${f}px`,m=`${n.floating.height+l}px`):u==="right"?(b=`${-l}px`,m=i?d:`${h}px`):u==="left"&&(b=`${n.floating.width+l}px`,m=i?d:`${h}px`),{data:{x:b,y:m}}}});function nb(e){const[t,r="center"]=e.split("-");return[t,r]}var jP=Jw,NP=Zw,IP=eb,DP=rb,[Pu,UD]=An("Tooltip",[Qw]),Ru=Qw(),sb="TooltipProvider",LP=700,Zd="tooltip.open",[MP,Xf]=Pu(sb),ob=e=>{const{__scopeTooltip:t,delayDuration:r=LP,skipDelayDuration:n=300,disableHoverableContent:s=!1,children:o}=e,i=p.useRef(!0),a=p.useRef(!1),l=p.useRef(0);return p.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),x.jsx(MP,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:p.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:p.useCallback(u=>{a.current=u},[]),disableHoverableContent:s,children:o})};ob.displayName=sb;var Bi="Tooltip",[$P,Ou]=Pu(Bi),ib=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:s,onOpenChange:o,disableHoverableContent:i,delayDuration:a}=e,l=Xf(Bi,e.__scopeTooltip),u=Ru(t),[c,d]=p.useState(null),f=oo(),h=p.useRef(0),b=i??l.disableHoverableContent,m=a??l.delayDuration,w=p.useRef(!1),[v,g]=aa({prop:n,defaultProp:s??!1,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(Zd))):l.onClose(),o==null||o(C)},caller:Bi}),y=p.useMemo(()=>v?w.current?"delayed-open":"instant-open":"closed",[v]),_=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w.current=!1,g(!0)},[g]),S=p.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g(!1)},[g]),k=p.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{w.current=!0,g(!0),h.current=0},m)},[m,g]);return p.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),x.jsx(jP,{...u,children:x.jsx($P,{scope:t,contentId:f,open:v,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:p.useCallback(()=>{l.isOpenDelayedRef.current?k():_()},[l.isOpenDelayedRef,k,_]),onTriggerLeave:p.useCallback(()=>{b?S():(window.clearTimeout(h.current),h.current=0)},[S,b]),onOpen:_,onClose:S,disableHoverableContent:b,children:r})})};ib.displayName=Bi;var eh="TooltipTrigger",ab=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Ou(eh,r),o=Xf(eh,r),i=Ru(r),a=p.useRef(null),l=Ce(t,a,s.onTriggerChange),u=p.useRef(!1),c=p.useRef(!1),d=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),x.jsx(NP,{asChild:!0,...i,children:x.jsx(oe.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...n,ref:l,onPointerMove:Z(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(s.onTriggerEnter(),c.current=!0)}),onPointerLeave:Z(e.onPointerLeave,()=>{s.onTriggerLeave(),c.current=!1}),onPointerDown:Z(e.onPointerDown,()=>{s.open&&s.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:Z(e.onFocus,()=>{u.current||s.onOpen()}),onBlur:Z(e.onBlur,s.onClose),onClick:Z(e.onClick,s.onClose)})})});ab.displayName=eh;var FP="TooltipPortal",[zD,UP]=Pu(FP,{forceMount:void 0}),Oo="TooltipContent",lb=p.forwardRef((e,t)=>
vendor: 4,656 bytes, line 127
127{const r=UP(Oo,e.__scopeTooltip),{forceMount:n=r.forceMount,side:s="top",...o}=e,i=Ou(Oo,e.__scopeTooltip);return x.jsx(tr,{present:n||i.open,children:i.disableHoverableContent?x.jsx(ub,{side:s,...o,ref:t}):x.jsx(zP,{side:s,...o,ref:t})})}),zP=p.forwardRef((e,t)=>{const r=Ou(Oo,e.__scopeTooltip),n=Xf(Oo,e.__scopeTooltip),s=p.useRef(null),o=Ce(t,s),[i,a]=p.useState(null),{trigger:l,onClose:u}=r,c=s.current,{onPointerInTransitChange:d}=n,f=p.useCallback(()=>{a(null),d(!1)},[d]),h=p.useCallback((b,m)=>{const w=b.currentTarget,v={x:b.clientX,y:b.clientY},g=qP(v,w.getBoundingClientRect()),y=KP(v,g),_=GP(m.getBoundingClientRect()),S=YP([...y,..._]);a(S),d(!0)},[d]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(l&&c){const b=w=>h(w,c),m=w=>h(w,l);return l.addEventListener("pointerleave",b),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",b),c.removeEventListener("pointerleave",m)}}},[l,c,h,f]),p.useEffect(()=>{if(i){const b=m=>{const w=m.target,v={x:m.clientX,y:m.clientY},g=(l==null?void 0:l.contains(w))||(c==null?void 0:c.contains(w)),y=!QP(v,i);g?f():y&&(f(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,c,i,u,f]),x.jsx(ub,{...e,ref:o})}),[BP,WP]=Pu(Bi,{isInside:!1}),VP=ek("TooltipContent"),ub=p.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:i,...a}=e,l=Ou(Oo,r),u=Ru(r),{onClose:c}=l;return p.useEffect(()=>(document.addEventListener(Zd,c),()=>document.removeEventListener(Zd,c)),[c]),p.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),x.jsx(xu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:x.jsxs(IP,{"data-state":l.stateAttribute,...u,...a,ref:t,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:[x.jsx(VP,{children:n}),x.jsx(BP,{scope:r,isInside:!0,children:x.jsx(Sk,{id:l.contentId,role:"tooltip",children:s||n})})]})})});lb.displayName=Oo;var cb="TooltipArrow",HP=p.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,s=Ru(r);return WP(cb,r).isInside?null:x.jsx(DP,{...s,...n,ref:t})});HP.displayName=cb;function qP(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,s,o)){case o:return"left";case s:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function KP(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function GP(e){const{top:t,right:r,bottom:n,left:s}=e;return[{x:s,y:t},{x:r,y:t},{x:r,y:n},{x:s,y:n}]}function QP(e,t){const{x:r,y:n}=e;let s=!1;for(let o=0,i=t.length-1;o<t.length;i=o++){const a=t[o],l=t[i],u=a.x,c=a.y,d=l.x,f=l.y;c>n!=f>n&&r<(d-u)*(n-c)/(f-c)+u&&(s=!s)}return s}function YP(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),JP(t)}function JP(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const s=e[n];for(;t.length>=2;){const o=t[t.length-1],i=t[t.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))t.pop();else break}t.push(s)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const s=e[n];for(;r.length>=2;){const o=r[r.length-1],i=r[r.length-2];if((o.x-i.x)*(s.y-i.y)>=(o.y-i.y)*(s.x-i.x))r.pop();else break}r.push(s)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var XP=ob,ZP=ib,eR=ab,db=lb;const tR=XP,BD=ZP,WD=eR,rR=p.forwardRef(({className:e,sideOffset:t=4,...r},n)=>x.jsx(db,{ref:n,sideOffset:t,className:de("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]:sli
127de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));rR.displayName=db.displayName;var Fo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ps=typeof window>"u"||"Deno"in globalThis;function et(){}function nR(e,t){return typeof e=="function"?e(t):e}function th(e){return typeof e=="number"&&e>=0&&e!==1/0}function hb(e,t){return Math.max(e+(t||0)-Date.now(),0)}function _n(e,t){return typeof e=="function"?e(t):e}function Pt(e,t){return typeof e=="function"?e(t):e}function pg(e,t){const{type:r="all",exact:n,fetchStatus:s,predicate:o,queryKey:i,stale:a}=e;if(i){if(n){if(t.queryHash!==Zf(i,t.options))return!1}else if(!Wi(t.queryKey,i))return!1}if(r!=="all"){const l=t.isActive();if(r==="active"&&!l||r==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||s&&s!==t.state.fetchStatus||o&&!o(t))}function mg(e,t){const{exact:r,status:n,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(ms(t.options.mutationKey)!==ms(o))return!1}else if(!Wi(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||s&&!s(t))}function Zf(e,t){return((t==null?void 0:t.queryKeyHashFn)||ms)(e)}function ms(e){return JSON.stringify(e,(t,r)=>rh(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}function Wi(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Wi(e[r],t[r])):!1}function fb(e,t){if(e===t)return e;const r=gg(e)&&gg(t);if(r||rh(e)&&rh(t)){const n=r?e:Object.keys(e),s=n.length,o=r?t:Object.keys(t),i=o.length,a=r?[]:{},l=new Set(n);let u=0;for(let c=0;c<i;c++){const d=r?c:o[c];(!r&&l.has(d)||r)&&e[d]===void 0&&t[d]===void 0?(a[d]=void 0,u++):(a[d]=fb(e[d],t[d]),a[d]===e[d]&&e[d]!==void 0&&u++)}return s===i&&u===s?e:a}return t}function Kl(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function gg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rh(e){if(!vg(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!vg(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function vg(e){return Object.prototype.toString.call(e)==="[object Object]"}function sR(e){return new Promise(t=>{setTimeout(t,e)})}function nh(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?fb(e,t):t}function oR(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function iR(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var ep=Symbol();function pb(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ep?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function mb(e,t){return typeof e=="function"?e(...t):!!e}var Jn,en,uo,Ev,aR=(Ev=class extends Fo{constructor(){super();q(this,Jn);q(this,en);q(this,uo);F(this,uo,t=>{if(!ps&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){E(this,en)||this.setEventListener(E(this,uo))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,en))==null||t.call(this),F(this,en,void 0))}setEventListener(t){var r;F(this,uo,t),(r=E(this,en))==null||r.call(this),F(this,en,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){E(this,Jn)!==t&&(F(this,Jn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof E(this,Jn)=="boolean"?E(this,Jn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Jn=new WeakMap,en=new WeakMap,uo=new WeakMap,Ev),tp=new aR,co,tn,ho,kv,lR=(kv=class extends Fo{constructor(){super();q(this,co,!0);q(this,tn);q(this,ho);F(this,ho,t=>{if(!ps&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n
vendor: 4,331 bytes, line 127
127)}}})}onSubscribe(){E(this,tn)||this.setEventListener(E(this,ho))}onUnsubscribe(){var t;this.hasListeners()||((t=E(this,tn))==null||t.call(this),F(this,tn,void 0))}setEventListener(t){var r;F(this,ho,t),(r=E(this,tn))==null||r.call(this),F(this,tn,t(this.setOnline.bind(this)))}setOnline(t){E(this,co)!==t&&(F(this,co,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return E(this,co)}},co=new WeakMap,tn=new WeakMap,ho=new WeakMap,kv),Gl=new lR;function sh(){let e,t;const r=new Promise((s,o)=>{e=s,t=o});r.status="pending",r.catch(()=>{});function n(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{n({status:"fulfilled",value:s}),e(s)},r.reject=s=>{n({status:"rejected",reason:s}),t(s)},r}function uR(e){return Math.min(1e3*2**e,3e4)}function gb(e){return(e??"online")==="online"?Gl.isOnline():!0}var vb=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Cc(e){return e instanceof vb}function yb(e){let t=!1,r=0,n=!1,s;const o=sh(),i=m=>{var w;n||(f(new vb(m)),(w=e.abort)==null||w.call(e))},a=()=>{t=!0},l=()=>{t=!1},u=()=>tp.isFocused()&&(e.networkMode==="always"||Gl.isOnline())&&e.canRun(),c=()=>gb(e.networkMode)&&e.canRun(),d=m=>{var w;n||(n=!0,(w=e.onSuccess)==null||w.call(e,m),s==null||s(),o.resolve(m))},f=m=>{var w;n||(n=!0,(w=e.onError)==null||w.call(e,m),s==null||s(),o.reject(m))},h=()=>new Promise(m=>{var w;s=v=>{(n||u())&&m(v)},(w=e.onPause)==null||w.call(e)}).then(()=>{var m;s=void 0,n||(m=e.onContinue)==null||m.call(e)}),b=()=>{if(n)return;let m;const w=r===0?e.initialPromise:void 0;try{m=w??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(d).catch(v=>{var k;if(n)return;const g=e.retry??(ps?0:3),y=e.retryDelay??uR,_=typeof y=="function"?y(r,v):y,S=g===!0||typeof g=="number"&&r<g||typeof g=="function"&&g(r,v);if(t||!S){f(v);return}r++,(k=e.onFail)==null||k.call(e,r,v),sR(_).then(()=>u()?void 0:h()).then(()=>{t?f(v):b()})})};return{promise:o,cancel:i,continue:()=>(s==null||s(),o),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?b():h().then(b),o)}}var cR=e=>setTimeout(e,0);function dR(){let e=[],t=0,r=a=>{a()},n=a=>{a()},s=cR;const o=a=>{t?e.push(a):s(()=>{r(a)})},i=()=>{const a=e;e=[],a.length&&s(()=>{n(()=>{a.forEach(l=>{r(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||i()}return l},batchCalls:a=>(...l)=>{o(()=>{a(...l)})},schedule:o,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{n=a},setScheduler:a=>{s=a}}}var Ie=dR(),Xn,Cv,wb=(Cv=class{constructor(){q(this,Xn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),th(this.gcTime)&&F(this,Xn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ps?1/0:5*60*1e3))}clearGcTimeout(){E(this,Xn)&&(clearTimeout(E(this,Xn)),F(this,Xn,void 0))}},Xn=new WeakMap,Cv),fo,Zn,Tt,es,qe,Ji,ts,Ht,wr,Tv,hR=(Tv=class extends wb{constructor(t){super();q(this,Ht);q(this,fo);q(this,Zn);q(this,Tt);q(this,es);q(this,qe);q(this,Ji);q(this,ts);F(this,ts,!1),F(this,Ji,t.defaultOptions),this.setOptions(t.options),this.observers=[],F(this,es,t.client),F(this,Tt,E(this,es).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,F(this,fo,fR(this.options)),this.state=t.state??E(this,fo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=E(this,qe))==null?void 0:t.promise}setOptions(t){this.options={...E(this,Ji),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&E(this,Tt).remove(this)}setData(t,r){const n=nh(this.state.data,t,this.options);return X(this,Ht,wr).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){X(this,Ht,wr).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,s;const r=(n=E(this,qe))==null?void 0:n.promise;return(s=E(this,qe))==null||s.cancel(t),r?r.then(et).catch(et):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(E(this,fo))}isActive(){return this.observers.some(t=>Pt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ep||this.state.dataUpdateCount+this.state.errorUpdate
127Count===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>_n(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!hb(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,qe))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=E(this,qe))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),E(this,Tt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(E(this,qe)&&(E(this,ts)?E(this,qe).cancel({revert:!0}):E(this,qe).cancelRetry()),this.scheduleGc()),E(this,Tt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||X(this,Ht,wr).call(this,{type:"invalidate"})}fetch(t,r){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(E(this,qe))return E(this,qe).continueRetry(),E(this,qe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const n=new AbortController,s=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(F(this,ts,!0),n.signal)})},o=()=>{const f=pb(this.options,r),b=(()=>{const m={client:E(this,es),queryKey:this.queryKey,meta:this.meta};return s(m),m})();return F(this,ts,!1),this.options.persister?this.options.persister(f,b,this):f(b)},a=(()=>{const f={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:E(this,es),state:this.state,fetchFn:o};return s(f),f})();(u=this.options.behavior)==null||u.onFetch(a,this),F(this,Zn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&X(this,Ht,wr).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,b,m,w;Cc(f)&&f.silent||X(this,Ht,wr).call(this,{type:"error",error:f}),Cc(f)||((b=(h=E(this,Tt).config).onError)==null||b.call(h,f,this),(w=(m=E(this,Tt).config).onSettled)==null||w.call(m,this.state.data,f,this)),this.scheduleGc()};return F(this,qe,yb({initialPromise:r==null?void 0:r.initialPromise,fn:a.fetchFn,abort:n.abort.bind(n),onSuccess:f=>{var h,b,m,w;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(v){l(v);return}(b=(h=E(this,Tt).config).onSuccess)==null||b.call(h,f,this),(w=(m=E(this,Tt).config).onSettled)==null||w.call(m,f,this.state.error,this),this.scheduleGc()},onError:l,onFail:(f,h)=>{X(this,Ht,wr).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{X(this,Ht,wr).call(this,{type:"pause"})},onContinue:()=>{X(this,Ht,wr).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),E(this,qe).start()}},fo=new WeakMap,Zn=new WeakMap,Tt=new WeakMap,es=new WeakMap,qe=new WeakMap,Ji=new WeakMap,ts=new WeakMap,Ht=new WeakSet,wr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...bb(n.data,this.options),fetchMeta:t.meta??null};case"success":return F(this,Zn,void 0),{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Cc(s)&&s.revert&&E(this,Zn)?{...E(this,Zn),fetchStatus:"idle"}
vendor: 5,088 bytes, line 127
127:{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),Ie.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),E(this,Tt).notify({query:this,type:"updated",action:t})})},Tv);function bb(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gb(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function fR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var ir,Pv,pR=(Pv=class extends Fo{constructor(t={}){super();q(this,ir);this.config=t,F(this,ir,new Map)}build(t,r,n){const s=r.queryKey,o=r.queryHash??Zf(s,r);let i=this.get(o);return i||(i=new hR({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(s)}),this.add(i)),i}add(t){E(this,ir).has(t.queryHash)||(E(this,ir).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=E(this,ir).get(t.queryHash);r&&(t.destroy(),r===t&&E(this,ir).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ie.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return E(this,ir).get(t)}getAll(){return[...E(this,ir).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>pg(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>pg(t,n)):r}notify(t){Ie.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ie.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ie.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ir=new WeakMap,Pv),ar,Ye,rs,lr,Kr,Rv,mR=(Rv=class extends wb{constructor(t){super();q(this,lr);q(this,ar);q(this,Ye);q(this,rs);this.mutationId=t.mutationId,F(this,Ye,t.mutationCache),F(this,ar,[]),this.state=t.state||xb(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){E(this,ar).includes(t)||(E(this,ar).push(t),this.clearGcTimeout(),E(this,Ye).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){F(this,ar,E(this,ar).filter(r=>r!==t)),this.scheduleGc(),E(this,Ye).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){E(this,ar).length||(this.state.status==="pending"?this.scheduleGc():E(this,Ye).remove(this))}continue(){var t;return((t=E(this,rs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,l,u,c,d,f,h,b,m,w,v,g,y,_,S,k,C,T;const r=()=>{X(this,lr,Kr).call(this,{type:"continue"})};F(this,rs,yb({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(P,R)=>{X(this,lr,Kr).call(this,{type:"failed",failureCount:P,error:R})},onPause:()=>{X(this,lr,Kr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>E(this,Ye).canRun(this)}));const n=this.state.status==="pending",s=!E(this,rs).canStart();try{if(n)r();else{X(this,lr,Kr).call(this,{type:"pending",variables:t,isPaused:s}),await((i=(o=E(this,Ye).config).onMutate)==null?void 0:i.call(o,t,this));const R=await((l=(a=this.options).onMutate)==null?void 0:l.call(a,t));R!==this.state.context&&X(this,lr,Kr).call(this,{type:"pending",context:R,variables:t,isPaused:s})}const P=await E(this,rs).start();return await((c=(u=E(this,Ye).config).onSuccess)==null?void 0:c.call(u,P,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,P,t,this.state.context)),await((b=(h=E(this,Ye).config).onSettled)==null?void 0:b.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,t,this.state.context)),X(this,lr,Kr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((g=(v=E(this,Ye).config).onError)==null?void 0:g.call(v,P,t,this.state.context,this)),await((_=(y=this.options).onError)==null?void 0:_.call(y,P,t,this.state.context)),await((k=(S=E(this,Ye).config).onSettled)==null?void 0:k.call(S,void 0,P,this.state.variables,this.state.context,this)),await((T=(C=this.options).onSettled)==null?void 0:T.call(C,void 0,P,t,this.state.context)),P}finally{X(this,lr,Kr).call(this,{type:"error",error:P})}}finally{E(this,Ye).runNext(this)}}},ar=new WeakMap,Ye=new WeakMap,rs=new WeakMap,lr=new WeakSet,Kr=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};
127case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Ie.batch(()=>{E(this,ar).forEach(n=>{n.onMutationUpdate(t)}),E(this,Ye).notify({mutation:this,type:"updated",action:t})})},Rv);function xb(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Sr,qt,Xi,Ov,gR=(Ov=class extends Fo{constructor(t={}){super();q(this,Sr);q(this,qt);q(this,Xi);this.config=t,F(this,Sr,new Set),F(this,qt,new Map),F(this,Xi,0)}build(t,r,n){const s=new mR({mutationCache:this,mutationId:++ga(this,Xi)._,options:t.defaultMutationOptions(r),state:n});return this.add(s),s}add(t){E(this,Sr).add(t);const r=$a(t);if(typeof r=="string"){const n=E(this,qt).get(r);n?n.push(t):E(this,qt).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(E(this,Sr).delete(t)){const r=$a(t);if(typeof r=="string"){const n=E(this,qt).get(r);if(n)if(n.length>1){const s=n.indexOf(t);s!==-1&&n.splice(s,1)}else n[0]===t&&E(this,qt).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=$a(t);if(typeof r=="string"){const n=E(this,qt).get(r),s=n==null?void 0:n.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var n;const r=$a(t);if(typeof r=="string"){const s=(n=E(this,qt).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ie.batch(()=>{E(this,Sr).forEach(t=>{this.notify({type:"removed",mutation:t})}),E(this,Sr).clear(),E(this,qt).clear()})}getAll(){return Array.from(E(this,Sr))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>mg(r,n))}findAll(t={}){return this.getAll().filter(r=>mg(t,r))}notify(t){Ie.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>
127r.state.isPaused);return Ie.batch(()=>Promise.all(t.map(r=>r.continue().catch(et))))}},Sr=new WeakMap,qt=new WeakMap,Xi=new WeakMap,Ov);function $a(e){var t;return(t=e.options.scope)==null?void 0:t.id}function yg(e){return{onFetch:(t,r)=>{var c,d,f,h,b;const n=t.options,s=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],i=((b=t.state.data)==null?void 0:b.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const w=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=pb(t.options,t.fetchOptions),g=async(y,_,S)=>{if(m)return Promise.reject();if(_==null&&y.pages.length)return Promise.resolve(y);const C=(()=>{const j={client:t.client,queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};return w(j),j})(),T=await v(C),{maxPages:P}=t.options,R=S?iR:oR;return{pages:R(y.pages,T,P),pageParams:R(y.pageParams,_,P)}};if(s&&o.length){const y=s==="backward",_=y?vR:wg,S={pages:o,pageParams:i},k=_(n,S);a=await g(S,k,y)}else{const y=e??o.length;do{const _=l===0?i[0]??n.initialPageParam:wg(n,a);if(l>0&&_==null)break;a=await g(a,_),l++}while(l<y)}return a};t.options.persister?t.fetchFn=()=>{var m,w;return(w=(m=t.options).persister)==null?void 0:w.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=u}}}function wg(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function vR(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}var Ee,rn,nn,po,mo,sn,go,vo,Av,yR=(Av=class{constructor(e={}){q(this,Ee);q(this,rn);q(this,nn);q(this,po);q(this,mo);q(this,sn);q(this,go);q(this,vo);F(this,Ee,e.queryCache||new pR),F(this,rn,e.mutationCache||new gR),F(this,nn,e.defaultOptions||{}),F(this,po,new Map),F(this,mo,new Map),F(this,sn,0)}mount(){ga(this,sn)._++,E(this,sn)===1&&(F(this,go,tp.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ee).onFocus())})),F(this,vo,Gl.subscribe(async e=>{e&&(await this.resumePausedMutations(),E(this,Ee).onOnline())})))}unmount(){var e,t;ga(this,sn)._--,E(this,sn)===0&&((e=E(this,go))==null||e.call(this),F(this,go,void 0),(t=E(this,vo))==null||t.call(this),F(this,vo,void 0))}isFetching(e){return E(this,Ee).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return E(this,rn).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Ee).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=E(this,Ee).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(_n(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return E(this,Ee).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),s=E(this,Ee).get(n.queryHash),o=s==null?void 0:s.state.data,i=nR(t,o);if(i!==void 0)return E(this,Ee).build(this,n).setData(i,{...r,manual:!0})}setQueriesData(e,t,r){return Ie.batch(()=>E(this,Ee).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=E(this,Ee).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=E(this,Ee);Ie.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=E(this,Ee);return Ie.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ie.batch(()=>E(this,Ee).findAll(e).map(s=>s.cancel(r)));return Promise.all(n).then(et).catch(et)}invalidateQueries(e,t={}){return Ie.batch(()=>(E(this,Ee).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=Ie.batch(()=>E(this,Ee).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,r);return r.throwOnError||(o=o.catch(et)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(et)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=E(this,Ee).build(this,t);return r.isStaleByTime(_n(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(et).catch(et)}
vendor: 4,526 bytes, line 127
127fetchInfiniteQuery(e){return e.behavior=yg(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(et).catch(et)}ensureInfiniteQueryData(e){return e.behavior=yg(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Gl.isOnline()?E(this,rn).resumePausedMutations():Promise.resolve()}getQueryCache(){return E(this,Ee)}getMutationCache(){return E(this,rn)}getDefaultOptions(){return E(this,nn)}setDefaultOptions(e){F(this,nn,e)}setQueryDefaults(e,t){E(this,po).set(ms(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...E(this,po).values()],r={};return t.forEach(n=>{Wi(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){E(this,mo).set(ms(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...E(this,mo).values()],r={};return t.forEach(n=>{Wi(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...E(this,nn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Zf(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ep&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...E(this,nn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){E(this,Ee).clear(),E(this,rn).clear()}},Ee=new WeakMap,rn=new WeakMap,nn=new WeakMap,po=new WeakMap,mo=new WeakMap,sn=new WeakMap,go=new WeakMap,vo=new WeakMap,Av),ot,ne,Zi,Je,ns,yo,on,an,ea,wo,bo,ss,os,ln,xo,ae,li,oh,ih,ah,lh,uh,ch,dh,_b,jv,wR=(jv=class extends Fo{constructor(t,r){super();q(this,ae);q(this,ot);q(this,ne);q(this,Zi);q(this,Je);q(this,ns);q(this,yo);q(this,on);q(this,an);q(this,ea);q(this,wo);q(this,bo);q(this,ss);q(this,os);q(this,ln);q(this,xo,new Set);this.options=r,F(this,ot,t),F(this,an,null),F(this,on,sh()),this.options.experimental_prefetchInRender||E(this,on).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(E(this,ne).addObserver(this),bg(E(this,ne),this.options)?X(this,ae,li).call(this):this.updateResult(),X(this,ae,lh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hh(E(this,ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hh(E(this,ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,X(this,ae,uh).call(this),X(this,ae,ch).call(this),E(this,ne).removeObserver(this)}setOptions(t){const r=this.options,n=E(this,ne);if(this.options=E(this,ot).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Pt(this.options.enabled,E(this,ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");X(this,ae,dh).call(this),E(this,ne).setOptions(this.options),r._defaulted&&!Kl(this.options,r)&&E(this,ot).getQueryCache().notify({type:"observerOptionsUpdated",query:E(this,ne),observer:this});const s=this.hasListeners();s&&xg(E(this,ne),n,this.options,r)&&X(this,ae,li).call(this),this.updateResult(),s&&(E(this,ne)!==n||Pt(this.options.enabled,E(this,ne))!==Pt(r.enabled,E(this,ne))||_n(this.options.staleTime,E(this,ne))!==_n(r.staleTime,E(this,ne)))&&X(this,ae,oh).call(this);const o=X(this,ae,ih).call(this);s&&(E(this,ne)!==n||Pt(this.options.enabled,E(this,ne))!==Pt(r.enabled,E(this,ne))||o!==E(this,ln))&&X(this,ae,ah).call(this,o)}getOptimisticResult(t){const r=E(this,ot).getQueryCache().build(E(this,ot),t),n=this.createResult(r,t);return xR(this,n)&&(F(this,Je,n),F(this,yo,this.options),F(this,ns,E(this,ne).state)),n}getCurrentResult(){return E(this,Je)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),Reflect.get(n,s))})}trackProp(t){E(this,xo).add(t)}getCurrentQuery(){return E(this,ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=E(this,ot).defaultQueryOptions(t),n=E(this,ot).getQueryCache().build(E(this,ot),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return X(this,ae,li).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),E(this,Je)))}createResult(t,r){var P;
127const n=E(this,ne),s=this.options,o=E(this,Je),i=E(this,ns),a=E(this,yo),u=t!==n?t.state:E(this,Zi),{state:c}=t;let d={...c},f=!1,h;if(r._optimisticResults){const R=this.hasListeners(),j=!R&&bg(t,r),O=R&&xg(t,n,r,s);(j||O)&&(d={...d,...bb(c.data,t.options)}),r._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:b,errorUpdatedAt:m,status:w}=d;h=d.data;let v=!1;if(r.placeholderData!==void 0&&h===void 0&&w==="pending"){let R;o!=null&&o.isPlaceholderData&&r.placeholderData===(a==null?void 0:a.placeholderData)?(R=o.data,v=!0):R=typeof r.placeholderData=="function"?r.placeholderData((P=E(this,bo))==null?void 0:P.state.data,E(this,bo)):r.placeholderData,R!==void 0&&(w="success",h=nh(o==null?void 0:o.data,R,r),f=!0)}if(r.select&&h!==void 0&&!v)if(o&&h===(i==null?void 0:i.data)&&r.select===E(this,ea))h=E(this,wo);else try{F(this,ea,r.select),h=r.select(h),h=nh(o==null?void 0:o.data,h,r),F(this,wo,h),F(this,an,null)}catch(R){F(this,an,R)}E(this,an)&&(b=E(this,an),h=E(this,wo),m=Date.now(),w="error");const g=d.fetchStatus==="fetching",y=w==="pending",_=w==="error",S=y&&g,k=h!==void 0,T={status:w,fetchStatus:d.fetchStatus,isPending:y,isSuccess:w==="success",isError:_,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:d.dataUpdatedAt,error:b,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!y,isLoadingError:_&&!k,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&k,isStale:rp(t,r),refetch:this.refetch,promise:E(this,on),isEnabled:Pt(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=M=>{T.status==="error"?M.reject(T.error):T.data!==void 0&&M.resolve(T.data)},j=()=>{const M=F(this,on,T.promise=sh());R(M)},O=E(this,on);switch(O.status){case"pending":t.queryHash===n.queryHash&&R(O);break;case"fulfilled":(T.status==="error"||T.data!==O.value)&&j();break;case"rejected":(T.status!=="error"||T.error!==O.reason)&&j();break}}return T}updateResult(){const t=E(this,Je),r=this.createResult(E(this,ne),this.options);if(F(this,ns,E(this,ne).state),F(this,yo,this.options),E(this,ns).data!==void 0&&F(this,bo,E(this,ne)),Kl(r,t))return;F(this,Je,r);const n=()=>
vendor: 4,682 bytes, line 127
127{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!E(this,xo).size)return!0;const i=new Set(o??E(this,xo));return this.options.throwOnError&&i.add("error"),Object.keys(E(this,Je)).some(a=>{const l=a;return E(this,Je)[l]!==t[l]&&i.has(l)})};X(this,ae,_b).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&X(this,ae,lh).call(this)}},ot=new WeakMap,ne=new WeakMap,Zi=new WeakMap,Je=new WeakMap,ns=new WeakMap,yo=new WeakMap,on=new WeakMap,an=new WeakMap,ea=new WeakMap,wo=new WeakMap,bo=new WeakMap,ss=new WeakMap,os=new WeakMap,ln=new WeakMap,xo=new WeakMap,ae=new WeakSet,li=function(t){X(this,ae,dh).call(this);let r=E(this,ne).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(et)),r},oh=function(){X(this,ae,uh).call(this);const t=_n(this.options.staleTime,E(this,ne));if(ps||E(this,Je).isStale||!th(t))return;const n=hb(E(this,Je).dataUpdatedAt,t)+1;F(this,ss,setTimeout(()=>{E(this,Je).isStale||this.updateResult()},n))},ih=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(E(this,ne)):this.options.refetchInterval)??!1},ah=function(t){X(this,ae,ch).call(this),F(this,ln,t),!(ps||Pt(this.options.enabled,E(this,ne))===!1||!th(E(this,ln))||E(this,ln)===0)&&F(this,os,setInterval(()=>{(this.options.refetchIntervalInBackground||tp.isFocused())&&X(this,ae,li).call(this)},E(this,ln)))},lh=function(){X(this,ae,oh).call(this),X(this,ae,ah).call(this,X(this,ae,ih).call(this))},uh=function(){E(this,ss)&&(clearTimeout(E(this,ss)),F(this,ss,void 0))},ch=function(){E(this,os)&&(clearInterval(E(this,os)),F(this,os,void 0))},dh=function(){const t=E(this,ot).getQueryCache().build(E(this,ot),this.options);if(t===E(this,ne))return;const r=E(this,ne);F(this,ne,t),F(this,Zi,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},_b=function(t){Ie.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(E(this,Je))}),E(this,ot).getQueryCache().notify({query:E(this,ne),type:"observerResultsUpdated"})})},jv);function bR(e,t){return Pt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function bg(e,t){return bR(e,t)||e.state.data!==void 0&&hh(e,t,t.refetchOnMount)}function hh(e,t,r){if(Pt(t.enabled,e)!==!1&&_n(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&rp(e,t)}return!1}function xg(e,t,r,n){return(e!==t||Pt(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&rp(e,r)}function rp(e,t){return Pt(t.enabled,e)!==!1&&e.isStaleByTime(_n(t.staleTime,e))}function xR(e,t){return!Kl(e.getCurrentResult(),t)}var un,cn,it,Er,Pr,ml,fh,Nv,_R=(Nv=class extends Fo{constructor(r,n){super();q(this,Pr);q(this,un);q(this,cn);q(this,it);q(this,Er);F(this,un,r),this.setOptions(n),this.bindMethods(),X(this,Pr,ml).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var s;const n=this.options;this.options=E(this,un).defaultMutationOptions(r),Kl(this.options,n)||E(this,un).getMutationCache().notify({type:"observerOptionsUpdated",mutation:E(this,it),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&ms(n.mutationKey)!==ms(this.options.mutationKey)?this.reset():((s=E(this,it))==null?void 0:s.state.status)==="pending"&&E(this,it).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=E(this,it))==null||r.removeObserver(this)}onMutationUpdate(r){X(this,Pr,ml).call(this),X(this,Pr,fh).call(this,r)}getCurrentResult(){return E(this,cn)}reset(){var r;(r=E(this,it))==null||r.removeObserver(this),F(this,it,void 0),X(this,Pr,ml).call(this),X(this,Pr,fh).call(this)}mutate(r,n){var s;return F(this,Er,n),(s=E(this,it))==null||s.removeObserver(this),F(this,it,E(this,un).getMutationCache().build(E(this,un),this.options)),E(this,it).addObserver(this),E(this,it).execute(r)}},un=new WeakMap,cn=new WeakMap,it=new WeakMap,Er=new WeakMap,Pr=new WeakSet,ml=function(){var n;const r=((n=E(this,it))==null?void 0:n.state)??xb();F(this,cn,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},fh=function(r){Ie.batch(()=>{var n,s,o,i,a,l,u,c;if(E(this,Er)&&this.hasListeners()){const d=E(this,cn).variables,f=E(this,cn).context;(r==null?void 0:r.type)==="success"?((s=(n=E(this,Er)).onSuccess)==null||s.call(n,r.data,d,f),(i=(o=E(this,Er)).onSettled)==null||i.call(o,r.data,null,d,f)):(r==null?void 0:r.type)==="error"&&((l=(a=E(this,Er)).onError)==null||l.call(a,r.error,d,f),(c=(u=E(this,Er)).onSettled)==null||c.call(u,void 0,r.error,d,f))}
127this.listeners.forEach(d=>{d(E(this,cn))})})},Nv),Sb=p.createContext(void 0),Au=e=>{const t=p.useContext(Sb);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},SR=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(Sb.Provider,{value:e,children:t})),Eb=p.createContext(!1),ER=()=>p.useContext(Eb);Eb.Provider;function kR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var CR=p.createContext(kR()),TR=()=>p.useContext(CR),PR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},RR=e=>{p.useEffect(()=>{e.clearReset()},[e])},OR=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||mb(r,[e.error,n])),AR=e=>{if(e.suspense){const t=n=>n==="static"?n:Math.max(n??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...n)=>t(r(...n)):t(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},jR=(e,t)=>e.isLoading&&e.isFetching&&!t,NR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,_g=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function IR(e,t,r){var d,f,h,b,m;const n=ER(),s=TR(),o=Au(),i=o.defaultQueryOptions(e);(f=(d=o.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,i),i._optimisticResults=n?"isRestoring":"optimistic",AR(i),PR(i,s),RR(s);const a=!o.getQueryCache().get(i.queryHash),[l]=p.useState(()=>new t(o,i)),u=l.getOptimisticResult(i),c=!n&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(w=>{const v=c?l.subscribe(Ie.batchCalls(w)):et;return l.updateResult(),v},[l,c]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(i)},[i,l]),NR(i,u))throw _g(i,l,s);if(OR({result:u,errorResetBoundary:s,throwOnError:i.throwOnError,query:o.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((b=(h=o.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||b.call(h,i,u),i.experimental_prefetchInRender&&!ps&&jR(u,n)){const w=a?_g(i,l,s):(m=o.getQueryCache().get(i.queryHash))==null?void 0:m.promise;w==null||w.catch(et).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function DR(e,t){return IR(e,wR)}function kb(e,t){const r=Au(),[n]=p.useState(()=>new _R(r,e));p.useEffect(()=>{n.setOptions(e)},[n,e]);const s=p.useSyncExternalStore(p.useCallback(i=>n.subscribe(Ie.batchCalls(i)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=p.useCallback((i,a)=>{n.mutate(i,a).catch(et)},[n]);if(s.error&&mb(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/**
128 * @remix-run/router v1.23.1
129 *
130 * Copyright (c) Remix Software Inc.
131 *
132 * This source code is licensed under the MIT license found in the
133 * LICENSE.md file in the root directory of this source tree.
134 *
135 * @license MIT
136 */function Vi(){return Vi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vi.apply(this,arguments)}var fn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(fn||(fn={}));const Sg="popstate";function LR(e){e===void 0&&(e={});function t(n,s){let{pathname:o,search:i,hash:a}=n.location;return ph("",{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:Ql(s)}return $R(t,r,null,e)}function Ae(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function np(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function MR(){return Math.random().toString(36).substr(2,8)}function Eg(e,t){return{usr:e.state,key:e.key,idx:t}}function ph(e,t,r,n){return r===void 0&&(r=null),Vi({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Uo(t):t,{state:r,key:t&&t.key||n||MR()})}function Ql(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Uo(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function $R(e,t,r,n){n===void 0&&(n={});let{window:s=document.defaultView,v5Compat:o=!1}=n,i=s.history,a=fn.Pop,l=null,u=c();u==null&&(u=0,i.replaceState(Vi({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function d(){a=fn.Pop;let w=c(),v=w==null?null:w-u;u=w,l&&l({action:a,location:m.location,delta:v})}function f(w,v){a=fn.Push;let g=ph(m.location,w,v);u=c()+1;let y=Eg(g,u),_=m.createHref(g);try{i.pushState(y,"",_)}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,v){a=fn.Replace;let g=ph(m.location,w,v);u=c();let y=Eg(g,u),_=m.createHref(g);i.replaceState(y,"",_),o&&l&&l({action:a,location:m.location,delta:0})}function b(w){let v=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof w=="string"?w:Ql(w);return g=g.replace(/ $/,"%20"),Ae(v,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,v)}let m={get action(){return a},get location(){return e(s,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Sg,d),l=w,()=>{s.removeEventListener(Sg,d),l=null}},createHref(w){return t(s,w)},createURL:b,encodeLocation(w){let v=b(w);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(w){return i.go(w)}};return m}var kg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(kg||(kg={}));function FR(e,t,r){return r===void 0&&(r="/"),UR(e,t,r,!1)}function UR(e,t,r,n){let s=typeof t=="string"?Uo(t):t,o=sp(s.pathname||"/",r);if(o==null)return null;let i=Cb(e);zR(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let u=XR(o);a=YR(i[l],u,n)}return a}function Cb(e,t,r,n){t===void 0&&(t=[]),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
136id. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Sn([n,l.relativePath]),c=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 "'+u+'".')),Cb(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:GR(u,o.index),routesMeta:c})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))s(o,i);else for(let l of Tb(o.path))s(o,i,l)}),t}function Tb(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,s=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return s?[o,""]:[o];let i=Tb(n.join("/")),a=[];return a.push(...i.map(l=>l===""?o:[o,l].join("/"))),s&&a.push(...i),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function zR(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:QR(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const BR=/^:[\w-]+$/,WR=3,VR=2,HR=1,qR=10,KR=-2,Cg=e=>e==="*";function GR(e,t){let r=e.split("/"),n=r.length;return r.some(Cg)&&(n+=KR),t&&(n+=VR),r.filter(s=>!Cg(s)).reduce((s,o)=>s+(BR.test(o)?WR:o===""?HR:qR),n)}function QR(e,t){return e.length===t.length&&e.slice(0,-1).every((n,s)=>n===t[s])?e[e.length-1]-t[t.length-1]:0}function YR(e,t,r){let{routesMeta:n}=e,s={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],u=a===n.length-1,c=o==="/"?t:t.slice(o.length)||"/",d=Tg({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},c),f=l.route;if(!d&&u&&r&&!n[n.length-1].route.index&&(d=Tg({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},c)),!d)return null;
vendor: 4,333 bytes, lines 136-145
136Object.assign(s,d.params),i.push({params:s,pathname:Sn([o,d.pathname]),pathnameBase:nO(Sn([o,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(o=Sn([o,d.pathnameBase]))}return i}function Tg(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=JR(e.path,e.caseSensitive,e.end),s=t.match(r);if(!s)return null;let o=s[0],i=o.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:n.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let m=a[d]||"";i=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}const b=a[d];return h&&!b?u[f]=void 0:u[f]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:i,pattern:e}}function JR(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),np(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,l)=>(n.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),n]}function XR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return np(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function sp(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const ZR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,eO=e=>ZR.test(e);function tO(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?Uo(e):e,o;if(r)if(eO(r))o=r;else{if(r.includes("//")){let i=r;r=r.replace(/\/\/+/g,"/"),np(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+r))}r.startsWith("/")?o=Pg(r.substring(1),"/"):o=Pg(r,t)}else o=t;return{pathname:o,search:sO(n),hash:oO(s)}}function Pg(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function Tc(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"].  Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function rO(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Pb(e,t){let r=rO(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Rb(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=Uo(e):(s=Vi({},e),Ae(!s.pathname||!s.pathname.includes("?"),Tc("?","pathname","search",s)),Ae(!s.pathname||!s.pathname.includes("#"),Tc("#","pathname","hash",s)),Ae(!s.search||!s.search.includes("#"),Tc("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,a;if(i==null)a=r;else{let d=t.length-1;if(!n&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=tO(s,a),u=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Sn=e=>e.join("/").replace(/\/\/+/g,"/"),nO=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),sO=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oO=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function iO(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ob=["post","put","patch","delete"];new Set(Ob);const aO=["get",...Ob];new Set(aO);/**
137 * React Router v6.30.2
138 *
139 * Copyright (c) Remix Software Inc.
140 *
141 * This source code is licensed under the MIT license found in the
142 * LICENSE.md file in the root directory of this source tree.
143 *
144 * @license MIT
145 */function Hi(){return Hi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
vendor: 5,183 bytes, line 145
145for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hi.apply(this,arguments)}const op=p.createContext(null),lO=p.createContext(null),bs=p.createContext(null),ju=p.createContext(null),jn=p.createContext({outlet:null,matches:[],isDataRoute:!1}),Ab=p.createContext(null);function uO(e,t){let{relative:r}=t===void 0?{}:t;ca()||Ae(!1);let{basename:n,navigator:s}=p.useContext(bs),{hash:o,pathname:i,search:a}=Nb(e,{relative:r}),l=i;return n!=="/"&&(l=i==="/"?n:Sn([n,i])),s.createHref({pathname:l,search:a,hash:o})}function ca(){return p.useContext(ju)!=null}function zo(){return ca()||Ae(!1),p.useContext(ju).location}function jb(e){p.useContext(bs).static||p.useLayoutEffect(e)}function ip(){let{isDataRoute:e}=p.useContext(jn);return e?_O():cO()}function cO(){ca()||Ae(!1);let e=p.useContext(op),{basename:t,future:r,navigator:n}=p.useContext(bs),{matches:s}=p.useContext(jn),{pathname:o}=zo(),i=JSON.stringify(Pb(s,r.v7_relativeSplatPath)),a=p.useRef(!1);return jb(()=>{a.current=!0}),p.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){n.go(u);return}let d=Rb(u,JSON.parse(i),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Sn([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,i,o,e])}function HD(){let{matches:e}=p.useContext(jn),t=e[e.length-1];return t?t.params:{}}function Nb(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=p.useContext(bs),{matches:s}=p.useContext(jn),{pathname:o}=zo(),i=JSON.stringify(Pb(s,n.v7_relativeSplatPath));return p.useMemo(()=>Rb(e,JSON.parse(i),o,r==="path"),[e,i,o,r])}function dO(e,t){return hO(e,t)}function hO(e,t,r,n){ca()||Ae(!1);let{navigator:s}=p.useContext(bs),{matches:o}=p.useContext(jn),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let l=i?i.pathnameBase:"/";i&&i.route;let u=zo(),c;if(t){var d;let w=typeof t=="string"?Uo(t):t;l==="/"||(d=w.pathname)!=null&&d.startsWith(l)||Ae(!1),c=w}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let w=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let b=FR(e,{pathname:h}),m=vO(b&&b.map(w=>Object.assign({},w,{params:Object.assign({},a,w.params),pathname:Sn([l,s.encodeLocation?s.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?l:Sn([l,s.encodeLocation?s.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,r,n);return t&&m?p.createElement(ju.Provider,{value:{location:Hi({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:fn.Pop}},m):m}function fO(){let e=xO(),t=iO(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),r?p.createElement("pre",{style:s},r):null,null)}const pO=p.createElement(fO,null);class mO extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?p.createElement(jn.Provider,{value:this.props.routeContext},p.createElement(Ab.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function gO(e){let{routeContext:t,match:r,children:n}=e,s=p.useContext(op);return s&&s.static&&s.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=r.route.id),p.createElement(jn.Provider,{value:t},n)}function vO(e,t,r,n){var s;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var o;if(!r)return null;if(r.errors)e=r.matches;else if((o=n)!=null&&o.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=(s=r)==null?void 0:s.errors;if(a!=null){let c=i.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||Ae(!1),i=i.slice(0,Math.min(i.length,c+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let c=0;c<i.length;c++){let d=i[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:h}=r,b=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||b){l=!0,u>=0?i=i.slice(0,u+1):i=[i[0]];break}}}return i.reduceRight((c,d,f)=>{let h,b=!1,m=null,w=null;r&&(h=a&&d.route.id?a[d.route.id]:void 0,m=d.route.errorElement||pO,l&&(u<0&&f===0?(b=!0,w=null):u===f&&(b=!0,w=d.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,f+1)),g=()=>{let y;return h?y=m:b?y=w:d.route.Component?y=p.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=c,p.createElement(gO,{match:d,routeC
145ontext:{outlet:c,matches:v,isDataRoute:r!=null},children:y})};return r&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?p.createElement(mO,{location:r.location,revalidation:r.revalidation,component:m,error:h,children:g(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):g()},null)}var Ib=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Ib||{}),Yl=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Yl||{});function yO(e){let t=p.useContext(op);return t||Ae(!1),t}function wO(e){let t=p.useContext(lO);return t||Ae(!1),t}function bO(e){let t=p.useContext(jn);return t||Ae(!1),t}function Db(e){let t=bO(),r=t.matches[t.matches.length-1];return r.route.id||Ae(!1),r.route.id}function xO(){var e;let t=p.useContext(Ab),r=wO(Yl.UseRouteError),n=Db(Yl.UseRouteError);return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function _O(){let{router:e}=yO(Ib.UseNavigateStable),t=Db(Yl.UseNavigateStable),r=p.useRef(!1);return jb(()=>{r.current=!0}),p.useCallback(function(s,o){o===void 0&&(o={}),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Hi({fromRouteId:t},o)))},[e,t])}function SO(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function we(e){Ae(!1)}function EO(e){let{basename:t="/",children:r=null,location:n,navigationType:s=fn.Pop,navigator:o,static:i=!1,future:a}=e;ca()&&Ae(!1);let l=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:l,navigator:o,static:i,future:Hi({v7_relativeSplatPath:!1},a)}),[l,a,o,i]);typeof n=="string"&&(n=Uo(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:b="default"}=n,m=p.useMemo(()=>{let w=sp(c,l);return w==null?null:{location:{pathname:w,search:d,hash:f,state:h,key:b},navigationType:s}},[l,c,d,f,h,b,s]);return m==null?null:p.createElement(bs.Provider,{value:u},p.createElement(ju.Provider,{children:r,value:m}))}function kO(e){let{children:t,location:r}=e;return dO(mh(t),r)}new Promise(()=>{});function mh(e,t){t===void 0&&(t=[]);let r=[];return p.Children.forEach(e,(n,s)=>{if(!p.isValidElement(n))return;let o=[...t,s];if(n.type===p.Fragment){r.push.apply(r,mh(n.props.children,o));return}n.type!==we&&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=mh(n.props.children,o)),r.push(i)}),r}/**
146 * React Router DOM v6.30.2
147 *
148 * Copyright (c) Remix Software Inc.
149 *
150 * This source code is licensed under the MIT license found in the
151 * LICENSE.md file in the root directory of this source tree.
152 *
153 * @license MIT
154 */function gh(){return gh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gh.apply(this,arguments)}function CO(e,t){if(e==null)return{};var r={},n=Object.keys(e),s,o;for(o=0;o<n.length;o++)s=n[o],!(t.indexOf(s)>=0)&&(r[s]=e[s]);return r}function TO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function PO(e,t){return e.button===0&&(!t||t==="_self")&&!TO(e)}function vh(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(s=>[r,s]):[[r,n]])},[]))}function RO(e,t){let r=vh(e);return t&&t.forEach((n,s)=>{r.has(s)||t.getAll(s).forEach(o=>{r.append(s,o)})}),r}const OO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],AO="6";try{window.__reactRouterVersion=AO}catch{}const jO="startTransition",Rg=Hh[jO];function NO(e){let{basename:t,children:r,future:n,window:s}=e,o=p.useRef();o.current==null&&(o.current=LR({window:s,v5Compat:!0}));let i=o.current,[a,l]=p.useState({action:i.action,location:i.location}),{v7_startTransition:u}=n||{},c=p.useCallback(d=>{u&&Rg?Rg(()=>l(d)):l(d)},[l,u]);return p.useLayoutEffect(()=>i.listen(c),[i,c]),p.useEffect(()=>SO(n),[n]),p.createElement(EO,{basename:t,children:r,location:a.location,navigationType:a.action,navigator:i,future:n})}const IO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",DO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Og=p.forwardRef(function(t,r){let{onClick:n,relative:s,reloadDocument:o,replace:i,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=t,f=CO(t,OO),{basename:h}=p.useContext(bs),b,m=!1;if(typeof u=="string"&&DO.test(u)&&(b=u,IO))try{let y=new URL(window.location.href),_=u.startsWith("//")?new URL(y.protocol+u):new URL(u),S=sp(_.pathname,h);
154_.origin===y.origin&&S!=null?u=S+_.search+_.hash:m=!0}catch{}let w=uO(u,{relative:s}),v=LO(u,{replace:i,state:a,target:l,preventScrollReset:c,relative:s,viewTransition:d});function g(y){n&&n(y),y.defaultPrevented||v(y)}return p.createElement("a",gh({},f,{href:b||w,onClick:m||o?n:g,ref:r,target:l}))});var Ag;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ag||(Ag={}));var jg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(jg||(jg={}));function LO(e,t){let{target:r,replace:n,state:s,preventScrollReset:o,relative:i,viewTransition:a}=t===void 0?{}:t,l=ip(),u=zo(),c=Nb(e,{relative:i});return p.useCallback(d=>{if(PO(d,r)){d.preventDefault();let f=n!==void 0?n:Ql(u)===Ql(c);l(e,{replace:f,state:s,preventScrollReset:o,relative:i,viewTransition:a})}},[u,l,c,n,s,r,e,o,i,a])}function qD(e){let t=p.useRef(vh(e)),r=p.useRef(!1),n=zo(),s=p.useMemo(()=>RO(n.search,r.current?null:t.current),[n.search]),o=ip(),i=p.useCallback((a,l)=>{const u=vh(typeof a=="function"?a(s):a);r.current=!0,o("?"+u,l)},[o,s]);return[s,i]}var yh=function(e,t){return yh=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])},yh(e,t)};
vendor: 4,456 bytes, line 154
154function Lb(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");yh(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var At=function(){return At=Object.assign||function(t){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},At.apply(this,arguments)};function Nn(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function Mb(e,t,r,n){var s=arguments.length,o=s<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,r,o):i(t,r))||o);return s>3&&o&&Object.defineProperty(t,r,o),o}function $b(e,t){return function(r,n){t(r,n,e)}}function Fb(e,t,r,n,s,o){function i(v){if(v!==void 0&&typeof v!="function")throw new TypeError("Function expected");return v}for(var a=n.kind,l=a==="getter"?"get":a==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,c=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),d,f=!1,h=r.length-1;h>=0;h--){var b={};for(var m in n)b[m]=m==="access"?{}:n[m];for(var m in n.access)b.access[m]=n.access[m];b.addInitializer=function(v){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(v||null))};var w=(0,r[h])(a==="accessor"?{get:c.get,set:c.set}:c[l],b);if(a==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(d=i(w.get))&&(c.get=d),(d=i(w.set))&&(c.set=d),(d=i(w.init))&&s.unshift(d)}else(d=i(w))&&(a==="field"?s.unshift(d):c[l]=d)}u&&Object.defineProperty(u,n.name,c),f=!0}function Ub(e,t,r){for(var n=arguments.length>2,s=0;s<t.length;s++)r=n?t[s].call(e,r):t[s].call(e);return n?r:void 0}function zb(e){return typeof e=="symbol"?e:"".concat(e)}function Bb(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function Wb(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function B(e,t,r,n){function s(o){return o instanceof r?o:new r(function(i){i(o)})}return new(r||(r=Promise))(function(o,i){function a(c){try{u(n.next(c))}catch(d){i(d)}}function l(c){try{u(n.throw(c))}catch(d){i(d)}}function u(c){c.done?o(c.value):s(c.value).then(a,l)}u((n=n.apply(e,t||[])).next())})}function Vb(e,t){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(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(r=0)),r;)try{if(n=1,s&&(o=u[0]&2?s.return:u[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,u[1])).done)return o;switch(s=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,s=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){r.label=u[1];break}if(u[0]===6&&r.label<o[1]){r.label=o[1],o=u;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(u);break}o[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(c){u=[6,c],s=0}finally{n=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}var Nu=Object.create?function(e,t,r,n){n===void 0&&(n=r);var s=Object.getOwnPropertyDescriptor(t,r);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,s)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};function Hb(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Nu(t,e,r)}function Jl(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);
vendor: 4,327 bytes, line 154
154if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ap(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),s,o=[],i;try{for(;(t===void 0||t-- >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 e=[],t=0;t<arguments.length;t++)e=e.concat(ap(arguments[t]));return e}function Kb(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),s=0,t=0;t<r;t++)for(var o=arguments[t],i=0,a=o.length;i<a;i++,s++)n[s]=o[i];return n}function lp(e,t,r){if(r||arguments.length===2)for(var n=0,s=t.length,o;n<s;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}function Ao(e){return this instanceof Ao?(this.v=e,this):new Ao(e)}function Gb(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),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(b){return Promise.resolve(b).then(h,d)}}function a(h,b){n[h]&&(s[h]=function(m){return new Promise(function(w,v){o.push([h,m,w,v])>1||l(h,m)})},b&&(s[h]=b(s[h])))}function l(h,b){try{u(n[h](b))}catch(m){f(o[0][3],m)}}function u(h){h.value instanceof Ao?Promise.resolve(h.value.v).then(c,d):f(o[0][2],h)}function c(h){l("next",h)}function d(h){l("throw",h)}function f(h,b){h(b),o.shift(),o.length&&l(o[0][0],o[0][1])}}function Qb(e){var t,r;return t={},n("next"),n("throw",function(s){throw s}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(s,o){t[s]=e[s]?function(i){return(r=!r)?{value:Ao(e[s](i)),done:!1}:o?o(i):i}:o}}function Yb(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Jl=="function"?Jl(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(o){r[o]=e[o]&&function(i){return new Promise(function(a,l){i=e[o](i),s(a,l,i.done,i.value)})}}function s(o,i,a,l){Promise.resolve(l).then(function(u){o({value:u,done:a})},i)}}function Jb(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var MO=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},wh=function(e){return wh=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},wh(e)};function Xb(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=wh(e),n=0;n<r.length;n++)r[n]!=="default"&&Nu(t,e,r[n]);return MO(t,e),t}function Zb(e){return e&&e.__esModule?e:{default:e}}function ex(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function tx(e,t,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 t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(e,r):s?s.value=r:t.set(e,r),r}function rx(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function nx(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,s;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(s=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");
154s&&(n=function(){try{s.call(this)}catch(o){return Promise.reject(o)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var $O=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function sx(e){function t(o){e.error=e.hasError?new $O(o,e.error,"An error was suppressed during disposal."):o,e.hasError=!0}var r,n=0;function s(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.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 t(i),s()})}else n|=1}catch(i){t(i)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return s()}function ox(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,s,o,i){return n?t?".jsx":".js":s&&(!o||!i)?r:s+o+"."+i.toLowerCase()+"js"}):e}const FO={__extends:Lb,__assign:At,__rest:Nn,__decorate:Mb,__param:$b,__esDecorate:Fb,__runInitializers:Ub,__propKey:zb,__setFunctionName:Bb,__metadata:Wb,__awaiter:B,__generator:Vb,__createBinding:Nu,__exportStar:Hb,__values:Jl,__read:ap,__spread:qb,__spreadArrays:Kb,__spreadArray:lp,__await:Ao,__asyncGenerator:Gb,__asyncDelegator:Qb,__asyncValues:Yb,__makeTemplateOb
154ject:Jb,__importStar:Xb,__importDefault:Zb,__classPrivateFieldGet:ex,__classPrivateFieldSet:tx,__classPrivateFieldIn:rx,__addDisposableResource:nx,__disposeResources:sx,__rewriteRelativeImportExtension:ox},UO=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:nx,get __assign(){return At},__asyncDelegator:Qb,__asyncGenerator:Gb,__asyncValues:Yb,__await:Ao,__awaiter:B,__classPrivateFieldGet:ex,__classPrivateFieldIn:rx,__classPrivateFieldSet:tx,__createBinding:Nu,__decorate:Mb,__disposeResources:sx,__esDecorate:Fb,__exportStar:Hb,__extends:Lb,__generator:Vb,__importDefault:Zb,__importStar:Xb,__makeTemplateObject:Jb,__metadata:Wb,__param:$b,__propKey:zb,__read:ap,__rest:Nn,__rewriteRelativeImportExtension:ox,__runInitializers:Ub,__setFunctionName:Bb,__spread:qb,__spreadArray:lp,__spreadArrays:Kb,__values:Jl,default:FO},Symbol.toStringTag,{value:"Module"})),zO=e=>e?(...t)=>e(...t):(...t)=>fetch(...t);class up extends Error{constructor(t,r="FunctionsError",n){super(t),this.name=r,this.context=n}}class BO extends up{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Ng extends up{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class Ig extends up{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var bh;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(bh||(bh={}));class WO{constructor(t,{headers:r={},customFetch:n,region:s=bh.Any}={}){this.url=t,this.headers=r,this.region=s,this.fetch=zO(n)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t){return B(this,arguments,void 0,function*(r,n={}){var s;let o,i;try{const{headers:a,method:l,body:u,signal:c,timeout:d}=n;let f={},{region:h}=n;h||(h=this.region);const b=new URL(`${this.url}/${r}`);h&&h!=="any"&&(f["x-region"]=h,b.searchParams.set("forceFunctionRegion",h));let m;u&&(a&&!Object.prototype.hasOwnProperty.call(a,"Content-Type")||!a)?typeof Blob<"u"&&u instanceof Blob||u instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",m=u):typeof u=="string"?(f["Content-Type"]="text/plain",m=u):typeof FormData<"u"&&u instanceof FormData?m=u:(f["Content-Type"]="application/json",m=JSON.stringify(u)):m=u;let w=c;d&&(i=new AbortController,o=setTimeout(()=>i.abort(),d),c?(w=i.signal,c.addEventListener("abort",()=>i.abort())):w=i.signal);const v=yield this.fetch(b.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),a),body:m,signal:w}).catch(S=>{throw new BO(S)}),g=v.headers.get("x-relay-error");if(g&&g==="true")throw new Ng(v);if(!v.ok)throw new Ig(v);let y=((s=v.headers.get("Content-Type"))!==null&&s!==void 0?s:"text/plain").split(";")[0].trim(),_;return y==="application/json"?_=yield v.json():y==="application/octet-stream"||y==="application/pdf"?_=yield v.blob():y==="text/event-stream"?_=v:y==="multipart/form-data"?_=yield v.formData():_=yield v.text(),{data:_,error:null,response:v}}catch(a){return{data:null,error:a,response:a instanceof Ig||a instanceof Ng?a.context:void 0}}finally{o&&clearTimeout(o)}})}}var tt={};const Bo=yS(UO);var Fa={},Ua={},za={},Ba={},Wa={},Va={},Dg;function ix(){if(Dg)return Va;Dg=1,Object.defineProperty(Va,"__esModule",{value:!0});class e extends Error{constructor(r){super(r.message),this.name="PostgrestError",this.details=r.details,this.hint=r.hint,this.co
154de=r.code}}return Va.default=e,Va}var Lg;function ax(){if(Lg)return Wa;Lg=1,Object.defineProperty(Wa,"__esModule",{value:!0});const t=Bo.__importDefault(ix());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 u,c,d,f;let h=null,b=null,m=null,w=l.status,v=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")&&(!((u=this.headers.get("Accept"))===null||u===void 0)&&u.includes("application/vnd.pgrst.plan+text"))?b=S:b=JSON.parse(S))}const y=(c=this.headers.get("Prefer"))===null||c===void 0?void 0:c.match(/count=(exact|planned|estimated)/),_=(d=l.headers.get("content-range"))===null||d===void 0?void 0:d.split("/");y&&_&&_.length>1&&(m=parseInt(_[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(b)&&(b.length>1?(h={code:"PGRST116",details:`Results contain ${b.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},b=null,m=null,w=406,v="Not Acceptable"):b.length===1?b=b[0]:b=null)}else{const y=await l.text();try{h=JSON.parse(y),Array.isArray(h)&&l.status===404&&(b=[],h=null,w=200,v="OK")}catch{l.status===404&&y===""?(w=204,v="No Content"):h={message:y}}if(h&&this.isMaybeSingle&&(!((f=h==null?void 0:h.details)===null||f===void 0)&&f.includes("0 rows"))&&(h=null,w=200,v="OK"),h&&this.shouldThrowOnError)throw new t.default(h)}return{error:h,data:b,count:m,status:w,statusText:v}});return this.shouldThrowOnError||(a=a.catch(l=>{var u,c,d,f,h,b;let m="";const w=l==null?void 0:l.cause;if(w){const v=(u=w==null?void 0:w.message)!==null&&u!==void 0?u:"",g=(c=w==null?void 0:w.code)!==null&&c!==void 0?c:"";m=`${(d=l==null?void 0:l.name)!==null&&d!==void 0?d:"FetchError"}: ${l==null?void 0:l.message}`,m+=`
155
156Caused by: ${(f=w==null?void 0:w.name)!==null&&f!==void 0?f:"Error"}: ${v}`,g&&(m+=` (${g})`),w!=null&&w.stack&&(m+=`
157${w.stack}`)}else m=(h=l==null?void 0:l.stack)!==null&&h!==void 0?h:"";return{error:{message:`${(b=l==null?void 0:l.name)!==null&&b!==void 0?b:"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 Wa.default=r,Wa}var Mg;function lx(){if(Mg)return Ba;Mg=1,Object.defineProperty(Ba,"__esModule",{value:!0});const t=Bo.__importDefault(ax());class r extends t.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 u=l?`${l}.order`:"order",c=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${c?`${c},`:""}${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`,u=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${s}`),this.url.searchParams.set(u,`${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}
157explain({analyze:s=!1,verbose:o=!1,settings:i=!1,buffers:a=!1,wal:l=!1,format:u="text"}={}){var c;const d=[s?"analyze":null,o?"verbose":null,i?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),f=(c=this.headers.get("Accept"))!==null&&c!==void 0?c:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${f}"; options=${d};`),u==="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 Ba.default=r,Ba}var $g;function cp(){if($g)return za;$g=1,Object.defineProperty(za,"__esModule",{value:!0});const t=Bo.__importDefault(lx()),r=new RegExp("[,()]");class n extends t.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}regexMatch(o,i){return this.url.searchParams.append(o,`match.${i}`),this}regexIMatch(o,i){return this.url.searchParams.append(o,`imatch.${i}`),this}is(o,i){return this.url.searchParams.append(o,`is.${i}`),this}isDistinct(o,i){return this.url.searchParams.append(o,`isdistinct.${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 u="";l==="plain"?u="pl":l==="phrase"?u="ph":l==="websearch"&&(u="w");const c=a===void 0?"":`(${a})`;return this.url.searchParams.append(o,`${u}fts${c}.${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 za.default=n,za}var Fg;function ux(){if(Fg)return Ua;Fg=1,Object.defineProperty(Ua,"__esModule",{value:!0});const t=Bo.__importDefault(cp());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 u=!1;const c=(s??"*").split("").map(d=>/\s/.test(d)&&!u?"":(d==='"'&&(u=!u),d)).join("");return this.url.searchParams.set("select",c),a&&this.headers.append("Prefer",`count=${a}`),new t.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 u=s.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(u.length>0){const c=[...new Set(u)].map(d=>`"${d}"`);this.url.searchParams.set("columns",c.join(","))}}return new t.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 u;const c="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 d=s.reduce((f,h)=>f.concat(Object.keys(h)),[]);if(d.length>0){const f=[...new Set(d)].map(h=>`"${h}"`);this.url.searchParams.set("columns",f.join(","))}}return new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:s,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch})}update(s,{count:o}={}){var i;const a="PATCH";return o&&this.headers.append("Prefer",`count=${o}`),new t.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 t.default({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:(o=this.fetch)!==null&&o!==void 0?o:fetch})}}return Ua.default=r,Ua}var Ug;function VO(){if(Ug)return Fa;Ug=1,Object.defineProperty(Fa,"__esModule",{value:!0});const e=Bo,t=e.__importDefault(ux()),r=e.__importDefault(cp());
157class 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){if(!o||typeof o!="string"||o.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");const i=new URL(`${this.url}/${o}`);return new t.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:u}={}){var c;let d;const f=new URL(`${this.url}/rpc/${o}`);let h;a||l?(d=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])=>{f.searchParams.append(m,w)})):(d="POST",h=i);const b=new Headers(this.headers);return u&&b.set("Prefer",`count=${u}`),new r.default({method:d,url:f,headers:b,schema:this.schemaName,body:h,fetch:(c=this.fetch)!==null&&c!==void 0?c:fetch})}}return Fa.default=n,Fa}Object.defineProperty(tt,"__esModule",{value:!0});var cx=tt.PostgrestError=bx=tt.PostgrestBuilder=yx=tt.PostgrestTransformBuilder=gx=tt.PostgrestFilterBuilder=px=tt.PostgrestQueryBuilder=hx=tt.PostgrestClient=void 0;const Wo=Bo,dx=Wo.__importDefault(VO());var hx=tt.PostgrestClient=dx.default;const fx=Wo.__importDefault(ux());var px=tt.PostgrestQueryBuilder=fx.default;const mx=Wo.__importDefault(cp());var gx=tt.PostgrestFilterBuilder=mx.default;const vx=Wo.__importDefault(lx());var yx=tt.PostgrestTransformBuilder=vx.default;const wx=Wo.__importDefault(ax());var bx=tt.PostgrestBuilder=wx.default;const xx=Wo.__importDefault(ix());cx=tt.PostgrestError=xx.default;var _x=tt.default={PostgrestClient:dx.default,PostgrestQueryBuilder:fx.default,PostgrestFilterBuilder:mx.default,PostgrestTransformBuilder:vx.default,PostgrestBuilder:wx.default,PostgrestError:xx.default};const HO=Iv({__proto__:null,get PostgrestBuilder(){return bx},get PostgrestClient(){return hx},get PostgrestError(){return cx},get PostgrestFilterBuilder(){return gx},get PostgrestQueryBuilder(){return px},get PostgrestTransformBuilder(){return yx},default:_x},[tt]),{PostgrestClient:qO,PostgrestQueryBuilder:KD,PostgrestFilterBuilder:GD,PostgrestTransformBuilder:QD,PostgrestBuilder:YD,PostgrestError:JD}=_x||HO;class KO{constructor(){}static detectEnvironment(){var t;if(typeof WebSocket<"u")return{type:"native",constructor:WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocket<"u")return{type:"native",constructor:globalThis.WebSocket};if(typeof global<"u"&&typeof global.WebSocket<"u")return{type:"native",constructor:global.WebSocket};if(typeof globalThis<"u"&&typeof globalThis.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&globalThis.EdgeRuntime||typeof navigator<"u"&&(!((t=navigator.userAgent)===null||t===void 0)&&t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};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:
158import ws from "ws"
159new RealtimeClient(url, { transport: ws })`}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const t=this.detectEnvironment();if(t.constructor)return t.constructor;let r=t.error||"WebSocket not supported in this environment.";throw t.workaround&&(r+=`
160
161Suggested solution: ${t.workaround}`),new Error(r)}static createWebSocket(t,r){const n=this.getWebSocketConstructor();return new n(t,r)}static isWebSocketSupported(){try{const t=this.detectEnvironment();return t.type==="native"||t.type==="ws"}catch{return!1}}}const GO="2.86.0",QO=`realtime-js/${GO}`,Sx="1.0.0",YO="2.0.0",zg=Sx,xh=1e4,JO=1e3,XO=100;var Vn;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Vn||(Vn={}));var je;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(je||(je={}));var Gt;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Gt||(Gt={}));var _h;(function(e){e.websocket="websocket"})(_h||(_h={}));var Hn;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(Hn||(Hn={}));class ZO{constructor(t){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=t??[]}encode(t,r){if(t.event===this.BROADCAST_EVENT&&!(t.payload instanceof ArrayBuffer)&&typeof t.payload.event=="string")return r(this._binaryEncodeUserBroadcastPush(t));let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return r(JSON.stringify(n))}_binaryEncodeUserBroadcastPush(t){var r;return this._isArrayBuffer((r=t.payload)===null||r===void 0?void 0:r.payload)?this._encodeBinaryUserBroadcastPush(t):this._encodeJsonUserBroadcastPush(t)}_encodeBinaryUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:new ArrayBuffer(0);return this._encodeUserBroadcastPush(t,this.BINARY_ENCODING,s)}_encodeJsonUserBroadcastPush(t){var r,n;const s=(n=(r=t.payload)===null||r===void 0?void 0:r.payload)!==null&&n!==void 0?n:{},i=new TextEncoder().encode(JSON.stringify(s)).buffer;return this._encodeUserBroadcastPush(t,this.JSON_ENCODING,i)}_encodeUserBroadcastPush(t,r,n){var s,o;const i=t.topic,a=(s=t.ref)!==null&&s!==void 0?s:"",l=(o=t.join_ref)!==null&&o!==void 0?o:"",u=t.payload.event,c=this.allowedMetadataKeys?this._pick(t.payload,this.allowedMetadataKeys):{},d=Object.keys(c).length===0?"":JSON.stringify(c);if(l.length>255)throw new Error(`joinRef length ${l.length} exceeds maximum of 255`);if(a.length>255)throw new Error(`ref length ${a.length} exceeds maximum of 255`);if(i.length>255)throw new Error(`topic length ${i.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(d.length>255)throw new Error(`metadata length ${d.length} exceeds maximum of 255`);const f=this.USER_BROADCAST_PUSH_META_LENGTH+l.length+a.length+i.length+u.length+d.length,h=new ArrayBuffer(this.HEADER_LENGTH+f);
161let b=new DataView(h),m=0;b.setUint8(m++,this.KINDS.userBroadcastPush),b.setUint8(m++,l.length),b.setUint8(m++,a.length),b.setUint8(m++,i.length),b.setUint8(m++,u.length),b.setUint8(m++,d.length),b.setUint8(m++,r),Array.from(l,v=>b.setUint8(m++,v.charCodeAt(0))),Array.from(a,v=>b.setUint8(m++,v.charCodeAt(0))),Array.from(i,v=>b.setUint8(m++,v.charCodeAt(0))),Array.from(u,v=>b.setUint8(m++,v.charCodeAt(0))),Array.from(d,v=>b.setUint8(m++,v.charCodeAt(0)));var w=new Uint8Array(h.byteLength+n.byteLength);return w.set(new Uint8Array(h),0),w.set(new Uint8Array(n),h.byteLength),w.buffer}decode(t,r){if(this._isArrayBuffer(t)){let n=this._binaryDecode(t);return r(n)}if(typeof t=="string"){const n=JSON.parse(t),[s,o,i,a,l]=n;return r({join_ref:s,ref:o,topic:i,event:a,payload:l})}return r({})}_binaryDecode(t){const r=new DataView(t),n=r.getUint8(0),s=new TextDecoder;switch(n){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(t,r,s)}}_decodeUserBroadcast(t,r,n){const s=r.getUint8(1),o=r.getUint8(2),i=r.getUint8(3),a=r.getUint8(4);let l=this.HEADER_LENGTH+4;const u=n.decode(t.slice(l,l+s));l=l+s;const c=n.decode(t.slice(l,l+o));l=l+o;const d=n.decode(t.slice(l,l+i));l=l+i;const f=t.slice(l,t.byteLength),h=a===this.JSON_ENCODING?JSON.parse(n.decode(f)):f,b={type:this.BROADCAST_EVENT,event:c,payload:h};return i>0&&(b.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:u,event:this.BROADCAST_EVENT,payload:b}}_isArrayBuffer(t){var r;return t instanceof ArrayBuffer||((r=t==null?void 0:t.constructor)===null||r===void 0?void 0:r.name)==="ArrayBuffer"}_pick(t,r){return!t||typeof t!="object"?{}:Object.fromEntries(Object.entries(t).filter(([n])=>r.includes(n)))}}class Ex{constructor(t,r){this.callback=t,this.timerCalc=r,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=r}reset(){this.tries=0,clearTimeout(this.timer),this.timer=void 0}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var he;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(he||(he={}));const Bg=(e,t,r={})=>{var n;const s=(n=r.skipTypes)!==null&&n!==void 0?n:[];return t?Object.keys(t).reduce((o,i)=>(o[i]=eA(i,e,t,s),o),{}):{}},eA=(e,t,r,n)=>{const s=t.find(a=>a.name===e),o=s==null?void 0:s.type,i=r[e];return o&&!n.includes(o)?kx(o,i):Sh(i)},kx=(e,t)=>{if(e.charAt(0)==="_"){const r=e.slice(1,e.length);return sA(t,r)}switch(e){case he.bool:return tA(t);case he.float4:case he.float8:case he.int2:case he.int4:case he.int8:case he.numeric:case he.oid:return rA(t);case he.json:case he.jsonb:return nA(t);case he.timestamp:return oA(t);case he.abstime:case he.date:case he.daterange:case he.int4range:case he.int8range:case he.money:case he.reltime:case he.text:case he.time:case he.timestamptz:case he.timetz:case he.tsrange:case he.tstzrange:return Sh(t);default:return Sh(t)}},Sh=e=>e,tA=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},rA=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},nA=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},sA=(e,t)=>{if(typeof e!="string")return e;const r=e.length-1,n=e[r];if(e[0]==="{"&&n==="}"){let o;const i=e.slice(1,r);try{o=JSON.parse("["+i+"]")}catch{o=i?i.split(","):[]}return o.map(a=>kx(t,a))}return e},oA=e=>typeof e=="string"?e.replace(" ","T"):e,Cx=e=>{const t=new URL(e);return t.protocol=t.protocol.replace(/^ws/i,"http"),t.pathname=t.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),t.pathname===""||t.pathname==="/"?t.pathname="/api/broadcast":t.pathname=t.pathname+"/api/broadcast",t.href};class Pc{constructor(t,r,n={},s=xh){this.channel=t,this.event=r,this.payload=n,this.timeout=s,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHo
161oks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,r){var n;return this._hasReceived(t)&&r((n=this.receivedResp)===null||n===void 0?void 0:n.response),this.recHooks.push({status:t,callback:r}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=r=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=r,this._matchReceive(r)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,r){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:r})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:r}){this.recHooks.filter(n=>n.status===t).forEach(n=>n.callback(r))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var Wg;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(Wg||(Wg={}));class bi{constructor(t,r){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.enabled=!1,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const n=(r==null?void 0:r.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(n.state,{},s=>{const{onJoin:o,onLeave:i,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=bi.syncState(this.state,s,o,i),this.pendingDiffs.forEach(l=>{this.state=bi.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=bi.syncDiff(this.state,s,o,i),a())}),this.onJoin((s,o,i)=>{this.channel._trigger("presence",{event:"join",key:s,currentPresences:o,newPresences:i})}),this.onLeave((s,o,i)=>{this.channel._trigger("presence",{event:"leave",key:s,currentPresences:o,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,r,n,s){const o=this.cloneDeep(t),i=this.transformState(r),a={},l={};return this.map(o,(u,c)=>{i[u]||(l[u]=c)}),this.map(i,(u,c)=>{const d=o[u];if(d){const f=c.map(w=>w.presence_ref),h=d.map(w=>w.presence_ref),b=c.filter(w=>h.indexOf(w.presence_ref)<0),m=d.filter(w=>f.indexOf(w.presence_ref)<0);b.length>0&&(a[u]=b),m.length>0&&(l[u]=m)}else a[u]=c}),this.syncDiff(o,{joins:a,leaves:l},n,s)}static syncDiff(t,r,n,s){const{joins:o,leaves:i}={joins:this.transformState(r.joins),leaves:this.transformState(r.leaves)};return n||(n=()=>{}),s||(s=()=>{}),this.map(o,(a,l)=>{var u;const c=(u=t[a])!==null&&u!==void 0?u:[];if(t[a]=this.cloneDeep(l),c.length>0){const d=t[a].map(h=>h.presence_ref),f=c.filter(h=>d.indexOf(h.presence_ref)<0);t[a].unshift(...f)}n(a,c,l)}),this.map(i,(a,l)=>{let u=t[a];if(!u)return;const c=l.map(d=>d.presence_ref);u=u.filter(d=>c.indexOf(d.presence_ref)<0),t[a]=u,s(a,u,l),u.length===0&&delete t[a]}),t}static map(t,r){return Object.getOwnPropertyNames(t).map(n=>r(n,t[n]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((r,n)=>{const s=t[n];return"metas"in s?r[n]=s.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):r[n]=s,r},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var Vg;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Vg||(Vg={}));var xi;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(xi||(xi={}));var xr;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(xr||(xr={}));class dp{constructor(t,r={config:{}},n){var s,o;if(this.topic=t,this.params=r,this.socket=n,this.bindings={},this.state=je.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},r.config),this.timeout=this.socket.timeout,this.joinPush=new Pc(this,Gt.join,this.params,this.timeout),this.rejoinTimer=new Ex(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=je.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>
161i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=je.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=je.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=je.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("error",i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=je.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Gt.reply,{},(i,a)=>{this._trigger(this._replyEventName(a),i)}),this.presence=new bi(this),this.broadcastEndpointURL=Cx(this.socket.endPoint),this.private=this.params.config.private||!1,!this.private&&(!((o=(s=this.params.config)===null||s===void 0?void 0:s.broadcast)===null||o===void 0)&&o.replay))throw`tried to use replay on public channel '${this.topic}'. It must be a private channel.`}subscribe(t,r=this.timeout){var n,s,o;if(this.socket.isConnected()||this.socket.connect(),this.state==je.closed){const{config:{broadcast:i,presence:a,private:l}}=this.params,u=(s=(n=this.bindings.postgres_changes)===null||n===void 0?void 0:n.map(h=>h.filter))!==null&&s!==void 0?s:[],c=!!this.bindings[xi.PRESENCE]&&this.bindings[xi.PRESENCE].length>0||((o=this.params.config.presence)===null||o===void 0?void 0:o.enabled)===!0,d={},f={broadcast:i,presence:Object.assign(Object.assign({},a),{enabled:c}),postgres_changes:u,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>t==null?void 0:t(xr.CHANNEL_ERROR,h)),this._onClose(()=>t==null?void 0:t(xr.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this.joinedOnce=!0,this._rejoin(r),this.joinPush.receive("ok",async({postgres_changes:h})=>{var b;if(this.socket.setAuth(),h===void 0){t==null||t(xr.SUBSCRIBED);return}else{const m=this.bindings.postgres_changes,w=(b=m==null?void 0:m.length)!==null&&b!==void 0?b:0,v=[];for(let g=0;g<w;g++){const y=m[g],{filter:{event:_,schema:S,table:k,filter:C}}=y,T=h&&h[g];if(T&&T.event===_&&T.schema===S&&T.table===k&&T.filter===C)v.push(Object.assign(Object.assign({},y),{id:T.id}));else{this.unsubscribe(),this.state=je.errored,t==null||t(xr.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=v,t&&t(xr.SUBSCRIBED);return}}).receive("error",h=>{this.state=je.errored,t==null||t(xr.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(h).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(xr.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,r={}){return await this.send({type:"presence",event:"track",payload:t},r.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,r,n){return this.state===je.joined&&t===xi.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(t,r,n)}async httpSend(t,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:t,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;try{const u=await a.json();l=u.error||u.message||l}catch{}return Promise.reject(new Error(l))}async send(t,r={}){var n,s;if(!this._canPush()&&t.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated 
161in the future. Please use httpSend() explicitly for REST delivery.");const{event:o,payload:i}=t,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 u=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(n=r.timeout)!==null&&n!==void 0?n:this.timeout);return await((s=u.body)===null||s===void 0?void 0:s.cancel()),u.ok?"ok":"error"}catch(u){return u.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var i,a,l;const u=this._push(t.type,t,r.timeout||this.timeout);t.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"),u.receive("ok",()=>o("ok")),u.receive("error",()=>o("error")),u.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=je.leaving;const r=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Gt.close,"leave",this._joinRef())};this.joinPush.destroy();let n=null;return new Promise(s=>{n=new Pc(this,Gt.leave,{},t),n.receive("ok",()=>{r(),s("ok")}).receive("timeout",()=>{r(),s("timed out")}).receive("error",()=>{s("error")}),n.send(),this._canPush()||n.trigger("ok",{})}).finally(()=>{n==null||n.destroy()})}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=je.closed,this.bindings={}}async _fetchWithTimeout(t,r,n){const s=new AbortController,o=setTimeout(()=>s.abort(),n),i=await this.socket.fetch(t,Object.assign(Object.assign({},r),{signal:s.signal}));return clearTimeout(o),i}_push(t,r,n=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let s=new Pc(this,t,r,n);return this._canPush()?s.send():this._addToPushBuffer(s),s}_addToPushBuffer(t){if(t.startTimeout(),this.pushBuffer.push(t),this.pushBuffer.length>XO){const r=this.pushBuffer.shift();r&&(r.destroy(),this.socket.log("channel",`discarded push due to buffer overflow: ${r.event}`,r.payload))}}_onMessage(t,r,n){return r}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,r,n){var s,o;const i=t.toLocaleLowerCase(),{close:a,error:l,leave:u,join:c}=Gt;if(n&&[a,l,u,c].indexOf(i)>=0&&n!==this._joinRef())return;let f=this._onMessage(i,r,n);if(r&&!f)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 b,m,w;return((b=h.filter)===null||b===void 0?void 0:b.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(f,n)):(o=this.bindings[i])===null||o===void 0||o.filter(h=>{var b,m,w,v,g,y;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in h){const _=h.id,S=(b=h.filter)===null||b===void 0?void 0:b.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 _=(g=(v=h==null?void 0:h.filter)===null||v===void 0?void 0:v.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return _==="*"||_===((y=r==null?void 0:r.event)===null||y===void 0?void 0:y.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===i}).map(h=>{if(typeof f=="object"&&"ids"in f){const b=f.data,{schema:m,table:w,commit_timestamp:v,type:g,errors:y}=b;f=Object.assign(Object.assign({},{schema:m,table:w,commit_timestamp:v,eventType:g,new:{},old:{},errors:y}),this._getPayloadRecords(b))}h.callback(f,n)})}_isClosed(){return this.state===je.closed}_isJoined(){return this.state===je.joined}_isJoining(){return this.state===je.joining}_isLeaving(){return this.state===je.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,r,n){const s=t.toLocaleLowerCase(),o={type:s,filter:r,callback:n};return this.bindings[s]?this.bindings[s].push(o):this.bindings[s]=[o],this}_off(t,r){const n=t.toLocaleLowerCase();return this.bindings[n]&&(this.bindings[n]=this.bindings[n].filter(s=>{var o;return!(((o=s.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===n&&dp.isEqual(s.filter,r))})),this}static isEqual(t,r){if(Object.keys(t).length!==Object.keys(r).length)return!1;for(const n in t)if(t[n]!==r[n])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Gt.close,{},t)}_onError(t){this._on(Gt.error,{},r=>t(r))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=je.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const r={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(r.new=Bg(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(r.old=Bg(t.columns,t.old_record)),r}}const Rc=()=>{},Ha={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},iA=[1e3,2e3,5e3,1e4],aA=1e4,lA=`
162  addEventListener("message", (e) => {
163    if (e.data.event === "start") {
164      setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
165    }
166  });`;class uA{constructor(t,r){var n;if(this.accessTokenValue=null,this.apiKey=null,this.channels=new Array,this.endPoint="",this.httpEndpoint="",this.headers={},this.params={},this.timeout=xh,this.transport=null,this.heartbeatIntervalMs=Ha.HEARTBEAT_INTERVAL,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.heartbeatCallback=Rc,this.ref=0,this.reconnectTimer=null,this.vsn=zg,this.logger=Rc,this.conn=null,this.sendBuffer=[],this.serializer
166=new ZO,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=`${t}/${_h.websocket}`,this.httpEndpoint=Cx(t),this._initializeOptions(r),this._setupReconnectionTimer(),this.fetch=this._resolveFetch(r==null?void 0:r.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.conn!==null&&this.isConnected())){if(this._setConnectionState("connecting"),this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this.transport)this.conn=new this.transport(this.endpointURL());else try{this.conn=KO.createWebSocket(this.endpointURL())}catch(t){this._setConnectionState("disconnected");const r=t.message;throw r.includes("Node.js")?new Error(`${r}
167
168To use Realtime in Node.js, you need to provide a WebSocket implementation:
169
170Option 1: Use Node.js 22+ which has native WebSocket support
171Option 2: Install and provide the "ws" package:
172
173  npm install ws
174
175  import ws from "ws"
176  const client = new RealtimeClient(url, {
177    ...options,
178    transport: ws
179  })`):new Error(`WebSocket not available: ${r}`)}this._setupConnectionHandlers()}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:this.vsn}))}disconnect(t,r){if(!this.isDisconnecting())if(this._setConnectionState("disconnecting",!0),this.conn){const n=setTimeout(()=>{this._setConnectionState("disconnected")},100);this.conn.onclose=()=>{clearTimeout(n),this._setConnectionState("disconnected")},typeof this.conn.close=="function"&&(t?this.conn.close(t,r??""):this.conn.close()),this._teardownConnection()}else this._setConnectionState("disconnected")}getChannels(){return this.channels}async removeChannel(t){const r=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),r}async removeAllChannels(){const t=await Promise.all(this.channels.map(r=>r.unsubscribe()));return this.channels=[],this.disconnect(),t}log(t,r,n){this.logger(t,r,n)}connectionState(){switch(this.conn&&this.conn.readyState){case Vn.connecting:return Hn.Connecting;case Vn.open:return Hn.Open;case Vn.closing:return Hn.Closing;default:return Hn.Closed}}isConnected(){return this.connectionState()===Hn.Open}isConnecting(){return this._connectionState==="connecting"}isDisconnecting(){return this._connectionState==="disconnecting"}channel(t,r={config:{}}){const n=`realtime:${t}`,s=this.getChannels().find(o=>o.topic===n);if(s)return s;{const o=new dp(`realtime:${t}`,r,this);return this.channels.push(o),o}}push(t){const{topic:r,event:n,payload:s,ref:o}=t,i=()=>{this.encode(t,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(t=null){this._authPromise=this._performAuth(t);try{await this._authPromise}finally{this._authPromise=null}}async sendHeartbeat(){var t;if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(r){this.log("error","error in heartbeat callback",r)}return}if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(r){this.log("error","error in heartbeat callback",r)}this._wasManualDisconnect=!1,(t=this.conn)===null||t===void 0||t.close(JO,"heartbeat timeout"),setTimeout(()=>{var r;this.isConnected()||(r=this.reconnectTimer)===null||r===void 0||r.sc
179heduleTimeout()},Ha.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(t){this.heartbeatCallback=t}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let r=this.channels.find(n=>n.topic===t&&(n._isJoined()||n._isJoining()));r&&(this.log("transport",`leaving duplicate topic "${t}"`),r.unsubscribe())}_remove(t){this.channels=this.channels.filter(r=>r.topic!==t.topic)}_onConnMessage(t){this.decode(t.data,r=>{if(r.topic==="phoenix"&&r.event==="phx_reply")try{this.heartbeatCallback(r.payload.status==="ok"?"ok":"error")}catch(u){this.log("error","error in heartbeat callback",u)}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(u=>u._isMember(n)).forEach(u=>u._trigger(s,o,i)),this._triggerStateCallbacks("message",r)})}_clearTimer(t){var r;t==="heartbeat"&&this.heartbeatTimer?(clearInterval(this.heartbeatTimer),this.heartbeatTimer=void 0):t==="reconnect"&&((r=this.reconnectTimer)===null||r===void 0||r.reset())}_clearAllTimers(){this._clearTimer("heartbeat"),this._clearTimer("reconnect")}_setupConnectionHandlers(){this.conn&&("binaryType"in this.conn&&(this.conn.binaryType="arraybuffer"),this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_teardownConnection(){if(this.conn){if(this.conn.readyState===Vn.open||this.conn.readyState===Vn.connecting)try{this.conn.close()}catch(t){this.log("error","Error closing connection",t)}this.conn.onopen=null,this.conn.onerror=null,this.conn.onmessage=null,this.conn.onclose=null,this.conn=null}this._clearAllTimers(),this.channels.forEach(t=>t.teardown())}_onConnOpen(){this._setConnectionState("connected"),this.log("transport",`connected to ${this.endpointURL()}`),(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).then(()=>{this.flushSendBuffer()}).catch(r=>{this.log("error","error waiting for auth on connect",r),this.flushSendBuffer()}),this._clearTimer("reconnect"),this.worker?this.workerRef||this._startWorkerHeartbeat():this._startHeartbeat(),this._triggerStateCallbacks("open")}_startHeartbeat(){this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs)}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=r=>{this.log("worker","worker error",r.message),this.workerRef.terminate()},this.workerRef.onmessage=r=>{r.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_onConnClose(t){var r;this._setConnectionState("disconnected"),this.log("transport","close",t),this._triggerChanError(),this._clearTimer("heartbeat"),this._wasManualDisconnect||(r=this.reconnectTimer)===null||r===void 0||r.sc
179heduleTimeout(),this._triggerStateCallbacks("close",t)}_onConnError(t){this._setConnectionState("disconnected"),this.log("transport",`${t}`),this._triggerChanError(),this._triggerStateCallbacks("error",t)}_triggerChanError(){this.channels.forEach(t=>t._trigger(Gt.error))}_appendParams(t,r){if(Object.keys(r).length===0)return t;const n=t.match(/\?/)?"&":"?",s=new URLSearchParams(r);return`${t}${n}${s}`}_workerObjectUrl(t){let r;if(t)r=t;else{const n=new Blob([lA],{type:"application/javascript"});r=URL.createObjectURL(n)}return r}_setConnectionState(t,r=!1){this._connectionState=t,t==="connecting"?this._wasManualDisconnect=!1:t==="disconnecting"&&(this._wasManualDisconnect=r)}async _performAuth(t=null){let r;t?r=t: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:QO};r&&n.updateJoinPayload(s),n.joinedOnce&&n._isJoined()&&n._push(Gt.access_token,{access_token:r})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(t="general"){this.setAuth().catch(r=>{this.log("error",`error setting auth in ${t}`,r)})}_triggerStateCallbacks(t,r){try{this.stateChangeCallbacks[t].forEach(n=>{try{n(r)}catch(s){this.log("error",`error in ${t} callback`,s)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}_setupReconnectionTimer(){this.reconnectTimer=new Ex(async()=>{setTimeout(async()=>{await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()},Ha.RECONNECT_DELAY)},this.reconnectAfterMs)}_initializeOptions(t){var r,n,s,o,i,a,l,u,c,d,f,h;switch(this.transport=(r=t==null?void 0:t.transport)!==null&&r!==void 0?r:null,this.timeout=(n=t==null?void 0:t.timeout)!==null&&n!==void 0?n:xh,this.heartbeatIntervalMs=(s=t==null?void 0:t.heartbeatIntervalMs)!==null&&s!==void 0?s:Ha.HEARTBEAT_INTERVAL,this.worker=(o=t==null?void 0:t.worker)!==null&&o!==void 0?o:!1,this.accessToken=(i=t==null?void 0:t.accessToken)!==null&&i!==void 0?i:null,this.heartbeatCallback=(a=t==null?void 0:t.heartbeatCallback)!==null&&a!==void 0?a:Rc,this.vsn=(l=t==null?void 0:t.vsn)!==null&&l!==void 0?l:zg,t!=null&&t.params&&(this.params=t.params),t!=null&&t.logger&&(this.logger=t.logger),(t!=null&&t.logLevel||t!=null&&t.log_level)&&(this.logLevel=t.logLevel||t.log_level,this.params=Object.assign(Object.assign({},this.params),{log_level:this.logLevel})),this.reconnectAfterMs=(u=t==null?void 0:t.reconnectAfterMs)!==null&&u!==void 0?u:b=>iA[b-1]||aA,this.vsn){case Sx:this.encode=(c=t==null?void 0:t.encode)!==null&&c!==void 0?c:(b,m)=>m(JSON.stringify(b)),this.decode=(d=t==null?void 0:t.decode)!==null&&d!==void 0?d:(b,m)=>m(JSON.parse(b));break;case YO:this.encode=(f=t==null?void 0:t.encode)!==null&&f!==void 0?f:this.serializer.encode.bind(this.serializer),this.decode=(h=t==null?void 0:t.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=t==null?void 0:t.workerUrl}}}class Iu extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function be(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class cA extends Iu{constructor(t,r,n){super(t),this.name="StorageApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class Eh extends Iu{constructor(t,r){super(t),this.name="StorageUnknownError",this.originalError=r}}const hp=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),dA=()=>Response,kh=e=>{if(Array.isArray(e))return e.map(r=>kh(r));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([r,n])=>{const s=r.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[s]=kh(n)}),t},hA=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},fA=e=>!e||typeof e!="string"||e.length===0||e.length>100||e.trim()!==e||e.includes("/")||e.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(e),Oc=e=>{var t;return e.msg||e.message||e.error_description||(typeof e.error=="string"?e.error:(t=e.error)===null||t===void 0?void 0:t.message)||JSON.stringify(e)},pA=(e,t,r)=>B(void 0,void 0,void 0,function*(){const n=yield dA();e instanceof n&&!(r!=null&&r.noResolveJson)?e.json().then(s=>{const o=e.status||500,i=(s==null?void 0:s.statusCode)||o+"";t(new cA(Oc(s),o,i))}).catch(s=>{t(new Eh(Oc(s),s))}):t(new Eh(Oc(e),e))}),mA=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"||!n?s:(hA(n)?(s.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,t!=null&&t.duplex&&(s.duplex=t.duplex),Object.assign(Object.assign({},s),r))};function da(e,t,r,n,s,o){return B(this,void 0,void 0,function*(){return new Promise((i,a)=>{e(r,mA(t,n,s,o)).then(l=>{if(!l.ok)throw l;return n!=null&&n.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>pA(l,a,n))})})}function qi(e,t,r,n){return B(this,void 0,void 0,function*(){return da(e,"GET",t,r,n)})}function Vt(e,t,r,n,s){return B(this,void 0,void 0,function*(){return da(e,"POST",t,n,s,r)})}function Ch(e,t,r,n,s){return B(this,void 0,void 0,function*(){return da(e,"PUT",t,n,s,r)})}function gA(e,t,r,n){return B(this,void 0,void 0,function*(){return da(e,"HEAD",t,Object.assign(Object.assign({},r),{noResolveJson:!0}),n)})}function fp(e,t,r,n,s){return B(this,void 0,void 0,function*(){return da(e,"DELETE",t,n,s,r)})}class vA{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r}then(t,r){return this.execute().then(t,r)}execute(){return B(this,void 0,void 0,function*(){try{return{data:(yield this.downloadFn()).body,error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(be(t))return{data:null,error:t};throw t}})}}var Tx;class yA{constructor(t,r){this.downloadFn=t,this.shouldThrowOnError=r,this[Tx]="BlobDownloadBuilder",this.promise=null}asStream(){return new vA(this.downloadFn,this.shouldThrowOnError)}then(t,r){return this.getPromise().then(t,r)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}execute(){return B(this,void 0,void 0,function*(){try{return{data:yield(yield this.downloadFn()).blob(),error:null}}catch(t){if(this.shouldThrowOnError)throw t;if(be(t))return{data:null,error:t};throw t}})}}Tx=Symbol.toStringTag;const wA={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Hg={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class bA{constructor(t,r={},n,s){this.shouldThrowOnError=!1,this.url=t,this.headers=r,this.bucketId=n,this.fetch=hp(s)}throwOnError(){return this.shouldThrowOnError=!0,this}uploadOrUpdate(t,r,n,s){return B(this,void 0,void 0,function*(){try{let o;const i=Object.assign(Object.assign({},Hg),s);let a=Object.assign(Object.assign({},this.headers),t==="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 u=this._removeEmptyFolders(r),c=this._getFinalPath(u),d=yield(t=="PUT"?Ch:Vt)(this.fetch,`${this.url}/object/${c}`,o,Object.assign({headers:a},i!=null&&i.duplex?{duplex:i.duplex}:{}));return{data:{path:u,id:d.Id,fullPath:d.Key},error:null}}catch(o){if(this.shouldThrowOnError)throw o;if(be(o))return{data:null,error:o};throw o}})}upload(t,r,n){return B(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,r,n)})}uploadToSignedUrl(t,r,n,s){return B(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(t),i=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${i}`);a.searchParams.set("token",r);try{let l;const u=Object.assign({upsert:Hg.upsert},s),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.append("cacheControl",u.cacheControl)):(l=n,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const d=yield Ch(this.fetch,a.toString(),l,{headers:c});return{data:{path:o,fullPath:d.Key},error:null}}catch(l){if(this.shouldThrowOnError)throw l;if(be(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,r){return B(this,void 0,void 0,function*(){try{let n=this._getFinalPath(t);const s=Object.assign({},this.headers);r!=null&&r.upsert&&(s["x-upsert"]="true");const o=yield Vt(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 Iu("No token returned by API");return{data:{signedUrl:i.toString(),path:t,token:a},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(be(n))return{data:null,error:n};throw n}})}update(t,r,n){return B(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,r,n)})}move(t,r,n){return B(this,void 0,void 0,function*(){try{return{data:yield Vt(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers}),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(be(s))return{data:null,error:s};throw s}})}copy(t,r,n){return B(this,void 0,void 0,function*(){try{return{data:{path:(yield Vt(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:r,destinationBucket:n==null?void 0:n.destinationBucket},{headers:this.headers})).Key},error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(be(s))return{data:null,error:s};throw s}})}createSignedUrl(t,r,n){return B(this,void 0,void 0,function*(){try{let s=this._getFinalPath(t),o=yield Vt(this.fetch,`${this.url}/object/sign/${s}
179`,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(be(s))return{data:null,error:s};throw s}})}createSignedUrls(t,r,n){return B(this,void 0,void 0,function*(){try{const s=yield Vt(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:r,paths:t},{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(be(s))return{data:null,error:s};throw s}})}download(t,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(t),l=()=>qi(this.fetch,`${this.url}/${s}/${a}${i}`,{headers:this.headers,noResolveJson:!0});return new yA(l,this.shouldThrowOnError)}info(t){return B(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{const n=yield qi(this.fetch,`${this.url}/object/info/${r}`,{headers:this.headers});return{data:kh(n),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(be(n))return{data:null,error:n};throw n}})}exists(t){return B(this,void 0,void 0,function*(){const r=this._getFinalPath(t);try{return yield gA(this.fetch,`${this.url}/object/${r}`,{headers:this.headers}),{data:!0,error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(be(n)&&n instanceof Eh){const s=n.originalError;if([400,404].includes(s==null?void 0:s.status))return{data:!1,error:n}}throw n}})}getPublicUrl(t,r){const n=this._getFinalPath(t),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 u=s.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${n}${u}`)}}}remove(t){return B(this,void 0,void 0,function*(){try{return{data:yield fp(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}list(t,r,n){return B(this,void 0,void 0,function*(){try{const s=Object.assign(Object.assign(Object.assign({},wA),r),{prefix:t||""});return{data:yield Vt(this.fetch,`${this.url}/object/list/${this.bucketId}`,s,{headers:this.headers},n),error:null}}catch(s){if(this.shouldThrowOnError)throw s;if(be(s))return{data:null,error:s};throw s}})}listV2(t,r){return B(this,void 0,void 0,function*(){try{const n=Object.assign({},t);return{data:yield Vt(this.fetch,`${this.url}/object/list-v2/${this.bucketId}`,n,{headers:this.headers},r),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(be(n))return{data:null,error:n};throw n}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const r=[];return t.width&&r.push(`width=${t.width}`),t.height&&r.push(`height=${t.height}`),t.resize&&r.push(`resize=${t.resize}`),t.format&&r.push(`format=${t.format}`),t.quality&&r.push(`quality=${t.quality}`),r.join("&")}}const Px="2.86.0",Rx={"X-Client-Info":`storage-js/${Px}`};class xA{constructor(t,r={},n,s){this.shouldThrowOnError=!1;const o=new URL(t);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({},Rx),r),this.fetch=hp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}listBuckets(t){return B(this,void 0,void 0,function*(){try{const r=this.listBucketOptionsToQueryString(t);return{data:yield qi(this.fetch,`${this.url}/bucket${r}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}getBucket(t){return B(this,void 0,void 0,function*(){try{return{data:yield qi(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}createBucket(t){return B(this,arguments,void 0,function*(r,n={public:!1}){try{return{data:yield Vt(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(be(s))return{data:null,error:s};throw s}})}updateBucket(t,r){return B(this,void 0,void 0,function*(){try{return{data:yield Ch(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,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(be(n))return{data:null,error:n};throw n}})}emptyBucket(t){return B(this,void 0,void 0,function*(){try{return{data:yield Vt(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}deleteBucket(t){return B(this,void 0,void 0,function*(){try{return{data:yield fp(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}listBucketOptionsToQueryString(t){const r={};return t&&("limit"in t&&(r.limit=String(t.limit)),"offset"in t&&(r.offset=String(t.offset)),t.search&&(r.search=t.search),t.sortColumn&&(r.sortColumn=t.sortColumn),t.sortOrder&&(r.sortOrder=t.sortOrder)),Object.keys(r).length>0?"?"+new URLSearchParams(r).toString():""}}
179var Ki=class extends Error{constructor(e,t){var r;super(e),this.name="IcebergError",this.status=t.status,this.icebergType=t.icebergType,this.icebergCode=t.icebergCode,this.details=t.details,this.isCommitStateUnknown=t.icebergType==="CommitStateUnknownException"||[500,502,504].includes(t.status)&&((r=t.icebergType)==null?void 0:r.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function _A(e,t,r){const n=new URL(t,e);if(r)for(const[s,o]of Object.entries(r))o!==void 0&&n.searchParams.set(s,o);return n.toString()}async function SA(e){return!e||e.type==="none"?{}:e.type==="bearer"?{Authorization:`Bearer ${e.token}`}:e.type==="header"?{[e.name]:e.value}:e.type==="custom"?await e.getHeaders():{}}function EA(e){const t=e.fetchImpl??globalThis.fetch;return{async request({method:r,path:n,query:s,body:o,headers:i}){const a=_A(e.baseUrl,n,s),l=await SA(e.auth),u=await t(a,{method:r,headers:{...o?{"Content-Type":"application/json"}:{},...l,...i},body:o?JSON.stringify(o):void 0}),c=await u.text(),d=(u.headers.get("content-type")||"").includes("application/json"),f=d&&c?JSON.parse(c):c;if(!u.ok){const h=d?f:void 0,b=h==null?void 0:h.error;throw new Ki((b==null?void 0:b.message)??`Request failed with status ${u.status}`,{status:u.status,icebergType:b==null?void 0:b.type,icebergCode:b==null?void 0:b.code,details:h})}return{status:u.status,headers:u.headers,data:f}}}}function qa(e){return e.join("�")}var kA=class{constructor(e,t=""){this.client=e,this.prefix=t}async listNamespaces(e){const t=e?{parent:qa(e.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:t})).data.namespaces.map(n=>({namespace:n}))}async createNamespace(e,t){const r={namespace:e.namespace,properties:t==null?void 0:t.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:r})).data}async dropNamespace(e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${qa(e.namespace)}`})}async loadNamespaceMetadata(e){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${qa(e.namespace)}`})).data.properties}}async namespaceExists(e){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${qa(e.namespace)}`}),!0}catch(t){if(t instanceof Ki&&t.status===404)return!1;throw t}}async createNamespaceIfNotExists(e,t){try{return await this.createNamespace(e,t)}catch(r){if(r instanceof Ki&&r.status===409)return;throw r}}};function Ps(e){return e.join("�")}var CA=class{constructor(e,t="",r){this.client=e,this.prefix=t,this.accessDelegation=r}async listTables(e){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ps(e.namespace)}/tables`})).data.identifiers}async createTable(e,t){const r={};return this.accessDelegation&&(r["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ps(e.namespace)}/tables`,body:t,headers:r})).data.metadata}async updateTable(e,t){const r=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${Ps(e.namespace)}/tables/${e.name}`,body:t});return{"metadata-location":r.data["metadata-location"],metadata:r.data.metadata}}async dropTable(e,t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${Ps(e.namespace)}/tables/${e.name}`,query:{purgeRequested:String((t==null?void 0:t.purge)??!1)}})}async loadTable(e){const t={};return this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${Ps(e.namespace)}/tables/${e.name}`,headers:t})).data.metadata}async tableExists(e){const t={};this.accessDelegation&&(t["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${Ps(e.namespace)}/tables/${e.name}`,headers:t}),!0}catch(r){if(r instanceof Ki&&r.status===404)return!1;throw r}}async createTableIfNotExists(e,t){try{return await this.createTable(e,t)}catch(r){if(r instanceof Ki&&r.status===409)return await this.loadTable({namespace:e.namespace,name:t.name});throw r}}},TA=class{constructor(e){var n;let t="v1";e.catalogName&&(t+=`/${e.catalogName}`);const r=e.baseUrl.endsWith("/")?e.baseUrl:`${e.baseUrl}/`;this.client=EA({baseUrl:r,auth:e.auth,fetchImpl:e.fetch}),this.accessDelegation=(n=e.accessDelegation)==null?void 0:n.join(","),this.namespaceOps=new kA(this.client,t),this.tableOps=new CA(this.client,t,this.accessDelegation)}async listNamespaces(e){return this.namespaceOps.listNamespaces(e)}async createNamespace(e,t){return this.namespaceOps.createNamespace(e,t)}async dropNamespace(e){await this.namespaceOps.dropNamespace(e)}async loadNamespaceMetadata(e){return this.namespaceOps.loadNamespaceMetadata(e)}async listTables(e){return this.tableOps.listTables(e)}
179async createTable(e,t){return this.tableOps.createTable(e,t)}async updateTable(e,t){return this.tableOps.updateTable(e,t)}async dropTable(e,t){await this.tableOps.dropTable(e,t)}async loadTable(e){return this.tableOps.loadTable(e)}async namespaceExists(e){return this.namespaceOps.namespaceExists(e)}async tableExists(e){return this.tableOps.tableExists(e)}async createNamespaceIfNotExists(e,t){return this.namespaceOps.createNamespaceIfNotExists(e,t)}async createTableIfNotExists(e,t){return this.tableOps.createTableIfNotExists(e,t)}};class PA{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},Rx),r),this.fetch=hp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return B(this,void 0,void 0,function*(){try{return{data:yield Vt(this.fetch,`${this.url}/bucket`,{name:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}listBuckets(t){return B(this,void 0,void 0,function*(){try{const r=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&r.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&r.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&r.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&r.set("sortOrder",t.sortOrder),t!=null&&t.search&&r.set("search",t.search);const n=r.toString(),s=n?`${this.url}/bucket?${n}`:`${this.url}/bucket`;return{data:yield qi(this.fetch,s,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}deleteBucket(t){return B(this,void 0,void 0,function*(){try{return{data:yield fp(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(be(r))return{data:null,error:r};throw r}})}from(t){if(!fA(t))throw new Iu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");return new TA({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:()=>B(this,void 0,void 0,function*(){return this.headers})},fetch:this.fetch})}}const pp={"X-Client-Info":`storage-js/${Px}`,"Content-Type":"application/json"};class Ox extends Error{constructor(t){super(t),this.__isStorageVectorsError=!0,this.name="StorageVectorsError"}}function vt(e){return typeof e=="object"&&e!==null&&"__isStorageVectorsError"in e}class Ac extends Ox{constructor(t,r,n){super(t),this.name="StorageVectorsApiError",this.status=r,this.statusCode=n}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}}class RA extends Ox{constructor(t,r){super(t),this.name="StorageVectorsUnknownError",this.originalError=r}}var qg;(function(e){e.InternalError="InternalError",e.S3VectorConflictException="S3VectorConflictException",e.S3VectorNotFoundException="S3VectorNotFoundException",e.S3VectorBucketNotEmpty="S3VectorBucketNotEmpty",e.S3VectorMaxBucketsExceeded="S3VectorMaxBucketsExceeded",e.S3VectorMaxIndexesExceeded="S3VectorMaxIndexesExceeded"})(qg||(qg={}));const mp=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),OA=e=>{if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Kg=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),AA=(e,t,r)=>B(void 0,void 0,void 0,function*(){if(e&&typeof e=="object"&&"status"in e&&"ok"in e&&typeof e.status=="number"&&!(r!=null&&r.noResolveJson)){const s=e.status||500,o=e;if(typeof o.json=="function")o.json().then(i=>{const a=(i==null?void 0:i.statusCode)||(i==null?void 0:i.code)||s+"";t(new Ac(Kg(i),s,a))}).catch(()=>{const i=s+"",a=o.statusText||`HTTP ${s} error`;t(new Ac(a,s,i))});else{const i=s+"",a=o.statusText||`HTTP ${s} error`;t(new Ac(a,s,i))}}else t(new RA(Kg(e),e))}),jA=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return n?(OA(n)?(s.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),s.body=JSON.stringify(n)):s.body=n,Object.assign(Object.assign({},s),r)):s};function NA(e,t,r,n,s,o){return B(this,void 0,void 0,function*(){return new Promise((i,a)=>{e(r,jA(t,n,s,o)).then(l=>{if(!l.ok)throw l;if(n!=null&&n.noResolveJson)return l;const u=l.headers.get("content-type");return!u||!u.includes("application/json")?{}:l.json()}).then(l=>i(l)).catch(l=>AA(l,a,n))})})}function yt(e,t,r,n,s){return B(this,void 0,void 0,function*(){return NA(e,"POST",t,n,s,r)})}class IA{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},pp),r),this.fetch=mp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createIndex(t){return B(this,void 0,void 0,function*(){try{return{data:(yield yt(this.fetch,`${this.url}/CreateIndex`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}getIndex(t,r){return B(this,void 0,void 0,function*(){try{return{data:yield yt(this.fetch,`${this.url}/GetIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}),error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(vt(n))return{data:null,error:n};throw n}})}listIndexes(t){return B(this,void 0,void 0,function*(){try{return{data:yield yt(this.fetch,`${this.url}/ListIndexes`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}deleteIndex(t,r){return B(this,void 0,void 0,function*(){try{return{data:(yield yt(this.fetch,`${this.url}/DeleteIndex`,{vectorBucketName:t,indexName:r},{headers:this.headers}))||{},error:null}}catch(n){if(this.shouldThrowOnError)throw n;if(vt(n))return{data:null,error:n};throw n}})}}class DA{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},pp),r),this.fetch=mp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}putVectors(t){return B(this,void 0,void 0,function*(){try{if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return{data:(yield yt(this.fetch,`${this.url}/PutVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}getVectors(t){return B(this,void 0,void 0,function*(){try{return{data:yield yt(this.fetch,`${this.url}/GetVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}listVectors(t){return B(this,void 0,void 0,function*(){try{if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");
179if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return{data:yield yt(this.fetch,`${this.url}/ListVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}queryVectors(t){return B(this,void 0,void 0,function*(){try{return{data:yield yt(this.fetch,`${this.url}/QueryVectors`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}deleteVectors(t){return B(this,void 0,void 0,function*(){try{if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return{data:(yield yt(this.fetch,`${this.url}/DeleteVectors`,t,{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}}class LA{constructor(t,r={},n){this.shouldThrowOnError=!1,this.url=t.replace(/\/$/,""),this.headers=Object.assign(Object.assign({},pp),r),this.fetch=mp(n)}throwOnError(){return this.shouldThrowOnError=!0,this}createBucket(t){return B(this,void 0,void 0,function*(){try{return{data:(yield yt(this.fetch,`${this.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}getBucket(t){return B(this,void 0,void 0,function*(){try{return{data:yield yt(this.fetch,`${this.url}/GetVectorBucket`,{vectorBucketName:t},{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}listBuckets(){return B(this,arguments,void 0,function*(t={}){try{return{data:yield yt(this.fetch,`${this.url}/ListVectorBuckets`,t,{headers:this.headers}),error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}deleteBucket(t){return B(this,void 0,void 0,function*(){try{return{data:(yield yt(this.fetch,`${this.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:this.headers}))||{},error:null}}catch(r){if(this.shouldThrowOnError)throw r;if(vt(r))return{data:null,error:r};throw r}})}}class MA extends LA{constructor(t,r={}){super(t,r.headers||{},r.fetch)}from(t){return new $A(this.url,this.headers,t,this.fetch)}createBucket(t){const r=Object.create(null,{createBucket:{get:()=>super.createBucket}});return B(this,void 0,void 0,function*(){return r.createBucket.call(this,t)})}getBucket(t){const r=Object.create(null,{getBucket:{get:()=>super.getBucket}});return B(this,void 0,void 0,function*(){return r.getBucket.call(this,t)})}listBuckets(){const t=Object.create(null,{listBuckets:{get:()=>super.listBuckets}});return B(this,arguments,void 0,function*(r={}){return t.listBuckets.call(this,r)})}deleteBucket(t){const r=Object.create(null,{deleteBucket:{get:()=>super.deleteBucket}});return B(this,void 0,void 0,function*(){return r.deleteBucket.call(this,t)})}}class $A extends IA{constructor(t,r,n,s){super(t,r,s),this.vectorBucketName=n}createIndex(t){const r=Object.create(null,{createIndex:{get:()=>super.createIndex}});return B(this,void 0,void 0,function*(){return r.createIndex.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName}))})}listIndexes(){const t=Object.create(null,{listIndexes:{get:()=>super.listIndexes}});return B(this,arguments,void 0,function*(r={}){return t.listIndexes.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName}))})}getIndex(t){const r=Object.create(null,{getIndex:{get:()=>super.getIndex}});return B(this,void 0,void 0,function*(){return r.getIndex.call(this,this.vectorBucketName,t)})}deleteIndex(t){const r=Object.create(null,{deleteIndex:{get:()=>super.deleteIndex}});return B(this,void 0,void 0,function*(){return r.deleteIndex.call(this,this.vectorBucketName,t)})}index(t){return new FA(this.url,this.headers,this.vectorBucketName,t,this.fetch)}}class FA extends DA{constructor(t,r,n,s,o){super(t,r,o),this.vectorBucketName=n,this.indexName=s}putVectors(t){const r=Object.create(null,{putVectors:{get:()=>super.putVectors}});return B(this,void 0,void 0,function*(){return r.putVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}getVectors(t){const r=Object.create(null,{getVectors:{get:()=>super.getVectors}});return B(this,void 0,void 0,function*(){return r.getVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}listVectors(){const t=Object.create(null,{listVectors:{get:()=>super.listVectors}});return B(this,arguments,void 0,function*(r={}){return t.listVectors.call(this,Object.assign(Object.assign({},r),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}queryVectors(t){const r=Object.create(null,{queryVectors:{get:()=>super.queryVectors}});return B(this,void 0,void 0,function*(){return r.queryVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}deleteVectors(t){const r=Object.create(null,{deleteVectors:{get:()=>super.deleteVectors}});return B(this,void 0,void 0,function*(){return r.deleteVectors.call(this,Object.assign(Object.assign({},t),{vectorBucketName:this.vectorBucketName,indexName:this.indexName}))})}}class UA extends xA{constructor(t,r={},n,s){super(t,r,n,s)}from(t){return new bA(this.url,this.headers,t,this.fetch)}get vectors(){return new MA(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new PA(this.url+"/iceberg",this.headers,this.fetch)}}const zA="2.86.0";let ui="";typeof Deno<"u"?ui="deno":typeof document<"u"?ui="web":typeof navigator<"u"&&navigator.product==="ReactNative"?ui="react-native":ui="node";const BA={"X-Client-Info":`supabase-js-${ui}/${zA}`},WA={headers:BA},VA={schema:"public"},HA={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},qA={},KA=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),GA=()=>Headers,QA=(e,t,r)=>{const n=KA(r),s=GA();return async(o,i)=>{var a;const l=(a=await t())!==null&&a!==void 0?a:e;let u=new s(i==null?void 0:i.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),n(o,Object.assign(Object.assign({},i),{headers:u}))}};function YA(e){return e.endsWith("/")?e:e+"/"}function JA(e,t){var r,n;const{db:s,auth:o,realtime:i,global:a}=e,{db:l,auth:u,realtime:c,global:d}=t,f={db:Object.assign(Object.assign({},l),s),auth:Object.assign(Object.assign({},u),o),realtime:Object.assign(Object.assign({},c),i),storage:{},global:Object.assign(Object.assign(Object.assign({},d),a),{headers:Object.assign(Object.assign({},(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{}),(n=a==null?void 0:a.headers)!==null&&n!==void 0?n:{})}),accessToken:async()=>""};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}function XA(e){const t=e==null?void 0:e.trim();if(!t)throw new Error("supabaseUrl is required.");
179if(!t.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(YA(t))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}const Ax="2.86.0",$s=30*1e3,Th=3,jc=Th*$s,ZA="http://localhost:9999",ej="supabase.auth.token",tj={"X-Client-Info":`gotrue-js/${Ax}`},Ph="X-Supabase-Api-Version",jx={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},rj=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,nj=10*60*1e3;class Gi extends Error{constructor(t,r,n){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=r,this.code=n}}function W(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class sj extends Gi{constructor(t,r,n){super(t,r,n),this.name="AuthApiError",this.status=r,this.code=n}}function oj(e){return W(e)&&e.name==="AuthApiError"}class qn extends Gi{constructor(t,r){super(t),this.name="AuthUnknownError",this.originalError=r}}class In extends Gi{constructor(t,r,n,s){super(t,n,s),this.name=r,this.status=n}}class pt extends In{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ij(e){return W(e)&&e.name==="AuthSessionMissingError"}class Rs extends In{constructor(){super("Auth session or user missing","AuthInvalidToken
179ResponseError",500,void 0)}}class Ka extends In{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Ga extends In{constructor(t,r=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function aj(e){return W(e)&&e.name==="AuthImplicitGrantRedirectError"}class Gg extends In{constructor(t,r=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=r}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class Rh extends In{constructor(t,r){super(t,"AuthRetryableFetchError",r,void 0)}}function Nc(e){return W(e)&&e.name==="AuthRetryableFetchError"}class Qg extends In{constructor(t,r,n){super(t,"AuthWeakPasswordError",r,"weak_password"),this.reasons=n}}class Oh extends In{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Xl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Yg=` 	
180\r=`.split(""),lj=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Yg.length;t+=1)e[Yg[t].charCodeAt(0)]=-2;for(let t=0;t<Xl.length;t+=1)e[Xl[t].charCodeAt(0)]=t;return e})();function Jg(e,t,r){if(e!==null)for(t.queue=t.queue<<8|e,t.queuedBits+=8;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Xl[n]),t.queuedBits-=6}else if(t.queuedBits>0)for(t.queue=t.queue<<6-t.queuedBits,t.queuedBits=6;t.queuedBits>=6;){const n=t.queue>>t.queuedBits-6&63;r(Xl[n]),t.queuedBits-=6}}function Nx(e,t,r){const n=lj[e];if(n>-1)for(t.queue=t.queue<<6|n,t.queuedBits+=6;t.queuedBits>=8;)r(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(n===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Xg(e){const t=[],r=i=>{t.push(String.fromCodePoint(i))},n={utf8seq:0,codepoint:0},s={queue:0,queuedBits:0},o=i=>{dj(i,n,r)};for(let i=0;i<e.length;i+=1)Nx(e.charCodeAt(i),s,o);return t.join("")}function uj(e,t){if(e<=127){t(e);return}else if(e<=2047){t(192|e>>6),t(128|e&63);return}else if(e<=65535){t(224|e>>12),t(128|e>>6&63),t(128|e&63);return}else if(e<=1114111){t(240|e>>18),t(128|e>>12&63),t(128|e>>6&63),t(128|e&63);return}throw new Error(`Unrecognized Unicode codepoint: ${e.toString(16)}`)}function cj(e,t){for(let r=0;r<e.length;r+=1){let n=e.charCodeAt(r);if(n>55295&&n<=56319){const s=(n-55296)*1024&65535;n=(e.charCodeAt(r+1)-56320&65535|s)+65536,r+=1}uj(n,t)}}function dj(e,t,r){if(t.utf8seq===0){if(e<=127){r(e);return}for(let n=1;n<6;n+=1)if(!(e>>7-n&1)){t.utf8seq=n;break}if(t.utf8seq===2)t.codepoint=e&31;else if(t.utf8seq===3)t.codepoint=e&15;else if(t.utf8seq===4)t.codepoint=e&7;else throw new Error("Invalid UTF-8 sequence");t.utf8seq-=1}else if(t.utf8seq>0){if(e<=127)throw new Error("Invalid UTF-8 sequence");t.codepoint=t.codepoint<<6|e&63,t.utf8seq-=1,t.utf8seq===0&&r(t.codepoint)}}function ao(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};for(let s=0;s<e.length;s+=1)Nx(e.charCodeAt(s),r,n);return new Uint8Array(t)}function hj(e){const t=[];return cj(e,r=>t.push(r)),new Uint8Array(t)}function Yn(e){const t=[],r={queue:0,queuedBits:0},n=s=>{t.push(s)};return e.forEach(s=>Jg(s,r,n)),Jg(null,r,n),t.join("")}function fj(e){return Math.round(Date.now()/1e3)+e}function pj(){return Symbol("auth-callback")}const Fe=()=>typeof window<"u"&&typeof document<"u",$n={tested:!1,writable:!1},Ix=()=>{if(!Fe())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if($n.tested)return $n.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),$n.tested=!0,$n.writable=!0}catch{$n.tested=!0,$n.writable=!1}return $n.writable};function mj(e){const t={},r=new URL(e);if(r.hash&&r.hash[0]==="#")try{new URLSearchParams(r.hash.substring(1)).forEach((s,o)=>{t[o]=s})}catch{}return r.searchParams.forEach((n,s)=>{t[s]=n}),t}const Dx=e=>e?(...t)=>e(...t):(...t)=>fetch(...t),gj=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",Fs=async(e,t,r)=>{await e.setItem(t,JSON.stringify(r))},Fn=async(e,t)=>{const r=await e.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch{return r}},Hr=async(e,t)=>{await e.removeItem(t)};class Du{constructor(){this.promise=new Du.promiseConstructor((t,r)=>{this.resolve=t,this.reject=r})}}Du.promiseConstructor=Promise;function Ic(e){const t=e.split(".");if(t.length!==3)throw new Oh("Invalid JWT structure");for(let n=0;n<t.length;n++)if(!rj.test(t[n]))throw new Oh("JWT not in base64url format");
180return{header:JSON.parse(Xg(t[0])),payload:JSON.parse(Xg(t[1])),signature:ao(t[2]),raw:{header:t[0],payload:t[1]}}}async function vj(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function yj(e,t){return new Promise((n,s)=>{(async()=>{for(let o=0;o<1/0;o++)try{const i=await e(o);if(!t(o,null,i)){n(i);return}}catch(i){if(!t(o,i)){s(i);return}}})()})}function wj(e){return("0"+e.toString(16)).substr(-2)}function bj(){const t=new Uint32Array(56);if(typeof crypto>"u"){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",n=r.length;let s="";for(let o=0;o<56;o++)s+=r.charAt(Math.floor(Math.random()*n));return s}return crypto.getRandomValues(t),Array.from(t,wj).join("")}async function xj(e){const r=new TextEncoder().encode(e),n=await crypto.subtle.digest("SHA-256",r),s=new Uint8Array(n);return Array.from(s).map(o=>String.fromCharCode(o)).join("")}async function _j(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const r=await xj(e);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Os(e,t,r=!1){const n=bj();let s=n;r&&(s+="/PASSWORD_RECOVERY"),await Fs(e,`${t}-code-verifier`,s);const o=await _j(n);return[o,n===o?"plain":"s256"]}const Sj=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Ej(e){const t=e.headers.get(Ph);if(!t||!t.match(Sj))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function kj(e){if(!e)throw new Error("Missing exp claim");const t=Math.floor(Date.now()/1e3);if(e<=t)throw new Error("JWT has expired")}function Cj(e){switch(e){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const Tj=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function As(e){if(!Tj.test(e))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Dc(){const e={};return new Proxy(e,{get:(t,r)=>{if(r==="__isUserNotAvailableProxy")return!0;if(typeof r=="symbol"){const n=r.toString();if(n==="Symbol(Symbol.toPrimitive)"||n==="Symbol(Symbol.toStringTag)"||n==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${r}" property of the session object is not supported. Please use getUser() instead.`)},set:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(t,r)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${r}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Pj(e,t){return new Proxy(e,{get:(r,n,s)=>{if(n==="__isInsecureUserWarningProxy")return!0;if(typeof n=="symbol"){const o=n.toString();if(o==="Symbol(Symbol.toPrimitive)"||o==="Symbol(Symbol.toStringTag)"||o==="Symbol(util.inspect.custom)"||o==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(r,n,s)}return!t.value&&typeof n=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),t.value=!0),Reflect.get(r,n,s)}})}function Zg(e){return JSON.parse(JSON.stringify(e))}const Bn=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Rj=[502,503,504];async function ev(e){var t;if(!gj(e))throw new Rh(Bn(e),0);if(Rj.includes(e.status))throw new Rh(Bn(e),e.status);let r;try{r=await e.json()}catch(o){throw new qn(Bn(o),o)}let n;const s=Ej(e);if(s&&s.getTime()>=jx["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 Qg(Bn(r),e.status,((t=r.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(n==="session_not_found")throw new pt}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 Qg(Bn(r),e.status,r.weak_password.reasons);throw new sj(Bn(r),e.status||500,n)}
180const Oj=(e,t,r,n)=>{const s={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?s:(s.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),s.body=JSON.stringify(n),Object.assign(Object.assign({},s),r))};async function K(e,t,r,n){var s;const o=Object.assign({},n==null?void 0:n.headers);o[Ph]||(o[Ph]=jx["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 Aj(e,t,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 Aj(e,t,r,n,s,o){const i=Oj(t,n,s,o);let a;try{a=await e(r,Object.assign({},i))}catch(l){throw console.error(l),new Rh(Bn(l),0)}if(a.ok||await ev(a),n!=null&&n.noResolveJson)return a;try{return await a.json()}catch(l){await ev(l)}}function Bt(e){var t;let r=null;Ij(e)&&(r=Object.assign({},e),e.expires_at||(r.expires_at=fj(e.expires_in)));const n=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:r,user:n},error:null}}function tv(e){const t=Bt(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((r,n)=>r&&typeof n=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Zr(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function jj(e){return{data:e,error:null}}function Nj(e){const{action_link:t,email_otp:r,hashed_token:n,redirect_to:s,verification_type:o}=e,i=Nn(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,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 rv(e){return e}function Ij(e){return e.access_token&&e.refresh_token&&e.expires_in}const Lc=["global","local","others"];class Dj{constructor({url:t="",headers:r={},fetch:n}){this.url=t,this.headers=r,this.fetch=Dx(n),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)}}async signOut(t,r=Lc[0]){if(Lc.indexOf(r)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Lc.join(", ")}`);try{return await K(this.fetch,"POST",`${this.url}/logout?scope=${r}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(n){if(W(n))return{data:null,error:n};throw n}}async inviteUserByEmail(t,r={}){try{return await K(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:r.data},headers:this.headers,redirectTo:r.redirectTo,xform:Zr})}catch(n){if(W(n))return{data:{user:null},error:n};throw n}}async generateLink(t){try{const{options:r}=t,n=Nn(t,["options"]),s=Object.assign(Object.assign({},n),r);return"newEmail"in n&&(s.new_email=n==null?void 0:n.newEmail,delete s.newEmail),await K(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:s,headers:this.headers,xform:Nj,redirectTo:r==null?void 0:r.redirectTo})}catch(r){if(W(r))return{data:{properties:null,user:null},error:r};throw r}}async createUser(t){try{return await K(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Zr})}catch(r){if(W(r))return{data:{user:null},error:r};throw r}}async listUsers(t){var r,n,s,o,i,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await K(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:rv});if(c.error)throw c.error;const d=await c.json(),f=(i=c.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>
1800&&(h.forEach(b=>{const m=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(b.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(W(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){As(t);try{return await K(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Zr})}catch(r){if(W(r))return{data:{user:null},error:r};throw r}}async updateUserById(t,r){As(t);try{return await K(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:r,headers:this.headers,xform:Zr})}catch(n){if(W(n))return{data:{user:null},error:n};throw n}}async deleteUser(t,r=!1){As(t);try{return await K(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:r},xform:Zr})}catch(n){if(W(n))return{data:{user:null},error:n};throw n}}async _listFactors(t){As(t.userId);try{const{data:r,error:n}=await K(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:s=>({data:{factors:s},error:null})});return{data:r,error:n}}catch(r){if(W(r))return{data:null,error:r};throw r}}async _deleteFactor(t){As(t.userId),As(t.id);try{return{data:await K(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(r){if(W(r))return{data:null,error:r};throw r}}async _listOAuthClients(t){var r,n,s,o,i,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await K(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(n=(r=t==null?void 0:t.page)===null||r===void 0?void 0:r.toString())!==null&&n!==void 0?n:"",per_page:(o=(s=t==null?void 0:t.perPage)===null||s===void 0?void 0:s.toString())!==null&&o!==void 0?o:""},xform:rv});if(c.error)throw c.error;const d=await c.json(),f=(i=c.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(b=>{const m=parseInt(b.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(b.split(";")[1].split("=")[1]);u[`${w}Page`]=m}),u.total=parseInt(f)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(W(u))return{data:{clients:[]},error:u};throw u}}async _createOAuthClient(t){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:t,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(W(r))return{data:null,error:r};throw r}}async _getOAuthClient(t){try{return await K(this.fetch,"GET",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(W(r))return{data:null,error:r};throw r}}async _updateOAuthClient(t,r){try{return await K(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${t}`,{body:r,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(W(n))return{data:null,error:n};throw n}}async _deleteOAuthClient(t){try{return await K(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${t}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(r){if(W(r))return{data:null,error:r};throw r}}async _regenerateOAuthClientSecret(t){try{return await K(this.fetch,"POST",`${this.url}/admin/oauth/clients/${t}/regenerate_secret`,{headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(W(r))return{data:null,error:r};throw r}}}function nv(e={}){return{getItem:t=>e[t]||null,setItem:(t,r)=>{e[t]=r},removeItem:t=>{delete e[t]}}}const js={debug:!!(globalThis&&Ix()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class Lx extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class Lj extends Lx{}async function Mj(e,t,r){js.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const n=new globalThis.AbortController;return t>0&&setTimeout(()=>{n.abort(),js.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:n.signal},async s=>{if(s){js.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,s.name);try{return await r()}finally{js.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,s.name)}}else{if(t===0)throw js.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new Lj(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(js.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 $j(){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 Mx(e){if(!/^0x[a-fA-F0-9]{40}$/.test(e))throw new Error(`@supabase/auth-js: Address "${e}
180" is invalid.`);return e.toLowerCase()}function Fj(e){return parseInt(e,16)}function Uj(e){const t=new TextEncoder().encode(e);return"0x"+Array.from(t,n=>n.toString(16).padStart(2,"0")).join("")}function zj(e){var t;const{chainId:r,domain:n,expirationTime:s,issuedAt:o=new Date,nonce:i,notBefore:a,requestId:l,resources:u,scheme:c,uri:d,version:f}=e;{if(!Number.isInteger(r))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${r}`);if(!n)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(i&&i.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${i}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((t=e.statement)===null||t===void 0)&&t.includes(`
181`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${e.statement}`)}const h=Mx(e.address),b=c?`${c}://${n}`:n,m=e.statement?`${e.statement}
182`:"",w=`${b} wants you to sign in with your Ethereum account:
183${h}
184
185${m}`;let v=`URI: ${d}
186Version: ${f}
187Chain ID: ${r}${i?`
188Nonce: ${i}`:""}
189Issued At: ${o.toISOString()}`;if(s&&(v+=`
190Expiration Time: ${s.toISOString()}`),a&&(v+=`
191Not Before: ${a.toISOString()}`),l&&(v+=`
192Request ID: ${l}`),u){let g=`
193Resources:`;for(const y of u){if(!y||typeof y!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${y}`);g+=`
194- ${y}`}v+=g}return`${w}
195${v}`}class Re extends Error{constructor({message:t,code:r,cause:n,name:s}){var o;super(t,{cause:n}),this.__isWebAuthnError=!0,this.name=(o=s??(n instanceof Error?n.name:void 0))!==null&&o!==void 0?o:"Unknown Error",this.code=r}}class Zl extends Re{constructor(t,r){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:r,message:t}),this.name="WebAuthnUnknownError",this.originalError=r}}function Bj({error:e,options:t}){var r,n,s;const{publicKey:o}=t;if(!o)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Re({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else if(e.name==="ConstraintError"){if(((r=o.authenticatorSelection)===null||r===void 0?void 0:r.requireResidentKey)===!0)return new Re({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:e});if(t.mediation==="conditional"&&((n=o.authenticatorSelection)===null||n===void 0?void 0:n.userVerification)==="required")return new Re({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:e});if(((s=o.authenticatorSelection)===null||s===void 0?void 0:s.userVerification)==="required")return new Re({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:e})}else{if(e.name==="InvalidStateError")return new Re({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:e});if(e.name==="NotAllowedError")return new Re({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="NotSupportedError")return o.pubKeyCredParams.filter(a=>a.type==="public-key").length===0?new Re({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:e}):new Re({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:e});if(e.name==="SecurityError"){const i=window.location.hostname;if($x(i)){if(o.rp.id!==i)return new Re({message:`The RP ID "${o.rp.id}
195" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Re({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="TypeError"){if(o.user.id.byteLength<1||o.user.id.byteLength>64)return new Re({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:e})}else if(e.name==="UnknownError")return new Re({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Re({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}function Wj({error:e,options:t}){const{publicKey:r}=t;if(!r)throw Error("options was missing required publicKey property");if(e.name==="AbortError"){if(t.signal instanceof AbortSignal)return new Re({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:e})}else{if(e.name==="NotAllowedError")return new Re({message:e.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e});if(e.name==="SecurityError"){const n=window.location.hostname;if($x(n)){if(r.rpId!==n)return new Re({message:`The RP ID "${r.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:e})}else return new Re({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:e})}else if(e.name==="UnknownError")return new Re({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:e})}return new Re({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:e})}class Vj{createNewAbortSignal(){if(this.controller){const r=new Error("Cancelling existing WebAuthn API call for new one");r.name="AbortError",this.controller.abort(r)}const t=new AbortController;return this.controller=t,t.signal}cancelCeremony(){if(this.controller){const t=new Error("Manually cancelling existing WebAuthn API call");t.name="AbortError",this.controller.abort(t),this.controller=void 0}}}const Hj=new Vj;function qj(e){if(!e)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(e);const{challenge:t,user:r,excludeCredentials:n}=e,s=Nn(e,["challenge","user","excludeCredentials"]),o=ao(t).buffer,i=Object.assign(Object.assign({},r),{id:ao(r.id).buffer}),a=Object.assign(Object.assign({},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 u=n[l];a.excludeCredentials[l]=Object.assign(Object.assign({},u),{id:ao(u.id).buffer,type:u.type||"public-key",transports:u.transports})}}return a}function Kj(e){if(!e)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(e);const{challenge:t,allowCredentials:r}=e,n=Nn(e,["challenge","allowCredentials"]),s=ao(t).buffer,o=Object.assign(Object.assign({},n),{challenge:s});if(r&&r.length>0){o.allowCredentials=new Array(r.length);for(let i=0;i<r.length;i++){const a=r[i];o.allowCredentials[i]=Object.assign(Object.assign({},a),{id:ao(a.id).buffer,type:a.type||"public-key",transports:a.transports})}}return o}function Gj(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e;return{id:e.id,rawId:e.id,response:{attestationObject:Yn(new Uint8Array(e.response.attestationObject)),clientDataJSON:Yn(new Uint8Array(e.response.clientDataJSON))},type:"public-key",clientExtensionResults:e.getClientExtensionResults(),authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function Qj(e){var t;if("toJSON"in e&&typeof e.toJSON=="function")return e.toJSON();const r=e,n=e.getClientExtensionResults(),s=e.response;return{id:e.id,rawId:e.id,response:{authenticatorData:Yn(new Uint8Array(s.authenticatorData)),clientDataJSON:Yn(new Uint8Array(s.clientDataJSON)),signature:Yn(new Uint8Array(s.signature)),userHandle:s.userHandle?Yn(new Uint8Array(s.userHandle)):void 0},type:"public-key",clientExtensionResults:n,authenticatorAttachment:(t=r.authenticatorAttachment)!==null&&t!==void 0?t:void 0}}function $x(e){return e==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}function sv(){var e,t;return!!(Fe()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.create)=="function"&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.get)=="function")}async function Yj(e){try{const t=await navigator.credentials.create(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Zl("Browser returned unexpected credential type",t)}:{data:null,error:new Zl("Empty credential response",t)}}
195catch(t){return{data:null,error:Bj({error:t,options:e})}}}async function Jj(e){try{const t=await navigator.credentials.get(e);return t?t instanceof PublicKeyCredential?{data:t,error:null}:{data:null,error:new Zl("Browser returned unexpected credential type",t)}:{data:null,error:new Zl("Empty credential response",t)}}catch(t){return{data:null,error:Wj({error:t,options:e})}}}const Xj={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},Zj={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function eu(...e){const t=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),r=s=>s instanceof ArrayBuffer||ArrayBuffer.isView(s),n={};for(const s of e)if(s)for(const o in s){const i=s[o];if(i!==void 0)if(Array.isArray(i))n[o]=i;else if(r(i))n[o]=i;else if(t(i)){const a=n[o];t(a)?n[o]=eu(a,i):n[o]=eu(i)}else n[o]=i}return n}function eN(e,t){return eu(Xj,e,t||{})}function tN(e,t){return eu(Zj,e,t||{})}class rN{constructor(t){this.client=t,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(t){return this.client.mfa.enroll(Object.assign(Object.assign({},t),{factorType:"webauthn"}))}async _challenge({factorId:t,webauthn:r,friendlyName:n,signal:s},o){try{const{data:i,error:a}=await this.client.mfa.challenge({factorId:t,webauthn:r});if(!i)return{data:null,error:a};const l=s??Hj.createNewAbortSignal();if(i.webauthn.type==="create"){const{user:u}=i.webauthn.credential_options.publicKey;u.name||(u.name=`${u.id}:${n}`),u.displayName||(u.displayName=u.name)}switch(i.webauthn.type){case"create":{const u=eN(i.webauthn.credential_options.publicKey,o==null?void 0:o.create),{data:c,error:d}=await Yj({publicKey:u,signal:l});return c?{data:{factorId:t,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:c}},error:null}:{data:null,error:d}}case"request":{const u=tN(i.webauthn.credential_options.publicKey,o==null?void 0:o.request),{data:c,error:d}=await Jj(Object.assign(Object.assign({},i.webauthn.credential_options),{publicKey:u,signal:l}));return c?{data:{factorId:t,challengeId:i.id,webauthn:{type:i.webauthn.type,credential_response:c}},error:null}:{data:null,error:d}}}}catch(i){return W(i)?{data:null,error:i}:{data:null,error:new qn("Unexpected error in challenge",i)}}}async _verify({challengeId:t,factorId:r,webauthn:n}){return this.client.mfa.verify({factorId:r,challengeId:t,webauthn:n})}async _authenticate({factorId:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new Gi("rpId is required for WebAuthn authentication")};try{if(!sv())return{data:null,error:new qn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this.challenge({factorId:t,webauthn:{rpId:r,rpOrigins:n},signal:s},{request:o});if(!i)return{data:null,error:a};const{webauthn:l}=i;return this._verify({factorId:t,challengeId:i.challengeId,webauthn:{type:l.type,rpId:r,rpOrigins:n,credential_response:l.credential_response}})}catch(i){return W(i)?{data:null,error:i}:{data:null,error:new qn("Unexpected error in authenticate",i)}}}async _register({friendlyName:t,webauthn:{rpId:r=typeof window<"u"?window.location.hostname:void 0,rpOrigins:n=typeof window<"u"?[window.location.origin]:void 0,signal:s}={}},o){if(!r)return{data:null,error:new Gi("rpId is required for WebAuthn registration")};try{if(!sv())return{data:null,error:new qn("Browser does not support WebAuthn",null)};const{data:i,error:a}=await this._enroll({friendlyName:t});if(!i)return await this.client.mfa.listFactors().then(c=>{var d;return(d=c.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===t&&f.status!=="unverified")}).then(c=>c?this.client.mfa.unenroll({factorId:c==null?void 0:c.id}):void 0),{data:null,error:a};const{data:l,error:u}=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:u}}catch(i){return W(i)?{data:null,error:i}:{data:null,error:new qn("Unexpected error in register",i)}}}}$j();const nN={url:ZA,storageKey:ej,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:tj,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1};async function ov(e,t,r){return await r()}const Ns={};class Qi{get jwks(){var t,r;return(r=(t=Ns[this.storageKey])===null||t===void 0?void 0:t.jwks)!==null&&r!==void 0?r:{keys:[]}}set jwks(t){Ns[this.storageKey]=Object.assign(Object.assign({},Ns[this.storageKey]),{jwks:t})}get jwks_cached_at(){var t,r;return(r=(t=Ns[this.storageKey])===null||t===void 0?void 0:t.cachedAt)!==null&&r!==void 0?r:Number.MIN_SAFE_INTEGER}set jwks_cached_at(t){Ns[this.storageKey]=Object.assign(Object.assign({},Ns[this.storageKey]),{cachedAt:t})}constructor(t){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({},nN),t);
195if(this.storageKey=o.storageKey,this.instanceID=(r=Qi.nextInstanceID[this.storageKey])!==null&&r!==void 0?r:0,Qi.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!o.debug,typeof o.debug=="function"&&(this.logger=o.debug),this.instanceID>0&&Fe()){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 Dj({url:o.url,headers:o.headers,fetch:o.fetch}),this.url=o.url,this.headers=o.headers,this.fetch=Dx(o.fetch),this.lock=o.lock||ov,this.detectSessionInUrl=o.detectSessionInUrl,this.flowType=o.flowType,this.hasCustomAuthorizationHeader=o.hasCustomAuthorizationHeader,this.throwOnError=o.throwOnError,o.lock?this.lock=o.lock:Fe()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=Mj:this.lock=ov,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 rN(this)},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.persistSession?(o.storage?this.storage=o.storage:Ix()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=nv(this.memoryStorage)),o.userStorage&&(this.userStorage=o.userStorage)):(this.memoryStorage={},this.storage=nv(this.memoryStorage)),Fe()&&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(t){if(this.throwOnError&&t&&t.error)throw t.error;return t}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${Ax}) ${new Date().toISOString()}`}_debug(...t){return this.logDebugMessages&&this.logger(this._logPrefix(),...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{let r={},n="none";if(Fe()&&(r=mj(window.location.href),this._isImplicitGrantCallback(r)?n="implicit":await this._isPKCECallback(r)&&(n="pkce")),Fe()&&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),aj(o)){const l=(t=o.details)===null||t===void 0?void 0:t.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 W(r)?this._returnResult({error:r}):this._returnResult({error:new qn("Unexpected error during initialization",r)}
195)}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var r,n,s;try{const o=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(n=(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:(s=t==null?void 0:t.options)===null||s===void 0?void 0:s.captchaToken}},xform:Bt}),{data:i,error:a}=o;if(a||!i)return this._returnResult({data:{user:null,session:null},error:a});const l=i.session,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(o){if(W(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signUp(t){var r,n,s;try{let o;if("email"in t){const{email:c,password:d,options:f}=t;let h=null,b=null;this.flowType==="pkce"&&([h,b]=await Os(this.storage,this.storageKey)),o=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:c,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:b},xform:Bt})}else if("phone"in t){const{phone:c,password:d,options:f}=t;o=await K(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},channel:(s=f==null?void 0:f.channel)!==null&&s!==void 0?s:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Bt})}else throw new Ka("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,u=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(o){if(W(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async signInWithPassword(t){try{let r;if("email"in t){const{email:o,password:i,options:a}=t;r=await K(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:tv})}else if("phone"in t){const{phone:o,password:i,options:a}=t;r=await K(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:tv})}else throw new Ka("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 Rs;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(W(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOAuth(t){var r,n,s,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(r=t.options)===null||r===void 0?void 0:r.redirectTo,scopes:(n=t.options)===null||n===void 0?void 0:n.scopes,queryParams:(s=t.options)===null||s===void 0?void 0:s.queryParams,skipBrowserRedirect:(o=t.options)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async signInWithWeb3(t){const{chain:r}=t;switch(r){case"ethereum":return await this.signInWithEthereum(t);case"solana":return await this.signInWithSolana(t);default:throw new Error(`@supabase/auth-js: Unsupported chain "${r}"`)}}async signInWithEthereum(t){var r,n,s,o,i,a,l,u,c,d,f;let h,b;if("message"in t)h=t.message,b=t.signature;else{const{chain:m,wallet:w,statement:v,options:g}=t;let y;if(Fe())if(typeof w=="object")y=w;else{const P=window;if("ethereum"in P&&typeof P.ethereum=="object"&&"request"in P.ethereum&&typeof P.ethereum.request=="function")y=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"||!(g!=null&&g.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");y=w}const _=new URL((r=g==null?void 0:g.url)!==null&&r!==void 0?r:window.location.href),S=await y.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 k=Mx(S[0]);let C=(n=g==null?void 0:g.signInWithEthereum)===null||n===void 0?void 0:n.chainId;if(!C){const P=await y.request({method:"eth_chainId"});C=Fj(P)}const T={domain:_.host,address:k,statement:v,uri:_.href,version:"1",chainId:C,nonce:(s=g==null?void 0:g.signInWithEthereum)===null||s===void 0?void 0:s.nonce,issuedAt:(i=(o=g==null?void 0:g.signInWithEthereum)===null||o===void 0?void 0:o.issuedAt)!==null&&i!==void 0?i:new Date,expirationTime:(a=g==null?void 0:g.signInWithEthereum)===null||a===void 0?void 0:a.expirationTime,notBefore:(l=g==null?void 0:g.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(u=g==null?void 0:g.signInWithEthereum)===null||u===void 0?void 0:u.requestId,resources:(c=g==null?void 0:g.signInWithEthereum)===null||c===void 0?void 0:c.resources};
195h=zj(T),b=await y.request({method:"personal_sign",params:[Uj(h),k]})}try{const{data:m,error:w}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:b},!((d=t.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=t.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Bt});if(w)throw w;if(!m||!m.session||!m.user){const v=new Rs;return this._returnResult({data:{user:null,session:null},error:v})}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(W(m))return this._returnResult({data:{user:null,session:null},error:m});throw m}}async signInWithSolana(t){var r,n,s,o,i,a,l,u,c,d,f,h;let b,m;if("message"in t)b=t.message,m=t.signature;else{const{chain:w,wallet:v,statement:g,options:y}=t;let _;if(Fe())if(typeof v=="object")_=v;else{const k=window;if("solana"in k&&typeof k.solana=="object"&&("signIn"in k.solana&&typeof k.solana.signIn=="function"||"signMessage"in k.solana&&typeof k.solana.signMessage=="function"))_=k.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof v!="object"||!(y!=null&&y.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");_=v}const S=new URL((r=y==null?void 0:y.url)!==null&&r!==void 0?r:window.location.href);if("signIn"in _&&_.signIn){const k=await _.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},y==null?void 0:y.signInWithSolana),{version:"1",domain:S.host,uri:S.href}),g?{statement:g}:null));let C;if(Array.isArray(k)&&k[0]&&typeof k[0]=="object")C=k[0];else if(k&&typeof k=="object"&&"signedMessage"in k&&"signature"in k)C=k;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)b=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");b=[`${S.host} wants you to sign in with your Solana account:`,_.publicKey.toBase58(),...g?["",g,""]:[""],"Version: 1",`URI: ${S.href}`,`Issued At: ${(s=(n=y==null?void 0:y.signInWithSolana)===null||n===void 0?void 0:n.issuedAt)!==null&&s!==void 0?s:new Date().toISOString()}`,...!((o=y==null?void 0:y.signInWithSolana)===null||o===void 0)&&o.notBefore?[`Not Before: ${y.signInWithSolana.notBefore}`]:[],...!((i=y==null?void 0:y.signInWithSolana)===null||i===void 0)&&i.expirationTime?[`Expiration Time: ${y.signInWithSolana.expirationTime}`]:[],...!((a=y==null?void 0:y.signInWithSolana)===null||a===void 0)&&a.chainId?[`Chain ID: ${y.signInWithSolana.chainId}`]:[],...!((l=y==null?void 0:y.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${y.signInWithSolana.nonce}`]:[],...!((u=y==null?void 0:y.signInWithSolana)===null||u===void 0)&&u.requestId?[`Request ID: ${y.signInWithSolana.requestId}`]:[],...!((d=(c=y==null?void 0:y.signInWithSolana)===null||c===void 0?void 0:c.resources)===null||d===void 0)&&d.length?["Resources",...y.signInWithSolana.resources.map(C=>`- ${C}`)]:[]].join(`
196`);const k=await _.signMessage(new TextEncoder().encode(b),"utf8");if(!k||!(k instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");m=k}}try{const{data:w,error:v}=await K(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:b,signature:Yn(m)},!((f=t.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=t.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Bt});if(v)throw v;if(!w||!w.session||!w.user){const g=new Rs;return this._returnResult({data:{user:null,session:null},error:g})}return w.session&&(await this._saveSession(w.session),await this._notifyAllSubscribers("SIGNED_IN",w.session)),this._returnResult({data:Object.assign({},w),error:v})}catch(w){if(W(w))return this._returnResult({data:{user:null,session:null},error:w});throw w}}async _exchangeCodeForSession(t){const r=await Fn(this.storage,`${this.storageKey}-code-verifier`),[n,s]=(r??"").split("/");try{const{data:o,error:i}=await K(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:n},xform:Bt});if(await Hr(this.storage,`${this.storageKey}-code-verifier`),i)throw i;if(!o||!o.session||!o.user){const a=new Rs;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(W(o))return this._returnResult({data:{user:null,session:null,redirectType:null},error:o});throw o}}async signInWithIdToken(t){try{const{options:r,provider:n,token:s,access_token:o,nonce:i}=t,a=await K(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:Bt}),{data:l,error:u}=a;if(u)return this._returnResult({data:{user:null,session:null},error:u});if(!l||!l.session||!l.user){const c=new Rs;return this._returnResult({data:{user:null,session:null},error:c})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:u})}catch(r){if(W(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async signInWithOtp(t){var r,n,s,o,i;try{if("email"in t){const{email:a,options:l}=t;let u=null,c=null;
196this.flowType==="pkce"&&([u,c]=await Os(this.storage,this.storageKey));const{error:d}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(n=l==null?void 0:l.shouldCreateUser)!==null&&n!==void 0?n:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in t){const{phone:a,options:l}=t,{data:u,error:c}=await K(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(s=l==null?void 0:l.data)!==null&&s!==void 0?s:{},create_user:(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:u==null?void 0:u.message_id},error:c})}throw new Ka("You must provide either an email or phone number.")}catch(a){if(W(a))return this._returnResult({data:{user:null,session:null},error:a});throw a}}async verifyOtp(t){var r,n;try{let s,o;"options"in t&&(s=(r=t.options)===null||r===void 0?void 0:r.redirectTo,o=(n=t.options)===null||n===void 0?void 0:n.captchaToken);const{data:i,error:a}=await K(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:s,xform:Bt});if(a)throw a;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,u=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:u,session:l},error:null})}catch(s){if(W(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithSSO(t){var r,n,s,o,i;try{let a=null,l=null;this.flowType==="pkce"&&([a,l]=await Os(this.storage,this.storageKey));const u=await K(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(n=(r=t.options)===null||r===void 0?void 0:r.redirectTo)!==null&&n!==void 0?n:void 0}),!((s=t==null?void 0:t.options)===null||s===void 0)&&s.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:a,code_challenge_method:l}),headers:this.headers,xform:jj});return!((o=u.data)===null||o===void 0)&&o.url&&Fe()&&!(!((i=t.options)===null||i===void 0)&&i.skipBrowserRedirect)&&window.location.assign(u.data.url),this._returnResult(u)}catch(a){if(W(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 t=>{const{data:{session:r},error:n}=t;if(n)throw n;if(!r)throw new pt;const{error:s}=await K(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:r.access_token});return this._returnResult({data:{user:null,session:null},error:s})})}catch(t){if(W(t))return this._returnResult({data:{user:null,session:null},error:t});throw t}}async resend(t){try{const r=`${this.url}/resend`;if("email"in t){const{email:n,type:s,options:o}=t,{error:i}=await K(this.fetch,"POST",r,{headers:this.headers,body:{email:n,type:s,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:i})}else if("phone"in t){const{phone:n,type:s,options:o}=t,{data:i,error:a}=await K(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 Ka("You must provide either an email or phone number and a type")}catch(r){if(W(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(t,r){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const n=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),s=(async()=>(await n,await r()))();return this.pendingInLock.push((async()=>{try{await s}catch{}})()),s}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const n=r();for(this.pendingInLock.push((async()=>{try{await n}catch{}})()),await n;this.pendingInLock.length;){const s=[...this.pendingInLock];await Promise.all(s),this.pendingInLock.splice(0,s.length)}return await n}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const r=await this.__loadSession();return await t(r)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const r=await Fn(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",r),r!==null&&(this._isValidSession(r)?t=r:(this._debug("#getSession()","session from storage is not val
196id"),await this._removeSession())),!t)return{data:{session:null},error:null};const n=t.expires_at?t.expires_at*1e3-Date.now()<jc:!1;if(this._debug("#__loadSession()",`session has${n?"":" not"} expired`,"expires_at",t.expires_at),!n){if(this.userStorage){const i=await Fn(this.userStorage,this.storageKey+"-user");i!=null&&i.user?t.user=i.user:t.user=Dc()}if(this.storage.isServer&&t.user&&!t.user.__isUserNotAvailableProxy){const i={value:this.suppressGetSessionWarning};t.user=Pj(t.user,i),i.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:t},error:null}}const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{session:null},error:o}):this._returnResult({data:{session:s},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await K(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Zr}):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 pt}:await K(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:Zr})})}catch(r){if(W(r))return ij(r)&&(await this._removeSession(),await Hr(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:r});throw r}}async updateUser(t,r={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,r))}async _updateUser(t,r={}){try{return await this._useSession(async n=>{const{data:s,error:o}=n;if(o)throw o;if(!s.session)throw new pt;const i=s.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await Os(this.storage,this.storageKey));const{data:u,error:c}=await K(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:r==null?void 0:r.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:i.access_token,xform:Zr});if(c)throw c;return i.user=u.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),this._returnResult({data:{user:i.user},error:null})})}catch(n){if(W(n))return this._returnResult({data:{user:null},error:n});throw n}}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new pt;const r=Date.now()/1e3;let n=r,s=!0,o=null;const{payload:i}=Ic(t.access_token);if(i.exp&&(n=i.exp,s=n<=r),s){const{data:a,error:l}=await this._callRefreshToken(t.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(t.access_token);if(l)throw l;o={access_token:t.access_token,refresh_token:t.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(W(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async r=>{var n;if(!t){const{data:i,error:a}=r;if(a)throw a;t=(n=i.session)!==null&&n!==void 0?n:void 0}if(!(t!=null&&t.refresh_token))throw new pt;const{data:s,error:o}=await this._callRefreshToken(t.refresh_token);return o?this._returnResult({data:{user:null,session:null},error:o}):s?this._returnResult({data:{user:s.user,session:s},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(r){if(W(r))return this._returnResult({data:{user:null,session:null},error:r});throw r}}async _getSessionFromURL(t,r){try{if(!Fe())throw new Ga("No browser detected.");
196if(t.error||t.error_description||t.error_code)throw new Ga(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(r){case"implicit":if(this.flowType==="pkce")throw new Gg("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Ga("Not a valid implicit grant flow url.");break;default:}if(r==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Gg("No code detected.");const{data:g,error:y}=await this._exchangeCodeForSession(t.code);if(y)throw y;const _=new URL(window.location.href);return _.searchParams.delete("code"),window.history.replaceState(window.history.state,"",_.toString()),{data:{session:g.session,redirectType:null},error:null}}const{provider_token:n,provider_refresh_token:s,access_token:o,refresh_token:i,expires_in:a,expires_at:l,token_type:u}=t;if(!o||!a||!i||!u)throw new Ga("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(a);let f=c+d;l&&(f=parseInt(l));const h=f-c;h*1e3<=$s&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${d}s`);const b=f-d;c-b>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",b,f,c):c-b<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",b,f,c);const{data:m,error:w}=await this._getUser(o);if(w)throw w;const v={provider_token:n,provider_refresh_token:s,access_token:o,expires_in:d,expires_at:f,refresh_token:i,token_type:u,user:m.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:v,redirectType:t.type},error:null})}catch(n){if(W(n))return this._returnResult({data:{session:null,redirectType:null},error:n});throw n}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const r=await Fn(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&r)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async r=>{var n;const{data:s,error:o}=r;if(o)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,t);if(a&&!(oj(a)&&(a.status===404||a.status===401||a.status===403)))return this._returnResult({error:a})}return t!=="others"&&(await this._removeSession(),await Hr(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({error:null})})}onAuthStateChange(t){const r=pj(),n={id:r,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",r),this.stateChangeEmitters.delete(r)}};return this._debug("#onAuthStateChange()","registered callback with id",r),this.stateChangeEmitters.set(r,n),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(r)})))(),{data:{subscription:n}}}async _emitInitialSession(t){return await this._useSession(async r=>{var n,s;try{const{data:{session:o},error:i}=r;if(i)throw i;await((n=this.stateChangeEmitters.get(t))===null||n===void 0?void 0:n.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((s=this.stateChangeEmitters.get(t))===null||s===void 0?void 0:s.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,r={}){let n=null,s=null;this.flowType==="pkce"&&([n,s]=await Os(this.storage,this.storageKey,!0));try{return await K(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:n,code_challenge_method:s,gotrue_meta_security:{captcha_token:r.captchaToken}},headers:this.headers,redirectTo:r.redirectTo})}catch(o){if(W(o))return this._returnResult({data:null,error:o});throw o}}async getUserIdentities(){var t;try{const{data:r,error:n}=await this.getUser();if(n)throw n;return this._returnResult({data:{identities:(t=r.user.identities)!==null&&t!==void 0?t:[]},error:null})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async linkIdentity(t){return"token"in t?this.linkIdentityIdToken(t):this.linkIdentityOAuth(t)}async linkIdentityOAuth(t){var r;try{const{data:n,error:s}=await this._useSession(async o=>{var i,a,l,u,c;const{data:d,error:f}=o;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(i=t.options)===null||i===void 0?void 0:i.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await K(this.fetch,"GET",h,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(s)throw s;return Fe()&&!(!((r=t.options)===null||r===void 0)&&r.skipBrowserRedirect)&&window.location.assign(n==null?void 0:n.url),this._returnResult({data:{provider:t.provider,url:n==null?void 0:n.url},error:null})}catch(n){if(W(n))return this._returnResult({data:{provider:t.provider,url:null},error:n});throw n}}async linkIdentityIdToken(t){return await this._useSession(async r=>{var n;try{const{error:s,data:{session:o}}=r;if(s)throw s;const{options:i,provider:a,token:l,access_token:u,nonce:c}=t,d=await K(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:u,nonce:c,link_identity:!0,gotrue_meta_security:{captcha_token:i==null?void 0:i.captchaToken}},xform:Bt}),{data:f,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new Rs}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(s){if(W(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}})}async unlinkIdentity(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)throw i;
196return await K(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(s=(n=o.session)===null||n===void 0?void 0:n.access_token)!==null&&s!==void 0?s:void 0})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async _refreshAccessToken(t){const r=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{const n=Date.now();return await yj(async s=>(s>0&&await vj(200*Math.pow(2,s-1)),this._debug(r,"refreshing attempt",s),await K(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:Bt})),(s,o)=>{const i=200*Math.pow(2,s);return o&&Nc(o)&&Date.now()+i-n<$s})}catch(n){if(this._debug(r,"error",n),W(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}finally{this._debug(r,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,r){const n=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:r.redirectTo,scopes:r.scopes,queryParams:r.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",r,"url",n),Fe()&&!r.skipBrowserRedirect&&window.location.assign(n),{data:{provider:t,url:n},error:null}}async _recoverAndRefresh(){var t,r;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const s=await Fn(this.storage,this.storageKey);if(s&&this.userStorage){let i=await Fn(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!i&&(i={user:s.user},await Fs(this.userStorage,this.storageKey+"-user",i)),s.user=(t=i==null?void 0:i.user)!==null&&t!==void 0?t:Dc()}else if(s&&!s.user&&!s.user){const i=await Fn(this.storage,this.storageKey+"-user");i&&(i!=null&&i.user)?(s.user=i.user,await Hr(this.storage,this.storageKey+"-user"),await Fs(this.storage,this.storageKey,s)):s.user=Dc()}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()<jc;if(this._debug(n,`session has${o?"":" not"} expired with margin of ${jc}s`),o){if(this.autoRefreshToken&&s.refresh_token){const{error:i}=await this._callRefreshToken(s.refresh_token);i&&(console.error(i),Nc(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(t){var r,n;if(!t)throw new pt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const s=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(s,"begin");try{this.refreshingDeferred=new Du;const{data:o,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!o.session)throw new pt;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),W(o)){const i={data:null,error:o};return Nc(o)||await this._removeSession(),(r=this.refreshingDeferred)===null||r===void 0||r.resolve(i),i}throw(n=this.refreshingDeferred)===null||n===void 0||n.reject(o),o}finally{this.refreshingDeferred=null,this._debug(s,"end")}}async _notifyAllSubscribers(t,r,n=!0){const s=`#_notifyAllSubscribers(${t})`;this._debug(s,"begin",r,`broadcast = ${n}`);try{this.broadcastChannel&&n&&this.broadcastChannel.postMessage({event:t,session:r});const o=[],i=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,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(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0;const r=Object.assign({},t),n=r.user&&r.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!n&&r.user&&await Fs(this.userStorage,this.storageKey+"-user",{user:r.user});const s=Object.assign({},r);delete s.user;const o=Zg(s);await Fs(this.storage,this.storageKey,o)}else{const s=Zg(r);await Fs(this.storage,this.storageKey,s)}}async _removeSession(){this._debug("#_removeSession()"),await Hr(this.storage,this.storageKey),await Hr(this.storage,this.storageKey+"-code-verifier"),await Hr(this.storage,this.storageKey+"-user"),this.userStorage&&await Hr(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Fe()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}
196catch(r){console.error("removing visibilitychange callback failed",r)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),$s);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async r=>{const{data:{session:n}}=r;if(!n||!n.refresh_token||!n.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const s=Math.floor((n.expires_at*1e3-t)/$s);this._debug("#_autoRefreshTokenTick()",`access token expires in ${s} ticks, a tick lasts ${$s}ms, refresh threshold is ${Th} ticks`),s<=Th&&await this._callRefreshToken(n.refresh_token)})}catch(r){console.error("Auto refresh tick failed with error. This is likely a transient error.",r)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof Lx)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Fe()||!(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(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const r=`#_onVisibilityChanged(${t})`;this._debug(r,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-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(t,r,n){const s=[`provider=${encodeURIComponent(r)}`];if(n!=null&&n.redirectTo&&s.push(`redirect_to=${encodeURIComponent(n.redirectTo)}`),n!=null&&n.scopes&&s.push(`scopes=${encodeURIComponent(n.scopes)}`),this.flowType==="pkce"){const[o,i]=await Os(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}`),`${t}?${s.join("&")}`}async _unenroll(t){try{return await this._useSession(async r=>{var n;const{data:s,error:o}=r;return o?this._returnResult({data:null,error:o}):await K(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async _enroll(t){try{return await this._useSession(async r=>{var n,s;const{data:o,error:i}=r;if(i)return this._returnResult({data:null,error:i});const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:t.factorType==="totp"?{issuer:t.issuer}:{}),{data:l,error:u}=await K(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 u?this._returnResult({data:null,error:u}):(t.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(W(r))return this._returnResult({data:null,error:r});throw r}}async _verify(t){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:t.challengeId},"webauthn"in t?{webauthn:Object.assign(Object.assign({},t.webauthn),{credential_response:t.webauthn.type==="create"?Gj(t.webauthn.credential_response):Qj(t.webauthn.credential_response)})}:{code:t.code}),{data:a,error:l}=await K(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:i,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});return 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(W(r))return this._returnResult({data:null,error:r});throw r}})}async _challenge(t){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 K(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:t,headers:this.headers,jwt:(n=s==null?void 0:s.session)===null||n===void 0?void 0:n.access_token});if(i.error)return i;const{data: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:qj(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:Kj(a.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}})}async _challengeAndVerify(t){const{data:r,error:n}=await this._challenge({factorId:t.factorId});return n?this._returnResult({data:null,error:n}):await this._verify({factorId:t.factorId,challengeId:r.id,code:t.code})}async _listFactors(){var t;const{data:{user:r},error:n}=await this.getUser();if(n)return{data:null,error:n};const s={all:[],phone:[],totp:[],webauthn:[]};for(const o of(t=r==null?void 0:r.factors)!==null&&t!==void 0?t:[])s.all.push(o),o.status==="verified"&&s[o.factor_type].push(o);return{data:s,error:null}}async _getAuthenticatorAssuranceLevel(){var t,r;const{data:{session:n},error:s}
196=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}=Ic(n.access_token);let i=null;o.aal&&(i=o.aal);let a=i;((r=(t=n.user.factors)===null||t===void 0?void 0:t.filter(c=>c.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(a="aal2");const u=o.amr||[];return{data:{currentLevel:i,nextLevel:a,currentAuthenticationMethods:u},error:null}}async _getAuthorizationDetails(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?await K(this.fetch,"GET",`${this.url}/oauth/authorizations/${t}`,{headers:this.headers,jwt:n.access_token,xform:o=>({data:o,error:null})}):this._returnResult({data:null,error:new pt})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async _approveAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new pt});const i=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"approve"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&Fe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(W(n))return this._returnResult({data:null,error:n});throw n}}async _denyAuthorization(t,r){try{return await this._useSession(async n=>{const{data:{session:s},error:o}=n;if(o)return this._returnResult({data:null,error:o});if(!s)return this._returnResult({data:null,error:new pt});const i=await K(this.fetch,"POST",`${this.url}/oauth/authorizations/${t}/consent`,{headers:this.headers,jwt:s.access_token,body:{action:"deny"},xform:a=>({data:a,error:null})});return i.data&&i.data.redirect_url&&Fe()&&!(r!=null&&r.skipBrowserRedirect)&&window.location.assign(i.data.redirect_url),i})}catch(n){if(W(n))return this._returnResult({data:null,error:n});throw n}}async _listOAuthGrants(){try{return await this._useSession(async t=>{const{data:{session:r},error:n}=t;return n?this._returnResult({data:null,error:n}):r?await K(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new pt})})}catch(t){if(W(t))return this._returnResult({data:null,error:t});throw t}}async _revokeOAuthGrant(t){try{return await this._useSession(async r=>{const{data:{session:n},error:s}=r;return s?this._returnResult({data:null,error:s}):n?(await K(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,query:{client_id:t.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new pt})})}catch(r){if(W(r))return this._returnResult({data:null,error:r});throw r}}async fetchJwk(t,r={keys:[]}){let n=r.keys.find(a=>a.kid===t);if(n)return n;const s=Date.now();if(n=this.jwks.keys.find(a=>a.kid===t),n&&this.jwks_cached_at+nj>s)return n;const{data:o,error:i}=await K(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===t),!n)?null:n}async getClaims(t,r={}){try{let n=t;if(!n){const{data:h,error:b}
196=await this.getSession();if(b||!h.session)return this._returnResult({data:null,error:b});n=h.session.access_token}const{header:s,payload:o,signature:i,raw:{header:a,payload:l}}=Ic(n);r!=null&&r.allowExpired||kj(o.exp);const u=!s.alg||s.alg.startsWith("HS")||!s.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(s.kid,r!=null&&r.keys?{keys:r.keys}:r==null?void 0:r.jwks);if(!u){const{error:h}=await this.getUser(n);if(h)throw h;return{data:{claims:o,header:s,signature:i},error:null}}const c=Cj(s.alg),d=await crypto.subtle.importKey("jwk",u,c,!0,["verify"]);if(!await crypto.subtle.verify(c,d,i,hj(`${a}.${l}`)))throw new Oh("Invalid JWT signature");return{data:{claims:o,header:s,signature:i},error:null}}catch(n){if(W(n))return this._returnResult({data:null,error:n});throw n}}}Qi.nextInstanceID={};const sN=Qi;class oN extends sN{constructor(t){super(t)}}class iN{constructor(t,r,n){var s,o,i;this.supabaseUrl=t,this.supabaseKey=r;const a=XA(t);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`,u={db:VA,realtime:qA,auth:Object.assign(Object.assign({},HA),{storageKey:l}),global:WA},c=JA(n??{},u);this.storageKey=(s=c.auth.storageKey)!==null&&s!==void 0?s:"",this.headers=(o=c.global.headers)!==null&&o!==void 0?o:{},c.accessToken?(this.accessToken=c.accessToken,this.auth=new Proxy({},{get:(d,f)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(f)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((i=c.auth)!==null&&i!==void 0?i:{},this.headers,c.global.fetch),this.fetch=QA(r,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},c.realtime)),this.accessToken&&this.accessToken().then(d=>this.realtime.setAuth(d)).catch(d=>console.warn("Failed to set initial Realtime auth token:",d)),this.rest=new qO(new URL("rest/v1",a).href,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this.storage=new UA(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),c.accessToken||this._listenForAuthEvents()}get functions(){return new WO(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,r={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,r,n)}channel(t,r={config:{}}){return this.realtime.channel(t,r)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getAccessToken(){var t,r;if(this.accessToken)return await this.accessToken();const{data:n}=await this.auth.getSession();return(r=(t=n.session)===null||t===void 0?void 0:t.access_token)!==null&&r!==void 0?r:this.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:s,userStorage:o,storageKey:i,flowType:a,lock:l,debug:u,throwOnError:c},d,f){const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new oN({url:this.authUrl.href,headers:Object.assign(Object.assign({},h),d),storageKey:i,autoRefreshToken:t,persistSession:r,detectSessionInUrl:n,storage:s,userStorage:o,flowType:a,lock:l,debug:u,throwOnError:c,fetch:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(b=>b.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new uA(this.realtimeUrl.href,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((r,n)=>{this._handleTokenChanged(r,"CLIENT",n==null?void 0:n.access_token)})}_handleTokenChanged(t,r,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),r=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const aN=(e,t,r)=>new iN(e,t,r);function lN(){if(typeof window<"u"||typeof process>"u")return!1;const e=process.version;if(e==null)return!1;const t=e.match(/^v(\d+)\./);return t?parseInt(t[1],10)<=18:!1}lN()&&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
196ode.js 20 or later. For more information, visit: https://github.com/orgs/supabase/discussions/37217");function uN(){var w,v;if(typeof window>"u")return;const e=location.hostname,r=["lovableproject.com","lovableproject-dev.com","lovable.app","gpt-eng.com","gptengineer.run"].some(g=>e===g||e.endsWith("."+g)),n="[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}",s=r?((w=e.match(new RegExp("^(?:id-preview(?:-[a-z0-9]+)?|project)--("+n+")(?:-dev)?(?=\\.|$)","i")))==null?void 0:w[1])??((v=e.match(new RegExp("^("+n+")(?=[.-])","i")))==null?void 0:v[1]):void 0,o=window.parent&&window.parent!==window;if(!s||!o)return localStorage;const i=e.endsWith(".lovableproject-dev.com")||e.endsWith(".gpt-eng.com"),a=i?/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$|^http:\/\/localhost:3000$/:/^https:\/\/([a-z0-9-]+\.)*(lovable\.dev|gptengineer\.app)$/,l=location.ancestorOrigins&&location.ancestorOrigins[0]||(document.referrer?new URL(document.referrer).origin:""),u=l&&a.test(l)?[l]:i?["https://lovable.dev","http://localhost:3000"]:["https://lovable.dev"],c="lovable-preview-auth:result",d=2e3,f=()=>Math.random().toString(36).slice(2)+Date.now().toString(36),h=(g,y,_)=>new Promise(S=>{const k=f();let C=!1,T;const P=O=>{C||(C=!0,clearTimeout(T),window.removeEventListener("message",R),S(O))},R=O=>{if(u.indexOf(O.origin)<0)return;const M=O.data;M&&M.type===c&&M.requestId===k&&P(M)};window.addEventListener("message",R);const j={type:g,requestId:k,projectId:s,key:y};_!==void 0&&(j.value=_);for(const O of u)window.parent.postMessage(j,O);T=setTimeout(()=>P(null),d)});let b=!0;const m=250;return{getItem:async g=>{let y=await h("lovable-preview-auth:get",g);return!y&&b&&(await new Promise(_=>setTimeout(_,m)),y=await h("lovable-preview-auth:get",g)),b=!1,y&&y.ok&&typeof y.value=="string"?y.value===""?(localStorage.removeItem(g),null):y.value:localStorage.getItem(g)},setItem:(g,y)=>(localStorage.setItem(g,y),h("lovable-preview-auth:set",g,y).then(()=>{})),removeItem:g=>(localStorage.removeItem(g),h("lovable-preview-auth:remove",g).then(()=>{}))}}const cN="https://nqlgtppspxbtrbyosqcm.supabase.co",dN="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5xbGd0cHBzcHhidHJieW9zcWNtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjQ3NTYxNTAsImV4cCI6MjA4MDMzMjE1MH0.mBG7EykseYTkIQ_gzmv4F-QPaozi9pZZZ2zYJzs5gFw",Ze=aN(cN,dN,{auth:{storage:uN(),persistSession:!0,autoRefreshToken:!0}}),XD=Object.freeze(Object.defineProperty({__proto__:null,supabase:Ze},Symbol.toStringTag,{value:"Module"})),Mc=30*60*1e3,hN=2*60*1e3,fN=5*60*1e3,Fx=p.createContext(void 0);function pN({children:e}){const[t,r]=p.useState(null),[n,s]=p.useState(null),[o,i]=p.useState(null),[a,l]=p.useState(!0),u=p.useRef(null),c=p.useRef(null),d=p.useRef(null),f=p.useRef(!1),h=p.useRef(Date.now()),b=p.useCallback(async()=>{console.log("Auth: Auto-logout triggered due to inactivity"),Bd({title:"Session Expired",description:"You have been logged out due to inactivity.",variant:"destructive"}),await Ze.auth.signOut(),r(null),s(null),i(null)},[]),m=p.useCallback(()=>{f.current||(f.current=!0,Bd({title:"Session expiring soon",description:"You will be logged out in 2 minutes due to inactivity. Move your mouse or press a key to stay logged in.",variant:"destructive"}))},[]),w=p.useCallback(P=>{if(d.current&&clearTimeout(d.current),!P.expires_at)return;const R=P.expires_at*1e3,j=Date.now(),O=R-j,M=Math.max(O-fN,6e4);console.log(`Auth: Token expires in ${Math.round(O/6e4)} minutes, scheduling refresh in ${Math.round(M/6e4)} minutes`),d.current=setTimeout(async()=>{console.log("Auth: Scheduled token refresh triggered");try{const{data:I,error:H}=await Ze.auth.refreshSession();H?console.error("Auth: Scheduled refresh failed:",H.message):I.session&&(console.log("Auth: Scheduled refresh successful"),s(I.session),r(I.session.user),w(I.session))}catch(I){console.error("Auth: Error during scheduled refresh:",I)}},M)},[]),v=p.useCallback(async()=>{try{console.log("Auth: Proactively refreshing session token");const{data:P,error:R}=await Ze.auth.refreshSession();R?console.error("Auth: Failed to refresh session:",R.message):P.session&&(console.log("Auth: Session refreshed successfully, expires at:",new Date(P.session.expires_at*1e3).toISOString()),s(P.session),r(P.session.user),w(P.session))}catch(P){console.error("Auth: Error during session refresh:",P)}},[w]),g=p.useCallback(()=>{h.current=Date.now(),u.current&&clearTimeout(u.current),c.current&&clearTimeout(c.current),f.current=!1,t&&(c.current=setTimeout(m,Mc-hN),u.current=setTimeout(b,Mc))},[t,b,m]);p.useEffect(()=>{if(!t){u.current&&(clearTimeout(u.current),u.current=null),c.current&&(clearTimeout(c.current),c.current=null),d.current&&(clearTimeout(d.current),d.current=null);return}const P=["mousedown","keydown","touchstart","scroll"];return P.forEach(R=>{window.addEventListener(R,g)}),g(),()=>{P.forEach(R=>{window.removeEventListener(R,g)}),u.current&&clearTimeout(u.current),c.current&&clearTimeout(c.current),d.current&&clearTimeout(d.current)}},[t,g]),p.useEffect(()=>{const{data:{subscription:P}}=Ze.auth.onAuthStateChange((R,j)=>{switch(console.log("Auth: State changed -",R,j?`User: ${j.user.email}`:"No session"),R){case"SIGNED_IN":console.log("Auth: User signed in"),s(j),r((j==null?void 0:j.user)??null),j&&w(j);break;case"SIGNED_OUT":console.log("Auth: User signed out");const O=Date.now()-h.current;O<Mc&&console.warn(`Auth: Unexpected sign out! User was active ${Math.round(O/1e3)}s ago`),s(null),r(null),i(null);break;case"TOKEN_REFRESHED":console.log("Auth: Token refreshed automatically"),s(j),r((j==null?void 0:j.user)??null),j&&w(j);break;case"USER_UPDATED":console.log("Auth: User updated"),s(j),r((j==null?void 0:j.user)??null);break;default:s(j),r((j==null?void 0:j.user)??null)}j!=null&&j.user?setTimeout(()=>{y(j.user.id)},0):R==="SIGNED_OUT"&&i(null)});return Ze.auth.getSession().then(({data:{session:R}})=>{if(console.log("Auth: Initial session check -",R?`User: ${R.user.email}`:"No session"),s(R),r((R==null?void 0:R.user)??null),R){if(y(R.user.id),w(R),R.expires_at){const j=new Date(R.expires_at*1e3);console.log("Auth: Token expires at:",j.toISOString())}}else l(!1)}),()=>P.unsubscribe()},[w]);const y=async P=>{try{const{data:R,error:j}=await Ze.from("profiles").select("*").eq("id",P).maybeSingle();j?console.error("Auth: Error fetching profile:",j):(i(R),Ze.from("profiles").update({last_seen_at:new Date().toISOString()}).eq("id",P).then(({error:O})=>{O&&console.error("Auth: Failed to update last_seen_at:",O)}))}catch(R){console.error("Auth: Error fetching profile:",R)}finally{l(!1)}},_=async(P,R)=>{console.log("Auth: Signing in user:",P);const{error:j}=await Ze.auth.signInWithPassword({email:P,password:R});return j&&console.error("Auth: Sign in failed:",j.message),{error:j}},S=async()=>{console.log("Auth: User initiated sign out"),await Ze.auth.signOut(),r(null),s(null),i(null)},k=(o==null?void 0:o.role)==="admin",C=(o==null?void 0:o.role)==="store",T=(o==null?void 0:o.role)==="region";return x.jsx(Fx.Provider,{value:{user:t,session:n,profile:o,loading:a,signIn:_,signOut:S,isAdmin:k,isStore:C,isRegion:T,refreshSession:v},children:e})}function mN(){const e=p.useContext(Fx);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}const Ux=p.createContext(void 0),$c="impersonation";function gN({children:e}){const[t,r]=p.useState(()=>{try{const o=sessionStorage.getItem($c);return o?JSON.parse(o):null}catch{return null}});p.useEffect(()=>{t?sessionStorage.setItem($c,JSON.stringify(t)):sessionStorage.removeItem($c)},[t]);const n=p.useCallback(o=>{r(o)},[]),s=p.useCallback(()=>{r(null)},[]);return x.jsx(Ux.Provider,{value:{impersonating:t,startImpersonation:n,stopImpersonation:s,isImpersonating:!!t},children:e})}function vN(){const e=p.useContext(Ux);if(e===void 0)throw new Error("useImpersonation must be used within an ImpersonationProvider");return e}const yN=zf("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-semibold transition-all duration-300 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 shadow-primary hover:bg-primary/90 hover:-translate-y-0.5 hover:shadow-elevated",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-2 border-input bg-transparent 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","status-new":"bg-status-new text-white hover:bg-status-new/90","status-in-flight":"bg-status-in-flight text-black hover:bg-status-in-flight/90","status-answered":"bg-status-answered text-white hover:bg-status-answered/90","status-resolved":"bg-status-resolved text-white hover:bg-status-resolved/90",hero:"bg-primary text-primary-foreground shadow-primary hover:bg-primary/90 hover:-translate-y-1 hover:shadow-elevated text-base",tab:"bg-card text-card-foreground shadow-card hover:-translate-y-0.5 hover:shadow-elevated data-[active=true]:bg-primary data-[active=true]:text-primary-foreground",store:"bg-status-answered text-white hover:bg-status-answered/90 hover:-translate-y-0.5"},size:{default:"h-10 px-5 py-2",sm:"h-9 rounded-md px-4",lg:"h-12 rounded-lg px-8 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ke=p.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...s},o)=>{const i=n?XE:"button";return x.jsx(i,{className:de(yN({variant:t,size:r,className:e})),ref:o,...s})});Ke.displayName="Button";function wN(){const{impersonating:e,stopImpersonation:t,isImpersonating:r}=vN(),n=ip();if(!r||!e)return null;const s=()=>{t(),n("/admin",{state:{resetToHome:!0}})},o=e.role==="store"?"Store User":"Region Manager";return x.jsxs("div",{className:"fixed top-0 left-0 right-0 z-50 bg-amber-500 text-black py-2 px-4 flex items-center justify-center gap-3 shadow-lg",children:[x.jsx(Hk,{className:"w-4 h-4"}),x.jsxs("span",{className:"text-sm font-semibold",children:["Viewing as ",x.jsx("strong",{children:e.name})," (",o,") — read-only"]}),x.jsxs(Ke,{size:"sm",variant:"destructive",className:"h-7 px-3 text-xs ml-2",onClick:s,children:[x.jsx(Eu,{className:"w-3 h-3 mr-1"}),"Exit"]})]})}const bN="https://nqlgtppspxbtrbyosqcm.supabase.co/functions/v1/ai-analytics";function xN(e){const[t,r]=p.useState([]),[n,s]=p.useState(!1),[o,i]=p.useState(null),a=p.useCallback(async c=>{var b,m,w,v,g,y;s(!0),i(null);const d={role:"user",content:c};r(_=>[..._,d]);let f="",h;try{const{data:{session:_}}=await Ze.auth.getSession(),S=_==null?void 0:_.access_token;if(!S)throw new Error("Not authenticated");const k=await fetch(bN,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${S}`,apikey:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im5xbGd0cHBzcHhidHJieW9zcWNtIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjQ3NTYxNTAsImV4cCI6MjA4MDMzMjE1MH0.mBG7EykseYTkIQ_gzmv4F-QPaozi9pZZZ2zYJzs5gFw"},body:JSON.stringify({question:c,storeId:e})});if(!k.ok){const M=await k.json().catch(()=>({error:`HTTP ${k.status}`}));throw new Error(M.error||`Request failed (${k.status})`)}if(!k.body)throw new Error("No response body");const C=k.body.getReader(),T=new TextDecoder;let P="";for(r(M=>[...M,{role:"assistant",content:""}]);;){const{done:M,value:I}=await C.read();if(M)break;P+=T.decode(I,{stream:!0});let H;for(;(H=P.indexOf(`
197`))!==-1;){let z=P.slice(0,H);if(P=P.slice(H+1),z.endsWith("\r")&&(z=z.slice(0,-1)),z.startsWith(":")||z.trim()===""||!z.startsWith("data: "))continue;const G=z.slice(6).trim();if(G==="[DONE]")break;try{const A=JSON.parse(G);if(A.recordsAnalyzed!=null&&!A.choices){h=A.recordsAnalyzed;continue}const N=(w=(m=(b=A.choices)==null?void 0:b[0])==null?void 0:m.delta)==null?void 0:w.content;if(N){f+=N;const $=f;r(Q=>Q.map((V,ee)=>ee===Q.length-1?{...V,content:$}:V))}}catch{P=z+`
198`+P;break}}}if(P.trim())for(let M of P.split(`
199`)){if(!M||(M.endsWith("\r")&&(M=M.slice(0,-1)),M.startsWith(":")||M.trim()==="")||!M.startsWith("data: "))continue;const I=M.slice(6).trim();if(I!=="[DONE]")try{const H=JSON.parse(I);if(H.recordsAnalyzed!=null&&!H.choices){h=H.recordsAnalyzed;continue}const z=(y=(g=(v=H.choices)==null?void 0:v[0])==null?void 0:g.delta)==null?void 0:y.content;z&&(f+=z)}catch{}}const R=f.match(/```csv\n([\s\S]*?)\n```/);let j=R?R[1]:null;j&&(j=j.replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,"[email-masked]"),j=j.replace(/(\+44|0)[\s.-]?\d{2,4}[\s.-]?\d{3,4}[\s.-]?\d{3,4}/g,"[phone-masked]"));let O=f;return O=O.replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,"[email-masked]"),O=O.replace(/(\+44|0)[\s.-]?\d{2,4}[\s.-]?\d{3,4}[\s.-]?\d{3,4}/g,"[phone-masked]"),r(M=>M.map((I,H)=>H===M.length-1?{...I,content:O,csvData:j,recordsAnalyzed:h}:I)),{role:"assistant",content:O,csvData:j,recordsAnalyzed:h}}catch(_){console.error("AI Analytics error:",_);const S=_ instanceof Error?_.message:"Failed to get AI response";return i(S),f||r(k=>k.filter((C,T)=>T!==k.length-1||k[k.length-1].content!=="")),null}finally{s(!1)}},[e]),l=p.useCallback(()=>{r([]),i(null)},[]),u=p.useCallback((c,d="feedback-report.csv")=>
199{const f=new Blob([c],{type:"text/csv;charset=utf-8;"}),h=document.createElement("a");h.href=URL.createObjectURL(f),h.download=d,h.click(),URL.revokeObjectURL(h.href)},[]);return{messages:t,isLoading:n,error:o,sendMessage:a,clearMessages:l,downloadCSV:u}}function _N(e){return DR({queryKey:["ai-reports",e],queryFn:async()=>{let t=Ze.from("ai_reports").select("*").order("created_at",{ascending:!1});e&&(t=t.eq("store_id",e));const{data:r,error:n}=await t;if(n)throw n;return r}})}function SN(){const e=Au();return kb({mutationFn:async t=>{const{data:{user:r}}=await Ze.auth.getUser();if(!r)throw new Error("Not authenticated");const{data:n,error:s}=await Ze.from("ai_reports").insert({user_id:r.id,store_id:t.storeId||null,title:t.title,question:t.question,answer:t.answer,csv_data:t.csvData||null,records_analyzed:t.recordsAnalyzed||null}).select().single();if(s)throw s;return n},onSuccess:()=>{e.invalidateQueries({queryKey:["ai-reports"]})}})}function EN(){const e=Au();return kb({mutationFn:async t=>{const{error:r}=await Ze.from("ai_reports").delete().eq("id",t);if(r)throw r},onSuccess:()=>{e.invalidateQueries({queryKey:["ai-reports"]})}})}const gl=p.forwardRef(({className:e,type:t,...r},n)=>x.jsx("input",{type:t,className:de("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...r}));gl.displayName="Input";const zx=p.forwardRef(({className:e,...t},r)=>x.jsx("div",{ref:r,className:de("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));zx.displayName="Card";const Bx=p.forwardRef(({className:e,...t},r)=>x.jsx("div",{ref:r,className:de("flex flex-col space-y-1.5 p-6",e),...t}));Bx.displayName="CardHeader";const Wx=p.forwardRef(({className:e,...t},r)=>x.jsx("h3",{ref:r,className:de("text-2xl font-semibold leading-none tracking-tight",e),...t}));Wx.displayName="CardTitle";const kN=p.forwardRef(({className:e,...t},r)=>x.jsx("p",{ref:r,className:de("text-sm text-muted-foreground",e),...t}));kN.displayName="CardDescription";const Vx=p.forwardRef(({className:e,...t},r)=>x.jsx("div",{ref:r,className:de("p-6 pt-0",e),...t}));Vx.displayName="CardContent";const CN=p.forwardRef(({className:e,...t},r)=>x.jsx("div",{ref:r,className:de("flex items-center p-6 pt-0",e),...t}));CN.displayName="CardFooter";var TN=p.createContext(void 0);function gp(e){const t=p.useContext(TN);return e||t||"ltr"}function PN(e,[t,r]){return Math.min(r,Math.max(t,e))}function RN(e,t){return p.useReducer((r,n)=>t[r][n]??r,e)}var vp="ScrollArea",[Hx,ZD]=An(vp),[ON,Lt]=Hx(vp),qx=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:s,scrollHideDelay:o=600,...i}=e,[a,l]=p.useState(null),[u,c]=p.useState(null),[d,f]=p.useState(null),[h,b]=p.useState(null),[m,w]=p.useState(null),[v,g]=p.useState(0),[y,_]=p.useState(0),[S,k]=p.useState(!1),[C,T]=p.useState(!1),P=Ce(t,j=>l(j)),R=gp(s);return x.jsx(ON,{scope:r,type:n,dir:R,scrollHideDelay:o,scrollArea:a,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:b,scrollbarXEnabled:S,onScrollbarXEnabledChange:k,scrollbarY:m,onScrollbarYChange:w,scrollbarYEnabled:C,onScrollbarYEnabledChange:T,onCornerWidthChange:g,onCornerHeightChange:_,children:x.jsx(oe.div,{dir:R,...i,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});qx.displayName=vp;var Kx="ScrollAreaViewport",Gx=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,nonce:s,...o}=e,i=Lt(Kx,r),a=p.useRef(null),l=Ce(t,a,i.onViewportChange);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),x.jsx(oe.div,{"data-radix-scroll-area-viewport":"",...o,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:x.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});Gx.displayName=Kx;var vr="ScrollAreaScrollbar",yp=p.forwardRef((e,t)=>
vendor: 14,113 bytes, line 199
199{const{forceMount:r,...n}=e,s=Lt(vr,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:i}=s,a=e.orientation==="horizontal";return p.useEffect(()=>(a?o(!0):i(!0),()=>{a?o(!1):i(!1)}),[a,o,i]),s.type==="hover"?x.jsx(AN,{...n,ref:t,forceMount:r}):s.type==="scroll"?x.jsx(jN,{...n,ref:t,forceMount:r}):s.type==="auto"?x.jsx(Qx,{...n,ref:t,forceMount:r}):s.type==="always"?x.jsx(wp,{...n,ref:t}):null});yp.displayName=vr;var AN=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Lt(vr,e.__scopeScrollArea),[o,i]=p.useState(!1);return p.useEffect(()=>{const a=s.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),i(!0)},c=()=>{l=window.setTimeout(()=>i(!1),s.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",c)}}},[s.scrollArea,s.scrollHideDelay]),x.jsx(tr,{present:r||o,children:x.jsx(Qx,{"data-state":o?"visible":"hidden",...n,ref:t})})}),jN=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Lt(vr,e.__scopeScrollArea),o=e.orientation==="horizontal",i=Mu(()=>l("SCROLL_END"),100),[a,l]=RN("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,s.scrollHideDelay,l]),p.useEffect(()=>{const u=s.viewport,c=o?"scrollLeft":"scrollTop";if(u){let d=u[c];const f=()=>{const h=u[c];d!==h&&(l("SCROLL"),i()),d=h};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[s.viewport,o,l,i]),x.jsx(tr,{present:r||a!=="hidden",children:x.jsx(wp,{"data-state":a==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Z(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Z(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Qx=p.forwardRef((e,t)=>{const r=Lt(vr,e.__scopeScrollArea),{forceMount:n,...s}=e,[o,i]=p.useState(!1),a=e.orientation==="horizontal",l=Mu(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,c=r.viewport.offsetHeight<r.viewport.scrollHeight;i(a?u:c)}},10);return jo(r.viewport,l),jo(r.content,l),x.jsx(tr,{present:n||o,children:x.jsx(wp,{"data-state":o?"visible":"hidden",...s,ref:t})})}),wp=p.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,s=Lt(vr,e.__scopeScrollArea),o=p.useRef(null),i=p.useRef(0),[a,l]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=e_(a.viewport,a.content),c={...n,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>o.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,h){return $N(f,i.current,a,h)}return r==="horizontal"?x.jsx(NN,{...c,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const f=s.viewport.scrollLeft,h=iv(f,a,s.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollLeft=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollLeft=d(f,s.dir))}}):r==="vertical"?x.jsx(IN,{...c,ref:t,onThumbPositionChange:()=>{if(s.viewport&&o.current){const f=s.viewport.scrollTop,h=iv(f,a);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{s.viewport&&(s.viewport.scrollTop=f)},onDragScroll:f=>{s.viewport&&(s.viewport.scrollTop=d(f))}}):null}),NN=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=Lt(vr,e.__scopeScrollArea),[i,a]=p.useState(),l=p.useRef(null),u=Ce(t,l,o.onScrollbarXChange);return p.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),x.jsx(Jx,{"data-orientation":"horizontal",...s,ref:u,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Lu(r)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),r_(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ru(i.paddingLeft),paddingEnd:ru(i.paddingRight)}})}})}),IN=p.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...s}=e,o=Lt(vr,e.__scopeScrollArea),[i,a]=p.useState(),l=p.useRef(null),u=Ce(t,l,o.onScrollbarYChange);return p.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),x.jsx(Jx,{"data-orientation":"vertical",...s,ref:u,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Lu(r)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),r_(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&o.viewport&&i&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ru(i.paddingTop),paddingEnd:ru(i.paddingBottom)}})}})}),[DN,Yx]=Hx(vr),Jx=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:s,onThumbChange:o,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=Lt(vr,r),[b,m]=p.useState(null),w=Ce(t,P=>m(P)),v=p.useRef(null),g=p.useRef(""),y=h.viewport,_=n.content-n.viewport,S=Me(c),k=Me(l),C=Mu(d,10);function T(P){if(v.current){const R=P.clientX-v.current.left,j=P.clientY-v.current.top;u({x:R,y:j})}}return p.useEffect(()=>{const P=R=>{const j=R.target;(b==null?void 0:b.contains(j))&&S(R,_)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[y,b,_,S]),p.useEffect(k,[n,k]),jo(b,C),jo(h.content,C),x.jsx(DN,{scope:r,scrollbar:b,hasThumb:s,onThumbChange:Me(o),onThumbPointerUp:Me(i),onThumbPositionChange:k,onThumbPointerDown:Me(a),children:x.jsx(oe.div,{...f,ref:w,style:{position:"absolute",...f.style},onPointerDown:Z(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),v.current=b.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),T(P))}),onPointerMove:Z(e.onPointerMove,T),onPointerUp:Z(e.onPointerUp,P=>{const R=P.target;R.hasPointerCapture(P.pointerId)&&R.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=g.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})})}),tu="ScrollAreaThumb",Xx=p.forwardRef((e,t)=>{const{forceMount:r,...n}=e,s=Yx(tu,e.__scopeScrollArea);return x.jsx(tr,{present:r||s.hasThumb,children:x.jsx(LN,{ref:t,...n})})}),LN=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...s}=e,o=Lt(tu,r),i=Yx(tu,r),{onThumbPositionChange:a}=i,l=Ce(t,d=>i.onThumbChange(d)),u=p.useRef(void 0),c=Mu(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const d=o.viewport;if(d){const f=()=>{if(c(),!u.current){const h=FN(d,a);u.current=h,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,c,a]),x.jsx(oe.div,{"data-state":i.hasThumb?"visible":"hidden",...s,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:Z(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),b=d.clientX-h.left,m=d.clientY-h.top;i.onThumbPointerDown({x:b,y:m})}),onPointerUp:Z(e.onPointerUp,i.onThumbPointerUp)})});Xx.displayName=tu;var bp="ScrollAreaCorner",Zx=p.forwardRef((e,t)=>{const r=Lt(bp,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?x.jsx(MN,{...e,ref:t}):null});Zx.displayName=bp;var MN=p.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,s=Lt(bp,r),[o,i]=p.useState(0),[a,l]=p.useState(0),u=!!(o&&a);return jo(s.scrollbarX,()=>{var d;const c=((d=s.scrollbarX)==null?void 0:d.offsetHeight)||0;s.onCornerHeightChange(c),l(c)}),jo(s.scrollbarY,()=>{var d;const c=((d=s.scrollbarY)==null?void 0:d.offsetWidth)||0;s.onCornerWidthChange(c),i(c)}),u?x.jsx(oe.div,{...n,ref:t,style:{width:o,height:a,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ru(e){return e?parseInt(e,10):0}function e_(e,t){const r=e/t;return isNaN(r)?0:r}function Lu(e){const t=e_(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function $N(e,t,r,n="ltr"){const s=Lu(r),o=s/2,i=t||o,a=s-i,l=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-a,c=r.content-r.viewport,d=n==="ltr"?[0,c]:[c*-1,0];return t_([l,u],d)(e)}function iv(e,t,r="ltr"){const n=Lu(t),s=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-s,i=t.content-t.viewport,a=o-n,l=r==="ltr"?[0,i]:[i*-1,0],u=PN(e,l);return t_([0,i],[0,a])(u)}function t_(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function r_(e,t){return e>0&&e<t}var FN=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function s(){const o={left:e.scrollLeft,top:e.scrollTop},i=r.left!==o.left,a=r.top!==o.top;(i||a)&&t(),r=o,n=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(n)};function Mu(e,t){const r=Me(e),n=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(n.current),[]),p.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function jo(e,t){const r=Me(t);pr(()=>{let n=0;if(e){const s=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return s.observe(e),()=>{window.cancelAnimationFrame(n),s.unobserve(e)}}},[e,r])}var n_=qx,UN=Gx,zN=Zx;const Ah=p.forwardRef(({className:e,children:t,...r},n)=>x.jsxs(n_,{ref:n,className:de("relative overflow-hidden",e),...r,children:[x.jsx(UN,{className:"h-full w-full rounded-[inherit]",children:t}),x.jsx(s_,{}),x.jsx(zN,{})]}));Ah.displayName=n_.displayName;const s_=p.forwardRef(({className:e,orientation:t="vertical",...r},n)=>x.jsx(yp,{ref:n,orientation:t,className:de("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:x.jsx(Xx,{className:"relative flex-1 rounded-full bg-border"})}));s_.displayName=yp.displayName;var Fc="rovingFocusGroup.onEntryFocus",BN={bubbles:!1,cancelable:!0},ha="RovingFocusGroup",[jh,o_,WN]=Z0(ha),[VN,i_]=An(ha,[WN]),[HN,qN]=VN(ha),a_=p.forwardRef((e,t)=>x.jsx(jh.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(jh.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(KN,{...e,ref:t})})}));a_.displayName=ha;var KN=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:s=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=p.useRef(null),h=Ce(t,f),b=gp(o),[m,w]=aa({prop:i,defaultProp:a??null,onChange:l,caller:ha}),[v,g]=p.useState(!1),y=Me(u),_=o_(r),S=p.useRef(!1),[k,C]=p.useState(0);return p.useEffect(()=>{const T=f.current;if(T)return T.addEventListener(Fc,y),()=>T.removeEventListener(Fc,y)},[y]),x.jsx(HN,{scope:r,orientation:n,dir:b,loop:s,currentTabStopId:m,onItemFocus:p.useCallback(T=>w(T),[w]),onItemShiftTab:p.useCallback(()=>g(!0),[]),onFocusableItemAdd:p.useCallback(()=>C(T=>T+1),[]),onFocusableItemRemove:p.useCallback(()=>C(T=>T-1),[]),children:x.jsx(oe.div,{tabIndex:v||k===0?-1:0,"data-orientation":n,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:Z(e.onMouseDown,()=>{S.current=!0}),onFocus:Z(e.onFocus,T=>{const P=!S.current;if(T.target===T.currentTarget&&P&&!v){const R=new CustomEvent(Fc,BN);if(T.currentTarget.dispatchEvent(R),!R.defaultPrevented){const j=_().filter(z=>z.focusable),O=j.find(z=>z.active),M=j.find(z=>z.id===m),H=[O,M,...j].filter(Boolean).map(z=>z.ref.current);c_(H,c)}}S.current=!1}),onBlur:Z(e.onBlur,()=>g(!1))})})}),l_="RovingFocusGroupItem",u_=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:s=!1,tabStopId:o,children:i,...a}=e,l=oo(),u=o||l,c=qN(l_,r),d=c.currentTabStopId===u,f=o_(r),{onFocusableItemAdd:h,onFocusableItemRemove:b,currentTabStopId:m}=c;return p.useEffect(()=>{if(n)return h(),()=>b()},[n,h,b]),x.jsx(jh.ItemSlot,{scope:r,id:u,focusable:n,active:s,children:x.jsx(oe.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:t,onMouseDown:Z(e.onMouseDown,w=>{n?c.onItemFocus(u):w.preventDefault()}),onFocus:Z(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:Z(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){c.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const v=YN(w,c.orientation,c.dir);if(v!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let y=f().filter(_=>_.focusable).map(_=>_.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();const _=y.indexOf(w.currentTarget);y=c.loop?JN(y,_+1):y.slice(_+1)}setTimeout(()=>c_(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});u_.displayName=l_;var GN={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function QN(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function YN(e,t,r){const n=QN(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return GN[n]}function c_(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function JN(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var XN=a_,ZN=u_,$u="Tabs",[eI,eL]=An($u,[i_]),d_=i_(),[tI,xp]=eI($u),h_=p.forwardRef((e,t)=>
vendor: 4,499 bytes, line 199
199{const{__scopeTabs:r,value:n,onValueChange:s,defaultValue:o,orientation:i="horizontal",dir:a,activationMode:l="automatic",...u}=e,c=gp(a),[d,f]=aa({prop:n,onChange:s,defaultProp:o??"",caller:$u});return x.jsx(tI,{scope:r,baseId:oo(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:x.jsx(oe.div,{dir:c,"data-orientation":i,...u,ref:t})})});h_.displayName=$u;var f_="TabsList",p_=p.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...s}=e,o=xp(f_,r),i=d_(r);return x.jsx(XN,{asChild:!0,...i,orientation:o.orientation,dir:o.dir,loop:n,children:x.jsx(oe.div,{role:"tablist","aria-orientation":o.orientation,...s,ref:t})})});p_.displayName=f_;var m_="TabsTrigger",g_=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:s=!1,...o}=e,i=xp(m_,r),a=d_(r),l=w_(i.baseId,n),u=b_(i.baseId,n),c=n===i.value;return x.jsx(ZN,{asChild:!0,...a,focusable:!s,active:c,children:x.jsx(oe.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:l,...o,ref:t,onMouseDown:Z(e.onMouseDown,d=>{!s&&d.button===0&&d.ctrlKey===!1?i.onValueChange(n):d.preventDefault()}),onKeyDown:Z(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(n)}),onFocus:Z(e.onFocus,()=>{const d=i.activationMode!=="manual";!c&&!s&&d&&i.onValueChange(n)})})})});g_.displayName=m_;var v_="TabsContent",y_=p.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:s,children:o,...i}=e,a=xp(v_,r),l=w_(a.baseId,n),u=b_(a.baseId,n),c=n===a.value,d=p.useRef(c);return p.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),x.jsx(tr,{present:s||c,children:({present:f})=>x.jsx(oe.div,{"data-state":c?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&o})})});y_.displayName=v_;function w_(e,t){return`${e}-trigger-${t}`}function b_(e,t){return`${e}-content-${t}`}var rI=h_,x_=p_,__=g_,S_=y_;const nI=rI,E_=p.forwardRef(({className:e,...t},r)=>x.jsx(x_,{ref:r,className:de("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));E_.displayName=x_.displayName;const Nh=p.forwardRef(({className:e,...t},r)=>x.jsx(__,{ref:r,className:de("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",e),...t}));Nh.displayName=__.displayName;const Ih=p.forwardRef(({className:e,...t},r)=>x.jsx(S_,{ref:r,className:de("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Ih.displayName=S_.displayName;var Uc="focusScope.autoFocusOnMount",zc="focusScope.autoFocusOnUnmount",av={bubbles:!1,cancelable:!0},sI="FocusScope",k_=p.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:o,...i}=e,[a,l]=p.useState(null),u=Me(s),c=Me(o),d=p.useRef(null),f=Ce(t,m=>l(m)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(n){let m=function(y){if(h.paused||!a)return;const _=y.target;a.contains(_)?d.current=_:Gr(d.current,{select:!0})},w=function(y){if(h.paused||!a)return;const _=y.relatedTarget;_!==null&&(a.contains(_)||Gr(d.current,{select:!0}))},v=function(y){if(document.activeElement===document.body)for(const S of y)S.removedNodes.length>0&&Gr(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",w);const g=new MutationObserver(v);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",w),g.disconnect()}}},[n,a,h.paused]),p.useEffect(()=>{if(a){uv.add(h);const m=document.activeElement;if(!a.contains(m)){const v=new CustomEvent(Uc,av);a.addEventListener(Uc,u),a.dispatchEvent(v),v.defaultPrevented||(oI(cI(C_(a)),{select:!0}),document.activeElement===m&&Gr(a))}return()=>{a.removeEventListener(Uc,u),setTimeout(()=>{const v=new CustomEvent(zc,av);a.addEventListener(zc,c),a.dispatchEvent(v),v.defaultPrevented||Gr(m??document.body,{select:!0}),a.removeEventListener(zc,c),uv.remove(h)}
vendor: 3,878 bytes, line 199
199,0)}}},[a,u,c,h]);const b=p.useCallback(m=>{if(!r&&!n||h.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(w&&v){const g=m.currentTarget,[y,_]=iI(g);y&&_?!m.shiftKey&&v===_?(m.preventDefault(),r&&Gr(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),r&&Gr(_,{select:!0})):v===g&&m.preventDefault()}},[r,n,h.paused]);return x.jsx(oe.div,{tabIndex:-1,...i,ref:f,onKeyDown:b})});k_.displayName=sI;function oI(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Gr(n,{select:t}),document.activeElement!==r)return}function iI(e){const t=C_(e),r=lv(t,e),n=lv(t.reverse(),e);return[r,n]}function C_(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function lv(e,t){for(const r of e)if(!aI(r,{upTo:t}))return r}function aI(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function lI(e){return e instanceof HTMLInputElement&&"select"in e}function Gr(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&lI(e)&&t&&e.select()}}var uv=uI();function uI(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=cv(e,t),e.unshift(t)},remove(t){var r;e=cv(e,t),(r=e[0])==null||r.resume()}}}function cv(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function cI(e){return e.filter(t=>t.tagName!=="A")}var Bc=0;function dI(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??dv()),document.body.insertAdjacentElement("beforeend",e[1]??dv()),Bc++,()=>{Bc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bc--}},[])}function dv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var vl="right-scroll-bar-position",yl="width-before-scroll-bar",hI="with-scroll-bars-hidden",fI="--removed-body-scroll-bar-size";function Wc(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pI(e,t){var r=p.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=t,r.facade}var mI=typeof window<"u"?p.useLayoutEffect:p.useEffect,hv=new WeakMap;function gI(e,t){var r=pI(null,function(n){return e.forEach(function(s){return Wc(s,n)})});return mI(function(){var n=hv.get(r);if(n){var s=new Set(n),o=new Set(e),i=r.current;s.forEach(function(a){o.has(a)||Wc(a,null)}),o.forEach(function(a){s.has(a)||Wc(a,i)})}hv.set(r,e)},[e]),r}function vI(e){return e}function yI(e,t){t===void 0&&(t=vI);var r=[],n=!1,s={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(o){var i=t(o,n);return r.push(i),function(){r=r.filter(function(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 c=i;i=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),r}}}};return s}function wI(e){e===void 0&&(e={});var t=yI(null);return t.options=At({async:!0,ssr:!1},e),t}
vendor: 4,667 bytes, lines 199-236
199var T_=function(e){var t=e.sideCar,r=Nn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return p.createElement(n,At({},r))};T_.isSideCarExport=!0;function bI(e,t){return e.useMedium(t),T_}var P_=wI(),Vc=function(){},Fu=p.forwardRef(function(e,t){var r=p.useRef(null),n=p.useState({onScrollCapture:Vc,onWheelCapture:Vc,onTouchMoveCapture:Vc}),s=n[0],o=n[1],i=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,b=e.noIsolation,m=e.inert,w=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,y=e.gapMode,_=Nn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,k=gI([r,t]),C=At(At({},_),s);return p.createElement(p.Fragment,null,c&&p.createElement(S,{sideCar:P_,removeScrollBar:u,shards:d,noRelative:h,noIsolation:b,inert:m,setCallbacks:o,allowPinchZoom:!!w,lockRef:r,gapMode:y}),i?p.cloneElement(p.Children.only(a),At(At({},C),{ref:k})):p.createElement(g,At({},C,{className:l,ref:k}),a))});Fu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fu.classNames={fullWidth:yl,zeroRight:vl};var xI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _I(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xI();return t&&e.setAttribute("nonce",t),e}function SI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function EI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kI=function(){var e=0,t=null;return{add:function(r){e==0&&(t=_I())&&(SI(t,r),EI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},CI=function(){var e=kI();return function(t,r){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},R_=function(){var e=CI(),t=function(r){var n=r.styles,s=r.dynamic;return e(n,s),null};return t},TI={left:0,top:0,right:0,gap:0},Hc=function(e){return parseInt(e||"",10)||0},PI=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[Hc(r),Hc(n),Hc(s)]},RI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return TI;var t=PI(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},OI=R_(),lo="data-scroll-locked",AI=function(e,t,r,n){var s=e.left,o=e.top,i=e.right,a=e.gap;return r===void 0&&(r="margin"),`
200  .`.concat(hI,` {
201   overflow: hidden `).concat(n,`;
202   padding-right: `).concat(a,"px ").concat(n,`;
203  }
204  body[`).concat(lo,`] {
205    overflow: hidden `).concat(n,`;
206    overscroll-behavior: contain;
207    `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
208    padding-left: `.concat(s,`px;
209    padding-top: `).concat(o,`px;
210    padding-right: `).concat(i,`px;
211    margin-left:0;
212    margin-top:0;
213    margin-right: `).concat(a,"px ").concat(n,`;
214    `),r==="padding"&&"padding-right: ".concat(a,"px ").concat(n,";")].filter(Boolean).join(""),`
215  }
216  
217  .`).concat(vl,` {
218    right: `).concat(a,"px ").concat(n,`;
219  }
220  
221  .`).concat(yl,` {
222    margin-right: `).concat(a,"px ").concat(n,`;
223  }
224  
225  .`).concat(vl," .").concat(vl,` {
226    right: 0 `).concat(n,`;
227  }
228  
229  .`).concat(yl," .").concat(yl,` {
230    margin-right: 0 `).concat(n,`;
231  }
232  
233  body[`).concat(lo,`] {
234    `).concat(fI,": ").concat(a,`px;
235  }
236`)},fv=function(){var e=parseInt(document.body.getAttribute(lo)||"0",10);return isFinite(e)?e:0},jI=function(){p.useEffect(function(){return document.body.setAttribute(lo,(fv()+1).toString()),function(){var e=fv()-1;e<=0?document.body.removeAttribute(lo):document.body.setAttribute(lo,e.toString())}},[])},NI=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,s=n===void 0?"margin":n;jI();var o=p.useMemo(function(){return RI(s)},[s]);return p.createElement(OI,{styles:AI(o,!t,s,r?"":"!important")})},Dh=!1;if(typeof window<"u")try{var Qa=Object.defineProperty({},"passive",{get:function(){return Dh=!0,!0}});window.addEventListener("test",Qa,Qa),window.removeEventListener("test",Qa,Qa)}catch{Dh=!1}var Is=Dh?{passive:!1}:!1,II=function(e){return e.tagName==="TEXTAREA"},O_=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!II(e)&&r[t]==="visible")},DI=function(e){return O_(e,"overflowY")},LI=function(e){return O_(e,"overflowX")}
vendor: 4,881 bytes, lines 236-239
236,pv=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var s=A_(e,n);if(s){var o=j_(e,n),i=o[1],a=o[2];if(i>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},MI=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},$I=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},A_=function(e,t){return e==="v"?DI(t):LI(t)},j_=function(e,t){return e==="v"?MI(t):$I(t)},FI=function(e,t){return e==="h"&&t==="rtl"?-1:1},UI=function(e,t,r,n,s){var o=FI(e,window.getComputedStyle(t).direction),i=o*n,a=r.target,l=t.contains(a),u=!1,c=i>0,d=0,f=0;do{if(!a)break;var h=j_(e,a),b=h[0],m=h[1],w=h[2],v=m-w-o*b;(b||v)&&A_(e,a)&&(d+=v,f+=b);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&(Math.abs(d)<1||!s)||!c&&(Math.abs(f)<1||!s))&&(u=!0),u},Ya=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},mv=function(e){return[e.deltaX,e.deltaY]},gv=function(e){return e&&"current"in e?e.current:e},zI=function(e,t){return e[0]===t[0]&&e[1]===t[1]},BI=function(e){return`
237  .block-interactivity-`.concat(e,` {pointer-events: none;}
238  .allow-interactivity-`).concat(e,` {pointer-events: all;}
239`)},WI=0,Ds=[];function VI(e){var t=p.useRef([]),r=p.useRef([0,0]),n=p.useRef(),s=p.useState(WI++)[0],o=p.useState(R_)[0],i=p.useRef(e);p.useEffect(function(){i.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var m=lp([e.lockRef.current],(e.shards||[]).map(gv),!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))})}}},[e.inert,e.lockRef.current,e.shards]);var a=p.useCallback(function(m,w){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var v=Ya(m),g=r.current,y="deltaX"in m?m.deltaX:g[0]-v[0],_="deltaY"in m?m.deltaY:g[1]-v[1],S,k=m.target,C=Math.abs(y)>Math.abs(_)?"h":"v";if("touches"in m&&C==="h"&&k.type==="range")return!1;var T=pv(C,k);if(!T)return!0;if(T?S=C:(S=C==="v"?"h":"v",T=pv(C,k)),!T)return!1;if(!n.current&&"changedTouches"in m&&(y||_)&&(n.current=S),!S)return!0;var P=n.current||S;return UI(P,w,m,P==="h"?y:_,!0)},[]),l=p.useCallback(function(m){var w=m;if(!(!Ds.length||Ds[Ds.length-1]!==o)){var v="deltaY"in w?mv(w):Ya(w),g=t.current.filter(function(S){return S.name===w.type&&(S.target===w.target||w.target===S.shadowParent)&&zI(S.delta,v)})[0];if(g&&g.should){w.cancelable&&w.preventDefault();return}if(!g){var y=(i.current.shards||[]).map(gv).filter(Boolean).filter(function(S){return S.contains(w.target)}),_=y.length>0?a(w,y[0]):!i.current.noIsolation;_&&w.cancelable&&w.preventDefault()}}},[]),u=p.useCallback(function(m,w,v,g){var y={name:m,delta:w,target:v,should:g,shadowParent:HI(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(_){return _!==y})},1)},[]),c=p.useCallback(function(m){r.current=Ya(m),n.current=void 0},[]),d=p.useCallback(function(m){u(m.type,mv(m),m.target,a(m,e.lockRef.current))},[]),f=p.useCallback(function(m){u(m.type,Ya(m),m.target,a(m,e.lockRef.current))},[]);p.useEffect(function(){return Ds.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Is),document.addEventListener("touchmove",l,Is),document.addEventListener("touchstart",c,Is),function(){Ds=Ds.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,Is),document.removeEventListener("touchmove",l,Is),document.removeEventListener("touchstart",c,Is)}},[]);var h=e.removeScrollBar,b=e.inert;return p.createElement(p.Fragment,null,b?p.createElement(o,{styles:BI(s)}):null,h?p.createElement(NI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function HI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const qI=bI(P_,VI);var N_=p.forwardRef(function(e,t){return p.createElement(Fu,At({},e,{ref:t,sideCar:qI}))});N_.classNames=Fu.classNames;var KI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ls=new WeakMap,Ja=new WeakMap,Xa={},qc=0,I_=function(e){return e&&(e.host||I_(e.parentNode))},GI=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=I_(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},QI=function(e,t,r,n){var s=GI(t,Array.isArray(e)?e:[e]);Xa[r]||(Xa[r]=new WeakMap);var o=Xa[r],i=[],a=new Set,l=new Set(s),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};
vendor: 4,537 bytes, line 239
239s.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var h=f.getAttribute(n),b=h!==null&&h!=="false",m=(Ls.get(f)||0)+1,w=(o.get(f)||0)+1;Ls.set(f,m),o.set(f,w),i.push(f),m===1&&b&&Ja.set(f,!0),w===1&&f.setAttribute(r,"true"),b||f.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),a.clear(),qc++,function(){i.forEach(function(d){var f=Ls.get(d)-1,h=o.get(d)-1;Ls.set(d,f),o.set(d,h),f||(Ja.has(d)||d.removeAttribute(n),Ja.delete(d)),h||d.removeAttribute(r)}),qc--,qc||(Ls=new WeakMap,Ls=new WeakMap,Ja=new WeakMap,Xa={})}},YI=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),s=KI(e);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live]"))),QI(n,s,r,"aria-hidden")):function(){return null}},Uu="Dialog",[D_,tL]=An(Uu),[JI,rr]=D_(Uu),L_=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:s,onOpenChange:o,modal:i=!0}=e,a=p.useRef(null),l=p.useRef(null),[u,c]=aa({prop:n,defaultProp:s??!1,onChange:o,caller:Uu});return x.jsx(JI,{scope:t,triggerRef:a,contentRef:l,contentId:oo(),titleId:oo(),descriptionId:oo(),open:u,onOpenChange:c,onOpenToggle:p.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};L_.displayName=Uu;var M_="DialogTrigger",$_=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=rr(M_,r),o=Ce(t,s.triggerRef);return x.jsx(oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":Ep(s.open),...n,ref:o,onClick:Z(e.onClick,s.onOpenToggle)})});$_.displayName=M_;var _p="DialogPortal",[XI,F_]=D_(_p,{forceMount:void 0}),U_=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:s}=e,o=rr(_p,t);return x.jsx(XI,{scope:t,forceMount:r,children:p.Children.map(n,i=>x.jsx(tr,{present:r||o.open,children:x.jsx(Mf,{asChild:!0,container:s,children:i})}))})};U_.displayName=_p;var nu="DialogOverlay",z_=p.forwardRef((e,t)=>{const r=F_(nu,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=rr(nu,e.__scopeDialog);return o.modal?x.jsx(tr,{present:n||o.open,children:x.jsx(e2,{...s,ref:t})}):null});z_.displayName=nu;var ZI=Fi("DialogOverlay.RemoveScroll"),e2=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=rr(nu,r);return x.jsx(N_,{as:ZI,allowPinchZoom:!0,shards:[s.contentRef],children:x.jsx(oe.div,{"data-state":Ep(s.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),gs="DialogContent",B_=p.forwardRef((e,t)=>{const r=F_(gs,e.__scopeDialog),{forceMount:n=r.forceMount,...s}=e,o=rr(gs,e.__scopeDialog);return x.jsx(tr,{present:n||o.open,children:o.modal?x.jsx(t2,{...s,ref:t}):x.jsx(r2,{...s,ref:t})})});B_.displayName=gs;var t2=p.forwardRef((e,t)=>{const r=rr(gs,e.__scopeDialog),n=p.useRef(null),s=Ce(t,r.contentRef,n);return p.useEffect(()=>{const o=n.current;if(o)return YI(o)},[]),x.jsx(W_,{...e,ref:s,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Z(e.onCloseAutoFocus,o=>{var i;o.preventDefault(),(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Z(e.onPointerDownOutside,o=>{const i=o.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&o.preventDefault()}),onFocusOutside:Z(e.onFocusOutside,o=>o.preventDefault())})}),r2=p.forwardRef((e,t)=>{const r=rr(gs,e.__scopeDialog),n=p.useRef(!1),s=p.useRef(!1);return x.jsx(W_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),o.preventDefault()),n.current=!1,s.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const i=o.target;((u=r.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&s.current&&o.preventDefault()}})}),W_=p.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:s,onCloseAutoFocus:o,...i}=e,a=rr(gs,r),l=p.useRef(null),u=Ce(t,l);return dI(),x.jsxs(x.Fragment,{children:[x.jsx(k_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:s,onUnmountAutoFocus:o,children:x.jsx(xu,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ep(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(n2,{titleId:a.titleId}),x.jsx(o2,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Sp="DialogTitle",V_=p.forwardRef((e,t)=>
239{const{__scopeDialog:r,...n}=e,s=rr(Sp,r);return x.jsx(oe.h2,{id:s.titleId,...n,ref:t})});V_.displayName=Sp;var H_="DialogDescription",q_=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=rr(H_,r);return x.jsx(oe.p,{id:s.descriptionId,...n,ref:t})});q_.displayName=H_;var K_="DialogClose",G_=p.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,s=rr(K_,r);return x.jsx(oe.button,{type:"button",...n,ref:t,onClick:Z(e.onClick,()=>s.onOpenChange(!1))})});G_.displayName=K_;function Ep(e){return e?"open":"closed"}var Q_="DialogTitleWarning",[rL,Y_]=YE(Q_,{contentName:gs,titleName:Sp,docsSlug:"dialog"}),n2=({titleId:e})=>{const t=Y_(Q_),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
240
241If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
242
243For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},s2="DialogDescriptionWarning",o2=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Y_(s2).contentName}}.`;return p.useEffect(()=>{var o;const s=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},i2=L_,a2=$_,l2=U_,J_=z_,X_=B_,Z_=V_,eS=q_,tS=G_;const vv=i2,nL=a2,u2=l2,sL=tS,rS=p.forwardRef(({className:e,...t},r)=>x.jsx(J_,{ref:r,className:de("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));rS.displayName=J_.displayName;const Lh=p.forwardRef(({className:e,children:t,...r},n)=>x.jsxs(u2,{children:[x.jsx(rS,{}),x.jsxs(X_,{ref:n,className:de("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,x.jsxs(tS,{className:"absolute right-4 top-4 roun
243ded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[x.jsx(Eu,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Lh.displayName=X_.displayName;const Mh=({className:e,...t})=>x.jsx("div",{className:de("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Mh.displayName="DialogHeader";const $h=({className:e,...t})=>x.jsx("div",{className:de("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$h.displayName="DialogFooter";const Fh=p.forwardRef(({className:e,...t},r)=>x.jsx(Z_,{ref:r,className:de("text-lg font-semibold leading-none tracking-tight",e),...t}));Fh.displayName=Z_.displayName;const c2=p.forwardRef(({className:e,...t},r)=>x.jsx(eS,{ref:r,className:de("text-sm text-muted-foreground",e),...t}));c2.displayName=eS.displayName;var d2="Label",nS=p.forwardRef((e,t)=>x.jsx(oe.label,{...e,ref:t,onMouseDown:r=>{var s;r.target.closest("button, input, select, textarea")||((s=e.onMouseDown)==null||s.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));nS.displayName=d2;var sS=nS;const h2=zf("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Uh=p.forwardRef(({className:e,...t},r)=>x.jsx(sS,{ref:r,className:de(h2(),e),...t}));Uh.displayName=sS.displayName;function nr(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function vs(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}const oS=6048e5,f2=864e5,oL=6e4,iL=36e5,aL=525600,lL=43200,uL=1440;let p2={};function zu(){return p2}function Yi(e,t){var a,l,u,c;const r=zu(),n=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((c=(u=r.locale)==null?void 0:u.options)==null?void 0:c.weekStartsOn)??0,s=nr(e),o=s.getDay(),i=(o<n?7:0)+o-n;return s.setDate(s.getDate()-i),s.setHours(0,0,0,0),s}function su(e){return Yi(e,{weekStartsOn:1})}function iS(e){const t=nr(e),r=t.getFullYear(),n=vs(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);const s=su(n),o=vs(e,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const i=su(o);return t.getTime()>=s.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function yv(e){const t=nr(e);return t.setHours(0,0,0,0),t}function wv(e){const t=nr(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function m2(e,t){const r=yv(e),n=yv(t),s=+r-wv(r),o=+n-wv(n);return Math.round((s-o)/f2)}function g2(e){const t=iS(e),r=vs(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),su(r)}function v2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function y2(e){if(!v2(e)&&typeof e!="number")return!1;const t=nr(e);return!isNaN(Number(t))}function w2(e){const t=nr(e),r=vs(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}const b2={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"}},x2=(e,t,r)=>{let n;const s=b2[e];return typeof s=="string"?n=s:t===1?n=s.one:n=s.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Kc(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const _2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},S2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},E2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},k2={date:Kc({formats:_2,defaultWidth:"full"}),time:Kc({formats:S2,defaultWidth:"full"}),dateTime:Kc({formats:E2,defaultWidth:"full"})},C2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},T2=(e,t,r,n)=>C2[e];function ri(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let s;if(n==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,a=r!=null&&r.width?String(r.width):i;s=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=r!=null&&r.width?String(r.width):e.defaultWidth;s=e.values[a]||e.values[i]}const o=e.argumentCallback?e.argumentCallback(t):t;return s[o]}}const P2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},R2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},O2={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"]},A2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
243ay","Saturday"]},j2={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"}},N2={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"}},I2=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},D2={ordinalNumber:I2,era:ri({values:P2,defaultWidth:"wide"}),quarter:ri({values:R2,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ri({values:O2,defaultWidth:"wide"}),day:ri({values:A2,defaultWidth:"wide"}),dayPeriod:ri({values:j2,defaultWidth:"wide",formattingValues:N2,defaultFormattingWidth:"wide"})};function ni(e){return(t,r={})=>{const n=r.width,s=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(s);if(!o)return null;const i=o[0],a=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?M2(a,d=>d.test(i)):L2(a,d=>d.test(i));let u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;const c=t.slice(i.length);return{value:u,rest:c}}}function L2(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function M2(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function $2(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const s=n[0],o=t.match(e.parsePattern);if(!o)return null;let i=e.valueCallback?e.valueCallback(o[0]):o[0];i=r.valueCallback?r.valueCallback(i):i;const a=t.slice(s.length);return{value:i,rest:a}}}const F2=/^(\d+)(th|st|nd|rd)?/i,U2=/\d+/i,z2={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},B2={any:[/^b/i,/^(a|c)/i]},W2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},V2={any:[/1/i,/2/i,/3/i,/4/i]},H2={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},q2={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]},K2={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},G2={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]},Q2={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},Y2={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}},J2={ordinalNumber:$2({matchPattern:F2,parsePattern:U2,valueCallback:e=>parseInt(e,10)}),era:ni({matchPatterns:z2,defaultMatchWidth:"wide",parsePatterns:B2,defaultParseWidth:"any"}),quarter:ni({matchPatterns:W2,defaultMatchWidth:"wide",parsePatterns:V2,defaultParseWidth:"any",valueCallback:e=>e+1}),month:ni({matchPatterns:H2,defaultMatchWidth:"wide",parsePatterns:q2,defaultParseWidth:"any"}),day:ni({matchPatterns:K2,defaultMatchWidth:"wide",parsePatterns:G2,defaultParseWidth:"any"}),dayPeriod:ni({matchPatterns:Q2,defaultMatchWidth:"any",parsePatterns:Y2,defaultParseWidth:"any"})},X2={code:"en-US",formatDistance:x2,formatLong:k2,formatRelative:T2,localize:D2,match:J2,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Z2(e){const t=nr(e);return m2(t,w2(t))+1}function eD(e){const t=nr(e),r=+su(t)-+g2(t);return Math.round(r/oS)+1}function aS(e,t){var c,d,f,h;const r=nr(e),n=r.getFullYear(),s=zu(),o=(t==null?void 0:t.firstWeekContainsDate)??((d=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??s.firstWeekContainsDate??((h=(f=s.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=vs(e,0);i.setFullYear(n+1,0,o),i.setHours(0,0,0,0);const a=Yi(i,t),l=vs(e,0);l.setFullYear(n,0,o),l.setHours(0,0,0,0);const u=Yi(l,t);return r.getTime()>=a.getTime()?n+1:r.getTime()>=u.getTime()?n:n-1}function tD(e,t){var a,l,u,c;const r=zu(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((c=(u=r.locale)==null?void 0:u.options)==null?void 0:c.firstWeekContainsDate)??1,s=aS(e,t),o=vs(e,0);return o.setFullYear(s,0,n),o.setHours(0,0,0,0),Yi(o,t)}function rD(e,t){const r=nr(e),n=+Yi(r,t)-+tD(r,t);return Math.round(n/oS)+1}function le(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const qr={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return le(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):le(r+1,2)},d(e,t){return le(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return le(e.getHours()%12||12,t.length)},H(e,t){return le(e.getHours(),t.length)},m(e,t){return le(e.getMinutes(),t.length)},s(e,t){return le(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),s=Math.trunc(n*Math.pow(10,r-3));return le(s,t.length)}},Ms={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bv={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),s=n>0?n:1-n;return r.ordinalNumber(s,{unit:"year"})}return qr.y(e,t)},Y:function(e,t,r,n){const s=aS(e,n),o=s>0?s:1-s;if(t==="YY"){const i=o%100;return le(i,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):le(o,t.length)},R:function(e,t){const r=iS(e);return le(r,t.length)},u:function(e,t){const r=e.getFullYear();return le(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return le(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return le(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return qr.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return le(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const s=rD(e,n);return t==="wo"?r.ordinalNumber(s,{unit:"week"}):le(s,t.length)},I:function(e,t,r){const n=eD(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):le(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):qr.d(e,t)},D:function(e,t,r){const n=Z2(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):le(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const s=e.getDay(),o=(s-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return le(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(s,{width:"short",context:"formatting"});case"eeee":default:return r.day(s,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const s=e.getDay(),o=(s-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return le(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(s,{width:"narrow",context:"standalone"});case"cccccc":return r.day(s,{width:"short",context:"standalone"});case"cccc":default:return r.day(s,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),s=n===0?7:n;switch(t){case"i":return String(s);case"ii":return le(s,t.length);case"io":return r.ordinalNumber(s,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const s=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let s;switch(n===12?s=Ms.noon:n===0?s=Ms.midnight:s=n/12>
vendor: 4,371 bytes, line 243
243=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let s;switch(n>=17?s=Ms.evening:n>=12?s=Ms.afternoon:n>=4?s=Ms.morning:s=Ms.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return qr.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):qr.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):le(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):le(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):qr.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):qr.s(e,t)},S:function(e,t){return qr.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return _v(n);case"XXXX":case"XX":return Wn(n);case"XXXXX":case"XXX":default:return Wn(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return _v(n);case"xxxx":case"xx":return Wn(n);case"xxxxx":case"xxx":default:return Wn(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xv(n,":");case"OOOO":default:return"GMT"+Wn(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xv(n,":");case"zzzz":default:return"GMT"+Wn(n,":")}},t:function(e,t,r){const n=Math.trunc(e.getTime()/1e3);return le(n,t.length)},T:function(e,t,r){const n=e.getTime();return le(n,t.length)}};function xv(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),s=Math.trunc(n/60),o=n%60;return o===0?r+String(s):r+String(s)+t+le(o,2)}function _v(e,t){return e%60===0?(e>0?"-":"+")+le(Math.abs(e)/60,2):Wn(e,t)}function Wn(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),s=le(Math.trunc(n/60),2),o=le(n%60,2);return r+s+t+o}const Sv=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},lS=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},nD=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],s=r[2];if(!s)return Sv(e,t);let o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Sv(n,t)).replace("{{time}}",lS(s,t))},sD={p:lS,P:nD},oD=/^D+$/,iD=/^Y+$/,aD=["D","DD","YY","YYYY"];function lD(e){return oD.test(e)}function uD(e){return iD.test(e)}function cD(e,t,r){const n=dD(e,t,r);if(console.warn(n),aD.includes(e))throw new RangeError(n)}function dD(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const hD=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fD=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,pD=/^'([^]*?)'?$/,mD=/''/g,gD=/[a-zA-Z]/;function vD(e,t,r){var c,d,f,h,b,m,w,v;const n=zu(),s=(r==null?void 0:r.locale)??n.locale??X2,o=(r==null?void 0:r.firstWeekContainsDate)??((d=(c=r==null?void 0:r.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??n.firstWeekContainsDate??((h=(f=n.locale)==null?void 0:f.options)==null?void 0:h.firstWeekContainsDate)??1,i=(r==null?void 0:r.weekStartsOn)??((m=(b=r==null?void 0:r.locale)==null?void 0:b.options)==null?void 0:m.weekStartsOn)??n.weekStartsOn??((v=(w=n.locale)==null?void 0:w.options)==null?void 0:v.weekStartsOn)??0,a=nr(e);
243if(!y2(a))throw new RangeError("Invalid time value");let l=t.match(fD).map(g=>{const y=g[0];if(y==="p"||y==="P"){const _=sD[y];return _(g,s.formatLong)}return g}).join("").match(hD).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const y=g[0];if(y==="'")return{isToken:!1,value:yD(g)};if(bv[y])return{isToken:!0,value:g};if(y.match(gD))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:g}});s.localize.preprocessor&&(l=s.localize.preprocessor(a,l));const u={firstWeekContainsDate:o,weekStartsOn:i,locale:s};return l.map(g=>{if(!g.isToken)return g.value;const y=g.value;(!(r!=null&&r.useAdditionalWeekYearTokens)&&uD(y)||!(r!=null&&r.useAdditionalDayOfYearTokens)&&lD(y))&&cD(y,t,String(e));const _=bv[y[0]];return _(a,y,s.localize,u)}).join("")}function yD(e){const t=e.match(pD);return t?t[1].replace(mD,"'"):e}function wD({storeId:e,floating:t}){var j;const[r,n]=p.useState(""),[s,o]=p.useState(!1),[i,a]=p.useState(""),[l,u]=p.useState(null),{messages:c,isLoading:d,error:f,sendMessage:h,clearMessages:b,downloadCSV:m}=xN(e),{data:w,isLoading:v}=_N(e),g=SN(),y=EN(),{toast:_}=Y0(),S=O=>{O.preventDefault(),!(!r.trim()||d)&&(h(r.trim()),n(""))},k=(O,M,I,H)=>{u({question:O,answer:M,csvData:I,recordsAnalyzed:H}),a(O.slice(0,50)+(O.length>50?"...":"")),o(!0)},C=async()=>{if(!(!l||!i.trim()))try{await g.mutateAsync({title:i.trim(),question:l.question,answer:l.answer,csvData:l.csvData,recordsAnalyzed:l.recordsAnalyzed,storeId:e}),_({title:"Report saved",description:"Your AI report has been saved for future reference."}),o(!1),u(null),a("")}catch{_({title:"Error",description:"Failed to save report",variant:"destructive"})}},T=async O=>{try{await y.mutateAsync(O),_({title:"Report deleted"})}catch{_({title:"Error",description:"Failed to delete report",variant:"destructive"})}},P=["Compare Google vs TripAdvisor review ratings","What are the top 5 complaints by store?","Show average ratings by category across all stores","What themes appear in both internal feedback and external reviews?","Generate a CSV of all external reviews with low ratings"],R=x.jsxs(nI,{defaultValue:"chat",className:"w-full",children:[x.jsxs(E_,{className:"grid w-full grid-cols-2 mb-5 h-10 bg-muted/50 p-1",children:[x.jsxs(Nh,{value:"chat",className:"gap-2 text-sm font-medium data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",children:[x.jsx(_c,{className:"h-4 w-4"}),"Chat"]}),x.jsxs(Nh,{value:"saved",className:"gap-2 text-sm font-medium data-[state=active]:bg-background data-[state=active]:shadow-sm rounded-md transition-all",children:[x.jsx(Ym,{className:"h-4 w-4"}),"Saved Reports"]})]}),x.jsxs(Ih,{value:"chat",className:"space-y-5",children:[c.length===0?x.jsxs("div",{className:"space-y-4",children:[x.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Ask questions about your feedback data. I can analyse patterns, generate reports, and create CSV exports."}),x.jsx("div",{className:"flex flex-wrap gap-2",children:P.map((O,M)=>x.jsx(Ke,{variant:"outline",size:"sm",className:"text-xs h-auto py-2 px-3 rounded-full border-border/60 hover:border-primary/40 hover:bg-primary/5 transition-colors",onClick:()=>n(O),children:O},M))})]}):x.jsx(Ah,{className:"h-[320px] pr-2",children:x.jsxs("div",{className:"space-y-4",children:[c.map((O,M)=>x.jsxs("div",{className:`flex gap-3 ${O.role==="user"?"justify-end":"justify-start"}`,children:[O.role==="assistant"&&x.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:x.jsx(_c,{className:"h-4 w-4 text-primary"})}),x.jsxs("div",{className:`max-w-[85%] rounded-xl px-3 py-2.5 text-sm overflow-hidden ${O.role==="user"?"bg-primary text-primary-foreground":"bg-muted/70 border border-border/40"}`,children:[x.jsx("div",{className:"whitespace-pre-wrap leading-relaxed break-words overflow-wrap-anywhere",children:O.content}),O.role==="assistant"&&x.jsxs("div",{className:"flex flex-wrap gap-2 mt-3 pt-2 border-t border-border/30",children:[O.csvData&&x.jsxs(Ke,{variant:"secondary",size:"sm",className:"h-7 text-xs rounded-full",onClick:()=>m(O.csvData),children:[x.jsx(Qm,{className:"h-3 w-3 mr-1.5"}),"Download CSV"]}),x.jsxs(Ke,{variant:"ghost",size:"sm",className:"h-7 text-xs rounded-full hover:bg-primary/10",onClick:()=>{const I=c[M-1];(I==null?void 0:I.role)==="user"&&k(I.content,O.content,O.csvData,O.recordsAnalyzed)},children:[x.jsx(Qk,{className:"h-3 w-3 mr-1.5"}),"Save"]})]}),O.recordsAnalyzed&&x.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Analyzed ",O.recordsAnalyzed," records"]})]})]},M)),d&&((j=c[c.length-1])==null?void 0:j.content)===""&&x.jsxs("div",{className:"flex gap-3",children:[x.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-primary/10 flex items-center justify-center",children:x.jsx(_c,{className:"h-4 w-4 text-primary"})}),x.jsx("div",{className:"bg-muted/70 border border-border/40 rounded-xl px-4 py-3",children:x.jsx(Jm,{className:"h-4 w-4 animate-spin text-muted-foreground"})})]})]})}),f&&x.jsx("p",{className:"text-sm text-destructive bg-destructive/10 px-3 py-2 rounded-lg",children:f}),x.jsxs("form",{onSubmit:S,className:"flex gap-2",children:[x.jsx("div",{className:"relative flex-1",children:x.jsx(gl,{value:r,onChange:O=>n(O.target.value),placeholder:"Ask about your feedback data...",disabled:d,className:"pr-10 h-11 rounded-xl border-border/60 focus:border-primary/40 transition-colors"})}),x.jsx(Ke,{type:"submit",size:"icon",disabled:d||!r.trim(),className:"h-11 w-11 rounded-xl shrink-0",children:x.jsx(Yk,{className:"h-4 w-4"})}),c.length>0&&x.jsx(Ke,{type:"button",variant:"outline",size:"icon",onClick:b,title:"Clear chat",className:"h-11 w-11 rounded-xl shrink-0 border-border/60",children:x.jsx(Xm,{className:"h-4 w-4"})})]})]}),x.jsx(Ih,{value:"saved",className:"space-y-4",children:v?x.jsx("div",{className:"flex items-center justify-center py-10",children:x.jsx(Jm,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):w&&w.length>0?x.jsx(Ah,{className:"h-[360px] pr-4",children:x.jsx("div",{className:"space-y-3",children:w.map(O=>x.jsxs("div",{className:"p-4 rounded-xl border border-border/40 bg-muted/30 space-y-2.5 hover:bg-muted/50 transition-colors",children:[x.jsxs("div",{className:"flex items-start justify-between gap-2",children:[x.jsxs("div",{className:"flex items-center gap-2.5",children:[x.jsx("div",{className:"p-1.5 rounded-md bg-primary/10",children:x.jsx(qk,{className:"h-3.5 w-3.5 text-primary"})}),x.jsx("h4",{className:"font-medium text-sm",children:O.title})]}),x.jsx(Ke,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0 rounded-lg text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:()=>T(O.id),children:x.jsx(Xm,{className:"h-3.5 w-3.5"})})]}),x.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 leading-relaxed",children:O.question}),x.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground pt-1",children:[x.jsx("span",{children:vD(new Date(O.created_at),"MMM d, yyyy HH:mm")}
243),O.records_analyzed&&x.jsxs("span",{className:"flex items-center gap-1",children:[x.jsx("span",{className:"w-1 h-1 rounded-full bg-muted-foreground/50"}),O.records_analyzed," records"]}),O.csv_data&&x.jsxs(Ke,{variant:"ghost",size:"sm",className:"h-6 text-xs px-2 rounded-full hover:bg-primary/10",onClick:()=>{const M=new Blob([O.csv_data],{type:"text/csv;charset=utf-8;"}),I=document.createElement("a");I.href=URL.createObjectURL(M),I.download=`${O.title.replace(/\s+/g,"-")}.csv`,I.click(),URL.revokeObjectURL(I.href)},children:[x.jsx(Qm,{className:"h-3 w-3 mr-1"}),"CSV"]})]}),x.jsxs("details",{className:"text-xs group",children:[x.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground transition-colors",children:"View full response"}),x.jsx("p",{className:"mt-2.5 whitespace-pre-wrap text-foreground/80 bg-background/80 p-3 rounded-lg border border-border/30 leading-relaxed",children:O.answer})]})]},O.id))})}):x.jsxs("div",{className:"text-center py-10 text-muted-foreground",children:[x.jsx("div",{className:"w-12 h-12 rounded-xl bg-muted/50 flex items-center justify-center mx-auto mb-3",children:x.jsx(Ym,{className:"h-5 w-5 opacity-50"})}),x.jsx("p",{className:"text-sm font-medium",children:"No saved reports yet"}),x.jsx("p",{className:"text-xs mt-1",children:"Save AI responses to reference later"})]})})]});return t?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"p-4",children:R}),x.jsx(vv,{open:s,onOpenChange:o,children:x.jsxs(Lh,{children:[x.jsx(Mh,{children:x.jsx(Fh,{children:"Save Report"})}),x.jsx("div",{className:"space-y-4 py-4",children:x.jsxs("div",{className:"space-y-2",children:[x.jsx(Uh,{htmlFor:"report-title",children:"Report Title"}),x.jsx(gl,{id:"report-title",value:i,onChange:O=>a(O.target.value),placeholder:"Enter a title for this report"})]})}),x.jsxs($h,{children:[x.jsx(Ke,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),x.jsx(Ke,{onClick:C,disabled:!i.trim()||g.isPending,children:g.isPending?"Saving...":"Save Report"})]})]})})]}):x.jsxs(x.Fragment,{children:[x.jsxs(zx,{className:"border-border/40 bg-card shadow-sm",children:[x.jsx(Bx,{className:"pb-4 border-b border-border/30",children:x.jsxs(Wx,{className:"flex items-center gap-2.5 text-lg font-semibold tracking-tight",children:[x.jsx("div",{className:"p-1.5 rounded-md bg-primary/10",children:x.jsx(Kd,{className:"h-4 w-4 text-primary"})}),"AI Analytics Assistant"]})}),x.jsx(Vx,{className:"pt-5",children:R})]}),x.jsx(vv,{open:s,onOpenChange:o,children:x.jsxs(Lh,{children:[x.jsx(Mh,{children:x.jsx(Fh,{children:"Save Report"})}),x.jsx("div",{className:"space-y-4 py-4",children:x.jsxs("div",{className:"space-y-2",children:[x.jsx(Uh,{htmlFor:"report-title",children:"Report Title"}),x.jsx(gl,{id:"report-title",value:i,onChange:O=>a(O.target.value),placeholder:"Enter a title for this report"})]})}),x.jsxs($h,{children:[x.jsx(Ke,{variant:"outline",onClick:()=>o(!1),children:"Cancel"}),x.jsx(Ke,{onClick:C,disabled:!i.trim()||g.isPending,children:g.isPending?"Saving...":"Save Report"})]})]})})]})}function bD(){const[e,t]=p.useState(!1),[r,n]=p.useState(!1),{user:s,profile:o}=mN(),i=zo(),a=["/admin","/store","/region"].some(u=>i.pathname.startsWith(u));if(!s||!a)return null;const l=(o==null?void 0:o.role)==="store"?o.store_id??void 0:void 0;return x.jsxs(x.Fragment,{children:[!e&&x.jsx(Ke,{onClick:()=>t(!0),className:"fixed bottom-6 right-6 z-50 h-14 w-14 rounded-full shadow-lg hover:shadow-xl transition-all duration-200 hover:scale-105",size:"icon","aria-label":"Open AI Analytics Assistant",children:x.jsx(Kd,{className:"h-6 w-6"})}),e&&x.jsxs("div",{className:de("fixed z-50 bg-card border border-border/60 shadow-2xl flex flex-col overflow-hidden","animate-in slide-in-from-bottom-4 fade-in duration-200 transition-all",r?"inset-4 rounded-xl":"bottom-6 right-6 w-[420px] max-w-[calc(100vw-2rem)] h-[560px] max-h-[calc(100vh-6rem)] rounded-2xl"),children:[x.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border/30 bg-muted/30 shrink-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("div",{className:"p-1.5 rounded-md bg-primary/10",children:x.jsx(Kd,{className:"h-4 w-4 text-primary"})}),x.jsx("span",{className:"font-semibold text-sm tracking-tight",children:"AI Analytics Assistant"})]}),x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(Ke,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-lg hover:bg-muted",onClick:()=>n(!r),"aria-label":r?"Minimize chat":"Maximize chat",children:r?x.jsx(Gk,{className:"h-4 w-4"}):x.jsx(Kk,{className:"h-4 w-4"})}),x.jsx(Ke,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-lg hover:bg-muted",onClick:()=>{t(!1),n(!1)},"aria-label":"Close AI chat",children:x.jsx(Eu,{className:"h-4 w-4"})})]})]}),x.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:x.jsx(wD,{storeId:l,floating:!0})})]})]})}function xD(){return x.jsx("div",{className:"min-h-screen gradient-dark flex items-center justify-center p-4",children:x.jsxs("div",{className:"max-w-md w-full text-center",children:[x.jsx(Og,{to:"/feedback",className:"block group",children:x.jsxs("div",{className:"bg-card p-8 rounded-xl shadow-card hover:shadow-elevated transition-all hover:-translate-y-1",children:[x.jsx("img",{src:"/tgif-logo-small.jpg",alt:"TGI Frid
243ays",width:134,height:48,fetchPriority:"high",className:"h-12 mx-auto mb-4"}),x.jsx("h2",{className:"text-xl font-bold text-foreground mb-2",children:"Share Your Experience"}),x.jsx("p",{className:"text-muted-foreground mb-5",children:"Tell us about your visit today"}),x.jsx("span",{className:"inline-flex items-center justify-center rounded-lg bg-primary text-primary-foreground font-semibold px-6 py-2.5 shadow-primary group-hover:bg-primary/90 transition-colors text-sm",children:"Get Started →"})]})}),x.jsx(Og,{to:"/portal",className:"inline-block mt-8 text-muted-foreground hover:text-foreground transition-colors text-sm",children:"Team Login →"})]})})}const _D=p.lazy(()=>ft(()=>import("./Portal-DDGOLGRU.js"),__vite__mapDeps([0,1,2,3,4,5]))),SD=p.lazy(()=>ft(()=>import("./Feedback-BG15_WCC.js"),__vite__mapDeps([6,7,8,9,2,10,11,12,13,14,15]))),ED=p.lazy(()=>ft(()=>import("./Auth-COnx-10l.js"),__vite__mapDeps([16,1,2,3,4,14,17,18]))),kD=p.lazy(()=>ft(()=>import("./Admin-C3cuGPVz.js"),__vite__mapDeps([19,8,20,21,12,2,22,1,3,23,17,24,13,25,26,27,28,9,29,30,31,15,11,7,32,33,34,35,36,37,18,38,39,14,40,10,41,42,43,44]))),CD=p.lazy(()=>ft(()=>import("./Store-Bdf7Ar19.js"),__vite__mapDeps([45,20,21,12,2,8,22,1,3,23,17,24,13,25,26,27,28,9,29,30,31,15,11,7,32,33,34,18,38,46,47,43]))),TD=p.lazy(()=>ft(()=>import("./Region-Dw5l_y3N.js"),__vite__mapDeps([48,20,21,12,2,8,22,1,3,23,17,24,13,25,26,27,28,9,29,30,31,15,11,7,32,33,34,35,36,39,18,46,47,43]))),Za=p.lazy(()=>ft(()=>import("./FeedbackDetail-D1jew8Ft.js"),__vite__mapDeps([49,7,8,9,2,21,12,24,10,50,41,44,33,17,27,13,29,47,28,51,31,52,25,15,32]))),Gc=p.lazy(()=>ft(()=>import("./ExternalReviewDetail-Bsap-DLG.js"),__vite__mapDeps([53,21,12,2,8,50,41,9,44,33,17,27,13,29,47,28,43,26,10,51,52,15]))),PD=p.lazy(()=>ft(()=>import("./TrainingGuide-BRLCEOKE.js"),__vite__mapDeps([54,23,13,17,26,30,3,39,27,32,18,33,44,15]))),RD=p.lazy(()=>ft(()=>import("./DataHealthDashboard-CtoWumsl.js"),__vite__mapDeps([55,37,31,22,36,27,9,2,30,44,40,28,52,3,13,26]))),Qc=p.lazy(()=>ft(()=>import("./SalesLeadDetail-48kfxKEp.js"),__vite__mapDeps([56,34,8,42,51,10,31,9,2,52,27,29,17,25,13,15,40,28]))
243),OD=p.lazy(()=>ft(()=>import("./ResetPassword-CgemMCMY.js"),__vite__mapDeps([57,5,14,2]))),AD=p.lazy(()=>ft(()=>import("./SsoEntry-D4uHGaEP.js"),[])),jD=p.lazy(()=>ft(()=>import("./NotFound-CqKWAhof.js"),[])),ND=new yR,ID=()=>x.jsx("div",{className:"min-h-screen gradient-dark flex items-center justify-center",children:x.jsx("div",{className:"text-white",children:"Loading..."})}),DD=()=>x.jsx(SR,{client:ND,children:x.jsx(tR,{children:x.jsx(pN,{children:x.jsxs(gN,{children:[x.jsx(jC,{}),x.jsx(cT,{}),x.jsxs(NO,{children:[x.jsx(wN,{}),x.jsx(bD,{}),x.jsx(p.Suspense,{fallback:x.jsx(ID,{}),children:x.jsxs(kO,{children:[x.jsx(we,{path:"/",element:x.jsx(xD,{})}),x.jsx(we,{path:"/portal",element:x.jsx(_D,{})}),x.jsx(we,{path:"/feedback",element:x.jsx(SD,{})}),x.jsx(we,{path:"/auth",element:x.jsx(ED,{})}),x.jsx(we,{path:"/admin",element:x.jsx(kD,{})}),x.jsx(we,{path:"/admin/feedback/:id",element:x.jsx(Za,{})}),x.jsx(we,{path:"/admin/review/:id",element:x.jsx(Gc,{})}),x.jsx(we,{path:"/store",element:x.jsx(CD,{})}),x.jsx(we,{path:"/store/feedback/:id",element:x.jsx(Za,{})}),x.jsx(we,{path:"/store/review/:id",element:x.jsx(Gc,{})}),x.jsx(we,{path:"/region",element:x.jsx(TD,{})}),x.jsx(we,{path:"/region/feedback/:id",element:x.jsx(Za,{})}),x.jsx(we,{path:"/region/review/:id",element:x.jsx(Gc,{})}),x.jsx(we,{path:"/feedback/:id",element:x.jsx(Za,{})}),x.jsx(we,{path:"/training-guide",element:x.jsx(PD,{})}),x.jsx(we,{path:"/admin/data-health",element:x.jsx(RD,{})}),x.jsx(we,{path:"/admin/sales-lead/:id",element:x.jsx(Qc,{})}),x.jsx(we,{path:"/store/sales-lead/:id",element:x.jsx(Qc,{})}),x.jsx(we,{path:"/region/sales-lead/:id",element:x.jsx(Qc,{})}),x.jsx(we,{path:"/reset-password",element:x.jsx(OD,{})}),x.jsx(we,{path:"/sso-entry",element:x.jsx(AD,{})}),x.jsx(we,{path:"*",element:x.jsx(jD,{})})]})})]})]})})})});Q0(document.getElementById("root")).render(x.jsx(DD,{}));export{Xm as $,gp as A,Ke as B,XN as C,ZN as D,zf as E,zx as F,Bx as G,Wx as H,gl as I,Vx as J,kN as K,Uh as L,Qm as M,BD as N,WD as O,oe as P,rR as Q,L as R,FD as S,tR as T,Kd as U,yv as V,qk as W,nI as X,E_ as Y,Nh as Z,Ih as _,ip as a,ew as a$,Hk as a0,Eu as a1,Qk as a2,vv as a3,Lh as a4,Mh as a5,Fh as a6,c2 as a7,$h as a8,vN as a9,xu as aA,IP as aB,DP as aC,jP as aD,vs as aE,oS as aF,m2 as aG,w2 as aH,su as aI,eD as aJ,rD as aK,v2 as aL,yN as aM,YI as aN,N_ as aO,dI as aP,k_ as aQ,oo as aR,Mf as aS,Fi as aT,HD as aU,Ym as aV,Me as aW,pr as aX,iL as aY,Z0 as aZ,J0 as a_,nL as aa,sL as ab,Au as ac,kb as ad,Yk as ae,_c as af,zo as ag,ft as ah,MD as ai,Dv as aj,Ce as ak,kP as al,J_ as am,X_ as an,tS as ao,Z_ as ap,eS as aq,i2 as ar,a2 as as,l2 as at,yS as au,Ah as av,Yi as aw,Qw as ax,NP as ay,tr as az,Y0 as b,Ew as b0,tL as b1,rL as b2,ek as b3,ia as b4,xk as b5,PN as b6,XD as b7,Og as c,de as d,qD as e,vD as f,Jm as g,kt as h,X2 as i,x as j,nr as k,wv as l,uL as m,lL as n,aL as o,zu as p,oL as q,p as r,Ze as s,Bd as t,mN as u,DR as v,aa as w,Z as x,An as y,i_ as z};

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