@pinkpixel/promptzy 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +108 -0
- package/LICENSE +21 -0
- package/README.md +187 -0
- package/bin/promptzy.js +79 -0
- package/dist/_headers +23 -0
- package/dist/_routes.json +18 -0
- package/dist/assets/browser-CtsaYQuQ.js +1 -0
- package/dist/assets/index-CAWOSBxH.js +265 -0
- package/dist/assets/index-DSwd6DbH.css +1 -0
- package/dist/favicon.png +0 -0
- package/dist/icon.png +0 -0
- package/dist/index.html +25 -0
- package/dist/robots.txt +14 -0
- package/package.json +128 -0
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
var gp=e=>{throw TypeError(e)};var Tu=(e,t,n)=>t.has(e)||gp("Cannot "+n);var O=(e,t,n)=>(Tu(e,t,"read from private field"),n?n.call(e):t.get(e)),ue=(e,t,n)=>t.has(e)?gp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Q=(e,t,n,a)=>(Tu(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),et=(e,t,n)=>(Tu(e,t,"access private method"),n);var Yo=(e,t,n,a)=>({set _(r){Q(e,t,r,n)},get _(){return O(e,t,a)}});function RE(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const r in a)if(r!=="default"&&!(r in e)){const s=Object.getOwnPropertyDescriptor(a,r);s&&Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:()=>a[r]})}}}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 r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const i of s.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&a(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function py(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function OE(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(n,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}),n}var gy={exports:{}},Nc={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var kE=Symbol.for("react.transitional.element"),NE=Symbol.for("react.fragment");function vy(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:kE,type:e,key:a,ref:t!==void 0?t:null,props:n}}Nc.Fragment=NE;Nc.jsx=vy;Nc.jsxs=vy;gy.exports=Nc;var p=gy.exports,yy={exports:{}},Dc={},by={exports:{}},wy={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* scheduler.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/(function(e){function t(C,P){var R=C.length;C.push(P);e:for(;0<R;){var z=R-1>>>1,q=C[z];if(0<r(q,P))C[z]=P,C[R]=q,R=z;else break e}}function n(C){return C.length===0?null:C[0]}function a(C){if(C.length===0)return null;var P=C[0],R=C.pop();if(R!==P){C[0]=R;e:for(var z=0,q=C.length,V=q>>>1;z<V;){var Z=2*(z+1)-1,j=C[Z],D=Z+1,G=C[D];if(0>r(j,R))D<q&&0>r(G,j)?(C[z]=G,C[D]=R,z=D):(C[z]=j,C[Z]=R,z=Z);else if(D<q&&0>r(G,R))C[z]=G,C[D]=R,z=D;else break e}}return P}function r(C,P){var R=C.sortIndex-P.sortIndex;return R!==0?R:C.id-P.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var l=[],c=[],d=1,u=null,f=3,h=!1,x=!1,y=!1,w=!1,g=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;function S(C){for(var P=n(c);P!==null;){if(P.callback===null)a(c);else if(P.startTime<=C)a(c),P.sortIndex=P.expirationTime,t(l,P);else break;P=n(c)}}function E(C){if(y=!1,S(C),!x)if(n(l)!==null)x=!0,_||(_=!0,F());else{var P=n(c);P!==null&&I(E,P.startTime-C)}}var _=!1,A=-1,T=5,k=-1;function M(){return w?!0:!(e.unstable_now()-k<T)}function H(){if(w=!1,_){var C=e.unstable_now();k=C;var P=!0;try{e:{x=!1,y&&(y=!1,v(A),A=-1),h=!0;var R=f;try{t:{for(S(C),u=n(l);u!==null&&!(u.expirationTime>C&&M());){var z=u.callback;if(typeof z=="function"){u.callback=null,f=u.priorityLevel;var q=z(u.expirationTime<=C);if(C=e.unstable_now(),typeof q=="function"){u.callback=q,S(C),P=!0;break t}u===n(l)&&a(l),S(C)}else a(l);u=n(l)}if(u!==null)P=!0;else{var V=n(c);V!==null&&I(E,V.startTime-C),P=!1}}break e}finally{u=null,f=R,h=!1}P=void 0}}finally{P?F():_=!1}}}var F;if(typeof b=="function")F=function(){b(H)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,L=X.port2;X.port1.onmessage=H,F=function(){L.postMessage(null)}}else F=function(){g(H,0)};function I(C,P){A=g(function(){C(e.unstable_now())},P)}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(C){C.callback=null},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(C){switch(f){case 1:case 2:case 3:var P=3;break;default:P=f}var R=f;f=P;try{return C()}finally{f=R}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(C,P){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var R=f;f=C;try{return P()}finally{f=R}},e.unstable_scheduleCallback=function(C,P,R){var z=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?z+R:z):R=z,C){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=R+q,C={id:d++,callback:P,priorityLevel:C,startTime:R,expirationTime:q,sortIndex:-1},R>z?(C.sortIndex=R,t(c,C),n(l)===null&&C===n(c)&&(y?(v(A),A=-1):y=!0,I(E,R-z))):(C.sortIndex=q,t(l,C),x||h||(x=!0,_||(_=!0,F()))),C},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(C){var P=f;return function(){var R=f;f=P;try{return C.apply(this,arguments)}finally{f=R}}}})(wy);by.exports=wy;var DE=by.exports,xy={exports:{}},te={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* react.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var sh=Symbol.for("react.transitional.element"),jE=Symbol.for("react.portal"),ME=Symbol.for("react.fragment"),LE=Symbol.for("react.strict_mode"),UE=Symbol.for("react.profiler"),PE=Symbol.for("react.consumer"),zE=Symbol.for("react.context"),BE=Symbol.for("react.forward_ref"),$E=Symbol.for("react.suspense"),HE=Symbol.for("react.memo"),Sy=Symbol.for("react.lazy"),vp=Symbol.iterator;function IE(e){return e===null||typeof e!="object"?null:(e=vp&&e[vp]||e["@@iterator"],typeof e=="function"?e:null)}var Ey={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_y=Object.assign,Ty={};function qs(e,t,n){this.props=e,this.context=t,this.refs=Ty,this.updater=n||Ey}qs.prototype.isReactComponent={};qs.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("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")};qs.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ay(){}Ay.prototype=qs.prototype;function ih(e,t,n){this.props=e,this.context=t,this.refs=Ty,this.updater=n||Ey}var oh=ih.prototype=new Ay;oh.constructor=ih;_y(oh,qs.prototype);oh.isPureReactComponent=!0;var yp=Array.isArray,_e={H:null,A:null,T:null,S:null,V:null},Cy=Object.prototype.hasOwnProperty;function lh(e,t,n,a,r,s){return n=s.ref,{$$typeof:sh,type:e,key:t,ref:n!==void 0?n:null,props:s}}function qE(e,t){return lh(e.type,t,void 0,void 0,void 0,e.props)}function ch(e){return typeof e=="object"&&e!==null&&e.$$typeof===sh}function GE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var bp=/\/+/g;function Au(e,t){return typeof e=="object"&&e!==null&&e.key!=null?GE(""+e.key):t.toString(36)}function wp(){}function FE(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(wp,wp):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function qr(e,t,n,a,r){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(s){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case sh:case jE:i=!0;break;case Sy:return i=e._init,qr(i(e._payload),t,n,a,r)}}if(i)return r=r(e),i=a===""?"."+Au(e,0):a,yp(r)?(n="",i!=null&&(n=i.replace(bp,"$&/")+"/"),qr(r,t,n,"",function(c){return c})):r!=null&&(ch(r)&&(r=qE(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(bp,"$&/")+"/")+i)),t.push(r)),1;i=0;var o=a===""?".":a+":";if(yp(e))for(var l=0;l<e.length;l++)a=e[l],s=o+Au(a,l),i+=qr(a,t,n,s,r);else if(l=IE(e),typeof l=="function")for(e=l.call(e),l=0;!(a=e.next()).done;)a=a.value,s=o+Au(a,l++),i+=qr(a,t,n,s,r);else if(s==="object"){if(typeof e.then=="function")return qr(FE(e),t,n,a,r);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 Vo(e,t,n){if(e==null)return e;var a=[],r=0;return qr(e,a,"","",function(s){return t.call(n,s,r++)}),a}function YE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var xp=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function VE(){}te.Children={map:Vo,forEach:function(e,t,n){Vo(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Vo(e,function(){t++}),t},toArray:function(e){return Vo(e,function(t){return t})||[]},only:function(e){if(!ch(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Component=qs;te.Fragment=ME;te.Profiler=UE;te.PureComponent=ih;te.StrictMode=LE;te.Suspense=$E;te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_e;te.__COMPILER_RUNTIME={__proto__:null,c:function(e){return _e.H.useMemoCache(e)}};te.cache=function(e){return function(){return e.apply(null,arguments)}};te.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=_y({},e.props),r=e.key,s=void 0;if(t!=null)for(i in t.ref!==void 0&&(s=void 0),t.key!==void 0&&(r=""+t.key),t)!Cy.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(a[i]=t[i]);var i=arguments.length-2;if(i===1)a.children=n;else if(1<i){for(var o=Array(i),l=0;l<i;l++)o[l]=arguments[l+2];a.children=o}return lh(e.type,r,void 0,void 0,s,a)};te.createContext=function(e){return e={$$typeof:zE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:PE,_context:e},e};te.createElement=function(e,t,n){var a,r={},s=null;if(t!=null)for(a in t.key!==void 0&&(s=""+t.key),t)Cy.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(r[a]=t[a]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var o=Array(i),l=0;l<i;l++)o[l]=arguments[l+2];r.children=o}if(e&&e.defaultProps)for(a in i=e.defaultProps,i)r[a]===void 0&&(r[a]=i[a]);return lh(e,s,void 0,void 0,null,r)};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:BE,render:e}};te.isValidElement=ch;te.lazy=function(e){return{$$typeof:Sy,_payload:{_status:-1,_result:e},_init:YE}};te.memo=function(e,t){return{$$typeof:HE,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=_e.T,n={};_e.T=n;try{var a=e(),r=_e.S;r!==null&&r(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(VE,xp)}catch(s){xp(s)}finally{_e.T=t}};te.unstable_useCacheRefresh=function(){return _e.H.useCacheRefresh()};te.use=function(e){return _e.H.use(e)};te.useActionState=function(e,t,n){return _e.H.useActionState(e,t,n)};te.useCallback=function(e,t){return _e.H.useCallback(e,t)};te.useContext=function(e){return _e.H.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e,t){return _e.H.useDeferredValue(e,t)};te.useEffect=function(e,t,n){var a=_e.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return a.useEffect(e,t)};te.useId=function(){return _e.H.useId()};te.useImperativeHandle=function(e,t,n){return _e.H.useImperativeHandle(e,t,n)};te.useInsertionEffect=function(e,t){return _e.H.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return _e.H.useLayoutEffect(e,t)};te.useMemo=function(e,t){return _e.H.useMemo(e,t)};te.useOptimistic=function(e,t){return _e.H.useOptimistic(e,t)};te.useReducer=function(e,t,n){return _e.H.useReducer(e,t,n)};te.useRef=function(e){return _e.H.useRef(e)};te.useState=function(e){return _e.H.useState(e)};te.useSyncExternalStore=function(e,t,n){return _e.H.useSyncExternalStore(e,t,n)};te.useTransition=function(){return _e.H.useTransition()};te.version="19.1.0";xy.exports=te;var m=xy.exports;const U=py(m),Ry=RE({__proto__:null,default:U},[m]);var Oy={exports:{}},lt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var KE=m;function ky(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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."}function sa(){}var ot={d:{f:sa,r:function(){throw Error(ky(522))},D:sa,C:sa,L:sa,m:sa,X:sa,S:sa,M:sa},p:0,findDOMNode:null},XE=Symbol.for("react.portal");function QE(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:XE,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var Ei=KE.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function jc(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}lt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ot;lt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(ky(299));return QE(e,t,null,n)};lt.flushSync=function(e){var t=Ei.T,n=ot.p;try{if(Ei.T=null,ot.p=2,e)return e()}finally{Ei.T=t,ot.p=n,ot.d.f()}};lt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,ot.d.C(e,t))};lt.prefetchDNS=function(e){typeof e=="string"&&ot.d.D(e)};lt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=jc(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,s=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?ot.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:r,fetchPriority:s}):n==="script"&&ot.d.X(e,{crossOrigin:a,integrity:r,fetchPriority:s,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};lt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=jc(t.as,t.crossOrigin);ot.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&ot.d.M(e)};lt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=jc(n,t.crossOrigin);ot.d.L(e,n,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};lt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=jc(t.as,t.crossOrigin);ot.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else ot.d.m(e)};lt.requestFormReset=function(e){ot.d.r(e)};lt.unstable_batchedUpdates=function(e,t){return e(t)};lt.useFormState=function(e,t,n){return Ei.H.useFormState(e,t,n)};lt.useFormStatus=function(){return Ei.H.useHostTransitionStatus()};lt.version="19.1.0";function Ny(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ny)}catch(e){console.error(e)}}Ny(),Oy.exports=lt;var mo=Oy.exports;const Dy=py(mo);/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var $e=DE,jy=m,ZE=mo;function N(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}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."}function My(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function po(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Ly(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 Sp(e){if(po(e)!==e)throw Error(N(188))}function JE(e){var t=e.alternate;if(!t){if(t=po(e),t===null)throw Error(N(188));return t!==e?null:e}for(var n=e,a=t;;){var r=n.return;if(r===null)break;var s=r.alternate;if(s===null){if(a=r.return,a!==null){n=a;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return Sp(r),e;if(s===a)return Sp(r),t;s=s.sibling}throw Error(N(188))}if(n.return!==a.return)n=r,a=s;else{for(var i=!1,o=r.child;o;){if(o===n){i=!0,n=r,a=s;break}if(o===a){i=!0,a=r,n=s;break}o=o.sibling}if(!i){for(o=s.child;o;){if(o===n){i=!0,n=s,a=r;break}if(o===a){i=!0,a=s,n=r;break}o=o.sibling}if(!i)throw Error(N(189))}}if(n.alternate!==a)throw Error(N(190))}if(n.tag!==3)throw Error(N(188));return n.stateNode.current===n?e:t}function Uy(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Uy(e),t!==null)return t;e=e.sibling}return null}var xe=Object.assign,WE=Symbol.for("react.element"),Ko=Symbol.for("react.transitional.element"),yi=Symbol.for("react.portal"),Kr=Symbol.for("react.fragment"),Py=Symbol.for("react.strict_mode"),Md=Symbol.for("react.profiler"),e_=Symbol.for("react.provider"),zy=Symbol.for("react.consumer"),Pn=Symbol.for("react.context"),uh=Symbol.for("react.forward_ref"),Ld=Symbol.for("react.suspense"),Ud=Symbol.for("react.suspense_list"),dh=Symbol.for("react.memo"),ha=Symbol.for("react.lazy"),Pd=Symbol.for("react.activity"),t_=Symbol.for("react.memo_cache_sentinel"),Ep=Symbol.iterator;function si(e){return e===null||typeof e!="object"?null:(e=Ep&&e[Ep]||e["@@iterator"],typeof e=="function"?e:null)}var n_=Symbol.for("react.client.reference");function zd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===n_?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kr:return"Fragment";case Md:return"Profiler";case Py:return"StrictMode";case Ld:return"Suspense";case Ud:return"SuspenseList";case Pd:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case yi:return"Portal";case Pn:return(e.displayName||"Context")+".Provider";case zy:return(e._context.displayName||"Context")+".Consumer";case uh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dh:return t=e.displayName||null,t!==null?t:zd(e.type)||"Memo";case ha:t=e._payload,e=e._init;try{return zd(e(t))}catch{}}return null}var bi=Array.isArray,Y=jy.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fe=ZE.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fr={pending:!1,data:null,method:null,action:null},Bd=[],Xr=-1;function Tn(e){return{current:e}}function Ve(e){0>Xr||(e.current=Bd[Xr],Bd[Xr]=null,Xr--)}function Te(e,t){Xr++,Bd[Xr]=e.current,e.current=t}var yn=Tn(null),qi=Tn(null),ka=Tn(null),Vl=Tn(null);function Kl(e,t){switch(Te(ka,t),Te(qi,e),Te(yn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Rg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Rg(t),e=tw(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Ve(yn),Te(yn,e)}function Rs(){Ve(yn),Ve(qi),Ve(ka)}function $d(e){e.memoizedState!==null&&Te(Vl,e);var t=yn.current,n=tw(t,e.type);t!==n&&(Te(qi,e),Te(yn,n))}function Xl(e){qi.current===e&&(Ve(yn),Ve(qi)),Vl.current===e&&(Ve(Vl),Wi._currentValue=fr)}var Hd=Object.prototype.hasOwnProperty,fh=$e.unstable_scheduleCallback,Cu=$e.unstable_cancelCallback,a_=$e.unstable_shouldYield,r_=$e.unstable_requestPaint,bn=$e.unstable_now,s_=$e.unstable_getCurrentPriorityLevel,By=$e.unstable_ImmediatePriority,$y=$e.unstable_UserBlockingPriority,Ql=$e.unstable_NormalPriority,i_=$e.unstable_LowPriority,Hy=$e.unstable_IdlePriority,o_=$e.log,l_=$e.unstable_setDisableYieldValue,go=null,Rt=null;function Aa(e){if(typeof o_=="function"&&l_(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(go,e)}catch{}}var Ot=Math.clz32?Math.clz32:d_,c_=Math.log,u_=Math.LN2;function d_(e){return e>>>=0,e===0?32:31-(c_(e)/u_|0)|0}var Xo=256,Qo=4194304;function tr(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Mc(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var o=a&134217727;return o!==0?(a=o&~s,a!==0?r=tr(a):(i&=o,i!==0?r=tr(i):n||(n=o&~e,n!==0&&(r=tr(n))))):(o=a&~s,o!==0?r=tr(o):i!==0?r=tr(i):n||(n=a&~e,n!==0&&(r=tr(n)))),r===0?0:t!==0&&t!==r&&!(t&s)&&(s=r&-r,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:r}function vo(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function f_(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Iy(){var e=Xo;return Xo<<=1,!(Xo&4194048)&&(Xo=256),e}function qy(){var e=Qo;return Qo<<=1,!(Qo&62914560)&&(Qo=4194304),e}function Ru(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yo(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function h_(e,t,n,a,r,s){var i=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=i&~n;0<n;){var d=31-Ot(n),u=1<<d;o[d]=0,l[d]=-1;var f=c[d];if(f!==null)for(c[d]=null,d=0;d<f.length;d++){var h=f[d];h!==null&&(h.lane&=-536870913)}n&=~u}a!==0&&Gy(e,a,0),s!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=s&~(i&~t))}function Gy(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ot(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function Fy(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Ot(n),r=1<<a;r&t|e[a]&t&&(e[a]|=t),n&=~r}}function hh(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function mh(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Yy(){var e=fe.p;return e!==0?e:(e=window.event,e===void 0?32:dw(e.type))}function m_(e,t){var n=fe.p;try{return fe.p=e,t()}finally{fe.p=n}}var Fa=Math.random().toString(36).slice(2),nt="__reactFiber$"+Fa,yt="__reactProps$"+Fa,Gs="__reactContainer$"+Fa,Id="__reactEvents$"+Fa,p_="__reactListeners$"+Fa,g_="__reactHandles$"+Fa,_p="__reactResources$"+Fa,bo="__reactMarker$"+Fa;function ph(e){delete e[nt],delete e[yt],delete e[Id],delete e[p_],delete e[g_]}function Qr(e){var t=e[nt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gs]||n[nt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ng(e);e!==null;){if(n=e[nt])return n;e=Ng(e)}return t}e=n,n=e.parentNode}return null}function Fs(e){if(e=e[nt]||e[Gs]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function wi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(N(33))}function is(e){var t=e[_p];return t||(t=e[_p]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Fe(e){e[bo]=!0}var Vy=new Set,Ky={};function Tr(e,t){Os(e,t),Os(e+"Capture",t)}function Os(e,t){for(Ky[e]=t,e=0;e<t.length;e++)Vy.add(t[e])}var v_=RegExp("^[: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]*$"),Tp={},Ap={};function y_(e){return Hd.call(Ap,e)?!0:Hd.call(Tp,e)?!1:v_.test(e)?Ap[e]=!0:(Tp[e]=!0,!1)}function Al(e,t,n){if(y_(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Zo(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function On(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}var Ou,Cp;function Gr(e){if(Ou===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ou=t&&t[1]||"",Cp=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Ou+e+Cp}var ku=!1;function Nu(e,t){if(!e||ku)return"";ku=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(h){var f=h}Reflect.construct(e,[],u)}else{try{u.call()}catch(h){f=h}e.call(u.prototype)}}else{try{throw Error()}catch(h){f=h}(u=e())&&typeof u.catch=="function"&&u.catch(function(){})}}catch(h){if(h&&f&&typeof h.stack=="string")return[h.stack,f.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),i=s[0],o=s[1];if(i&&o){var l=i.split(`
|
|
44
|
+
`),c=o.split(`
|
|
45
|
+
`);for(r=a=0;a<l.length&&!l[a].includes("DetermineComponentFrameRoot");)a++;for(;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;if(a===l.length||r===c.length)for(a=l.length-1,r=c.length-1;1<=a&&0<=r&&l[a]!==c[r];)r--;for(;1<=a&&0<=r;a--,r--)if(l[a]!==c[r]){if(a!==1||r!==1)do if(a--,r--,0>r||l[a]!==c[r]){var d=`
|
|
46
|
+
`+l[a].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=a&&0<=r);break}}}finally{ku=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Gr(n):""}function b_(e){switch(e.tag){case 26:case 27:case 5:return Gr(e.type);case 16:return Gr("Lazy");case 13:return Gr("Suspense");case 19:return Gr("SuspenseList");case 0:case 15:return Nu(e.type,!1);case 11:return Nu(e.type.render,!1);case 1:return Nu(e.type,!0);case 31:return Gr("Activity");default:return""}}function Rp(e){try{var t="";do t+=b_(e),e=e.return;while(e);return t}catch(n){return`
|
|
47
|
+
Error generating stack: `+n.message+`
|
|
48
|
+
`+n.stack}}function Pt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function w_(e){var t=Xy(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(i){a=""+i,s.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(i){a=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zl(e){e._valueTracker||(e._valueTracker=w_(e))}function Qy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Xy(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Jl(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}}var x_=/[\n"\\]/g;function $t(e){return e.replace(x_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function qd(e,t,n,a,r,s,i,o){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Pt(t)):e.value!==""+Pt(t)&&(e.value=""+Pt(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?Gd(e,i,Pt(t)):n!=null?Gd(e,i,Pt(n)):a!=null&&e.removeAttribute("value"),r==null&&s!=null&&(e.defaultChecked=!!s),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Pt(o):e.removeAttribute("name")}function Zy(e,t,n,a,r,s,i,o){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null))return;n=n!=null?""+Pt(n):"",t=t!=null?""+Pt(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}a=a??r,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=o?e.checked:!!a,e.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i)}function Gd(e,t,n){t==="number"&&Jl(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function os(e,t,n,a){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Pt(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,a&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Jy(e,t,n){if(t!=null&&(t=""+Pt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Pt(n):""}function Wy(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(N(92));if(bi(a)){if(1<a.length)throw Error(N(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Pt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a)}function ks(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var S_=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Op(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||S_.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function e0(e,t,n){if(t!=null&&typeof t!="object")throw Error(N(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var r in t)a=t[r],t.hasOwnProperty(r)&&n[r]!==a&&Op(e,r,a)}else for(var s in t)t.hasOwnProperty(s)&&Op(e,s,t[s])}function gh(e){if(e.indexOf("-")===-1)return!1;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 E_=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),__=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Cl(e){return __.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var Fd=null;function vh(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zr=null,ls=null;function kp(e){var t=Fs(e);if(t&&(e=t.stateNode)){var n=e[yt]||null;e:switch(e=t.stateNode,t.type){case"input":if(qd(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+$t(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var r=a[yt]||null;if(!r)throw Error(N(90));qd(a,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Qy(a)}break e;case"textarea":Jy(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&os(e,!!n.multiple,t,!1)}}}var Du=!1;function t0(e,t,n){if(Du)return e(t,n);Du=!0;try{var a=e(t);return a}finally{if(Du=!1,(Zr!==null||ls!==null)&&(Gc(),Zr&&(t=Zr,e=ls,ls=Zr=null,kp(t),e)))for(t=0;t<e.length;t++)kp(e[t])}}function Gi(e,t){var n=e.stateNode;if(n===null)return null;var a=n[yt]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(N(231,t,typeof n));return n}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yd=!1;if(Vn)try{var ii={};Object.defineProperty(ii,"passive",{get:function(){Yd=!0}}),window.addEventListener("test",ii,ii),window.removeEventListener("test",ii,ii)}catch{Yd=!1}var Ca=null,yh=null,Rl=null;function n0(){if(Rl)return Rl;var e,t=yh,n=t.length,a,r="value"in Ca?Ca.value:Ca.textContent,s=r.length;for(e=0;e<n&&t[e]===r[e];e++);var i=n-e;for(a=1;a<=i&&t[n-a]===r[s-a];a++);return Rl=r.slice(e,1<a?1-a:void 0)}function Ol(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 Jo(){return!0}function Np(){return!1}function bt(e){function t(n,a,r,s,i){this._reactName=n,this._targetInst=r,this.type=a,this.nativeEvent=s,this.target=i,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Jo:Np,this.isPropagationStopped=Np,this}return xe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Jo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Jo)},persist:function(){},isPersistent:Jo}),t}var Ar={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lc=bt(Ar),wo=xe({},Ar,{view:0,detail:0}),T_=bt(wo),ju,Mu,oi,Uc=xe({},wo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bh,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!==oi&&(oi&&e.type==="mousemove"?(ju=e.screenX-oi.screenX,Mu=e.screenY-oi.screenY):Mu=ju=0,oi=e),ju)},movementY:function(e){return"movementY"in e?e.movementY:Mu}}),Dp=bt(Uc),A_=xe({},Uc,{dataTransfer:0}),C_=bt(A_),R_=xe({},wo,{relatedTarget:0}),Lu=bt(R_),O_=xe({},Ar,{animationName:0,elapsedTime:0,pseudoElement:0}),k_=bt(O_),N_=xe({},Ar,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),D_=bt(N_),j_=xe({},Ar,{data:0}),jp=bt(j_),M_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L_={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"},U_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function P_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=U_[e])?!!t[e]:!1}function bh(){return P_}var z_=xe({},wo,{key:function(e){if(e.key){var t=M_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ol(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?L_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bh,charCode:function(e){return e.type==="keypress"?Ol(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ol(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),B_=bt(z_),$_=xe({},Uc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mp=bt($_),H_=xe({},wo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bh}),I_=bt(H_),q_=xe({},Ar,{propertyName:0,elapsedTime:0,pseudoElement:0}),G_=bt(q_),F_=xe({},Uc,{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}),Y_=bt(F_),V_=xe({},Ar,{newState:0,oldState:0}),K_=bt(V_),X_=[9,13,27,32],wh=Vn&&"CompositionEvent"in window,_i=null;Vn&&"documentMode"in document&&(_i=document.documentMode);var Q_=Vn&&"TextEvent"in window&&!_i,a0=Vn&&(!wh||_i&&8<_i&&11>=_i),Lp=" ",Up=!1;function r0(e,t){switch(e){case"keyup":return X_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function s0(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Jr=!1;function Z_(e,t){switch(e){case"compositionend":return s0(t);case"keypress":return t.which!==32?null:(Up=!0,Lp);case"textInput":return e=t.data,e===Lp&&Up?null:e;default:return null}}function J_(e,t){if(Jr)return e==="compositionend"||!wh&&r0(e,t)?(e=n0(),Rl=yh=Ca=null,Jr=!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 a0&&t.locale!=="ko"?null:t.data;default:return null}}var W_={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Pp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!W_[e.type]:t==="textarea"}function i0(e,t,n,a){Zr?ls?ls.push(a):ls=[a]:Zr=a,t=gc(t,"onChange"),0<t.length&&(n=new Lc("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Ti=null,Fi=null;function eT(e){Jb(e,0)}function Pc(e){var t=wi(e);if(Qy(t))return e}function zp(e,t){if(e==="change")return t}var o0=!1;if(Vn){var Uu;if(Vn){var Pu="oninput"in document;if(!Pu){var Bp=document.createElement("div");Bp.setAttribute("oninput","return;"),Pu=typeof Bp.oninput=="function"}Uu=Pu}else Uu=!1;o0=Uu&&(!document.documentMode||9<document.documentMode)}function $p(){Ti&&(Ti.detachEvent("onpropertychange",l0),Fi=Ti=null)}function l0(e){if(e.propertyName==="value"&&Pc(Fi)){var t=[];i0(t,Fi,e,vh(e)),t0(eT,t)}}function tT(e,t,n){e==="focusin"?($p(),Ti=t,Fi=n,Ti.attachEvent("onpropertychange",l0)):e==="focusout"&&$p()}function nT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Pc(Fi)}function aT(e,t){if(e==="click")return Pc(t)}function rT(e,t){if(e==="input"||e==="change")return Pc(t)}function sT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:sT;function Yi(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var r=n[a];if(!Hd.call(t,r)||!jt(e[r],t[r]))return!1}return!0}function Hp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ip(e,t){var n=Hp(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Hp(n)}}function c0(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?c0(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function u0(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Jl(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Jl(e.document)}return t}function xh(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")}var iT=Vn&&"documentMode"in document&&11>=document.documentMode,Wr=null,Vd=null,Ai=null,Kd=!1;function qp(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kd||Wr==null||Wr!==Jl(a)||(a=Wr,"selectionStart"in a&&xh(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ai&&Yi(Ai,a)||(Ai=a,a=gc(Vd,"onSelect"),0<a.length&&(t=new Lc("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Wr)))}function Ja(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var es={animationend:Ja("Animation","AnimationEnd"),animationiteration:Ja("Animation","AnimationIteration"),animationstart:Ja("Animation","AnimationStart"),transitionrun:Ja("Transition","TransitionRun"),transitionstart:Ja("Transition","TransitionStart"),transitioncancel:Ja("Transition","TransitionCancel"),transitionend:Ja("Transition","TransitionEnd")},zu={},d0={};Vn&&(d0=document.createElement("div").style,"AnimationEvent"in window||(delete es.animationend.animation,delete es.animationiteration.animation,delete es.animationstart.animation),"TransitionEvent"in window||delete es.transitionend.transition);function Cr(e){if(zu[e])return zu[e];if(!es[e])return e;var t=es[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in d0)return zu[e]=t[n];return e}var f0=Cr("animationend"),h0=Cr("animationiteration"),m0=Cr("animationstart"),oT=Cr("transitionrun"),lT=Cr("transitionstart"),cT=Cr("transitioncancel"),p0=Cr("transitionend"),g0=new Map,Xd="abort auxClick beforeToggle 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(" ");Xd.push("scrollEnd");function an(e,t){g0.set(e,t),Tr(t,[e])}var Gp=new WeakMap;function Ht(e,t){if(typeof e=="object"&&e!==null){var n=Gp.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Rp(t)},Gp.set(e,t),t)}return{value:e,source:t,stack:Rp(t)}}var Ut=[],ts=0,Sh=0;function zc(){for(var e=ts,t=Sh=ts=0;t<e;){var n=Ut[t];Ut[t++]=null;var a=Ut[t];Ut[t++]=null;var r=Ut[t];Ut[t++]=null;var s=Ut[t];if(Ut[t++]=null,a!==null&&r!==null){var i=a.pending;i===null?r.next=r:(r.next=i.next,i.next=r),a.pending=r}s!==0&&v0(n,r,s)}}function Bc(e,t,n,a){Ut[ts++]=e,Ut[ts++]=t,Ut[ts++]=n,Ut[ts++]=a,Sh|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Eh(e,t,n,a){return Bc(e,t,n,a),Wl(e)}function Ys(e,t){return Bc(e,null,null,t),Wl(e)}function v0(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var r=!1,s=e.return;s!==null;)s.childLanes|=n,a=s.alternate,a!==null&&(a.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(r=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,r&&t!==null&&(r=31-Ot(n),e=s.hiddenUpdates,a=e[r],a===null?e[r]=[t]:a.push(t),t.lane=n|536870912),s):null}function Wl(e){if(50<Ui)throw Ui=0,vf=null,Error(N(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ns={};function uT(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ct(e,t,n,a){return new uT(e,t,n,a)}function _h(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qn(e,t){var n=e.alternate;return n===null?(n=Ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function y0(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function kl(e,t,n,a,r,s){var i=0;if(a=e,typeof e=="function")_h(e)&&(i=1);else if(typeof e=="string")i=fA(e,n,yn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Pd:return e=Ct(31,n,t,r),e.elementType=Pd,e.lanes=s,e;case Kr:return hr(n.children,r,s,t);case Py:i=8,r|=24;break;case Md:return e=Ct(12,n,t,r|2),e.elementType=Md,e.lanes=s,e;case Ld:return e=Ct(13,n,t,r),e.elementType=Ld,e.lanes=s,e;case Ud:return e=Ct(19,n,t,r),e.elementType=Ud,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case e_:case Pn:i=10;break e;case zy:i=9;break e;case uh:i=11;break e;case dh:i=14;break e;case ha:i=16,a=null;break e}i=29,n=Error(N(130,e===null?"null":typeof e,"")),a=null}return t=Ct(i,n,t,r),t.elementType=e,t.type=a,t.lanes=s,t}function hr(e,t,n,a){return e=Ct(7,e,a,t),e.lanes=n,e}function Bu(e,t,n){return e=Ct(6,e,null,t),e.lanes=n,e}function $u(e,t,n){return t=Ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var as=[],rs=0,ec=null,tc=0,zt=[],Bt=0,mr=null,zn=1,Bn="";function nr(e,t){as[rs++]=tc,as[rs++]=ec,ec=e,tc=t}function b0(e,t,n){zt[Bt++]=zn,zt[Bt++]=Bn,zt[Bt++]=mr,mr=e;var a=zn;e=Bn;var r=32-Ot(a)-1;a&=~(1<<r),n+=1;var s=32-Ot(t)+r;if(30<s){var i=r-r%5;s=(a&(1<<i)-1).toString(32),a>>=i,r-=i,zn=1<<32-Ot(t)+r|n<<r|a,Bn=s+e}else zn=1<<s|n<<r|a,Bn=e}function Th(e){e.return!==null&&(nr(e,1),b0(e,1,0))}function Ah(e){for(;e===ec;)ec=as[--rs],as[rs]=null,tc=as[--rs],as[rs]=null;for(;e===mr;)mr=zt[--Bt],zt[Bt]=null,Bn=zt[--Bt],zt[Bt]=null,zn=zt[--Bt],zt[Bt]=null}var it=null,Ne=null,de=!1,pr=null,pn=!1,Qd=Error(N(519));function br(e){var t=Error(N(418,""));throw Vi(Ht(t,e)),Qd}function Fp(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[nt]=e,t[yt]=a,n){case"dialog":re("cancel",t),re("close",t);break;case"iframe":case"object":case"embed":re("load",t);break;case"video":case"audio":for(n=0;n<Qi.length;n++)re(Qi[n],t);break;case"source":re("error",t);break;case"img":case"image":case"link":re("error",t),re("load",t);break;case"details":re("toggle",t);break;case"input":re("invalid",t),Zy(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),Zl(t);break;case"select":re("invalid",t);break;case"textarea":re("invalid",t),Wy(t,a.value,a.defaultValue,a.children),Zl(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||ew(t.textContent,n)?(a.popover!=null&&(re("beforetoggle",t),re("toggle",t)),a.onScroll!=null&&re("scroll",t),a.onScrollEnd!=null&&re("scrollend",t),a.onClick!=null&&(t.onclick=Vc),t=!0):t=!1,t||br(e)}function Yp(e){for(it=e.return;it;)switch(it.tag){case 5:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:it=it.return}}function li(e){if(e!==it)return!1;if(!de)return Yp(e),de=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Ef(e.type,e.memoizedProps)),n=!n),n&&Ne&&br(e),Yp(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(N(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Ne=Wt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Ne=null}}else t===27?(t=Ne,Ya(e.type)?(e=Af,Af=null,Ne=e):Ne=t):Ne=it?Wt(e.stateNode.nextSibling):null;return!0}function xo(){Ne=it=null,de=!1}function Vp(){var e=pr;return e!==null&&(pt===null?pt=e:pt.push.apply(pt,e),pr=null),e}function Vi(e){pr===null?pr=[e]:pr.push(e)}var Zd=Tn(null),Rr=null,$n=null;function ga(e,t,n){Te(Zd,t._currentValue),t._currentValue=n}function Gn(e){e._currentValue=Zd.current,Ve(Zd)}function Jd(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Wd(e,t,n,a){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var s=r.dependencies;if(s!==null){var i=r.child;s=s.firstContext;e:for(;s!==null;){var o=s;s=r;for(var l=0;l<t.length;l++)if(o.context===t[l]){s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Jd(s.return,n,e),a||(i=null);break e}s=o.next}}else if(r.tag===18){if(i=r.return,i===null)throw Error(N(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),Jd(i,n,e),i=null}else i=r.child;if(i!==null)i.return=r;else for(i=r;i!==null;){if(i===e){i=null;break}if(r=i.sibling,r!==null){r.return=i.return,i=r;break}i=i.return}r=i}}function So(e,t,n,a){e=null;for(var r=t,s=!1;r!==null;){if(!s){if(r.flags&524288)s=!0;else if(r.flags&262144)break}if(r.tag===10){var i=r.alternate;if(i===null)throw Error(N(387));if(i=i.memoizedProps,i!==null){var o=r.type;jt(r.pendingProps.value,i.value)||(e!==null?e.push(o):e=[o])}}else if(r===Vl.current){if(i=r.alternate,i===null)throw Error(N(387));i.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Wi):e=[Wi])}r=r.return}e!==null&&Wd(t,e,n,a),t.flags|=262144}function nc(e){for(e=e.firstContext;e!==null;){if(!jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function wr(e){Rr=e,$n=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function at(e){return w0(Rr,e)}function Wo(e,t){return Rr===null&&wr(e),w0(e,t)}function w0(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},$n===null){if(e===null)throw Error(N(308));$n=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else $n=$n.next=t;return n}var dT=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},fT=$e.unstable_scheduleCallback,hT=$e.unstable_NormalPriority,ze={$$typeof:Pn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ch(){return{controller:new dT,data:new Map,refCount:0}}function Eo(e){e.refCount--,e.refCount===0&&fT(hT,function(){e.controller.abort()})}var Ci=null,ef=0,Ns=0,cs=null;function mT(e,t){if(Ci===null){var n=Ci=[];ef=0,Ns=Qh(),cs={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ef++,t.then(Kp,Kp),t}function Kp(){if(--ef===0&&Ci!==null){cs!==null&&(cs.status="fulfilled");var e=Ci;Ci=null,Ns=0,cs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pT(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(a.status="rejected",a.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),a}var Xp=Y.S;Y.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&mT(e,t),Xp!==null&&Xp(e,t)};var gr=Tn(null);function Rh(){var e=gr.current;return e!==null?e:we.pooledCache}function Nl(e,t){t===null?Te(gr,gr.current):Te(gr,t.pool)}function x0(){var e=Rh();return e===null?null:{parent:ze._currentValue,pool:e}}var _o=Error(N(460)),S0=Error(N(474)),$c=Error(N(542)),tf={then:function(){}};function Qp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function el(){}function E0(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(el,el),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Jp(e),e;default:if(typeof t.status=="string")t.then(el,el);else{if(e=we,e!==null&&100<e.shellSuspendCounter)throw Error(N(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=a}},function(a){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Jp(e),e}throw Ri=t,_o}}var Ri=null;function Zp(){if(Ri===null)throw Error(N(459));var e=Ri;return Ri=null,e}function Jp(e){if(e===_o||e===$c)throw Error(N(483))}var ma=!1;function Oh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nf(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Da(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,me&2){var r=a.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),a.pending=t,t=Wl(e),v0(e,null,n),t}return Bc(e,a,t,n),Wl(e)}function Oi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Fy(e,n)}}function Hu(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?r=s=i:s=s.next=i,n=n.next}while(n!==null);s===null?r=s=t:s=s.next=t}else r=s=t;n={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var af=!1;function ki(){if(af){var e=cs;if(e!==null)throw e}}function Ni(e,t,n,a){af=!1;var r=e.updateQueue;ma=!1;var s=r.firstBaseUpdate,i=r.lastBaseUpdate,o=r.shared.pending;if(o!==null){r.shared.pending=null;var l=o,c=l.next;l.next=null,i===null?s=c:i.next=c,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==i&&(o===null?d.firstBaseUpdate=c:o.next=c,d.lastBaseUpdate=l))}if(s!==null){var u=r.baseState;i=0,d=c=l=null,o=s;do{var f=o.lane&-536870913,h=f!==o.lane;if(h?(le&f)===f:(a&f)===f){f!==0&&f===Ns&&(af=!0),d!==null&&(d=d.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var x=e,y=o;f=t;var w=n;switch(y.tag){case 1:if(x=y.payload,typeof x=="function"){u=x.call(w,u,f);break e}u=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=y.payload,f=typeof x=="function"?x.call(w,u,f):x,f==null)break e;u=xe({},u,f);break e;case 2:ma=!0}}f=o.callback,f!==null&&(e.flags|=64,h&&(e.flags|=8192),h=r.callbacks,h===null?r.callbacks=[f]:h.push(f))}else h={lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(c=d=h,l=u):d=d.next=h,i|=f;if(o=o.next,o===null){if(o=r.shared.pending,o===null)break;h=o,o=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);d===null&&(l=u),r.baseState=l,r.firstBaseUpdate=c,r.lastBaseUpdate=d,s===null&&(r.shared.lanes=0),Ha|=i,e.lanes=i,e.memoizedState=u}}function _0(e,t){if(typeof e!="function")throw Error(N(191,e));e.call(t)}function T0(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)_0(n[e],t)}var Ds=Tn(null),ac=Tn(0);function Wp(e,t){e=Qn,Te(ac,e),Te(Ds,t),Qn=e|t.baseLanes}function rf(){Te(ac,Qn),Te(Ds,Ds.current)}function kh(){Qn=ac.current,Ve(Ds),Ve(ac)}var Ba=0,ae=null,ve=null,Le=null,rc=!1,us=!1,xr=!1,sc=0,Ki=0,ds=null,gT=0;function je(){throw Error(N(321))}function Nh(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jt(e[n],t[n]))return!1;return!0}function Dh(e,t,n,a,r,s){return Ba=s,ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?nb:ab,xr=!1,s=n(a,r),xr=!1,us&&(s=C0(t,n,a,r)),A0(e),s}function A0(e){Y.H=ic;var t=ve!==null&&ve.next!==null;if(Ba=0,Le=ve=ae=null,rc=!1,Ki=0,ds=null,t)throw Error(N(300));e===null||Ye||(e=e.dependencies,e!==null&&nc(e)&&(Ye=!0))}function C0(e,t,n,a){ae=e;var r=0;do{if(us&&(ds=null),Ki=0,us=!1,25<=r)throw Error(N(301));if(r+=1,Le=ve=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}Y.H=ET,s=t(n,a)}while(us);return s}function vT(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?To(t):t,e=e.useState()[0],(ve!==null?ve.memoizedState:null)!==e&&(ae.flags|=1024),t}function jh(){var e=sc!==0;return sc=0,e}function Mh(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Lh(e){if(rc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}rc=!1}Ba=0,Le=ve=ae=null,us=!1,Ki=sc=0,ds=null}function ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Le===null?ae.memoizedState=Le=e:Le=Le.next=e,Le}function Ue(){if(ve===null){var e=ae.alternate;e=e!==null?e.memoizedState:null}else e=ve.next;var t=Le===null?ae.memoizedState:Le.next;if(t!==null)Le=t,ve=e;else{if(e===null)throw ae.alternate===null?Error(N(467)):Error(N(310));ve=e,e={memoizedState:ve.memoizedState,baseState:ve.baseState,baseQueue:ve.baseQueue,queue:ve.queue,next:null},Le===null?ae.memoizedState=Le=e:Le=Le.next=e}return Le}function Uh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function To(e){var t=Ki;return Ki+=1,ds===null&&(ds=[]),e=E0(ds,e,t),t=ae,(Le===null?t.memoizedState:Le.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?nb:ab),e}function Hc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return To(e);if(e.$$typeof===Pn)return at(e)}throw Error(N(438,String(e)))}function Ph(e){var t=null,n=ae.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=ae.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Uh(),ae.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=t_;return t.index++,n}function Kn(e,t){return typeof t=="function"?t(e):t}function Dl(e){var t=Ue();return zh(t,ve,e)}function zh(e,t,n){var a=e.queue;if(a===null)throw Error(N(311));a.lastRenderedReducer=n;var r=e.baseQueue,s=a.pending;if(s!==null){if(r!==null){var i=r.next;r.next=s.next,s.next=i}t.baseQueue=r=s,a.pending=null}if(s=e.baseState,r===null)e.memoizedState=s;else{t=r.next;var o=i=null,l=null,c=t,d=!1;do{var u=c.lane&-536870913;if(u!==c.lane?(le&u)===u:(Ba&u)===u){var f=c.revertLane;if(f===0)l!==null&&(l=l.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),u===Ns&&(d=!0);else if((Ba&f)===f){c=c.next,f===Ns&&(d=!0);continue}else u={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=u,i=s):l=l.next=u,ae.lanes|=f,Ha|=f;u=c.action,xr&&n(s,u),s=c.hasEagerState?c.eagerState:n(s,u)}else f={lane:u,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=f,i=s):l=l.next=f,ae.lanes|=u,Ha|=u;c=c.next}while(c!==null&&c!==t);if(l===null?i=s:l.next=o,!jt(s,e.memoizedState)&&(Ye=!0,d&&(n=cs,n!==null)))throw n;e.memoizedState=s,e.baseState=i,e.baseQueue=l,a.lastRenderedState=s}return r===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Iu(e){var t=Ue(),n=t.queue;if(n===null)throw Error(N(311));n.lastRenderedReducer=e;var a=n.dispatch,r=n.pending,s=t.memoizedState;if(r!==null){n.pending=null;var i=r=r.next;do s=e(s,i.action),i=i.next;while(i!==r);jt(s,t.memoizedState)||(Ye=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,a]}function R0(e,t,n){var a=ae,r=Ue(),s=de;if(s){if(n===void 0)throw Error(N(407));n=n()}else n=t();var i=!jt((ve||r).memoizedState,n);i&&(r.memoizedState=n,Ye=!0),r=r.queue;var o=N0.bind(null,a,r,e);if(Ao(2048,8,o,[e]),r.getSnapshot!==t||i||Le!==null&&Le.memoizedState.tag&1){if(a.flags|=2048,js(9,Ic(),k0.bind(null,a,r,n,t),null),we===null)throw Error(N(349));s||Ba&124||O0(a,t,n)}return n}function O0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ae.updateQueue,t===null?(t=Uh(),ae.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function k0(e,t,n,a){t.value=n,t.getSnapshot=a,D0(t)&&j0(e)}function N0(e,t,n){return n(function(){D0(t)&&j0(e)})}function D0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jt(e,n)}catch{return!0}}function j0(e){var t=Ys(e,2);t!==null&&Nt(t,e,2)}function sf(e){var t=ht();if(typeof e=="function"){var n=e;if(e=n(),xr){Aa(!0);try{n()}finally{Aa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:e},t}function M0(e,t,n,a){return e.baseState=n,zh(e,ve,typeof a=="function"?a:Kn)}function yT(e,t,n,a,r){if(qc(e))throw Error(N(485));if(e=t.action,e!==null){var s={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){s.listeners.push(i)}};Y.T!==null?n(!0):s.isTransition=!1,a(s),n=t.pending,n===null?(s.next=t.pending=s,L0(t,s)):(s.next=n.next,t.pending=n.next=s)}}function L0(e,t){var n=t.action,a=t.payload,r=e.state;if(t.isTransition){var s=Y.T,i={};Y.T=i;try{var o=n(r,a),l=Y.S;l!==null&&l(i,o),eg(e,t,o)}catch(c){of(e,t,c)}finally{Y.T=s}}else try{s=n(r,a),eg(e,t,s)}catch(c){of(e,t,c)}}function eg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){tg(e,t,a)},function(a){return of(e,t,a)}):tg(e,t,n)}function tg(e,t,n){t.status="fulfilled",t.value=n,U0(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,L0(e,n)))}function of(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,U0(t),t=t.next;while(t!==a)}e.action=null}function U0(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function P0(e,t){return t}function ng(e,t){if(de){var n=we.formState;if(n!==null){e:{var a=ae;if(de){if(Ne){t:{for(var r=Ne,s=pn;r.nodeType!==8;){if(!s){r=null;break t}if(r=Wt(r.nextSibling),r===null){r=null;break t}}s=r.data,r=s==="F!"||s==="F"?r:null}if(r){Ne=Wt(r.nextSibling),a=r.data==="F!";break e}}br(a)}a=!1}a&&(t=n[0])}}return n=ht(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:P0,lastRenderedState:t},n.queue=a,n=W0.bind(null,ae,a),a.dispatch=n,a=sf(!1),s=Ih.bind(null,ae,!1,a.queue),a=ht(),r={state:t,dispatch:null,action:e,pending:null},a.queue=r,n=yT.bind(null,ae,r,s,n),r.dispatch=n,a.memoizedState=e,[t,n,!1]}function ag(e){var t=Ue();return z0(t,ve,e)}function z0(e,t,n){if(t=zh(e,t,P0)[0],e=Dl(Kn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=To(t)}catch(i){throw i===_o?$c:i}else a=t;t=Ue();var r=t.queue,s=r.dispatch;return n!==t.memoizedState&&(ae.flags|=2048,js(9,Ic(),bT.bind(null,r,n),null)),[a,s,e]}function bT(e,t){e.action=t}function rg(e){var t=Ue(),n=ve;if(n!==null)return z0(t,n,e);Ue(),t=t.memoizedState,n=Ue();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function js(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=ae.updateQueue,t===null&&(t=Uh(),ae.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Ic(){return{destroy:void 0,resource:void 0}}function B0(){return Ue().memoizedState}function jl(e,t,n,a){var r=ht();a=a===void 0?null:a,ae.flags|=e,r.memoizedState=js(1|t,Ic(),n,a)}function Ao(e,t,n,a){var r=Ue();a=a===void 0?null:a;var s=r.memoizedState.inst;ve!==null&&a!==null&&Nh(a,ve.memoizedState.deps)?r.memoizedState=js(t,s,n,a):(ae.flags|=e,r.memoizedState=js(1|t,s,n,a))}function sg(e,t){jl(8390656,8,e,t)}function $0(e,t){Ao(2048,8,e,t)}function H0(e,t){return Ao(4,2,e,t)}function I0(e,t){return Ao(4,4,e,t)}function q0(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function G0(e,t,n){n=n!=null?n.concat([e]):null,Ao(4,4,q0.bind(null,t,e),n)}function Bh(){}function F0(e,t){var n=Ue();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Nh(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Y0(e,t){var n=Ue();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Nh(t,a[1]))return a[0];if(a=e(),xr){Aa(!0);try{e()}finally{Aa(!1)}}return n.memoizedState=[a,t],a}function $h(e,t,n){return n===void 0||Ba&1073741824?e.memoizedState=t:(e.memoizedState=n,e=Ub(),ae.lanes|=e,Ha|=e,n)}function V0(e,t,n,a){return jt(n,t)?n:Ds.current!==null?(e=$h(e,n,a),jt(e,t)||(Ye=!0),e):Ba&42?(e=Ub(),ae.lanes|=e,Ha|=e,t):(Ye=!0,e.memoizedState=n)}function K0(e,t,n,a,r){var s=fe.p;fe.p=s!==0&&8>s?s:8;var i=Y.T,o={};Y.T=o,Ih(e,!1,t,n);try{var l=r(),c=Y.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var d=pT(l,a);Di(e,t,d,kt(e))}else Di(e,t,a,kt(e))}catch(u){Di(e,t,{then:function(){},status:"rejected",reason:u},kt())}finally{fe.p=s,Y.T=i}}function wT(){}function lf(e,t,n,a){if(e.tag!==5)throw Error(N(476));var r=X0(e).queue;K0(e,r,t,fr,n===null?wT:function(){return Q0(e),n(a)})}function X0(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:fr,baseState:fr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:fr},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Q0(e){var t=X0(e).next.queue;Di(e,t,{},kt())}function Hh(){return at(Wi)}function Z0(){return Ue().memoizedState}function J0(){return Ue().memoizedState}function xT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=kt();e=Na(n);var a=Da(t,e,n);a!==null&&(Nt(a,t,n),Oi(a,t,n)),t={cache:Ch()},e.payload=t;return}t=t.return}}function ST(e,t,n){var a=kt();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},qc(e)?eb(t,n):(n=Eh(e,t,n,a),n!==null&&(Nt(n,e,a),tb(n,t,a)))}function W0(e,t,n){var a=kt();Di(e,t,n,a)}function Di(e,t,n,a){var r={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(qc(e))eb(t,r);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var i=t.lastRenderedState,o=s(i,n);if(r.hasEagerState=!0,r.eagerState=o,jt(o,i))return Bc(e,t,r,0),we===null&&zc(),!1}catch{}finally{}if(n=Eh(e,t,r,a),n!==null)return Nt(n,e,a),tb(n,t,a),!0}return!1}function Ih(e,t,n,a){if(a={lane:2,revertLane:Qh(),action:a,hasEagerState:!1,eagerState:null,next:null},qc(e)){if(t)throw Error(N(479))}else t=Eh(e,n,a,2),t!==null&&Nt(t,e,2)}function qc(e){var t=e.alternate;return e===ae||t!==null&&t===ae}function eb(e,t){us=rc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tb(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Fy(e,n)}}var ic={readContext:at,use:Hc,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useLayoutEffect:je,useInsertionEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useSyncExternalStore:je,useId:je,useHostTransitionStatus:je,useFormState:je,useActionState:je,useOptimistic:je,useMemoCache:je,useCacheRefresh:je},nb={readContext:at,use:Hc,useCallback:function(e,t){return ht().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:sg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,jl(4194308,4,q0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return jl(4194308,4,e,t)},useInsertionEffect:function(e,t){jl(4,2,e,t)},useMemo:function(e,t){var n=ht();t=t===void 0?null:t;var a=e();if(xr){Aa(!0);try{e()}finally{Aa(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=ht();if(n!==void 0){var r=n(t);if(xr){Aa(!0);try{n(t)}finally{Aa(!1)}}}else r=t;return a.memoizedState=a.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a.queue=e,e=e.dispatch=ST.bind(null,ae,e),[a.memoizedState,e]},useRef:function(e){var t=ht();return e={current:e},t.memoizedState=e},useState:function(e){e=sf(e);var t=e.queue,n=W0.bind(null,ae,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Bh,useDeferredValue:function(e,t){var n=ht();return $h(n,e,t)},useTransition:function(){var e=sf(!1);return e=K0.bind(null,ae,e.queue,!0,!1),ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ae,r=ht();if(de){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),we===null)throw Error(N(349));le&124||O0(a,t,n)}r.memoizedState=n;var s={value:n,getSnapshot:t};return r.queue=s,sg(N0.bind(null,a,s,e),[e]),a.flags|=2048,js(9,Ic(),k0.bind(null,a,s,n,t),null),n},useId:function(){var e=ht(),t=we.identifierPrefix;if(de){var n=Bn,a=zn;n=(a&~(1<<32-Ot(a)-1)).toString(32)+n,t="«"+t+"R"+n,n=sc++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=gT++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:Hh,useFormState:ng,useActionState:ng,useOptimistic:function(e){var t=ht();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ih.bind(null,ae,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ph,useCacheRefresh:function(){return ht().memoizedState=xT.bind(null,ae)}},ab={readContext:at,use:Hc,useCallback:F0,useContext:at,useEffect:$0,useImperativeHandle:G0,useInsertionEffect:H0,useLayoutEffect:I0,useMemo:Y0,useReducer:Dl,useRef:B0,useState:function(){return Dl(Kn)},useDebugValue:Bh,useDeferredValue:function(e,t){var n=Ue();return V0(n,ve.memoizedState,e,t)},useTransition:function(){var e=Dl(Kn)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:To(e),t]},useSyncExternalStore:R0,useId:Z0,useHostTransitionStatus:Hh,useFormState:ag,useActionState:ag,useOptimistic:function(e,t){var n=Ue();return M0(n,ve,e,t)},useMemoCache:Ph,useCacheRefresh:J0},ET={readContext:at,use:Hc,useCallback:F0,useContext:at,useEffect:$0,useImperativeHandle:G0,useInsertionEffect:H0,useLayoutEffect:I0,useMemo:Y0,useReducer:Iu,useRef:B0,useState:function(){return Iu(Kn)},useDebugValue:Bh,useDeferredValue:function(e,t){var n=Ue();return ve===null?$h(n,e,t):V0(n,ve.memoizedState,e,t)},useTransition:function(){var e=Iu(Kn)[0],t=Ue().memoizedState;return[typeof e=="boolean"?e:To(e),t]},useSyncExternalStore:R0,useId:Z0,useHostTransitionStatus:Hh,useFormState:rg,useActionState:rg,useOptimistic:function(e,t){var n=Ue();return ve!==null?M0(n,ve,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ph,useCacheRefresh:J0},fs=null,Xi=0;function tl(e){var t=Xi;return Xi+=1,fs===null&&(fs=[]),E0(fs,e,t)}function ci(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function nl(e,t){throw t.$$typeof===WE?Error(N(525)):(e=Object.prototype.toString.call(t),Error(N(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ig(e){var t=e._init;return t(e._payload)}function rb(e){function t(g,v){if(e){var b=g.deletions;b===null?(g.deletions=[v],g.flags|=16):b.push(v)}}function n(g,v){if(!e)return null;for(;v!==null;)t(g,v),v=v.sibling;return null}function a(g){for(var v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function r(g,v){return g=qn(g,v),g.index=0,g.sibling=null,g}function s(g,v,b){return g.index=b,e?(b=g.alternate,b!==null?(b=b.index,b<v?(g.flags|=67108866,v):b):(g.flags|=67108866,v)):(g.flags|=1048576,v)}function i(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function o(g,v,b,S){return v===null||v.tag!==6?(v=Bu(b,g.mode,S),v.return=g,v):(v=r(v,b),v.return=g,v)}function l(g,v,b,S){var E=b.type;return E===Kr?d(g,v,b.props.children,S,b.key):v!==null&&(v.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ha&&ig(E)===v.type)?(v=r(v,b.props),ci(v,b),v.return=g,v):(v=kl(b.type,b.key,b.props,null,g.mode,S),ci(v,b),v.return=g,v)}function c(g,v,b,S){return v===null||v.tag!==4||v.stateNode.containerInfo!==b.containerInfo||v.stateNode.implementation!==b.implementation?(v=$u(b,g.mode,S),v.return=g,v):(v=r(v,b.children||[]),v.return=g,v)}function d(g,v,b,S,E){return v===null||v.tag!==7?(v=hr(b,g.mode,S,E),v.return=g,v):(v=r(v,b),v.return=g,v)}function u(g,v,b){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=Bu(""+v,g.mode,b),v.return=g,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ko:return b=kl(v.type,v.key,v.props,null,g.mode,b),ci(b,v),b.return=g,b;case yi:return v=$u(v,g.mode,b),v.return=g,v;case ha:var S=v._init;return v=S(v._payload),u(g,v,b)}if(bi(v)||si(v))return v=hr(v,g.mode,b,null),v.return=g,v;if(typeof v.then=="function")return u(g,tl(v),b);if(v.$$typeof===Pn)return u(g,Wo(g,v),b);nl(g,v)}return null}function f(g,v,b,S){var E=v!==null?v.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return E!==null?null:o(g,v,""+b,S);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Ko:return b.key===E?l(g,v,b,S):null;case yi:return b.key===E?c(g,v,b,S):null;case ha:return E=b._init,b=E(b._payload),f(g,v,b,S)}if(bi(b)||si(b))return E!==null?null:d(g,v,b,S,null);if(typeof b.then=="function")return f(g,v,tl(b),S);if(b.$$typeof===Pn)return f(g,v,Wo(g,b),S);nl(g,b)}return null}function h(g,v,b,S,E){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return g=g.get(b)||null,o(v,g,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ko:return g=g.get(S.key===null?b:S.key)||null,l(v,g,S,E);case yi:return g=g.get(S.key===null?b:S.key)||null,c(v,g,S,E);case ha:var _=S._init;return S=_(S._payload),h(g,v,b,S,E)}if(bi(S)||si(S))return g=g.get(b)||null,d(v,g,S,E,null);if(typeof S.then=="function")return h(g,v,b,tl(S),E);if(S.$$typeof===Pn)return h(g,v,b,Wo(v,S),E);nl(v,S)}return null}function x(g,v,b,S){for(var E=null,_=null,A=v,T=v=0,k=null;A!==null&&T<b.length;T++){A.index>T?(k=A,A=null):k=A.sibling;var M=f(g,A,b[T],S);if(M===null){A===null&&(A=k);break}e&&A&&M.alternate===null&&t(g,A),v=s(M,v,T),_===null?E=M:_.sibling=M,_=M,A=k}if(T===b.length)return n(g,A),de&&nr(g,T),E;if(A===null){for(;T<b.length;T++)A=u(g,b[T],S),A!==null&&(v=s(A,v,T),_===null?E=A:_.sibling=A,_=A);return de&&nr(g,T),E}for(A=a(A);T<b.length;T++)k=h(A,g,T,b[T],S),k!==null&&(e&&k.alternate!==null&&A.delete(k.key===null?T:k.key),v=s(k,v,T),_===null?E=k:_.sibling=k,_=k);return e&&A.forEach(function(H){return t(g,H)}),de&&nr(g,T),E}function y(g,v,b,S){if(b==null)throw Error(N(151));for(var E=null,_=null,A=v,T=v=0,k=null,M=b.next();A!==null&&!M.done;T++,M=b.next()){A.index>T?(k=A,A=null):k=A.sibling;var H=f(g,A,M.value,S);if(H===null){A===null&&(A=k);break}e&&A&&H.alternate===null&&t(g,A),v=s(H,v,T),_===null?E=H:_.sibling=H,_=H,A=k}if(M.done)return n(g,A),de&&nr(g,T),E;if(A===null){for(;!M.done;T++,M=b.next())M=u(g,M.value,S),M!==null&&(v=s(M,v,T),_===null?E=M:_.sibling=M,_=M);return de&&nr(g,T),E}for(A=a(A);!M.done;T++,M=b.next())M=h(A,g,T,M.value,S),M!==null&&(e&&M.alternate!==null&&A.delete(M.key===null?T:M.key),v=s(M,v,T),_===null?E=M:_.sibling=M,_=M);return e&&A.forEach(function(F){return t(g,F)}),de&&nr(g,T),E}function w(g,v,b,S){if(typeof b=="object"&&b!==null&&b.type===Kr&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case Ko:e:{for(var E=b.key;v!==null;){if(v.key===E){if(E=b.type,E===Kr){if(v.tag===7){n(g,v.sibling),S=r(v,b.props.children),S.return=g,g=S;break e}}else if(v.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ha&&ig(E)===v.type){n(g,v.sibling),S=r(v,b.props),ci(S,b),S.return=g,g=S;break e}n(g,v);break}else t(g,v);v=v.sibling}b.type===Kr?(S=hr(b.props.children,g.mode,S,b.key),S.return=g,g=S):(S=kl(b.type,b.key,b.props,null,g.mode,S),ci(S,b),S.return=g,g=S)}return i(g);case yi:e:{for(E=b.key;v!==null;){if(v.key===E)if(v.tag===4&&v.stateNode.containerInfo===b.containerInfo&&v.stateNode.implementation===b.implementation){n(g,v.sibling),S=r(v,b.children||[]),S.return=g,g=S;break e}else{n(g,v);break}else t(g,v);v=v.sibling}S=$u(b,g.mode,S),S.return=g,g=S}return i(g);case ha:return E=b._init,b=E(b._payload),w(g,v,b,S)}if(bi(b))return x(g,v,b,S);if(si(b)){if(E=si(b),typeof E!="function")throw Error(N(150));return b=E.call(b),y(g,v,b,S)}if(typeof b.then=="function")return w(g,v,tl(b),S);if(b.$$typeof===Pn)return w(g,v,Wo(g,b),S);nl(g,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,v!==null&&v.tag===6?(n(g,v.sibling),S=r(v,b),S.return=g,g=S):(n(g,v),S=Bu(b,g.mode,S),S.return=g,g=S),i(g)):n(g,v)}return function(g,v,b,S){try{Xi=0;var E=w(g,v,b,S);return fs=null,E}catch(A){if(A===_o||A===$c)throw A;var _=Ct(29,A,null,g.mode);return _.lanes=S,_.return=g,_}finally{}}}var Ms=rb(!0),sb=rb(!1),Gt=Tn(null),wn=null;function va(e){var t=e.alternate;Te(Be,Be.current&1),Te(Gt,e),wn===null&&(t===null||Ds.current!==null||t.memoizedState!==null)&&(wn=e)}function ib(e){if(e.tag===22){if(Te(Be,Be.current),Te(Gt,e),wn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(wn=e)}}else ya()}function ya(){Te(Be,Be.current),Te(Gt,Gt.current)}function Hn(e){Ve(Gt),wn===e&&(wn=null),Ve(Be)}var Be=Tn(0);function oc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||Tf(n)))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}function qu(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:xe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var cf={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=kt(),r=Na(a);r.payload=t,n!=null&&(r.callback=n),t=Da(e,r,a),t!==null&&(Nt(t,e,a),Oi(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=kt(),r=Na(a);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=Da(e,r,a),t!==null&&(Nt(t,e,a),Oi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=kt(),a=Na(n);a.tag=2,t!=null&&(a.callback=t),t=Da(e,a,n),t!==null&&(Nt(t,e,n),Oi(t,e,n))}};function og(e,t,n,a,r,s,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,i):t.prototype&&t.prototype.isPureReactComponent?!Yi(n,a)||!Yi(r,s):!0}function lg(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&cf.enqueueReplaceState(t,t.state,null)}function Sr(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=xe({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}var lc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function ob(e){lc(e)}function lb(e){console.error(e)}function cb(e){lc(e)}function cc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function cg(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function uf(e,t,n){return n=Na(n),n.tag=3,n.payload={element:null},n.callback=function(){cc(e,t)},n}function ub(e){return e=Na(e),e.tag=3,e}function db(e,t,n,a){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var s=a.value;e.payload=function(){return r(s)},e.callback=function(){cg(t,n,a)}}var i=n.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){cg(t,n,a),typeof r!="function"&&(ja===null?ja=new Set([this]):ja.add(this));var o=a.stack;this.componentDidCatch(a.value,{componentStack:o!==null?o:""})})}function _T(e,t,n,a,r){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&So(t,n,r,!0),n=Gt.current,n!==null){switch(n.tag){case 13:return wn===null?yf():n.alternate===null&&De===0&&(De=3),n.flags&=-257,n.flags|=65536,n.lanes=r,a===tf?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),ed(e,a,r)),!1;case 22:return n.flags|=65536,a===tf?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),ed(e,a,r)),!1}throw Error(N(435,n.tag))}return ed(e,a,r),yf(),!1}if(de)return t=Gt.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=r,a!==Qd&&(e=Error(N(422),{cause:a}),Vi(Ht(e,n)))):(a!==Qd&&(t=Error(N(423),{cause:a}),Vi(Ht(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,a=Ht(a,n),r=uf(e.stateNode,a,r),Hu(e,r),De!==4&&(De=2)),!1;var s=Error(N(520),{cause:a});if(s=Ht(s,n),Li===null?Li=[s]:Li.push(s),De!==4&&(De=2),t===null)return!0;a=Ht(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=uf(n.stateNode,a,e),Hu(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(ja===null||!ja.has(s))))return n.flags|=65536,r&=-r,n.lanes|=r,r=ub(r),db(r,e,n,a),Hu(n,r),!1}n=n.return}while(n!==null);return!1}var fb=Error(N(461)),Ye=!1;function Qe(e,t,n,a){t.child=e===null?sb(t,null,n,a):Ms(t,e.child,n,a)}function ug(e,t,n,a,r){n=n.render;var s=t.ref;if("ref"in a){var i={};for(var o in a)o!=="ref"&&(i[o]=a[o])}else i=a;return wr(t),a=Dh(e,t,n,i,s,r),o=jh(),e!==null&&!Ye?(Mh(e,t,r),Xn(e,t,r)):(de&&o&&Th(t),t.flags|=1,Qe(e,t,a,r),t.child)}function dg(e,t,n,a,r){if(e===null){var s=n.type;return typeof s=="function"&&!_h(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,hb(e,t,s,a,r)):(e=kl(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!qh(e,r)){var i=s.memoizedProps;if(n=n.compare,n=n!==null?n:Yi,n(i,a)&&e.ref===t.ref)return Xn(e,t,r)}return t.flags|=1,e=qn(s,a),e.ref=t.ref,e.return=t,t.child=e}function hb(e,t,n,a,r){if(e!==null){var s=e.memoizedProps;if(Yi(s,a)&&e.ref===t.ref)if(Ye=!1,t.pendingProps=a=s,qh(e,r))e.flags&131072&&(Ye=!0);else return t.lanes=e.lanes,Xn(e,t,r)}return df(e,t,n,a,r)}function mb(e,t,n){var a=t.pendingProps,r=a.children,s=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if(t.flags&128){if(a=s!==null?s.baseLanes|n:n,e!==null){for(r=t.child=e.child,s=0;r!==null;)s=s|r.lanes|r.childLanes,r=r.sibling;t.childLanes=s&~a}else t.childLanes=0,t.child=null;return fg(e,t,a,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Nl(t,s!==null?s.cachePool:null),s!==null?Wp(t,s):rf(),ib(t);else return t.lanes=t.childLanes=536870912,fg(e,t,s!==null?s.baseLanes|n:n,n)}else s!==null?(Nl(t,s.cachePool),Wp(t,s),ya(),t.memoizedState=null):(e!==null&&Nl(t,null),rf(),ya());return Qe(e,t,r,n),t.child}function fg(e,t,n,a){var r=Rh();return r=r===null?null:{parent:ze._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&Nl(t,null),rf(),ib(t),e!==null&&So(e,t,a,!0),null}function Ml(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(N(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function df(e,t,n,a,r){return wr(t),n=Dh(e,t,n,a,void 0,r),a=jh(),e!==null&&!Ye?(Mh(e,t,r),Xn(e,t,r)):(de&&a&&Th(t),t.flags|=1,Qe(e,t,n,r),t.child)}function hg(e,t,n,a,r,s){return wr(t),t.updateQueue=null,n=C0(t,a,n,r),A0(e),a=jh(),e!==null&&!Ye?(Mh(e,t,s),Xn(e,t,s)):(de&&a&&Th(t),t.flags|=1,Qe(e,t,n,s),t.child)}function mg(e,t,n,a,r){if(wr(t),t.stateNode===null){var s=ns,i=n.contextType;typeof i=="object"&&i!==null&&(s=at(i)),s=new n(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=cf,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},Oh(t),i=n.contextType,s.context=typeof i=="object"&&i!==null?at(i):ns,s.state=t.memoizedState,i=n.getDerivedStateFromProps,typeof i=="function"&&(qu(t,n,i,a),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(i=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),i!==s.state&&cf.enqueueReplaceState(s,s.state,null),Ni(t,a,s,r),ki(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var o=t.memoizedProps,l=Sr(n,o);s.props=l;var c=s.context,d=n.contextType;i=ns,typeof d=="object"&&d!==null&&(i=at(d));var u=n.getDerivedStateFromProps;d=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o||c!==i)&&lg(t,s,a,i),ma=!1;var f=t.memoizedState;s.state=f,Ni(t,a,s,r),ki(),c=t.memoizedState,o||f!==c||ma?(typeof u=="function"&&(qu(t,n,u,a),c=t.memoizedState),(l=ma||og(t,n,l,a,f,c,i))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=c),s.props=a,s.state=c,s.context=i,a=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,nf(e,t),i=t.memoizedProps,d=Sr(n,i),s.props=d,u=t.pendingProps,f=s.context,c=n.contextType,l=ns,typeof c=="object"&&c!==null&&(l=at(c)),o=n.getDerivedStateFromProps,(c=typeof o=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(i!==u||f!==l)&&lg(t,s,a,l),ma=!1,f=t.memoizedState,s.state=f,Ni(t,a,s,r),ki();var h=t.memoizedState;i!==u||f!==h||ma||e!==null&&e.dependencies!==null&&nc(e.dependencies)?(typeof o=="function"&&(qu(t,n,o,a),h=t.memoizedState),(d=ma||og(t,n,d,a,f,h,l)||e!==null&&e.dependencies!==null&&nc(e.dependencies))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,h,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,h,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=h),s.props=a,s.state=h,s.context=l,a=d):(typeof s.componentDidUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,Ml(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=Ms(t,e.child,null,r),t.child=Ms(t,null,n,r)):Qe(e,t,n,r),t.memoizedState=s.state,e=t.child):e=Xn(e,t,r),e}function pg(e,t,n,a){return xo(),t.flags|=256,Qe(e,t,n,a),t.child}var Gu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fu(e){return{baseLanes:e,cachePool:x0()}}function Yu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=It),e}function pb(e,t,n){var a=t.pendingProps,r=!1,s=(t.flags&128)!==0,i;if((i=s)||(i=e!==null&&e.memoizedState===null?!1:(Be.current&2)!==0),i&&(r=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(de){if(r?va(t):ya(),de){var o=Ne,l;if(l=o){e:{for(l=o,o=pn;l.nodeType!==8;){if(!o){o=null;break e}if(l=Wt(l.nextSibling),l===null){o=null;break e}}o=l}o!==null?(t.memoizedState={dehydrated:o,treeContext:mr!==null?{id:zn,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},l=Ct(18,null,null,0),l.stateNode=o,l.return=t,t.child=l,it=t,Ne=null,l=!0):l=!1}l||br(t)}if(o=t.memoizedState,o!==null&&(o=o.dehydrated,o!==null))return Tf(o)?t.lanes=32:t.lanes=536870912,null;Hn(t)}return o=a.children,a=a.fallback,r?(ya(),r=t.mode,o=uc({mode:"hidden",children:o},r),a=hr(a,r,n,null),o.return=t,a.return=t,o.sibling=a,t.child=o,r=t.child,r.memoizedState=Fu(n),r.childLanes=Yu(e,i,n),t.memoizedState=Gu,a):(va(t),ff(t,o))}if(l=e.memoizedState,l!==null&&(o=l.dehydrated,o!==null)){if(s)t.flags&256?(va(t),t.flags&=-257,t=Vu(e,t,n)):t.memoizedState!==null?(ya(),t.child=e.child,t.flags|=128,t=null):(ya(),r=a.fallback,o=t.mode,a=uc({mode:"visible",children:a.children},o),r=hr(r,o,n,null),r.flags|=2,a.return=t,r.return=t,a.sibling=r,t.child=a,Ms(t,e.child,null,n),a=t.child,a.memoizedState=Fu(n),a.childLanes=Yu(e,i,n),t.memoizedState=Gu,t=r);else if(va(t),Tf(o)){if(i=o.nextSibling&&o.nextSibling.dataset,i)var c=i.dgst;i=c,a=Error(N(419)),a.stack="",a.digest=i,Vi({value:a,source:null,stack:null}),t=Vu(e,t,n)}else if(Ye||So(e,t,n,!1),i=(n&e.childLanes)!==0,Ye||i){if(i=we,i!==null&&(a=n&-n,a=a&42?1:hh(a),a=a&(i.suspendedLanes|n)?0:a,a!==0&&a!==l.retryLane))throw l.retryLane=a,Ys(e,a),Nt(i,e,a),fb;o.data==="$?"||yf(),t=Vu(e,t,n)}else o.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ne=Wt(o.nextSibling),it=t,de=!0,pr=null,pn=!1,e!==null&&(zt[Bt++]=zn,zt[Bt++]=Bn,zt[Bt++]=mr,zn=e.id,Bn=e.overflow,mr=t),t=ff(t,a.children),t.flags|=4096);return t}return r?(ya(),r=a.fallback,o=t.mode,l=e.child,c=l.sibling,a=qn(l,{mode:"hidden",children:a.children}),a.subtreeFlags=l.subtreeFlags&65011712,c!==null?r=qn(c,r):(r=hr(r,o,n,null),r.flags|=2),r.return=t,a.return=t,a.sibling=r,t.child=a,a=r,r=t.child,o=e.child.memoizedState,o===null?o=Fu(n):(l=o.cachePool,l!==null?(c=ze._currentValue,l=l.parent!==c?{parent:c,pool:c}:l):l=x0(),o={baseLanes:o.baseLanes|n,cachePool:l}),r.memoizedState=o,r.childLanes=Yu(e,i,n),t.memoizedState=Gu,a):(va(t),n=e.child,e=n.sibling,n=qn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=n,t.memoizedState=null,n)}function ff(e,t){return t=uc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function uc(e,t){return e=Ct(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Vu(e,t,n){return Ms(t,e.child,null,n),e=ff(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gg(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Jd(e.return,t,n)}function Ku(e,t,n,a,r){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:r}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=a,s.tail=n,s.tailMode=r)}function gb(e,t,n){var a=t.pendingProps,r=a.revealOrder,s=a.tail;if(Qe(e,t,a.children,n),a=Be.current,a&2)a=a&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&&gg(e,n,t);else if(e.tag===19)gg(e,n,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}a&=1}switch(Te(Be,a),r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&oc(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Ku(t,!1,r,n,s);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&oc(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Ku(t,!0,n,null,s);break;case"together":Ku(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Xn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ha|=t.lanes,!(n&t.childLanes))if(e!==null){if(So(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(N(153));if(t.child!==null){for(e=t.child,n=qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=qn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qh(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&nc(e)))}function TT(e,t,n){switch(t.tag){case 3:Kl(t,t.stateNode.containerInfo),ga(t,ze,e.memoizedState.cache),xo();break;case 27:case 5:$d(t);break;case 4:Kl(t,t.stateNode.containerInfo);break;case 10:ga(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(va(t),t.flags|=128,null):n&t.child.childLanes?pb(e,t,n):(va(t),e=Xn(e,t,n),e!==null?e.sibling:null);va(t);break;case 19:var r=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(So(e,t,n,!1),a=(n&t.childLanes)!==0),r){if(a)return gb(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Te(Be,Be.current),a)break;return null;case 22:case 23:return t.lanes=0,mb(e,t,n);case 24:ga(t,ze,e.memoizedState.cache)}return Xn(e,t,n)}function vb(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ye=!0;else{if(!qh(e,n)&&!(t.flags&128))return Ye=!1,TT(e,t,n);Ye=!!(e.flags&131072)}else Ye=!1,de&&t.flags&1048576&&b0(t,tc,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,r=a._init;if(a=r(a._payload),t.type=a,typeof a=="function")_h(a)?(e=Sr(a,e),t.tag=1,t=mg(null,t,a,e,n)):(t.tag=0,t=df(null,t,a,e,n));else{if(a!=null){if(r=a.$$typeof,r===uh){t.tag=11,t=ug(null,t,a,e,n);break e}else if(r===dh){t.tag=14,t=dg(null,t,a,e,n);break e}}throw t=zd(a)||a,Error(N(306,t,""))}}return t;case 0:return df(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,r=Sr(a,t.pendingProps),mg(e,t,a,r,n);case 3:e:{if(Kl(t,t.stateNode.containerInfo),e===null)throw Error(N(387));a=t.pendingProps;var s=t.memoizedState;r=s.element,nf(e,t),Ni(t,a,null,n);var i=t.memoizedState;if(a=i.cache,ga(t,ze,a),a!==s.cache&&Wd(t,[ze],n,!0),ki(),a=i.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=pg(e,t,a,n);break e}else if(a!==r){r=Ht(Error(N(424)),t),Vi(r),t=pg(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ne=Wt(e.firstChild),it=t,de=!0,pr=null,pn=!0,n=sb(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(xo(),a===r){t=Xn(e,t,n);break e}Qe(e,t,a,n)}t=t.child}return t;case 26:return Ml(e,t),e===null?(n=jg(t.type,null,t.pendingProps,null))?t.memoizedState=n:de||(n=t.type,e=t.pendingProps,a=vc(ka.current).createElement(n),a[nt]=t,a[yt]=e,Je(a,n,e),Fe(a),t.stateNode=a):t.memoizedState=jg(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $d(t),e===null&&de&&(a=t.stateNode=aw(t.type,t.pendingProps,ka.current),it=t,pn=!0,r=Ne,Ya(t.type)?(Af=r,Ne=Wt(a.firstChild)):Ne=r),Qe(e,t,t.pendingProps.children,n),Ml(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&de&&((r=a=Ne)&&(a=WT(a,t.type,t.pendingProps,pn),a!==null?(t.stateNode=a,it=t,Ne=Wt(a.firstChild),pn=!1,r=!0):r=!1),r||br(t)),$d(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,Ef(r,s)?a=null:i!==null&&Ef(r,i)&&(t.flags|=32),t.memoizedState!==null&&(r=Dh(e,t,vT,null,null,n),Wi._currentValue=r),Ml(e,t),Qe(e,t,a,n),t.child;case 6:return e===null&&de&&((e=n=Ne)&&(n=eA(n,t.pendingProps,pn),n!==null?(t.stateNode=n,it=t,Ne=null,e=!0):e=!1),e||br(t)),null;case 13:return pb(e,t,n);case 4:return Kl(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ms(t,null,a,n):Qe(e,t,a,n),t.child;case 11:return ug(e,t,t.type,t.pendingProps,n);case 7:return Qe(e,t,t.pendingProps,n),t.child;case 8:return Qe(e,t,t.pendingProps.children,n),t.child;case 12:return Qe(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,ga(t,t.type,a.value),Qe(e,t,a.children,n),t.child;case 9:return r=t.type._context,a=t.pendingProps.children,wr(t),r=at(r),a=a(r),t.flags|=1,Qe(e,t,a,n),t.child;case 14:return dg(e,t,t.type,t.pendingProps,n);case 15:return hb(e,t,t.type,t.pendingProps,n);case 19:return gb(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=uc(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=qn(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return mb(e,t,n);case 24:return wr(t),a=at(ze),e===null?(r=Rh(),r===null&&(r=we,s=Ch(),r.pooledCache=s,s.refCount++,s!==null&&(r.pooledCacheLanes|=n),r=s),t.memoizedState={parent:a,cache:r},Oh(t),ga(t,ze,r)):(e.lanes&n&&(nf(e,t),Ni(t,null,null,n),ki()),r=e.memoizedState,s=t.memoizedState,r.parent!==a?(r={parent:a,cache:a},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),ga(t,ze,a)):(a=s.cache,ga(t,ze,a),a!==r.cache&&Wd(t,[ze],n,!0))),Qe(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(N(156,t.tag))}function kn(e){e.flags|=4}function vg(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!iw(t)){if(t=Gt.current,t!==null&&((le&4194048)===le?wn!==null:(le&62914560)!==le&&!(le&536870912)||t!==wn))throw Ri=tf,S0;e.flags|=8192}}function al(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?qy():536870912,e.lanes|=t,Ls|=t)}function ui(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ce(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags&65011712,a|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function AT(e,t,n){var a=t.pendingProps;switch(Ah(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ce(t),null;case 1:return Ce(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Gn(ze),Rs(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(li(t)?kn(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Vp())),Ce(t),null;case 26:return n=t.memoizedState,e===null?(kn(t),n!==null?(Ce(t),vg(t,n)):(Ce(t),t.flags&=-16777217)):n?n!==e.memoizedState?(kn(t),Ce(t),vg(t,n)):(Ce(t),t.flags&=-16777217):(e.memoizedProps!==a&&kn(t),Ce(t),t.flags&=-16777217),null;case 27:Xl(t),n=ka.current;var r=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&kn(t);else{if(!a){if(t.stateNode===null)throw Error(N(166));return Ce(t),null}e=yn.current,li(t)?Fp(t):(e=aw(r,a,n),t.stateNode=e,kn(t))}return Ce(t),null;case 5:if(Xl(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&kn(t);else{if(!a){if(t.stateNode===null)throw Error(N(166));return Ce(t),null}if(e=yn.current,li(t))Fp(t);else{switch(r=vc(ka.current),e){case 1:e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=r.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?r.createElement("select",{is:a.is}):r.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?r.createElement(n,{is:a.is}):r.createElement(n)}}e[nt]=t,e[yt]=a;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=e;e:switch(Je(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&kn(t)}}return Ce(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&kn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(N(166));if(e=ka.current,li(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,r=it,r!==null)switch(r.tag){case 27:case 5:a=r.memoizedProps}e[nt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||ew(e.nodeValue,n)),e||br(t)}else e=vc(e).createTextNode(a),e[nt]=t,t.stateNode=e}return Ce(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=li(t),a!==null&&a.dehydrated!==null){if(e===null){if(!r)throw Error(N(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(N(317));r[nt]=t}else xo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ce(t),r=!1}else r=Vp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Hn(t),t):(Hn(t),null)}if(Hn(t),t.flags&128)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,r=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(r=a.alternate.memoizedState.cachePool.pool);var s=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==r&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),al(t,t.updateQueue),Ce(t),null;case 4:return Rs(),e===null&&Zh(t.stateNode.containerInfo),Ce(t),null;case 10:return Gn(t.type),Ce(t),null;case 19:if(Ve(Be),r=t.memoizedState,r===null)return Ce(t),null;if(a=(t.flags&128)!==0,s=r.rendering,s===null)if(a)ui(r,!1);else{if(De!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=oc(e),s!==null){for(t.flags|=128,ui(r,!1),e=s.updateQueue,t.updateQueue=e,al(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)y0(n,e),n=n.sibling;return Te(Be,Be.current&1|2),t.child}e=e.sibling}r.tail!==null&&bn()>fc&&(t.flags|=128,a=!0,ui(r,!1),t.lanes=4194304)}else{if(!a)if(e=oc(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,al(t,e),ui(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!de)return Ce(t),null}else 2*bn()-r.renderingStartTime>fc&&n!==536870912&&(t.flags|=128,a=!0,ui(r,!1),t.lanes=4194304);r.isBackwards?(s.sibling=t.child,t.child=s):(e=r.last,e!==null?e.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=bn(),t.sibling=null,e=Be.current,Te(Be,a?e&1|2:e&1),t):(Ce(t),null);case 22:case 23:return Hn(t),kh(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(Ce(t),t.subtreeFlags&6&&(t.flags|=8192)):Ce(t),n=t.updateQueue,n!==null&&al(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&Ve(gr),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Gn(ze),Ce(t),null;case 25:return null;case 30:return null}throw Error(N(156,t.tag))}function CT(e,t){switch(Ah(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gn(ze),Rs(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xl(t),null;case 13:if(Hn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));xo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ve(Be),null;case 4:return Rs(),null;case 10:return Gn(t.type),null;case 22:case 23:return Hn(t),kh(),e!==null&&Ve(gr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gn(ze),null;case 25:return null;default:return null}}function yb(e,t){switch(Ah(t),t.tag){case 3:Gn(ze),Rs();break;case 26:case 27:case 5:Xl(t);break;case 4:Rs();break;case 13:Hn(t);break;case 19:Ve(Be);break;case 10:Gn(t.type);break;case 22:case 23:Hn(t),kh(),e!==null&&Ve(gr);break;case 24:Gn(ze)}}function Co(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var r=a.next;n=r;do{if((n.tag&e)===e){a=void 0;var s=n.create,i=n.inst;a=s(),i.destroy=a}n=n.next}while(n!==r)}}catch(o){ye(t,t.return,o)}}function $a(e,t,n){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var s=r.next;a=s;do{if((a.tag&e)===e){var i=a.inst,o=i.destroy;if(o!==void 0){i.destroy=void 0,r=t;var l=n,c=o;try{c()}catch(d){ye(r,l,d)}}}a=a.next}while(a!==s)}}catch(d){ye(t,t.return,d)}}function bb(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{T0(t,n)}catch(a){ye(e,e.return,a)}}}function wb(e,t,n){n.props=Sr(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){ye(e,t,a)}}function ji(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(r){ye(e,t,r)}}function vn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(r){ye(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){ye(e,t,r)}else n.current=null}function xb(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(r){ye(e,e.return,r)}}function Xu(e,t,n){try{var a=e.stateNode;KT(a,e.type,n,t),a[yt]=t}catch(r){ye(e,e.return,r)}}function Sb(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ya(e.type)||e.tag===4}function Qu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sb(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.tag===27&&Ya(e.type)||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 hf(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vc));else if(a!==4&&(a===27&&Ya(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(hf(e,t,n),e=e.sibling;e!==null;)hf(e,t,n),e=e.sibling}function dc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Ya(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(dc(e,t,n),e=e.sibling;e!==null;)dc(e,t,n),e=e.sibling}function Eb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Je(t,a,n),t[nt]=e,t[yt]=n}catch(s){ye(e,e.return,s)}}var Un=!1,Me=!1,Zu=!1,yg=typeof WeakSet=="function"?WeakSet:Set,qe=null;function RT(e,t){if(e=e.containerInfo,xf=xc,e=u0(e),xh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var r=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var i=0,o=-1,l=-1,c=0,d=0,u=e,f=null;t:for(;;){for(var h;u!==n||r!==0&&u.nodeType!==3||(o=i+r),u!==s||a!==0&&u.nodeType!==3||(l=i+a),u.nodeType===3&&(i+=u.nodeValue.length),(h=u.firstChild)!==null;)f=u,u=h;for(;;){if(u===e)break t;if(f===n&&++c===r&&(o=i),f===s&&++d===a&&(l=i),(h=u.nextSibling)!==null)break;u=f,f=u.parentNode}u=h}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Sf={focusedElem:e,selectionRange:n},xc=!1,qe=t;qe!==null;)if(t=qe,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,qe=e;else for(;qe!==null;){switch(t=qe,s=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&s!==null){e=void 0,n=t,r=s.memoizedProps,s=s.memoizedState,a=n.stateNode;try{var x=Sr(n.type,r,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(x,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(y){ye(n,n.return,y)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)_f(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_f(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(N(163))}if(e=t.sibling,e!==null){e.return=t.return,qe=e;break}qe=t.return}}function _b(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:ia(e,n),a&4&&Co(5,n);break;case 1:if(ia(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(i){ye(n,n.return,i)}else{var r=Sr(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){ye(n,n.return,i)}}a&64&&bb(n),a&512&&ji(n,n.return);break;case 3:if(ia(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{T0(e,t)}catch(i){ye(n,n.return,i)}}break;case 27:t===null&&a&4&&Eb(n);case 26:case 5:ia(e,n),t===null&&a&4&&xb(n),a&512&&ji(n,n.return);break;case 12:ia(e,n);break;case 13:ia(e,n),a&4&&Cb(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=PT.bind(null,n),tA(e,n))));break;case 22:if(a=n.memoizedState!==null||Un,!a){t=t!==null&&t.memoizedState!==null||Me,r=Un;var s=Me;Un=a,(Me=t)&&!s?la(e,n,(n.subtreeFlags&8772)!==0):ia(e,n),Un=r,Me=s}break;case 30:break;default:ia(e,n)}}function Tb(e){var t=e.alternate;t!==null&&(e.alternate=null,Tb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ph(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Se=null,mt=!1;function Nn(e,t,n){for(n=n.child;n!==null;)Ab(e,t,n),n=n.sibling}function Ab(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(go,n)}catch{}switch(n.tag){case 26:Me||vn(n,t),Nn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Me||vn(n,t);var a=Se,r=mt;Ya(n.type)&&(Se=n.stateNode,mt=!1),Nn(e,t,n),Pi(n.stateNode),Se=a,mt=r;break;case 5:Me||vn(n,t);case 6:if(a=Se,r=mt,Se=null,Nn(e,t,n),Se=a,mt=r,Se!==null)if(mt)try{(Se.nodeType===9?Se.body:Se.nodeName==="HTML"?Se.ownerDocument.body:Se).removeChild(n.stateNode)}catch(s){ye(n,t,s)}else try{Se.removeChild(n.stateNode)}catch(s){ye(n,t,s)}break;case 18:Se!==null&&(mt?(e=Se,kg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),no(e)):kg(Se,n.stateNode));break;case 4:a=Se,r=mt,Se=n.stateNode.containerInfo,mt=!0,Nn(e,t,n),Se=a,mt=r;break;case 0:case 11:case 14:case 15:Me||$a(2,n,t),Me||$a(4,n,t),Nn(e,t,n);break;case 1:Me||(vn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&wb(n,t,a)),Nn(e,t,n);break;case 21:Nn(e,t,n);break;case 22:Me=(a=Me)||n.memoizedState!==null,Nn(e,t,n),Me=a;break;default:Nn(e,t,n)}}function Cb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{no(e)}catch(n){ye(t,t.return,n)}}function OT(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new yg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new yg),t;default:throw Error(N(435,e.tag))}}function Ju(e,t){var n=OT(e);t.forEach(function(a){var r=zT.bind(null,e,a);n.has(a)||(n.add(a),a.then(r,r))})}function St(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var r=n[a],s=e,i=t,o=i;e:for(;o!==null;){switch(o.tag){case 27:if(Ya(o.type)){Se=o.stateNode,mt=!1;break e}break;case 5:Se=o.stateNode,mt=!1;break e;case 3:case 4:Se=o.stateNode.containerInfo,mt=!0;break e}o=o.return}if(Se===null)throw Error(N(160));Ab(s,i,r),Se=null,mt=!1,s=r.alternate,s!==null&&(s.return=null),r.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)Rb(t,e),t=t.sibling}var Zt=null;function Rb(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:St(t,e),Et(e),a&4&&($a(3,e,e.return),Co(3,e),$a(5,e,e.return));break;case 1:St(t,e),Et(e),a&512&&(Me||n===null||vn(n,n.return)),a&64&&Un&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var r=Zt;if(St(t,e),Et(e),a&512&&(Me||n===null||vn(n,n.return)),a&4){var s=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(a){case"title":s=r.getElementsByTagName("title")[0],(!s||s[bo]||s[nt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(a),r.head.insertBefore(s,r.querySelector("head > title"))),Je(s,a,n),s[nt]=e,Fe(s),a=s;break e;case"link":var i=Lg("link","href",r).get(a+(n.href||""));if(i){for(var o=0;o<i.length;o++)if(s=i[o],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){i.splice(o,1);break t}}s=r.createElement(a),Je(s,a,n),r.head.appendChild(s);break;case"meta":if(i=Lg("meta","content",r).get(a+(n.content||""))){for(o=0;o<i.length;o++)if(s=i[o],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){i.splice(o,1);break t}}s=r.createElement(a),Je(s,a,n),r.head.appendChild(s);break;default:throw Error(N(468,a))}s[nt]=e,Fe(s),a=s}e.stateNode=a}else Ug(r,e.type,e.stateNode);else e.stateNode=Mg(r,a,e.memoizedProps);else s!==a?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,a===null?Ug(r,e.type,e.stateNode):Mg(r,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Xu(e,e.memoizedProps,n.memoizedProps)}break;case 27:St(t,e),Et(e),a&512&&(Me||n===null||vn(n,n.return)),n!==null&&a&4&&Xu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(St(t,e),Et(e),a&512&&(Me||n===null||vn(n,n.return)),e.flags&32){r=e.stateNode;try{ks(r,"")}catch(h){ye(e,e.return,h)}}a&4&&e.stateNode!=null&&(r=e.memoizedProps,Xu(e,r,n!==null?n.memoizedProps:r)),a&1024&&(Zu=!0);break;case 6:if(St(t,e),Et(e),a&4){if(e.stateNode===null)throw Error(N(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(h){ye(e,e.return,h)}}break;case 3:if(Pl=null,r=Zt,Zt=yc(t.containerInfo),St(t,e),Zt=r,Et(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{no(t.containerInfo)}catch(h){ye(e,e.return,h)}Zu&&(Zu=!1,Ob(e));break;case 4:a=Zt,Zt=yc(e.stateNode.containerInfo),St(t,e),Et(e),Zt=a;break;case 12:St(t,e),Et(e);break;case 13:St(t,e),Et(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Kh=bn()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(e,a)));break;case 22:r=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,c=Un,d=Me;if(Un=c||r,Me=d||l,St(t,e),Me=d,Un=c,Et(e),a&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||l||Un||Me||ar(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(s=l.stateNode,r)i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{o=l.stateNode;var u=l.memoizedProps.style,f=u!=null&&u.hasOwnProperty("display")?u.display:null;o.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(h){ye(l,l.return,h)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=r?"":l.memoizedProps}catch(h){ye(l,l.return,h)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Ju(e,n))));break;case 19:St(t,e),Et(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(e,a)));break;case 30:break;case 21:break;default:St(t,e),Et(e)}}function Et(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Sb(a)){n=a;break}a=a.return}if(n==null)throw Error(N(160));switch(n.tag){case 27:var r=n.stateNode,s=Qu(e);dc(e,s,r);break;case 5:var i=n.stateNode;n.flags&32&&(ks(i,""),n.flags&=-33);var o=Qu(e);dc(e,o,i);break;case 3:case 4:var l=n.stateNode.containerInfo,c=Qu(e);hf(e,c,l);break;default:throw Error(N(161))}}catch(d){ye(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ob(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ob(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ia(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_b(e,t.alternate,t),t=t.sibling}function ar(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:$a(4,t,t.return),ar(t);break;case 1:vn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&wb(t,t.return,n),ar(t);break;case 27:Pi(t.stateNode);case 26:case 5:vn(t,t.return),ar(t);break;case 22:t.memoizedState===null&&ar(t);break;case 30:ar(t);break;default:ar(t)}e=e.sibling}}function la(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,r=e,s=t,i=s.flags;switch(s.tag){case 0:case 11:case 15:la(r,s,n),Co(4,s);break;case 1:if(la(r,s,n),a=s,r=a.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(c){ye(a,a.return,c)}if(a=s,r=a.updateQueue,r!==null){var o=a.stateNode;try{var l=r.shared.hiddenCallbacks;if(l!==null)for(r.shared.hiddenCallbacks=null,r=0;r<l.length;r++)_0(l[r],o)}catch(c){ye(a,a.return,c)}}n&&i&64&&bb(s),ji(s,s.return);break;case 27:Eb(s);case 26:case 5:la(r,s,n),n&&a===null&&i&4&&xb(s),ji(s,s.return);break;case 12:la(r,s,n);break;case 13:la(r,s,n),n&&i&4&&Cb(r,s);break;case 22:s.memoizedState===null&&la(r,s,n),ji(s,s.return);break;case 30:break;default:la(r,s,n)}t=t.sibling}}function Gh(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Eo(n))}function Fh(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Eo(e))}function cn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)kb(e,t,n,a),t=t.sibling}function kb(e,t,n,a){var r=t.flags;switch(t.tag){case 0:case 11:case 15:cn(e,t,n,a),r&2048&&Co(9,t);break;case 1:cn(e,t,n,a);break;case 3:cn(e,t,n,a),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Eo(e)));break;case 12:if(r&2048){cn(e,t,n,a),e=t.stateNode;try{var s=t.memoizedProps,i=s.id,o=s.onPostCommit;typeof o=="function"&&o(i,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(l){ye(t,t.return,l)}}else cn(e,t,n,a);break;case 13:cn(e,t,n,a);break;case 23:break;case 22:s=t.stateNode,i=t.alternate,t.memoizedState!==null?s._visibility&2?cn(e,t,n,a):Mi(e,t):s._visibility&2?cn(e,t,n,a):(s._visibility|=2,Fr(e,t,n,a,(t.subtreeFlags&10256)!==0)),r&2048&&Gh(i,t);break;case 24:cn(e,t,n,a),r&2048&&Fh(t.alternate,t);break;default:cn(e,t,n,a)}}function Fr(e,t,n,a,r){for(r=r&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var s=e,i=t,o=n,l=a,c=i.flags;switch(i.tag){case 0:case 11:case 15:Fr(s,i,o,l,r),Co(8,i);break;case 23:break;case 22:var d=i.stateNode;i.memoizedState!==null?d._visibility&2?Fr(s,i,o,l,r):Mi(s,i):(d._visibility|=2,Fr(s,i,o,l,r)),r&&c&2048&&Gh(i.alternate,i);break;case 24:Fr(s,i,o,l,r),r&&c&2048&&Fh(i.alternate,i);break;default:Fr(s,i,o,l,r)}t=t.sibling}}function Mi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,r=a.flags;switch(a.tag){case 22:Mi(n,a),r&2048&&Gh(a.alternate,a);break;case 24:Mi(n,a),r&2048&&Fh(a.alternate,a);break;default:Mi(n,a)}t=t.sibling}}var xi=8192;function Mr(e){if(e.subtreeFlags&xi)for(e=e.child;e!==null;)Nb(e),e=e.sibling}function Nb(e){switch(e.tag){case 26:Mr(e),e.flags&xi&&e.memoizedState!==null&&mA(Zt,e.memoizedState,e.memoizedProps);break;case 5:Mr(e);break;case 3:case 4:var t=Zt;Zt=yc(e.stateNode.containerInfo),Mr(e),Zt=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=xi,xi=16777216,Mr(e),xi=t):Mr(e));break;default:Mr(e)}}function Db(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function di(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];qe=a,Mb(a,e)}Db(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jb(e),e=e.sibling}function jb(e){switch(e.tag){case 0:case 11:case 15:di(e),e.flags&2048&&$a(9,e,e.return);break;case 3:di(e);break;case 12:di(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):di(e);break;default:di(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];qe=a,Mb(a,e)}Db(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:$a(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Mb(e,t){for(;qe!==null;){var n=qe;switch(n.tag){case 0:case 11:case 15:$a(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Eo(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,qe=a;else e:for(n=e;qe!==null;){a=qe;var r=a.sibling,s=a.return;if(Tb(a),a===n){qe=null;break e}if(r!==null){r.return=s,qe=r;break e}qe=s}}}var kT={getCacheForType:function(e){var t=at(ze),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},NT=typeof WeakMap=="function"?WeakMap:Map,me=0,we=null,se=null,le=0,he=0,Tt=null,Ra=!1,Vs=!1,Yh=!1,Qn=0,De=0,Ha=0,vr=0,Vh=0,It=0,Ls=0,Li=null,pt=null,mf=!1,Kh=0,fc=1/0,hc=null,ja=null,Ze=0,Ma=null,Us=null,hs=0,pf=0,gf=null,Lb=null,Ui=0,vf=null;function kt(){if(me&2&&le!==0)return le&-le;if(Y.T!==null){var e=Ns;return e!==0?e:Qh()}return Yy()}function Ub(){It===0&&(It=!(le&536870912)||de?Iy():536870912);var e=Gt.current;return e!==null&&(e.flags|=32),It}function Nt(e,t,n){(e===we&&(he===2||he===9)||e.cancelPendingCommit!==null)&&(Ps(e,0),Oa(e,le,It,!1)),yo(e,n),(!(me&2)||e!==we)&&(e===we&&(!(me&2)&&(vr|=n),De===4&&Oa(e,le,It,!1)),An(e))}function Pb(e,t,n){if(me&6)throw Error(N(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||vo(e,t),r=a?MT(e,t):Wu(e,t,!0),s=a;do{if(r===0){Vs&&!a&&Oa(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!DT(n)){r=Wu(e,t,!1),s=!1;continue}if(r===2){if(s=t,e.errorRecoveryDisabledLanes&s)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){t=i;e:{var o=e;r=Li;var l=o.current.memoizedState.isDehydrated;if(l&&(Ps(o,i).flags|=256),i=Wu(o,i,!1),i!==2){if(Yh&&!l){o.errorRecoveryDisabledLanes|=s,vr|=s,r=4;break e}s=pt,pt=r,s!==null&&(pt===null?pt=s:pt.push.apply(pt,s))}r=i}if(s=!1,r!==2)continue}}if(r===1){Ps(e,0),Oa(e,t,0,!0);break}e:{switch(a=e,s=r,s){case 0:case 1:throw Error(N(345));case 4:if((t&4194048)!==t)break;case 6:Oa(a,t,It,!Ra);break e;case 2:pt=null;break;case 3:case 5:break;default:throw Error(N(329))}if((t&62914560)===t&&(r=Kh+300-bn(),10<r)){if(Oa(a,t,It,!Ra),Mc(a,0,!0)!==0)break e;a.timeoutHandle=nw(bg.bind(null,a,n,pt,hc,mf,t,It,vr,Ls,Ra,s,2,-0,0),r);break e}bg(a,n,pt,hc,mf,t,It,vr,Ls,Ra,s,0,-0,0)}}break}while(!0);An(e)}function bg(e,t,n,a,r,s,i,o,l,c,d,u,f,h){if(e.timeoutHandle=-1,u=t.subtreeFlags,(u&8192||(u&16785408)===16785408)&&(Ji={stylesheets:null,count:0,unsuspend:hA},Nb(t),u=pA(),u!==null)){e.cancelPendingCommit=u(xg.bind(null,e,t,s,n,a,r,i,o,l,d,1,f,h)),Oa(e,s,i,!c);return}xg(e,t,s,n,a,r,i,o,l)}function DT(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var r=n[a],s=r.getSnapshot;r=r.value;try{if(!jt(s(),r))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 Oa(e,t,n,a){t&=~Vh,t&=~vr,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var r=t;0<r;){var s=31-Ot(r),i=1<<s;a[s]=-1,r&=~i}n!==0&&Gy(e,n,t)}function Gc(){return me&6?!0:(Ro(0),!1)}function Xh(){if(se!==null){if(he===0)var e=se.return;else e=se,$n=Rr=null,Lh(e),fs=null,Xi=0,e=se;for(;e!==null;)yb(e.alternate,e),e=e.return;se=null}}function Ps(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,QT(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Xh(),we=e,se=n=qn(e.current,null),le=t,he=0,Tt=null,Ra=!1,Vs=vo(e,t),Yh=!1,Ls=It=Vh=vr=Ha=De=0,pt=Li=null,mf=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var r=31-Ot(a),s=1<<r;t|=e[r],a&=~s}return Qn=t,zc(),n}function zb(e,t){ae=null,Y.H=ic,t===_o||t===$c?(t=Zp(),he=3):t===S0?(t=Zp(),he=4):he=t===fb?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tt=t,se===null&&(De=1,cc(e,Ht(t,e.current)))}function Bb(){var e=Y.H;return Y.H=ic,e===null?ic:e}function $b(){var e=Y.A;return Y.A=kT,e}function yf(){De=4,Ra||(le&4194048)!==le&&Gt.current!==null||(Vs=!0),!(Ha&134217727)&&!(vr&134217727)||we===null||Oa(we,le,It,!1)}function Wu(e,t,n){var a=me;me|=2;var r=Bb(),s=$b();(we!==e||le!==t)&&(hc=null,Ps(e,t)),t=!1;var i=De;e:do try{if(he!==0&&se!==null){var o=se,l=Tt;switch(he){case 8:Xh(),i=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(t=!0);var c=he;if(he=0,Tt=null,ss(e,o,l,c),n&&Vs){i=0;break e}break;default:c=he,he=0,Tt=null,ss(e,o,l,c)}}jT(),i=De;break}catch(d){zb(e,d)}while(!0);return t&&e.shellSuspendCounter++,$n=Rr=null,me=a,Y.H=r,Y.A=s,se===null&&(we=null,le=0,zc()),i}function jT(){for(;se!==null;)Hb(se)}function MT(e,t){var n=me;me|=2;var a=Bb(),r=$b();we!==e||le!==t?(hc=null,fc=bn()+500,Ps(e,t)):Vs=vo(e,t);e:do try{if(he!==0&&se!==null){t=se;var s=Tt;t:switch(he){case 1:he=0,Tt=null,ss(e,t,s,1);break;case 2:case 9:if(Qp(s)){he=0,Tt=null,wg(t);break}t=function(){he!==2&&he!==9||we!==e||(he=7),An(e)},s.then(t,t);break e;case 3:he=7;break e;case 4:he=5;break e;case 7:Qp(s)?(he=0,Tt=null,wg(t)):(he=0,Tt=null,ss(e,t,s,7));break;case 5:var i=null;switch(se.tag){case 26:i=se.memoizedState;case 5:case 27:var o=se;if(!i||iw(i)){he=0,Tt=null;var l=o.sibling;if(l!==null)se=l;else{var c=o.return;c!==null?(se=c,Fc(c)):se=null}break t}}he=0,Tt=null,ss(e,t,s,5);break;case 6:he=0,Tt=null,ss(e,t,s,6);break;case 8:Xh(),De=6;break e;default:throw Error(N(462))}}LT();break}catch(d){zb(e,d)}while(!0);return $n=Rr=null,Y.H=a,Y.A=r,me=n,se!==null?0:(we=null,le=0,zc(),De)}function LT(){for(;se!==null&&!a_();)Hb(se)}function Hb(e){var t=vb(e.alternate,e,Qn);e.memoizedProps=e.pendingProps,t===null?Fc(e):se=t}function wg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=hg(n,t,t.pendingProps,t.type,void 0,le);break;case 11:t=hg(n,t,t.pendingProps,t.type.render,t.ref,le);break;case 5:Lh(t);default:yb(n,t),t=se=y0(t,Qn),t=vb(n,t,Qn)}e.memoizedProps=e.pendingProps,t===null?Fc(e):se=t}function ss(e,t,n,a){$n=Rr=null,Lh(t),fs=null,Xi=0;var r=t.return;try{if(_T(e,r,t,n,le)){De=1,cc(e,Ht(n,e.current)),se=null;return}}catch(s){if(r!==null)throw se=r,s;De=1,cc(e,Ht(n,e.current)),se=null;return}t.flags&32768?(de||a===1?e=!0:Vs||le&536870912?e=!1:(Ra=e=!0,(a===2||a===9||a===3||a===6)&&(a=Gt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Ib(t,e)):Fc(t)}function Fc(e){var t=e;do{if(t.flags&32768){Ib(t,Ra);return}e=t.return;var n=AT(t.alternate,t,Qn);if(n!==null){se=n;return}if(t=t.sibling,t!==null){se=t;return}se=t=e}while(t!==null);De===0&&(De=5)}function Ib(e,t){do{var n=CT(e.alternate,e);if(n!==null){n.flags&=32767,se=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){se=e;return}se=e=n}while(e!==null);De=6,se=null}function xg(e,t,n,a,r,s,i,o,l){e.cancelPendingCommit=null;do Yc();while(Ze!==0);if(me&6)throw Error(N(327));if(t!==null){if(t===e.current)throw Error(N(177));if(s=t.lanes|t.childLanes,s|=Sh,h_(e,n,s,i,o,l),e===we&&(se=we=null,le=0),Us=t,Ma=e,hs=n,pf=s,gf=r,Lb=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,BT(Ql,function(){return Vb(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=Y.T,Y.T=null,r=fe.p,fe.p=2,i=me,me|=4;try{RT(e,t,n)}finally{me=i,fe.p=r,Y.T=a}}Ze=1,qb(),Gb(),Fb()}}function qb(){if(Ze===1){Ze=0;var e=Ma,t=Us,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=Y.T,Y.T=null;var a=fe.p;fe.p=2;var r=me;me|=4;try{Rb(t,e);var s=Sf,i=u0(e.containerInfo),o=s.focusedElem,l=s.selectionRange;if(i!==o&&o&&o.ownerDocument&&c0(o.ownerDocument.documentElement,o)){if(l!==null&&xh(o)){var c=l.start,d=l.end;if(d===void 0&&(d=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(d,o.value.length);else{var u=o.ownerDocument||document,f=u&&u.defaultView||window;if(f.getSelection){var h=f.getSelection(),x=o.textContent.length,y=Math.min(l.start,x),w=l.end===void 0?y:Math.min(l.end,x);!h.extend&&y>w&&(i=w,w=y,y=i);var g=Ip(o,y),v=Ip(o,w);if(g&&v&&(h.rangeCount!==1||h.anchorNode!==g.node||h.anchorOffset!==g.offset||h.focusNode!==v.node||h.focusOffset!==v.offset)){var b=u.createRange();b.setStart(g.node,g.offset),h.removeAllRanges(),y>w?(h.addRange(b),h.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),h.addRange(b))}}}}for(u=[],h=o;h=h.parentNode;)h.nodeType===1&&u.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<u.length;o++){var S=u[o];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}xc=!!xf,Sf=xf=null}finally{me=r,fe.p=a,Y.T=n}}e.current=t,Ze=2}}function Gb(){if(Ze===2){Ze=0;var e=Ma,t=Us,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=Y.T,Y.T=null;var a=fe.p;fe.p=2;var r=me;me|=4;try{_b(e,t.alternate,t)}finally{me=r,fe.p=a,Y.T=n}}Ze=3}}function Fb(){if(Ze===4||Ze===3){Ze=0,r_();var e=Ma,t=Us,n=hs,a=Lb;t.subtreeFlags&10256||t.flags&10256?Ze=5:(Ze=0,Us=Ma=null,Yb(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ja=null),mh(n),t=t.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(go,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=Y.T,r=fe.p,fe.p=2,Y.T=null;try{for(var s=e.onRecoverableError,i=0;i<a.length;i++){var o=a[i];s(o.value,{componentStack:o.stack})}}finally{Y.T=t,fe.p=r}}hs&3&&Yc(),An(e),r=e.pendingLanes,n&4194090&&r&42?e===vf?Ui++:(Ui=0,vf=e):Ui=0,Ro(0)}}function Yb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Eo(t)))}function Yc(e){return qb(),Gb(),Fb(),Vb()}function Vb(){if(Ze!==5)return!1;var e=Ma,t=pf;pf=0;var n=mh(hs),a=Y.T,r=fe.p;try{fe.p=32>n?32:n,Y.T=null,n=gf,gf=null;var s=Ma,i=hs;if(Ze=0,Us=Ma=null,hs=0,me&6)throw Error(N(331));var o=me;if(me|=4,jb(s.current),kb(s,s.current,i,n),me=o,Ro(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(go,s)}catch{}return!0}finally{fe.p=r,Y.T=a,Yb(e,t)}}function Sg(e,t,n){t=Ht(n,t),t=uf(e.stateNode,t,2),e=Da(e,t,2),e!==null&&(yo(e,2),An(e))}function ye(e,t,n){if(e.tag===3)Sg(e,e,n);else for(;t!==null;){if(t.tag===3){Sg(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ja===null||!ja.has(a))){e=Ht(n,e),n=ub(2),a=Da(t,n,2),a!==null&&(db(n,a,t,e),yo(a,2),An(a));break}}t=t.return}}function ed(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new NT;var r=new Set;a.set(t,r)}else r=a.get(t),r===void 0&&(r=new Set,a.set(t,r));r.has(n)||(Yh=!0,r.add(n),e=UT.bind(null,e,t,n),t.then(e,e))}function UT(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,we===e&&(le&n)===n&&(De===4||De===3&&(le&62914560)===le&&300>bn()-Kh?!(me&2)&&Ps(e,0):Vh|=n,Ls===le&&(Ls=0)),An(e)}function Kb(e,t){t===0&&(t=qy()),e=Ys(e,t),e!==null&&(yo(e,t),An(e))}function PT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kb(e,n)}function zT(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(N(314))}a!==null&&a.delete(t),Kb(e,n)}function BT(e,t){return fh(e,t)}var mc=null,Yr=null,bf=!1,pc=!1,td=!1,yr=0;function An(e){e!==Yr&&e.next===null&&(Yr===null?mc=Yr=e:Yr=Yr.next=e),pc=!0,bf||(bf=!0,HT())}function Ro(e,t){if(!td&&pc){td=!0;do for(var n=!1,a=mc;a!==null;){if(e!==0){var r=a.pendingLanes;if(r===0)var s=0;else{var i=a.suspendedLanes,o=a.pingedLanes;s=(1<<31-Ot(42|e)+1)-1,s&=r&~(i&~o),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,Eg(a,s))}else s=le,s=Mc(a,a===we?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(s&3)||vo(a,s)||(n=!0,Eg(a,s));a=a.next}while(n);td=!1}}function $T(){Xb()}function Xb(){pc=bf=!1;var e=0;yr!==0&&(XT()&&(e=yr),yr=0);for(var t=bn(),n=null,a=mc;a!==null;){var r=a.next,s=Qb(a,t);s===0?(a.next=null,n===null?mc=r:n.next=r,r===null&&(Yr=n)):(n=a,(e!==0||s&3)&&(pc=!0)),a=r}Ro(e)}function Qb(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var i=31-Ot(s),o=1<<i,l=r[i];l===-1?(!(o&n)||o&a)&&(r[i]=f_(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}if(t=we,n=le,n=Mc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(he===2||he===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Cu(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||vo(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Cu(a),mh(n)){case 2:case 8:n=$y;break;case 32:n=Ql;break;case 268435456:n=Hy;break;default:n=Ql}return a=Zb.bind(null,e),n=fh(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Cu(a),e.callbackPriority=2,e.callbackNode=null,2}function Zb(e,t){if(Ze!==0&&Ze!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yc()&&e.callbackNode!==n)return null;var a=le;return a=Mc(e,e===we?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Pb(e,a,t),Qb(e,bn()),e.callbackNode!=null&&e.callbackNode===n?Zb.bind(null,e):null)}function Eg(e,t){if(Yc())return null;Pb(e,t,!0)}function HT(){ZT(function(){me&6?fh(By,$T):Xb()})}function Qh(){return yr===0&&(yr=Iy()),yr}function _g(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Cl(""+e)}function Tg(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function IT(e,t,n,a,r){if(t==="submit"&&n&&n.stateNode===r){var s=_g((r[yt]||null).action),i=a.submitter;i&&(t=(t=i[yt]||null)?_g(t.formAction):i.getAttribute("formAction"),t!==null&&(s=t,i=null));var o=new Lc("action","action",null,a,r);e.push({event:o,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(yr!==0){var l=i?Tg(r,i):new FormData(r);lf(n,{pending:!0,data:l,method:r.method,action:s},null,l)}}else typeof s=="function"&&(o.preventDefault(),l=i?Tg(r,i):new FormData(r),lf(n,{pending:!0,data:l,method:r.method,action:s},s,l))},currentTarget:r}]})}}for(var nd=0;nd<Xd.length;nd++){var ad=Xd[nd],qT=ad.toLowerCase(),GT=ad[0].toUpperCase()+ad.slice(1);an(qT,"on"+GT)}an(f0,"onAnimationEnd");an(h0,"onAnimationIteration");an(m0,"onAnimationStart");an("dblclick","onDoubleClick");an("focusin","onFocus");an("focusout","onBlur");an(oT,"onTransitionRun");an(lT,"onTransitionStart");an(cT,"onTransitionCancel");an(p0,"onTransitionEnd");Os("onMouseEnter",["mouseout","mouseover"]);Os("onMouseLeave",["mouseout","mouseover"]);Os("onPointerEnter",["pointerout","pointerover"]);Os("onPointerLeave",["pointerout","pointerover"]);Tr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Tr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Tr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Tr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Tr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Tr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qi="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(" "),FT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qi));function Jb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],r=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var i=a.length-1;0<=i;i--){var o=a[i],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&r.isPropagationStopped())break e;s=o,r.currentTarget=c;try{s(r)}catch(d){lc(d)}r.currentTarget=null,s=l}else for(i=0;i<a.length;i++){if(o=a[i],l=o.instance,c=o.currentTarget,o=o.listener,l!==s&&r.isPropagationStopped())break e;s=o,r.currentTarget=c;try{s(r)}catch(d){lc(d)}r.currentTarget=null,s=l}}}}function re(e,t){var n=t[Id];n===void 0&&(n=t[Id]=new Set);var a=e+"__bubble";n.has(a)||(Wb(t,e,2,!1),n.add(a))}function rd(e,t,n){var a=0;t&&(a|=4),Wb(n,e,a,t)}var rl="_reactListening"+Math.random().toString(36).slice(2);function Zh(e){if(!e[rl]){e[rl]=!0,Vy.forEach(function(n){n!=="selectionchange"&&(FT.has(n)||rd(n,!1,e),rd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[rl]||(t[rl]=!0,rd("selectionchange",!1,t))}}function Wb(e,t,n,a){switch(dw(t)){case 2:var r=yA;break;case 8:r=bA;break;default:r=tm}n=r.bind(null,t,n,e),r=void 0,!Yd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),a?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function sd(e,t,n,a,r){var s=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var o=a.stateNode.containerInfo;if(o===r)break;if(i===4)for(i=a.return;i!==null;){var l=i.tag;if((l===3||l===4)&&i.stateNode.containerInfo===r)return;i=i.return}for(;o!==null;){if(i=Qr(o),i===null)return;if(l=i.tag,l===5||l===6||l===26||l===27){a=s=i;continue e}o=o.parentNode}}a=a.return}t0(function(){var c=s,d=vh(n),u=[];e:{var f=g0.get(e);if(f!==void 0){var h=Lc,x=e;switch(e){case"keypress":if(Ol(n)===0)break e;case"keydown":case"keyup":h=B_;break;case"focusin":x="focus",h=Lu;break;case"focusout":x="blur",h=Lu;break;case"beforeblur":case"afterblur":h=Lu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Dp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=C_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=I_;break;case f0:case h0:case m0:h=k_;break;case p0:h=G_;break;case"scroll":case"scrollend":h=T_;break;case"wheel":h=Y_;break;case"copy":case"cut":case"paste":h=D_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Mp;break;case"toggle":case"beforetoggle":h=K_}var y=(t&4)!==0,w=!y&&(e==="scroll"||e==="scrollend"),g=y?f!==null?f+"Capture":null:f;y=[];for(var v=c,b;v!==null;){var S=v;if(b=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||b===null||g===null||(S=Gi(v,g),S!=null&&y.push(Zi(v,S,b))),w)break;v=v.return}0<y.length&&(f=new h(f,x,null,n,d),u.push({event:f,listeners:y}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Fd&&(x=n.relatedTarget||n.fromElement)&&(Qr(x)||x[Gs]))break e;if((h||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,h?(x=n.relatedTarget||n.toElement,h=c,x=x?Qr(x):null,x!==null&&(w=po(x),y=x.tag,x!==w||y!==5&&y!==27&&y!==6)&&(x=null)):(h=null,x=c),h!==x)){if(y=Dp,S="onMouseLeave",g="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(y=Mp,S="onPointerLeave",g="onPointerEnter",v="pointer"),w=h==null?f:wi(h),b=x==null?f:wi(x),f=new y(S,v+"leave",h,n,d),f.target=w,f.relatedTarget=b,S=null,Qr(d)===c&&(y=new y(g,v+"enter",x,n,d),y.target=b,y.relatedTarget=w,S=y),w=S,h&&x)t:{for(y=h,g=x,v=0,b=y;b;b=Lr(b))v++;for(b=0,S=g;S;S=Lr(S))b++;for(;0<v-b;)y=Lr(y),v--;for(;0<b-v;)g=Lr(g),b--;for(;v--;){if(y===g||g!==null&&y===g.alternate)break t;y=Lr(y),g=Lr(g)}y=null}else y=null;h!==null&&Ag(u,f,h,y,!1),x!==null&&w!==null&&Ag(u,w,x,y,!0)}}e:{if(f=c?wi(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var E=zp;else if(Pp(f))if(o0)E=rT;else{E=nT;var _=tT}else h=f.nodeName,!h||h.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?c&&gh(c.elementType)&&(E=zp):E=aT;if(E&&(E=E(e,c))){i0(u,E,n,d);break e}_&&_(e,f,c),e==="focusout"&&c&&f.type==="number"&&c.memoizedProps.value!=null&&Gd(f,"number",f.value)}switch(_=c?wi(c):window,e){case"focusin":(Pp(_)||_.contentEditable==="true")&&(Wr=_,Vd=c,Ai=null);break;case"focusout":Ai=Vd=Wr=null;break;case"mousedown":Kd=!0;break;case"contextmenu":case"mouseup":case"dragend":Kd=!1,qp(u,n,d);break;case"selectionchange":if(iT)break;case"keydown":case"keyup":qp(u,n,d)}var A;if(wh)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 Jr?r0(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(a0&&n.locale!=="ko"&&(Jr||T!=="onCompositionStart"?T==="onCompositionEnd"&&Jr&&(A=n0()):(Ca=d,yh="value"in Ca?Ca.value:Ca.textContent,Jr=!0)),_=gc(c,T),0<_.length&&(T=new jp(T,e,null,n,d),u.push({event:T,listeners:_}),A?T.data=A:(A=s0(n),A!==null&&(T.data=A)))),(A=Q_?Z_(e,n):J_(e,n))&&(T=gc(c,"onBeforeInput"),0<T.length&&(_=new jp("onBeforeInput","beforeinput",null,n,d),u.push({event:_,listeners:T}),_.data=A)),IT(u,e,c,n,d)}Jb(u,t)})}function Zi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gc(e,t){for(var n=t+"Capture",a=[];e!==null;){var r=e,s=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||s===null||(r=Gi(e,n),r!=null&&a.unshift(Zi(e,r,s)),r=Gi(e,t),r!=null&&a.push(Zi(e,r,s))),e.tag===3)return a;e=e.return}return[]}function Lr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ag(e,t,n,a,r){for(var s=t._reactName,i=[];n!==null&&n!==a;){var o=n,l=o.alternate,c=o.stateNode;if(o=o.tag,l!==null&&l===a)break;o!==5&&o!==26&&o!==27||c===null||(l=c,r?(c=Gi(n,s),c!=null&&i.unshift(Zi(n,c,l))):r||(c=Gi(n,s),c!=null&&i.push(Zi(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var YT=/\r\n?/g,VT=/\u0000|\uFFFD/g;function Cg(e){return(typeof e=="string"?e:""+e).replace(YT,`
|
|
49
|
+
`).replace(VT,"")}function ew(e,t){return t=Cg(t),Cg(e)===t}function Vc(){}function ge(e,t,n,a,r,s){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ks(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ks(e,""+a);break;case"className":Zo(e,"class",a);break;case"tabIndex":Zo(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Zo(e,n,a);break;case"style":e0(e,a,s);break;case"data":if(t!=="object"){Zo(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Cl(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(n==="formAction"?(t!=="input"&&ge(e,t,"name",r.name,r,null),ge(e,t,"formEncType",r.formEncType,r,null),ge(e,t,"formMethod",r.formMethod,r,null),ge(e,t,"formTarget",r.formTarget,r,null)):(ge(e,t,"encType",r.encType,r,null),ge(e,t,"method",r.method,r,null),ge(e,t,"target",r.target,r,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Cl(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Vc);break;case"onScroll":a!=null&&re("scroll",e);break;case"onScrollEnd":a!=null&&re("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(N(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(N(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=Cl(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":re("beforetoggle",e),re("toggle",e),Al(e,"popover",a);break;case"xlinkActuate":On(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":On(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":On(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":On(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":On(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":On(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":On(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":On(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":On(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Al(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=E_.get(n)||n,Al(e,n,a))}}function wf(e,t,n,a,r,s){switch(n){case"style":e0(e,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(N(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(N(60));e.innerHTML=n}}break;case"children":typeof a=="string"?ks(e,a):(typeof a=="number"||typeof a=="bigint")&&ks(e,""+a);break;case"onScroll":a!=null&&re("scroll",e);break;case"onScrollEnd":a!=null&&re("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Vc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ky.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),s=e[yt]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,r),typeof a=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,r);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):Al(e,n,a)}}}function Je(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":re("error",e),re("load",e);var a=!1,r=!1,s;for(s in n)if(n.hasOwnProperty(s)){var i=n[s];if(i!=null)switch(s){case"src":a=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(N(137,t));default:ge(e,t,s,i,n,null)}}r&&ge(e,t,"srcSet",n.srcSet,n,null),a&&ge(e,t,"src",n.src,n,null);return;case"input":re("invalid",e);var o=s=i=r=null,l=null,c=null;for(a in n)if(n.hasOwnProperty(a)){var d=n[a];if(d!=null)switch(a){case"name":r=d;break;case"type":i=d;break;case"checked":l=d;break;case"defaultChecked":c=d;break;case"value":s=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(N(137,t));break;default:ge(e,t,a,d,n,null)}}Zy(e,s,o,l,c,i,r,!1),Zl(e);return;case"select":re("invalid",e),a=i=s=null;for(r in n)if(n.hasOwnProperty(r)&&(o=n[r],o!=null))switch(r){case"value":s=o;break;case"defaultValue":i=o;break;case"multiple":a=o;default:ge(e,t,r,o,n,null)}t=s,n=i,e.multiple=!!a,t!=null?os(e,!!a,t,!1):n!=null&&os(e,!!a,n,!0);return;case"textarea":re("invalid",e),s=r=a=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":a=o;break;case"defaultValue":r=o;break;case"children":s=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(N(91));break;default:ge(e,t,i,o,n,null)}Wy(e,a,r,s),Zl(e);return;case"option":for(l in n)if(n.hasOwnProperty(l)&&(a=n[l],a!=null))switch(l){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:ge(e,t,l,a,n,null)}return;case"dialog":re("beforetoggle",e),re("toggle",e),re("cancel",e),re("close",e);break;case"iframe":case"object":re("load",e);break;case"video":case"audio":for(a=0;a<Qi.length;a++)re(Qi[a],e);break;case"image":re("error",e),re("load",e);break;case"details":re("toggle",e);break;case"embed":case"source":case"link":re("error",e),re("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(N(137,t));default:ge(e,t,c,a,n,null)}return;default:if(gh(t)){for(d in n)n.hasOwnProperty(d)&&(a=n[d],a!==void 0&&wf(e,t,d,a,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(a=n[o],a!=null&&ge(e,t,o,a,n,null))}function KT(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,s=null,i=null,o=null,l=null,c=null,d=null;for(h in n){var u=n[h];if(n.hasOwnProperty(h)&&u!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=u;default:a.hasOwnProperty(h)||ge(e,t,h,null,a,u)}}for(var f in a){var h=a[f];if(u=n[f],a.hasOwnProperty(f)&&(h!=null||u!=null))switch(f){case"type":s=h;break;case"name":r=h;break;case"checked":c=h;break;case"defaultChecked":d=h;break;case"value":i=h;break;case"defaultValue":o=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(N(137,t));break;default:h!==u&&ge(e,t,f,h,a,u)}}qd(e,i,o,l,c,d,s,r);return;case"select":h=i=o=f=null;for(s in n)if(l=n[s],n.hasOwnProperty(s)&&l!=null)switch(s){case"value":break;case"multiple":h=l;default:a.hasOwnProperty(s)||ge(e,t,s,null,a,l)}for(r in a)if(s=a[r],l=n[r],a.hasOwnProperty(r)&&(s!=null||l!=null))switch(r){case"value":f=s;break;case"defaultValue":o=s;break;case"multiple":i=s;default:s!==l&&ge(e,t,r,s,a,l)}t=o,n=i,a=h,f!=null?os(e,!!n,f,!1):!!a!=!!n&&(t!=null?os(e,!!n,t,!0):os(e,!!n,n?[]:"",!1));return;case"textarea":h=f=null;for(o in n)if(r=n[o],n.hasOwnProperty(o)&&r!=null&&!a.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:ge(e,t,o,null,a,r)}for(i in a)if(r=a[i],s=n[i],a.hasOwnProperty(i)&&(r!=null||s!=null))switch(i){case"value":f=r;break;case"defaultValue":h=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(N(91));break;default:r!==s&&ge(e,t,i,r,a,s)}Jy(e,f,h);return;case"option":for(var x in n)if(f=n[x],n.hasOwnProperty(x)&&f!=null&&!a.hasOwnProperty(x))switch(x){case"selected":e.selected=!1;break;default:ge(e,t,x,null,a,f)}for(l in a)if(f=a[l],h=n[l],a.hasOwnProperty(l)&&f!==h&&(f!=null||h!=null))switch(l){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:ge(e,t,l,f,a,h)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var y in n)f=n[y],n.hasOwnProperty(y)&&f!=null&&!a.hasOwnProperty(y)&&ge(e,t,y,null,a,f);for(c in a)if(f=a[c],h=n[c],a.hasOwnProperty(c)&&f!==h&&(f!=null||h!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(N(137,t));break;default:ge(e,t,c,f,a,h)}return;default:if(gh(t)){for(var w in n)f=n[w],n.hasOwnProperty(w)&&f!==void 0&&!a.hasOwnProperty(w)&&wf(e,t,w,void 0,a,f);for(d in a)f=a[d],h=n[d],!a.hasOwnProperty(d)||f===h||f===void 0&&h===void 0||wf(e,t,d,f,a,h);return}}for(var g in n)f=n[g],n.hasOwnProperty(g)&&f!=null&&!a.hasOwnProperty(g)&&ge(e,t,g,null,a,f);for(u in a)f=a[u],h=n[u],!a.hasOwnProperty(u)||f===h||f==null&&h==null||ge(e,t,u,f,a,h)}var xf=null,Sf=null;function vc(e){return e.nodeType===9?e:e.ownerDocument}function Rg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function tw(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Ef(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var id=null;function XT(){var e=window.event;return e&&e.type==="popstate"?e===id?!1:(id=e,!0):(id=null,!1)}var nw=typeof setTimeout=="function"?setTimeout:void 0,QT=typeof clearTimeout=="function"?clearTimeout:void 0,Og=typeof Promise=="function"?Promise:void 0,ZT=typeof queueMicrotask=="function"?queueMicrotask:typeof Og<"u"?function(e){return Og.resolve(null).then(e).catch(JT)}:nw;function JT(e){setTimeout(function(){throw e})}function Ya(e){return e==="head"}function kg(e,t){var n=t,a=0,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(0<a&&8>a){n=a;var i=e.ownerDocument;if(n&1&&Pi(i.documentElement),n&2&&Pi(i.body),n&4)for(n=i.head,Pi(n),i=n.firstChild;i;){var o=i.nextSibling,l=i.nodeName;i[bo]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=o}}if(r===0){e.removeChild(s),no(t);return}r--}else n==="$"||n==="$?"||n==="$!"?r++:a=n.charCodeAt(0)-48;else a=0;n=s}while(n);no(t)}function _f(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":_f(n),ph(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function WT(e,t,n,a){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[bo])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Wt(e.nextSibling),e===null)break}return null}function eA(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Wt(e.nextSibling),e===null))return null;return e}function Tf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function tA(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Wt(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==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Af=null;function Ng(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function aw(e,t,n){switch(t=vc(n),e){case"html":if(e=t.documentElement,!e)throw Error(N(452));return e;case"head":if(e=t.head,!e)throw Error(N(453));return e;case"body":if(e=t.body,!e)throw Error(N(454));return e;default:throw Error(N(451))}}function Pi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ph(e)}var Ft=new Map,Dg=new Set;function yc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ea=fe.d;fe.d={f:nA,r:aA,D:rA,C:sA,L:iA,m:oA,X:cA,S:lA,M:uA};function nA(){var e=ea.f(),t=Gc();return e||t}function aA(e){var t=Fs(e);t!==null&&t.tag===5&&t.type==="form"?Q0(t):ea.r(e)}var Ks=typeof document>"u"?null:document;function rw(e,t,n){var a=Ks;if(a&&typeof t=="string"&&t){var r=$t(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),Dg.has(r)||(Dg.add(r),e={rel:e,crossOrigin:n,href:t},a.querySelector(r)===null&&(t=a.createElement("link"),Je(t,"link",e),Fe(t),a.head.appendChild(t)))}}function rA(e){ea.D(e),rw("dns-prefetch",e,null)}function sA(e,t){ea.C(e,t),rw("preconnect",e,t)}function iA(e,t,n){ea.L(e,t,n);var a=Ks;if(a&&e&&t){var r='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+$t(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+$t(n.imageSizes)+'"]')):r+='[href="'+$t(e)+'"]';var s=r;switch(t){case"style":s=zs(e);break;case"script":s=Xs(e)}Ft.has(s)||(e=xe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Ft.set(s,e),a.querySelector(r)!==null||t==="style"&&a.querySelector(Oo(s))||t==="script"&&a.querySelector(ko(s))||(t=a.createElement("link"),Je(t,"link",e),Fe(t),a.head.appendChild(t)))}}function oA(e,t){ea.m(e,t);var n=Ks;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+$t(a)+'"][href="'+$t(e)+'"]',s=r;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Xs(e)}if(!Ft.has(s)&&(e=xe({rel:"modulepreload",href:e},t),Ft.set(s,e),n.querySelector(r)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(ko(s)))return}a=n.createElement("link"),Je(a,"link",e),Fe(a),n.head.appendChild(a)}}}function lA(e,t,n){ea.S(e,t,n);var a=Ks;if(a&&e){var r=is(a).hoistableStyles,s=zs(e);t=t||"default";var i=r.get(s);if(!i){var o={loading:0,preload:null};if(i=a.querySelector(Oo(s)))o.loading=5;else{e=xe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Ft.get(s))&&Jh(e,n);var l=i=a.createElement("link");Fe(l),Je(l,"link",e),l._p=new Promise(function(c,d){l.onload=c,l.onerror=d}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Ul(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:o},r.set(s,i)}}}function cA(e,t){ea.X(e,t);var n=Ks;if(n&&e){var a=is(n).hoistableScripts,r=Xs(e),s=a.get(r);s||(s=n.querySelector(ko(r)),s||(e=xe({src:e,async:!0},t),(t=Ft.get(r))&&Wh(e,t),s=n.createElement("script"),Fe(s),Je(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(r,s))}}function uA(e,t){ea.M(e,t);var n=Ks;if(n&&e){var a=is(n).hoistableScripts,r=Xs(e),s=a.get(r);s||(s=n.querySelector(ko(r)),s||(e=xe({src:e,async:!0,type:"module"},t),(t=Ft.get(r))&&Wh(e,t),s=n.createElement("script"),Fe(s),Je(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(r,s))}}function jg(e,t,n,a){var r=(r=ka.current)?yc(r):null;if(!r)throw Error(N(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=zs(n.href),n=is(r).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=zs(n.href);var s=is(r).hoistableStyles,i=s.get(e);if(i||(r=r.ownerDocument||r,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,i),(s=r.querySelector(Oo(e)))&&!s._p&&(i.instance=s,i.state.loading=5),Ft.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ft.set(e,n),s||dA(r,e,n,i.state))),t&&a===null)throw Error(N(528,""));return i}if(t&&a!==null)throw Error(N(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Xs(n),n=is(r).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(N(444,e))}}function zs(e){return'href="'+$t(e)+'"'}function Oo(e){return'link[rel="stylesheet"]['+e+"]"}function sw(e){return xe({},e,{"data-precedence":e.precedence,precedence:null})}function dA(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Je(t,"link",n),Fe(t),e.head.appendChild(t))}function Xs(e){return'[src="'+$t(e)+'"]'}function ko(e){return"script[async]"+e}function Mg(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+$t(n.href)+'"]');if(a)return t.instance=a,Fe(a),a;var r=xe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Fe(a),Je(a,"style",r),Ul(a,n.precedence,e),t.instance=a;case"stylesheet":r=zs(n.href);var s=e.querySelector(Oo(r));if(s)return t.state.loading|=4,t.instance=s,Fe(s),s;a=sw(n),(r=Ft.get(r))&&Jh(a,r),s=(e.ownerDocument||e).createElement("link"),Fe(s);var i=s;return i._p=new Promise(function(o,l){i.onload=o,i.onerror=l}),Je(s,"link",a),t.state.loading|=4,Ul(s,n.precedence,e),t.instance=s;case"script":return s=Xs(n.src),(r=e.querySelector(ko(s)))?(t.instance=r,Fe(r),r):(a=n,(r=Ft.get(s))&&(a=xe({},n),Wh(a,r)),e=e.ownerDocument||e,r=e.createElement("script"),Fe(r),Je(r,"link",a),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(N(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,Ul(a,n.precedence,e));return t.instance}function Ul(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=a.length?a[a.length-1]:null,s=r,i=0;i<a.length;i++){var o=a[i];if(o.dataset.precedence===t)s=o;else if(s!==r)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Jh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Wh(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Pl=null;function Lg(e,t,n){if(Pl===null){var a=new Map,r=Pl=new Map;r.set(n,a)}else r=Pl,a=r.get(n),a||(a=new Map,r.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var s=n[r];if(!(s[bo]||s[nt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var i=s.getAttribute(t)||"";i=e+i;var o=a.get(i);o?o.push(s):a.set(i,[s])}}return a}function Ug(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function fA(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function iw(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Ji=null;function hA(){}function mA(e,t,n){if(Ji===null)throw Error(N(475));var a=Ji;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var r=zs(n.href),s=e.querySelector(Oo(r));if(s){e=s._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=bc.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=s,Fe(s);return}s=e.ownerDocument||e,n=sw(n),(r=Ft.get(r))&&Jh(n,r),s=s.createElement("link"),Fe(s);var i=s;i._p=new Promise(function(o,l){i.onload=o,i.onerror=l}),Je(s,"link",n),t.instance=s}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(a.count++,t=bc.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function pA(){if(Ji===null)throw Error(N(475));var e=Ji;return e.stylesheets&&e.count===0&&Cf(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&Cf(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function bc(){if(this.count--,this.count===0){if(this.stylesheets)Cf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var wc=null;function Cf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,wc=new Map,t.forEach(gA,e),wc=null,bc.call(e))}function gA(e,t){if(!(t.state.loading&4)){var n=wc.get(e);if(n)var a=n.get(null);else{n=new Map,wc.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<r.length;s++){var i=r[s];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(n.set(i.dataset.precedence,i),a=i)}a&&n.set(null,a)}r=t.instance,i=r.getAttribute("data-precedence"),s=n.get(i)||a,s===a&&n.set(null,r),n.set(i,r),this.count++,a=bc.bind(this),r.addEventListener("load",a),r.addEventListener("error",a),s?s.parentNode.insertBefore(r,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Wi={$$typeof:Pn,Provider:null,Consumer:null,_currentValue:fr,_currentValue2:fr,_threadCount:0};function vA(e,t,n,a,r,s,i,o){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ru(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ru(0),this.hiddenUpdates=Ru(null),this.identifierPrefix=a,this.onUncaughtError=r,this.onCaughtError=s,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function ow(e,t,n,a,r,s,i,o,l,c,d,u){return e=new vA(e,t,n,i,o,l,c,u),t=1,s===!0&&(t|=24),s=Ct(3,null,null,t),e.current=s,s.stateNode=e,t=Ch(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:n,cache:t},Oh(s),e}function lw(e){return e?(e=ns,e):ns}function cw(e,t,n,a,r,s){r=lw(r),a.context===null?a.context=r:a.pendingContext=r,a=Na(t),a.payload={element:n},s=s===void 0?null:s,s!==null&&(a.callback=s),n=Da(e,a,t),n!==null&&(Nt(n,e,t),Oi(n,e,t))}function Pg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function em(e,t){Pg(e,t),(e=e.alternate)&&Pg(e,t)}function uw(e){if(e.tag===13){var t=Ys(e,67108864);t!==null&&Nt(t,e,67108864),em(e,67108864)}}var xc=!0;function yA(e,t,n,a){var r=Y.T;Y.T=null;var s=fe.p;try{fe.p=2,tm(e,t,n,a)}finally{fe.p=s,Y.T=r}}function bA(e,t,n,a){var r=Y.T;Y.T=null;var s=fe.p;try{fe.p=8,tm(e,t,n,a)}finally{fe.p=s,Y.T=r}}function tm(e,t,n,a){if(xc){var r=Rf(a);if(r===null)sd(e,t,a,Sc,n),zg(e,a);else if(xA(r,e,t,n,a))a.stopPropagation();else if(zg(e,a),t&4&&-1<wA.indexOf(e)){for(;r!==null;){var s=Fs(r);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var i=tr(s.pendingLanes);if(i!==0){var o=s;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var l=1<<31-Ot(i);o.entanglements[1]|=l,i&=~l}An(s),!(me&6)&&(fc=bn()+500,Ro(0))}}break;case 13:o=Ys(s,2),o!==null&&Nt(o,s,2),Gc(),em(s,2)}if(s=Rf(a),s===null&&sd(e,t,a,Sc,n),s===r)break;r=s}r!==null&&a.stopPropagation()}else sd(e,t,a,null,n)}}function Rf(e){return e=vh(e),nm(e)}var Sc=null;function nm(e){if(Sc=null,e=Qr(e),e!==null){var t=po(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Ly(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Sc=e,null}function dw(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(s_()){case By:return 2;case $y:return 8;case Ql:case i_:return 32;case Hy:return 268435456;default:return 32}default:return 32}}var Of=!1,La=null,Ua=null,Pa=null,eo=new Map,to=new Map,ba=[],wA="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".split(" ");function zg(e,t){switch(e){case"focusin":case"focusout":La=null;break;case"dragenter":case"dragleave":Ua=null;break;case"mouseover":case"mouseout":Pa=null;break;case"pointerover":case"pointerout":eo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":to.delete(t.pointerId)}}function fi(e,t,n,a,r,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:s,targetContainers:[r]},t!==null&&(t=Fs(t),t!==null&&uw(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function xA(e,t,n,a,r){switch(t){case"focusin":return La=fi(La,e,t,n,a,r),!0;case"dragenter":return Ua=fi(Ua,e,t,n,a,r),!0;case"mouseover":return Pa=fi(Pa,e,t,n,a,r),!0;case"pointerover":var s=r.pointerId;return eo.set(s,fi(eo.get(s)||null,e,t,n,a,r)),!0;case"gotpointercapture":return s=r.pointerId,to.set(s,fi(to.get(s)||null,e,t,n,a,r)),!0}return!1}function fw(e){var t=Qr(e.target);if(t!==null){var n=po(t);if(n!==null){if(t=n.tag,t===13){if(t=Ly(n),t!==null){e.blockedOn=t,m_(e.priority,function(){if(n.tag===13){var a=kt();a=hh(a);var r=Ys(n,a);r!==null&&Nt(r,n,a),em(n,a)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Rf(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Fd=a,n.target.dispatchEvent(a),Fd=null}else return t=Fs(n),t!==null&&uw(t),e.blockedOn=n,!1;t.shift()}return!0}function Bg(e,t,n){zl(e)&&n.delete(t)}function SA(){Of=!1,La!==null&&zl(La)&&(La=null),Ua!==null&&zl(Ua)&&(Ua=null),Pa!==null&&zl(Pa)&&(Pa=null),eo.forEach(Bg),to.forEach(Bg)}function sl(e,t){e.blockedOn===t&&(e.blockedOn=null,Of||(Of=!0,$e.unstable_scheduleCallback($e.unstable_NormalPriority,SA)))}var il=null;function $g(e){il!==e&&(il=e,$e.unstable_scheduleCallback($e.unstable_NormalPriority,function(){il===e&&(il=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],r=e[t+2];if(typeof a!="function"){if(nm(a||n)===null)continue;break}var s=Fs(n);s!==null&&(e.splice(t,3),t-=3,lf(s,{pending:!0,data:r,method:n.method,action:a},a,r))}}))}function no(e){function t(l){return sl(l,e)}La!==null&&sl(La,e),Ua!==null&&sl(Ua,e),Pa!==null&&sl(Pa,e),eo.forEach(t),to.forEach(t);for(var n=0;n<ba.length;n++){var a=ba[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ba.length&&(n=ba[0],n.blockedOn===null);)fw(n),n.blockedOn===null&&ba.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var r=n[a],s=n[a+1],i=r[yt]||null;if(typeof s=="function")i||$g(n);else if(i){var o=null;if(s&&s.hasAttribute("formAction")){if(r=s,i=s[yt]||null)o=i.formAction;else if(nm(r)!==null)continue}else o=i.action;typeof o=="function"?n[a+1]=o:(n.splice(a,3),a-=3),$g(n)}}}function am(e){this._internalRoot=e}Kc.prototype.render=am.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(N(409));var n=t.current,a=kt();cw(n,a,e,t,null,null)};Kc.prototype.unmount=am.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cw(e.current,2,null,e,null,null),Gc(),t[Gs]=null}};function Kc(e){this._internalRoot=e}Kc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yy();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ba.length&&t!==0&&t<ba[n].priority;n++);ba.splice(n,0,e),n===0&&fw(e)}};var Hg=jy.version;if(Hg!=="19.1.0")throw Error(N(527,Hg,"19.1.0"));fe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(N(188)):(e=Object.keys(e).join(","),Error(N(268,e)));return e=JE(t),e=e!==null?Uy(e):null,e=e===null?null:e.stateNode,e};var EA={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ol=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ol.isDisabled&&ol.supportsFiber)try{go=ol.inject(EA),Rt=ol}catch{}}Dc.createRoot=function(e,t){if(!My(e))throw Error(N(299));var n=!1,a="",r=ob,s=lb,i=cb,o=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(o=t.unstable_transitionCallbacks)),t=ow(e,1,!1,null,null,n,a,r,s,i,o,null),e[Gs]=t.current,Zh(e),new am(t)};Dc.hydrateRoot=function(e,t,n){if(!My(e))throw Error(N(299));var a=!1,r="",s=ob,i=lb,o=cb,l=null,c=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(i=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(l=n.unstable_transitionCallbacks),n.formState!==void 0&&(c=n.formState)),t=ow(e,1,!0,t,n??null,a,r,s,i,o,l,c),t.context=lw(null),n=t.current,a=kt(),a=hh(a),r=Na(a),r.callback=null,Da(n,r,a),n=a,t.current.lanes=n,yo(t,n),An(t),e[Gs]=t.current,Zh(e),new Kc(t)};Dc.version="19.1.0";function hw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hw)}catch(e){console.error(e)}}hw(),yy.exports=Dc;var _A=yy.exports;const TA=1,AA=1e6;let od=0;function CA(){return od=(od+1)%Number.MAX_SAFE_INTEGER,od.toString()}const ld=new Map,Ig=e=>{if(ld.has(e))return;const t=setTimeout(()=>{ld.delete(e),zi({type:"REMOVE_TOAST",toastId:e})},AA);ld.set(e,t)},RA=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,TA)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Ig(n):e.toasts.forEach(a=>{Ig(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===n||n===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Bl=[];let $l={toasts:[]};function zi(e){$l=RA($l,e),Bl.forEach(t=>{t($l)})}function OA({...e}){const t=CA(),n=r=>zi({type:"UPDATE_TOAST",toast:{...r,id:t}}),a=()=>zi({type:"DISMISS_TOAST",toastId:t});return zi({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||a()}}}),{id:t,dismiss:a,update:n}}function No(){const[e,t]=m.useState($l);return m.useEffect(()=>(Bl.push(t),()=>{const n=Bl.indexOf(t);n>-1&&Bl.splice(n,1)}),[e]),{...e,toast:OA,dismiss:n=>zi({type:"DISMISS_TOAST",toastId:n})}}function ie(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function qg(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mw(...e){return t=>{let n=!1;const a=e.map(r=>{const s=qg(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<a.length;r++){const s=a[r];typeof s=="function"?s():qg(e[r],null)}}}}function Ae(...e){return m.useCallback(mw(...e),e)}function kA(e,t){const n=m.createContext(t),a=s=>{const{children:i,...o}=s,l=m.useMemo(()=>o,Object.values(o));return p.jsx(n.Provider,{value:l,children:i})};a.displayName=e+"Provider";function r(s){const i=m.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[a,r]}function rn(e,t=[]){let n=[];function a(s,i){const o=m.createContext(i),l=n.length;n=[...n,i];const c=u=>{var g;const{scope:f,children:h,...x}=u,y=((g=f==null?void 0:f[e])==null?void 0:g[l])||o,w=m.useMemo(()=>x,Object.values(x));return p.jsx(y.Provider,{value:w,children:h})};c.displayName=s+"Provider";function d(u,f){var y;const h=((y=f==null?void 0:f[e])==null?void 0:y[l])||o,x=m.useContext(h);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[c,d]}const r=()=>{const s=n.map(i=>m.createContext(i));return function(o){const l=(o==null?void 0:o[e])||s;return m.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return r.scopeName=e,[a,NA(r,...t)]}function NA(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const i=a.reduce((o,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...o,...u}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function ao(e){const t=jA(e),n=m.forwardRef((a,r)=>{const{children:s,...i}=a,o=m.Children.toArray(s),l=o.find(MA);if(l){const c=l.props.children,d=o.map(u=>u===l?m.Children.count(c)>1?m.Children.only(null):m.isValidElement(c)?c.props.children:null:u);return p.jsx(t,{...i,ref:r,children:m.isValidElement(c)?m.cloneElement(c,void 0,d):null})}return p.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var DA=ao("Slot");function jA(e){const t=m.forwardRef((n,a)=>{const{children:r,...s}=n;if(m.isValidElement(r)){const i=UA(r),o=LA(s,r.props);return r.type!==m.Fragment&&(o.ref=a?mw(a,i):i),m.cloneElement(r,o)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pw=Symbol("radix.slottable");function gw(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=pw,t}function MA(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pw}function LA(e,t){const n={...t};for(const a in t){const r=e[a],s=t[a];/^on[A-Z]/.test(a)?r&&s?n[a]=(...o)=>{const l=s(...o);return r(...o),l}:r&&(n[a]=r):a==="style"?n[a]={...r,...s}:a==="className"&&(n[a]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function UA(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function vw(e){const t=e+"CollectionProvider",[n,a]=rn(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=y=>{const{scope:w,children:g}=y,v=U.useRef(null),b=U.useRef(new Map).current;return p.jsx(r,{scope:w,itemMap:b,collectionRef:v,children:g})};i.displayName=t;const o=e+"CollectionSlot",l=ao(o),c=U.forwardRef((y,w)=>{const{scope:g,children:v}=y,b=s(o,g),S=Ae(w,b.collectionRef);return p.jsx(l,{ref:S,children:v})});c.displayName=o;const d=e+"CollectionItemSlot",u="data-radix-collection-item",f=ao(d),h=U.forwardRef((y,w)=>{const{scope:g,children:v,...b}=y,S=U.useRef(null),E=Ae(w,S),_=s(d,g);return U.useEffect(()=>(_.itemMap.set(S,{ref:S,...b}),()=>void _.itemMap.delete(S))),p.jsx(f,{[u]:"",ref:E,children:v})});h.displayName=d;function x(y){const w=s(e+"CollectionConsumer",y);return U.useCallback(()=>{const v=w.collectionRef.current;if(!v)return[];const b=Array.from(v.querySelectorAll(`[${u}]`));return Array.from(w.itemMap.values()).sort((_,A)=>b.indexOf(_.ref.current)-b.indexOf(A.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:i,Slot:c,ItemSlot:h},x,a]}var PA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ce=PA.reduce((e,t)=>{const n=ao(`Primitive.${t}`),a=m.forwardRef((r,s)=>{const{asChild:i,...o}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...o,ref:s})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function yw(e,t){e&&mo.flushSync(()=>e.dispatchEvent(t))}function en(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var a;return(a=t.current)==null?void 0:a.call(t,...n)},[])}function zA(e,t=globalThis==null?void 0:globalThis.document){const n=en(e);m.useEffect(()=>{const a=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var BA="DismissableLayer",kf="dismissableLayer.update",$A="dismissableLayer.pointerDownOutside",HA="dismissableLayer.focusOutside",Gg,bw=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Xc=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:i,onDismiss:o,...l}=e,c=m.useContext(bw),[d,u]=m.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=m.useState({}),x=Ae(t,A=>u(A)),y=Array.from(c.layers),[w]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=y.indexOf(w),v=d?y.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,S=v>=g,E=qA(A=>{const T=A.target,k=[...c.branches].some(M=>M.contains(T));!S||k||(r==null||r(A),i==null||i(A),A.defaultPrevented||o==null||o())},f),_=GA(A=>{const T=A.target;[...c.branches].some(M=>M.contains(T))||(s==null||s(A),i==null||i(A),A.defaultPrevented||o==null||o())},f);return zA(A=>{v===c.layers.size-1&&(a==null||a(A),!A.defaultPrevented&&o&&(A.preventDefault(),o()))},f),m.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Gg=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Fg(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Gg)}},[d,f,n,c]),m.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Fg())},[d,c]),m.useEffect(()=>{const A=()=>h({});return document.addEventListener(kf,A),()=>document.removeEventListener(kf,A)},[]),p.jsx(ce.div,{...l,ref:x,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:ie(e.onFocusCapture,_.onFocusCapture),onBlurCapture:ie(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:ie(e.onPointerDownCapture,E.onPointerDownCapture)})});Xc.displayName=BA;var IA="DismissableLayerBranch",ww=m.forwardRef((e,t)=>{const n=m.useContext(bw),a=m.useRef(null),r=Ae(t,a);return m.useEffect(()=>{const s=a.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(ce.div,{...e,ref:r})});ww.displayName=IA;function qA(e,t=globalThis==null?void 0:globalThis.document){const n=en(e),a=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const s=o=>{if(o.target&&!a.current){let l=function(){xw($A,n,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);a.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function GA(e,t=globalThis==null?void 0:globalThis.document){const n=en(e),a=m.useRef(!1);return m.useEffect(()=>{const r=s=>{s.target&&!a.current&&xw(HA,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function Fg(){const e=new CustomEvent(kf);document.dispatchEvent(e)}function xw(e,t,n,{discrete:a}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),a?yw(r,s):r.dispatchEvent(s)}var FA=Xc,YA=ww,Sn=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},VA="Portal",rm=m.forwardRef((e,t)=>{var o;const{container:n,...a}=e,[r,s]=m.useState(!1);Sn(()=>s(!0),[]);const i=n||r&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return i?Dy.createPortal(p.jsx(ce.div,{...a,ref:t}),i):null});rm.displayName=VA;function KA(e,t){return m.useReducer((n,a)=>t[n][a]??n,e)}var ta=e=>{const{present:t,children:n}=e,a=XA(t),r=typeof n=="function"?n({present:a.isPresent}):m.Children.only(n),s=Ae(a.ref,QA(r));return typeof n=="function"||a.isPresent?m.cloneElement(r,{ref:s}):null};ta.displayName="Presence";function XA(e){const[t,n]=m.useState(),a=m.useRef(null),r=m.useRef(e),s=m.useRef("none"),i=e?"mounted":"unmounted",[o,l]=KA(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const c=ll(a.current);s.current=o==="mounted"?c:"none"},[o]),Sn(()=>{const c=a.current,d=r.current;if(d!==e){const f=s.current,h=ll(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),Sn(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,u=h=>{const y=ll(a.current).includes(h.animationName);if(h.target===t&&y&&(l("ANIMATION_END"),!r.current)){const w=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=w)})}},f=h=>{h.target===t&&(s.current=ll(a.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:m.useCallback(c=>{a.current=c?getComputedStyle(c):null,n(c)},[])}}function ll(e){return(e==null?void 0:e.animationName)||"none"}function QA(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ZA=Ry[" useInsertionEffect ".trim().toString()]||Sn;function Qs({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[r,s,i]=JA({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:r;{const d=m.useRef(e!==void 0);m.useEffect(()=>{const u=d.current;u!==o&&console.warn(`${a} is changing from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=o},[o,a])}const c=m.useCallback(d=>{var u;if(o){const f=WA(d)?d(e):d;f!==e&&((u=i.current)==null||u.call(i,f))}else s(d)},[o,e,s,i]);return[l,c]}function JA({defaultProp:e,onChange:t}){const[n,a]=m.useState(e),r=m.useRef(n),s=m.useRef(t);return ZA(()=>{s.current=t},[t]),m.useEffect(()=>{var i;r.current!==n&&((i=s.current)==null||i.call(s,n),r.current=n)},[n,r]),[n,a,s]}function WA(e){return typeof e=="function"}var eC=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"}),tC="VisuallyHidden",Qc=m.forwardRef((e,t)=>p.jsx(ce.span,{...e,ref:t,style:{...eC,...e.style}}));Qc.displayName=tC;var nC=Qc,sm="ToastProvider",[im,aC,rC]=vw("Toast"),[Sw,OL]=rn("Toast",[rC]),[sC,Zc]=Sw(sm),Ew=e=>{const{__scopeToast:t,label:n="Notification",duration:a=5e3,swipeDirection:r="right",swipeThreshold:s=50,children:i}=e,[o,l]=m.useState(null),[c,d]=m.useState(0),u=m.useRef(!1),f=m.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${sm}\`. Expected non-empty \`string\`.`),p.jsx(im.Provider,{scope:t,children:p.jsx(sC,{scope:t,label:n,duration:a,swipeDirection:r,swipeThreshold:s,toastCount:c,viewport:o,onViewportChange:l,onToastAdd:m.useCallback(()=>d(h=>h+1),[]),onToastRemove:m.useCallback(()=>d(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:u,isClosePausedRef:f,children:i})})};Ew.displayName=sm;var _w="ToastViewport",iC=["F8"],Nf="toast.viewportPause",Df="toast.viewportResume",Tw=m.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:a=iC,label:r="Notifications ({hotkey})",...s}=e,i=Zc(_w,n),o=aC(n),l=m.useRef(null),c=m.useRef(null),d=m.useRef(null),u=m.useRef(null),f=Ae(t,u,i.onViewportChange),h=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=i.toastCount>0;m.useEffect(()=>{const w=g=>{var b;a.length!==0&&a.every(S=>g[S]||g.code===S)&&((b=u.current)==null||b.focus())};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[a]),m.useEffect(()=>{const w=l.current,g=u.current;if(x&&w&&g){const v=()=>{if(!i.isClosePausedRef.current){const _=new CustomEvent(Nf);g.dispatchEvent(_),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){const _=new CustomEvent(Df);g.dispatchEvent(_),i.isClosePausedRef.current=!1}},S=_=>{!w.contains(_.relatedTarget)&&b()},E=()=>{w.contains(document.activeElement)||b()};return w.addEventListener("focusin",v),w.addEventListener("focusout",S),w.addEventListener("pointermove",v),w.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",b),()=>{w.removeEventListener("focusin",v),w.removeEventListener("focusout",S),w.removeEventListener("pointermove",v),w.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",b)}}},[x,i.isClosePausedRef]);const y=m.useCallback(({tabbingDirection:w})=>{const v=o().map(b=>{const S=b.ref.current,E=[S,...bC(S)];return w==="forwards"?E:E.reverse()});return(w==="forwards"?v.reverse():v).flat()},[o]);return m.useEffect(()=>{const w=u.current;if(w){const g=v=>{var E,_,A;const b=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!b){const T=document.activeElement,k=v.shiftKey;if(v.target===w&&k){(E=c.current)==null||E.focus();return}const F=y({tabbingDirection:k?"backwards":"forwards"}),X=F.findIndex(L=>L===T);cd(F.slice(X+1))?v.preventDefault():k?(_=c.current)==null||_.focus():(A=d.current)==null||A.focus()}};return w.addEventListener("keydown",g),()=>w.removeEventListener("keydown",g)}},[o,y]),p.jsxs(YA,{ref:l,role:"region","aria-label":r.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:x?void 0:"none"},children:[x&&p.jsx(jf,{ref:c,onFocusFromOutsideViewport:()=>{const w=y({tabbingDirection:"forwards"});cd(w)}}),p.jsx(im.Slot,{scope:n,children:p.jsx(ce.ol,{tabIndex:-1,...s,ref:f})}),x&&p.jsx(jf,{ref:d,onFocusFromOutsideViewport:()=>{const w=y({tabbingDirection:"backwards"});cd(w)}})]})});Tw.displayName=_w;var Aw="ToastFocusProxy",jf=m.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:a,...r}=e,s=Zc(Aw,n);return p.jsx(Qc,{"aria-hidden":!0,tabIndex:0,...r,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const o=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(o))&&a()}})});jf.displayName=Aw;var Do="Toast",oC="toast.swipeStart",lC="toast.swipeMove",cC="toast.swipeCancel",uC="toast.swipeEnd",Cw=m.forwardRef((e,t)=>{const{forceMount:n,open:a,defaultOpen:r,onOpenChange:s,...i}=e,[o,l]=Qs({prop:a,defaultProp:r??!0,onChange:s,caller:Do});return p.jsx(ta,{present:n||o,children:p.jsx(hC,{open:o,...i,ref:t,onClose:()=>l(!1),onPause:en(e.onPause),onResume:en(e.onResume),onSwipeStart:ie(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ie(e.onSwipeMove,c=>{const{x:d,y:u}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${u}px`)}),onSwipeCancel:ie(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ie(e.onSwipeEnd,c=>{const{x:d,y:u}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${u}px`),l(!1)})})})});Cw.displayName=Do;var[dC,fC]=Sw(Do,{onClose(){}}),hC=m.forwardRef((e,t)=>{const{__scopeToast:n,type:a="foreground",duration:r,open:s,onClose:i,onEscapeKeyDown:o,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:u,onSwipeCancel:f,onSwipeEnd:h,...x}=e,y=Zc(Do,n),[w,g]=m.useState(null),v=Ae(t,L=>g(L)),b=m.useRef(null),S=m.useRef(null),E=r||y.duration,_=m.useRef(0),A=m.useRef(E),T=m.useRef(0),{onToastAdd:k,onToastRemove:M}=y,H=en(()=>{var I;(w==null?void 0:w.contains(document.activeElement))&&((I=y.viewport)==null||I.focus()),i()}),F=m.useCallback(L=>{!L||L===1/0||(window.clearTimeout(T.current),_.current=new Date().getTime(),T.current=window.setTimeout(H,L))},[H]);m.useEffect(()=>{const L=y.viewport;if(L){const I=()=>{F(A.current),c==null||c()},C=()=>{const P=new Date().getTime()-_.current;A.current=A.current-P,window.clearTimeout(T.current),l==null||l()};return L.addEventListener(Nf,C),L.addEventListener(Df,I),()=>{L.removeEventListener(Nf,C),L.removeEventListener(Df,I)}}},[y.viewport,E,l,c,F]),m.useEffect(()=>{s&&!y.isClosePausedRef.current&&F(E)},[s,E,y.isClosePausedRef,F]),m.useEffect(()=>(k(),()=>M()),[k,M]);const X=m.useMemo(()=>w?Mw(w):null,[w]);return y.viewport?p.jsxs(p.Fragment,{children:[X&&p.jsx(mC,{__scopeToast:n,role:"status","aria-live":a==="foreground"?"assertive":"polite","aria-atomic":!0,children:X}),p.jsx(dC,{scope:n,onClose:H,children:mo.createPortal(p.jsx(im.ItemSlot,{scope:n,children:p.jsx(FA,{asChild:!0,onEscapeKeyDown:ie(o,()=>{y.isFocusedToastEscapeKeyDownRef.current||H(),y.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(ce.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":y.swipeDirection,...x,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ie(e.onKeyDown,L=>{L.key==="Escape"&&(o==null||o(L.nativeEvent),L.nativeEvent.defaultPrevented||(y.isFocusedToastEscapeKeyDownRef.current=!0,H()))}),onPointerDown:ie(e.onPointerDown,L=>{L.button===0&&(b.current={x:L.clientX,y:L.clientY})}),onPointerMove:ie(e.onPointerMove,L=>{if(!b.current)return;const I=L.clientX-b.current.x,C=L.clientY-b.current.y,P=!!S.current,R=["left","right"].includes(y.swipeDirection),z=["left","up"].includes(y.swipeDirection)?Math.min:Math.max,q=R?z(0,I):0,V=R?0:z(0,C),Z=L.pointerType==="touch"?10:2,j={x:q,y:V},D={originalEvent:L,delta:j};P?(S.current=j,cl(lC,u,D,{discrete:!1})):Yg(j,y.swipeDirection,Z)?(S.current=j,cl(oC,d,D,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(I)>Z||Math.abs(C)>Z)&&(b.current=null)}),onPointerUp:ie(e.onPointerUp,L=>{const I=S.current,C=L.target;if(C.hasPointerCapture(L.pointerId)&&C.releasePointerCapture(L.pointerId),S.current=null,b.current=null,I){const P=L.currentTarget,R={originalEvent:L,delta:I};Yg(I,y.swipeDirection,y.swipeThreshold)?cl(uC,h,R,{discrete:!0}):cl(cC,f,R,{discrete:!0}),P.addEventListener("click",z=>z.preventDefault(),{once:!0})}})})})}),y.viewport)})]}):null}),mC=e=>{const{__scopeToast:t,children:n,...a}=e,r=Zc(Do,t),[s,i]=m.useState(!1),[o,l]=m.useState(!1);return vC(()=>i(!0)),m.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),o?null:p.jsx(rm,{asChild:!0,children:p.jsx(Qc,{...a,children:s&&p.jsxs(p.Fragment,{children:[r.label," ",n]})})})},pC="ToastTitle",Rw=m.forwardRef((e,t)=>{const{__scopeToast:n,...a}=e;return p.jsx(ce.div,{...a,ref:t})});Rw.displayName=pC;var gC="ToastDescription",Ow=m.forwardRef((e,t)=>{const{__scopeToast:n,...a}=e;return p.jsx(ce.div,{...a,ref:t})});Ow.displayName=gC;var kw="ToastAction",Nw=m.forwardRef((e,t)=>{const{altText:n,...a}=e;return n.trim()?p.jsx(jw,{altText:n,asChild:!0,children:p.jsx(om,{...a,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${kw}\`. Expected non-empty \`string\`.`),null)});Nw.displayName=kw;var Dw="ToastClose",om=m.forwardRef((e,t)=>{const{__scopeToast:n,...a}=e,r=fC(Dw,n);return p.jsx(jw,{asChild:!0,children:p.jsx(ce.button,{type:"button",...a,ref:t,onClick:ie(e.onClick,r.onClose)})})});om.displayName=Dw;var jw=m.forwardRef((e,t)=>{const{__scopeToast:n,altText:a,...r}=e;return p.jsx(ce.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0,...r,ref:t})});function Mw(e){const t=[];return Array.from(e.childNodes).forEach(a=>{if(a.nodeType===a.TEXT_NODE&&a.textContent&&t.push(a.textContent),yC(a)){const r=a.ariaHidden||a.hidden||a.style.display==="none",s=a.dataset.radixToastAnnounceExclude==="";if(!r)if(s){const i=a.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Mw(a))}}),t}function cl(e,t,n,{discrete:a}){const r=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),a?yw(r,s):r.dispatchEvent(s)}var Yg=(e,t,n=0)=>{const a=Math.abs(e.x),r=Math.abs(e.y),s=a>r;return t==="left"||t==="right"?s&&a>n:!s&&r>n};function vC(e=()=>{}){const t=en(e);Sn(()=>{let n=0,a=0;return n=window.requestAnimationFrame(()=>a=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(a)}},[t])}function yC(e){return e.nodeType===e.ELEMENT_NODE}function bC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const r=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||r?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var wC=Ew,Lw=Tw,Uw=Cw,Pw=Rw,zw=Ow,Bw=Nw,$w=om;function Hw(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Hw(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function Iw(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Hw(e))&&(a&&(a+=" "),a+=t);return a}const Vg=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kg=Iw,lm=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return Kg(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:s}=t,i=Object.keys(r).map(c=>{const d=n==null?void 0:n[c],u=s==null?void 0:s[c];if(d===null)return null;const f=Vg(d)||Vg(u);return r[c][f]}),o=n&&Object.entries(n).reduce((c,d)=>{let[u,f]=d;return f===void 0||(c[u]=f),c},{}),l=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((c,d)=>{let{class:u,className:f,...h}=d;return Object.entries(h).every(x=>{let[y,w]=x;return Array.isArray(w)?w.includes({...s,...o}[y]):{...s,...o}[y]===w})?[...c,u,f]:c},[]);return Kg(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)};/**
|
|
50
|
+
* @license lucide-react v0.511.0 - ISC
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the ISC license.
|
|
53
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/const xC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),SC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),Xg=e=>{const t=SC(e);return t.charAt(0).toUpperCase()+t.slice(1)},qw=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),EC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
55
|
+
* @license lucide-react v0.511.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var _C={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"};/**
|
|
60
|
+
* @license lucide-react v0.511.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the ISC license.
|
|
63
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/const TC=m.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:r="",children:s,iconNode:i,...o},l)=>m.createElement("svg",{ref:l,..._C,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:qw("lucide",r),...!s&&!EC(o)&&{"aria-hidden":"true"},...o},[...i.map(([c,d])=>m.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
|
|
65
|
+
* @license lucide-react v0.511.0 - ISC
|
|
66
|
+
*
|
|
67
|
+
* This source code is licensed under the ISC license.
|
|
68
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
+
*/const Ke=(e,t)=>{const n=m.forwardRef(({className:a,...r},s)=>m.createElement(TC,{ref:s,iconNode:t,className:qw(`lucide-${xC(Xg(e))}`,`lucide-${e}`,a),...r}));return n.displayName=Xg(e),n};/**
|
|
70
|
+
* @license lucide-react v0.511.0 - ISC
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the ISC license.
|
|
73
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
+
*/const AC=[["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"}]],CC=Ke("bot",AC);/**
|
|
75
|
+
* @license lucide-react v0.511.0 - ISC
|
|
76
|
+
*
|
|
77
|
+
* This source code is licensed under the ISC license.
|
|
78
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
+
*/const RC=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],OC=Ke("check",RC);/**
|
|
80
|
+
* @license lucide-react v0.511.0 - ISC
|
|
81
|
+
*
|
|
82
|
+
* This source code is licensed under the ISC license.
|
|
83
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
+
*/const kC=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Gw=Ke("chevron-down",kC);/**
|
|
85
|
+
* @license lucide-react v0.511.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/const NC=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Fw=Ke("chevron-up",NC);/**
|
|
90
|
+
* @license lucide-react v0.511.0 - ISC
|
|
91
|
+
*
|
|
92
|
+
* This source code is licensed under the ISC license.
|
|
93
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
+
*/const DC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ud=Ke("circle-alert",DC);/**
|
|
95
|
+
* @license lucide-react v0.511.0 - ISC
|
|
96
|
+
*
|
|
97
|
+
* This source code is licensed under the ISC license.
|
|
98
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
+
*/const jC=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],MC=Ke("circle-check-big",jC);/**
|
|
100
|
+
* @license lucide-react v0.511.0 - ISC
|
|
101
|
+
*
|
|
102
|
+
* This source code is licensed under the ISC license.
|
|
103
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
+
*/const LC=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],UC=Ke("circle",LC);/**
|
|
105
|
+
* @license lucide-react v0.511.0 - ISC
|
|
106
|
+
*
|
|
107
|
+
* This source code is licensed under the ISC license.
|
|
108
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
+
*/const PC=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Mf=Ke("copy",PC);/**
|
|
110
|
+
* @license lucide-react v0.511.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/const zC=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Qg=Ke("database",zC);/**
|
|
115
|
+
* @license lucide-react v0.511.0 - ISC
|
|
116
|
+
*
|
|
117
|
+
* This source code is licensed under the ISC license.
|
|
118
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
+
*/const BC=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],$C=Ke("external-link",BC);/**
|
|
120
|
+
* @license lucide-react v0.511.0 - ISC
|
|
121
|
+
*
|
|
122
|
+
* This source code is licensed under the ISC license.
|
|
123
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
+
*/const HC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],cm=Ke("plus",HC);/**
|
|
125
|
+
* @license lucide-react v0.511.0 - ISC
|
|
126
|
+
*
|
|
127
|
+
* This source code is licensed under the ISC license.
|
|
128
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
+
*/const IC=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],ul=Ke("refresh-cw",IC);/**
|
|
130
|
+
* @license lucide-react v0.511.0 - ISC
|
|
131
|
+
*
|
|
132
|
+
* This source code is licensed under the ISC license.
|
|
133
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
+
*/const qC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],GC=Ke("search",qC);/**
|
|
135
|
+
* @license lucide-react v0.511.0 - ISC
|
|
136
|
+
*
|
|
137
|
+
* This source code is licensed under the ISC license.
|
|
138
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
+
*/const FC=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Yw=Ke("settings",FC);/**
|
|
140
|
+
* @license lucide-react v0.511.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/const YC=[["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"}]],VC=Ke("sparkles",YC);/**
|
|
145
|
+
* @license lucide-react v0.511.0 - ISC
|
|
146
|
+
*
|
|
147
|
+
* This source code is licensed under the ISC license.
|
|
148
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
+
*/const KC=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],XC=Ke("square-pen",KC);/**
|
|
150
|
+
* @license lucide-react v0.511.0 - ISC
|
|
151
|
+
*
|
|
152
|
+
* This source code is licensed under the ISC license.
|
|
153
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
+
*/const QC=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],ZC=Ke("trash",QC);/**
|
|
155
|
+
* @license lucide-react v0.511.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* This source code is licensed under the ISC license.
|
|
158
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
+
*/const JC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],um=Ke("x",JC),dm="-",WC=e=>{const t=tR(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:i=>{const o=i.split(dm);return o[0]===""&&o.length!==1&&o.shift(),Vw(o,t)||eR(i)},getConflictingClassGroupIds:(i,o)=>{const l=n[i]||[];return o&&a[i]?[...l,...a[i]]:l}}},Vw=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],a=t.nextPart.get(n),r=a?Vw(e.slice(1),a):void 0;if(r)return r;if(t.validators.length===0)return;const s=e.join(dm);return(i=t.validators.find(({validator:o})=>o(s)))==null?void 0:i.classGroupId},Zg=/^\[(.+)\]$/,eR=e=>{if(Zg.test(e)){const t=Zg.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},tR=e=>{const{theme:t,classGroups:n}=e,a={nextPart:new Map,validators:[]};for(const r in n)Lf(n[r],a,r,t);return a},Lf=(e,t,n,a)=>{e.forEach(r=>{if(typeof r=="string"){const s=r===""?t:Jg(t,r);s.classGroupId=n;return}if(typeof r=="function"){if(nR(r)){Lf(r(a),t,n,a);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([s,i])=>{Lf(i,Jg(t,s),n,a)})})},Jg=(e,t)=>{let n=e;return t.split(dm).forEach(a=>{n.nextPart.has(a)||n.nextPart.set(a,{nextPart:new Map,validators:[]}),n=n.nextPart.get(a)}),n},nR=e=>e.isThemeGetter,aR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,a=new Map;const r=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,a=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=a.get(s))!==void 0)return r(s,i),i},set(s,i){n.has(s)?n.set(s,i):r(s,i)}}},Uf="!",Pf=":",rR=Pf.length,sR=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=r=>{const s=[];let i=0,o=0,l=0,c;for(let x=0;x<r.length;x++){let y=r[x];if(i===0&&o===0){if(y===Pf){s.push(r.slice(l,x)),l=x+rR;continue}if(y==="/"){c=x;continue}}y==="["?i++:y==="]"?i--:y==="("?o++:y===")"&&o--}const d=s.length===0?r:r.substring(l),u=iR(d),f=u!==d,h=c&&c>l?c-l:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:h}};if(t){const r=t+Pf,s=a;a=i=>i.startsWith(r)?s(i.substring(r.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const r=a;a=s=>n({className:s,parseClassName:r})}return a},iR=e=>e.endsWith(Uf)?e.substring(0,e.length-1):e.startsWith(Uf)?e.substring(1):e,oR=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(a=>[a,!0]));return a=>{if(a.length<=1)return a;const r=[];let s=[];return a.forEach(i=>{i[0]==="["||t[i]?(r.push(...s.sort(),i),s=[]):s.push(i)}),r.push(...s.sort()),r}},lR=e=>({cache:aR(e.cacheSize),parseClassName:sR(e),sortModifiers:oR(e),...WC(e)}),cR=/\s+/,uR=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:s}=t,i=[],o=e.trim().split(cR);let l="";for(let c=o.length-1;c>=0;c-=1){const d=o[c],{isExternal:u,modifiers:f,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:y}=n(d);if(u){l=d+(l.length>0?" "+l:l);continue}let w=!!y,g=a(w?x.substring(0,y):x);if(!g){if(!w){l=d+(l.length>0?" "+l:l);continue}if(g=a(x),!g){l=d+(l.length>0?" "+l:l);continue}w=!1}const v=s(f).join(":"),b=h?v+Uf:v,S=b+g;if(i.includes(S))continue;i.push(S);const E=r(g,w);for(let _=0;_<E.length;++_){const A=E[_];i.push(b+A)}l=d+(l.length>0?" "+l:l)}return l};function dR(){let e=0,t,n,a="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Kw(t))&&(a&&(a+=" "),a+=n);return a}const Kw=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Kw(e[a]))&&(n&&(n+=" "),n+=t);return n};function fR(e,...t){let n,a,r,s=i;function i(l){const c=t.reduce((d,u)=>u(d),e());return n=lR(c),a=n.cache.get,r=n.cache.set,s=o,o(l)}function o(l){const c=a(l);if(c)return c;const d=uR(l,n);return r(l,d),d}return function(){return s(dR.apply(null,arguments))}}const Pe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Xw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Qw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hR=/^\d+\/\d+$/,mR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pR=/\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$/,gR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,vR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ur=e=>hR.test(e),ne=e=>!!e&&!Number.isNaN(Number(e)),oa=e=>!!e&&Number.isInteger(Number(e)),dd=e=>e.endsWith("%")&&ne(e.slice(0,-1)),Dn=e=>mR.test(e),bR=()=>!0,wR=e=>pR.test(e)&&!gR.test(e),Zw=()=>!1,xR=e=>vR.test(e),SR=e=>yR.test(e),ER=e=>!B(e)&&!$(e),_R=e=>Zs(e,ex,Zw),B=e=>Xw.test(e),Wa=e=>Zs(e,tx,wR),fd=e=>Zs(e,OR,ne),Wg=e=>Zs(e,Jw,Zw),TR=e=>Zs(e,Ww,SR),dl=e=>Zs(e,nx,xR),$=e=>Qw.test(e),hi=e=>Js(e,tx),AR=e=>Js(e,kR),ev=e=>Js(e,Jw),CR=e=>Js(e,ex),RR=e=>Js(e,Ww),fl=e=>Js(e,nx,!0),Zs=(e,t,n)=>{const a=Xw.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Js=(e,t,n=!1)=>{const a=Qw.exec(e);return a?a[1]?t(a[1]):n:!1},Jw=e=>e==="position"||e==="percentage",Ww=e=>e==="image"||e==="url",ex=e=>e==="length"||e==="size"||e==="bg-size",tx=e=>e==="length",OR=e=>e==="number",kR=e=>e==="family-name",nx=e=>e==="shadow",NR=()=>{const e=Pe("color"),t=Pe("font"),n=Pe("text"),a=Pe("font-weight"),r=Pe("tracking"),s=Pe("leading"),i=Pe("breakpoint"),o=Pe("container"),l=Pe("spacing"),c=Pe("radius"),d=Pe("shadow"),u=Pe("inset-shadow"),f=Pe("text-shadow"),h=Pe("drop-shadow"),x=Pe("blur"),y=Pe("perspective"),w=Pe("aspect"),g=Pe("ease"),v=Pe("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),$,B],_=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],T=()=>[$,B,l],k=()=>[Ur,"full","auto",...T()],M=()=>[oa,"none","subgrid",$,B],H=()=>["auto",{span:["full",oa,$,B]},oa,$,B],F=()=>[oa,"auto",$,B],X=()=>["auto","min","max","fr",$,B],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",...T()],P=()=>[Ur,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],R=()=>[e,$,B],z=()=>[...S(),ev,Wg,{position:[$,B]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],V=()=>["auto","cover","contain",CR,_R,{size:[$,B]}],Z=()=>[dd,hi,Wa],j=()=>["","none","full",c,$,B],D=()=>["",ne,hi,Wa],G=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[ne,dd,ev,Wg],Oe=()=>["","none",x,$,B],ct=()=>["none",ne,$,B],ut=()=>["none",ne,$,B],on=()=>[ne,$,B],ln=()=>[Ur,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Dn],breakpoint:[Dn],color:[bR],container:[Dn],"drop-shadow":[Dn],ease:["in","out","in-out"],font:[ER],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Dn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Dn],shadow:[Dn],spacing:["px",ne],text:[Dn],"text-shadow":[Dn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ur,B,$,w]}],container:["container"],columns:[{columns:[ne,B,$,o]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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"],sr:["sr-only","not-sr-only"],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:E()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:k()}],"inset-x":[{"inset-x":k()}],"inset-y":[{"inset-y":k()}],start:[{start:k()}],end:[{end:k()}],top:[{top:k()}],right:[{right:k()}],bottom:[{bottom:k()}],left:[{left:k()}],visibility:["visible","invisible","collapse"],z:[{z:[oa,"auto",$,B]}],basis:[{basis:[Ur,"full","auto",o,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ne,Ur,"auto","initial","none",B]}],grow:[{grow:["",ne,$,B]}],shrink:[{shrink:["",ne,$,B]}],order:[{order:[oa,"first","last","none",$,B]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],w:[{w:[o,"screen",...P()]}],"min-w":[{"min-w":[o,"screen","none",...P()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[i]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,hi,Wa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,$,fd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",dd,B]}],"font-family":[{font:[AR,B,t]}],"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:[r,$,B]}],"line-clamp":[{"line-clamp":[ne,"none",$,fd]}],leading:[{leading:[s,...T()]}],"list-image":[{"list-image":["none",$,B]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$,B]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[ne,"from-font","auto",$,Wa]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[ne,"auto",$,B]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$,B]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",$,B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:V()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},oa,$,B],radial:["",$,B],conic:[oa,$,B]},RR,TR]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ne,$,B]}],"outline-w":[{outline:["",ne,hi,Wa]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",d,fl,dl]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",u,fl,dl]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[ne,Wa]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",f,fl,dl]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[ne,$,B]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[$,B]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:V()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",$,B]}],filter:[{filter:["","none",$,B]}],blur:[{blur:Oe()}],brightness:[{brightness:[ne,$,B]}],contrast:[{contrast:[ne,$,B]}],"drop-shadow":[{"drop-shadow":["","none",h,fl,dl]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",ne,$,B]}],"hue-rotate":[{"hue-rotate":[ne,$,B]}],invert:[{invert:["",ne,$,B]}],saturate:[{saturate:[ne,$,B]}],sepia:[{sepia:["",ne,$,B]}],"backdrop-filter":[{"backdrop-filter":["","none",$,B]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[ne,$,B]}],"backdrop-contrast":[{"backdrop-contrast":[ne,$,B]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ne,$,B]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ne,$,B]}],"backdrop-invert":[{"backdrop-invert":["",ne,$,B]}],"backdrop-opacity":[{"backdrop-opacity":[ne,$,B]}],"backdrop-saturate":[{"backdrop-saturate":[ne,$,B]}],"backdrop-sepia":[{"backdrop-sepia":["",ne,$,B]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$,B]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ne,"initial",$,B]}],ease:[{ease:["linear","initial",g,$,B]}],delay:[{delay:[ne,$,B]}],animate:[{animate:["none",v,$,B]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,$,B]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ct()}],"rotate-x":[{"rotate-x":ct()}],"rotate-y":[{"rotate-y":ct()}],"rotate-z":[{"rotate-z":ct()}],scale:[{scale:ut()}],"scale-x":[{"scale-x":ut()}],"scale-y":[{"scale-y":ut()}],"scale-z":[{"scale-z":ut()}],"scale-3d":["scale-3d"],skew:[{skew:on()}],"skew-x":[{"skew-x":on()}],"skew-y":[{"skew-y":on()}],transform:[{transform:[$,B,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ln()}],"translate-x":[{"translate-x":ln()}],"translate-y":[{"translate-y":ln()}],"translate-z":[{"translate-z":ln()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",$,B]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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",$,B]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[ne,hi,Wa,fd]}],stroke:[{stroke:["none",...R()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},DR=fR(NR);function pe(...e){return DR(Iw(e))}const jR=wC,ax=m.forwardRef(({className:e,...t},n)=>p.jsx(Lw,{ref:n,className:pe("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));ax.displayName=Lw.displayName;const MR=lm("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"}}),rx=m.forwardRef(({className:e,variant:t,...n},a)=>p.jsx(Uw,{ref:a,className:pe(MR({variant:t}),e),...n}));rx.displayName=Uw.displayName;const LR=m.forwardRef(({className:e,...t},n)=>p.jsx(Bw,{ref:n,className:pe("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));LR.displayName=Bw.displayName;const sx=m.forwardRef(({className:e,...t},n)=>p.jsx($w,{ref:n,className:pe("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(um,{className:"h-4 w-4"})}));sx.displayName=$w.displayName;const ix=m.forwardRef(({className:e,...t},n)=>p.jsx(Pw,{ref:n,className:pe("text-sm font-semibold",e),...t}));ix.displayName=Pw.displayName;const ox=m.forwardRef(({className:e,...t},n)=>p.jsx(zw,{ref:n,className:pe("text-sm opacity-90",e),...t}));ox.displayName=zw.displayName;function UR(){const{toasts:e}=No();return p.jsxs(jR,{children:[e.map(function({id:t,title:n,description:a,action:r,...s}){return p.jsxs(rx,{...s,children:[p.jsxs("div",{className:"grid gap-1",children:[n&&p.jsx(ix,{children:n}),a&&p.jsx(ox,{children:a})]}),r,p.jsx(sx,{})]},t)}),p.jsx(ax,{})]})}var PR=(e,t,n,a,r,s,i,o)=>{let l=document.documentElement,c=["light","dark"];function d(h){(Array.isArray(e)?e:[e]).forEach(x=>{let y=x==="class",w=y&&s?r.map(g=>s[g]||g):r;y?(l.classList.remove(...w),l.classList.add(s&&s[h]?s[h]:h)):l.setAttribute(x,h)}),u(h)}function u(h){o&&c.includes(h)&&(l.style.colorScheme=h)}function f(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(a)d(a);else try{let h=localStorage.getItem(t)||n,x=i&&h==="system"?f():h;d(x)}catch{}},zR=m.createContext(void 0),BR={setTheme:e=>{},themes:[]},$R=()=>{var e;return(e=m.useContext(zR))!=null?e:BR};m.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:a,enableColorScheme:r,defaultTheme:s,value:i,themes:o,nonce:l,scriptProps:c})=>{let d=JSON.stringify([n,t,s,e,o,i,a,r]).slice(1,-1);return m.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${PR.toString()})(${d})`}})});function HR(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const IR=e=>{switch(e){case"success":return FR;case"info":return VR;case"warning":return YR;case"error":return KR;default:return null}},qR=Array(12).fill(0),GR=({visible:e,className:t})=>U.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},U.createElement("div",{className:"sonner-spinner"},qR.map((n,a)=>U.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),FR=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},U.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"})),YR=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},U.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"})),VR=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},U.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"})),KR=U.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},U.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"})),XR=U.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"},U.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),U.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),QR=()=>{const[e,t]=U.useState(document.hidden);return U.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let zf=1;class ZR{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...r}=t,s=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:zf++,i=this.toasts.find(l=>l.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:a}),{...l,...t,id:s,dismissible:o,title:a}):l):this.addToast({title:a,...r,dismissible:o,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let s=a!==void 0,i;const o=r.then(async c=>{if(i=["resolve",c],U.isValidElement(c))s=!1,this.create({id:a,type:"default",message:c});else if(WR(c)&&!c.ok){s=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,x=typeof u=="object"&&!U.isValidElement(u)?u:{message:u};this.create({id:a,type:"error",description:f,...x})}else if(c instanceof Error){s=!1;const u=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,x=typeof u=="object"&&!U.isValidElement(u)?u:{message:u};this.create({id:a,type:"error",description:f,...x})}else if(n.success!==void 0){s=!1;const u=typeof n.success=="function"?await n.success(c):n.success,f=typeof n.description=="function"?await n.description(c):n.description,x=typeof u=="object"&&!U.isValidElement(u)?u:{message:u};this.create({id:a,type:"success",description:f,...x})}}).catch(async c=>{if(i=["reject",c],n.error!==void 0){s=!1;const d=typeof n.error=="function"?await n.error(c):n.error,u=typeof n.description=="function"?await n.description(c):n.description,h=typeof d=="object"&&!U.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:u,...h})}}).finally(()=>{s&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>o.then(()=>i[0]==="reject"?d(i[1]):c(i[1])).catch(d));return typeof a!="string"&&typeof a!="number"?{unwrap:l}:Object.assign(a,{unwrap:l})},this.custom=(t,n)=>{const a=(n==null?void 0:n.id)||zf++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const gt=new ZR,JR=(e,t)=>{const n=(t==null?void 0:t.id)||zf++;return gt.addToast({title:e,...t,id:n}),n},WR=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",e2=JR,t2=()=>gt.toasts,n2=()=>gt.getActiveToasts();Object.assign(e2,{success:gt.success,info:gt.info,warning:gt.warning,error:gt.error,custom:gt.custom,message:gt.message,promise:gt.promise,dismiss:gt.dismiss,loading:gt.loading},{getHistory:t2,getToasts:n2});HR("[data-sonner-toaster][dir=ltr],html[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%)}[data-sonner-toaster][dir=rtl],html[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%)}[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:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[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);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [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)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [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;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left: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);background:var(--normal-bg);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-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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,0)) translateX(var(--swipe-amount-x,0));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{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{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{from{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-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--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-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-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, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-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-sonner-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]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[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]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[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]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[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]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{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%)}");function hl(e){return e.label!==void 0}const a2=3,r2="24px",s2="16px",tv=4e3,i2=356,o2=14,l2=45,c2=200;function un(...e){return e.filter(Boolean).join(" ")}function u2(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const d2=e=>{var t,n,a,r,s,i,o,l,c;const{invert:d,toast:u,unstyled:f,interacting:h,setHeights:x,visibleToasts:y,heights:w,index:g,toasts:v,expanded:b,removeToast:S,defaultRichColors:E,closeButton:_,style:A,cancelButtonStyle:T,actionButtonStyle:k,className:M="",descriptionClassName:H="",duration:F,position:X,gap:L,expandByDefault:I,classNames:C,icons:P,closeButtonAriaLabel:R="Close toast"}=e,[z,q]=U.useState(null),[V,Z]=U.useState(null),[j,D]=U.useState(!1),[G,J]=U.useState(!1),[K,Oe]=U.useState(!1),[ct,ut]=U.useState(!1),[on,ln]=U.useState(!1),[Xa,kr]=U.useState(0),[Su,Ho]=U.useState(0),Qa=U.useRef(u.duration||F||tv),Io=U.useRef(null),dt=U.useRef(null),yE=g===0,bE=g+1<=y,wt=u.type,Nr=u.dismissible!==!1,wE=u.className||"",xE=u.descriptionClassName||"",qo=U.useMemo(()=>w.findIndex(ee=>ee.toastId===u.id)||0,[w,u.id]),SE=U.useMemo(()=>{var ee;return(ee=u.closeButton)!=null?ee:_},[u.closeButton,_]),cp=U.useMemo(()=>u.duration||F||tv,[u.duration,F]),Eu=U.useRef(0),Dr=U.useRef(0),up=U.useRef(0),jr=U.useRef(null),[EE,_E]=X.split("-"),dp=U.useMemo(()=>w.reduce((ee,He,We)=>We>=qo?ee:ee+He.height,0),[w,qo]),fp=QR(),TE=u.invert||d,_u=wt==="loading";Dr.current=U.useMemo(()=>qo*L+dp,[qo,dp]),U.useEffect(()=>{Qa.current=cp},[cp]),U.useEffect(()=>{D(!0)},[]),U.useEffect(()=>{const ee=dt.current;if(ee){const He=ee.getBoundingClientRect().height;return Ho(He),x(We=>[{toastId:u.id,height:He,position:u.position},...We]),()=>x(We=>We.filter(xt=>xt.toastId!==u.id))}},[x,u.id]),U.useLayoutEffect(()=>{if(!j)return;const ee=dt.current,He=ee.style.height;ee.style.height="auto";const We=ee.getBoundingClientRect().height;ee.style.height=He,Ho(We),x(xt=>xt.find(Xe=>Xe.toastId===u.id)?xt.map(Xe=>Xe.toastId===u.id?{...Xe,height:We}:Xe):[{toastId:u.id,height:We,position:u.position},...xt])},[j,u.title,u.description,x,u.id]);const ra=U.useCallback(()=>{J(!0),kr(Dr.current),x(ee=>ee.filter(He=>He.toastId!==u.id)),setTimeout(()=>{S(u)},c2)},[u,S,x,Dr]);U.useEffect(()=>{if(u.promise&&wt==="loading"||u.duration===1/0||u.type==="loading")return;let ee;return b||h||fp?(()=>{if(up.current<Eu.current){const xt=new Date().getTime()-Eu.current;Qa.current=Qa.current-xt}up.current=new Date().getTime()})():(()=>{Qa.current!==1/0&&(Eu.current=new Date().getTime(),ee=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),ra()},Qa.current))})(),()=>clearTimeout(ee)},[b,h,u,wt,fp,ra]),U.useEffect(()=>{u.delete&&ra()},[ra,u.delete]);function AE(){var ee;if(P!=null&&P.loading){var He;return U.createElement("div",{className:un(C==null?void 0:C.loader,u==null||(He=u.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":wt==="loading"},P.loading)}return U.createElement(GR,{className:un(C==null?void 0:C.loader,u==null||(ee=u.classNames)==null?void 0:ee.loader),visible:wt==="loading"})}const CE=u.icon||(P==null?void 0:P[wt])||IR(wt);var hp,mp;return U.createElement("li",{tabIndex:0,ref:dt,className:un(M,wE,C==null?void 0:C.toast,u==null||(t=u.classNames)==null?void 0:t.toast,C==null?void 0:C.default,C==null?void 0:C[wt],u==null||(n=u.classNames)==null?void 0:n[wt]),"data-sonner-toast":"","data-rich-colors":(hp=u.richColors)!=null?hp:E,"data-styled":!(u.jsx||u.unstyled||f),"data-mounted":j,"data-promise":!!u.promise,"data-swiped":on,"data-removed":G,"data-visible":bE,"data-y-position":EE,"data-x-position":_E,"data-index":g,"data-front":yE,"data-swiping":K,"data-dismissible":Nr,"data-type":wt,"data-invert":TE,"data-swipe-out":ct,"data-swipe-direction":V,"data-expanded":!!(b||I&&j),style:{"--index":g,"--toasts-before":g,"--z-index":v.length-g,"--offset":`${G?Xa:Dr.current}px`,"--initial-height":I?"auto":`${Su}px`,...A,...u.style},onDragEnd:()=>{Oe(!1),q(null),jr.current=null},onPointerDown:ee=>{_u||!Nr||(Io.current=new Date,kr(Dr.current),ee.target.setPointerCapture(ee.pointerId),ee.target.tagName!=="BUTTON"&&(Oe(!0),jr.current={x:ee.clientX,y:ee.clientY}))},onPointerUp:()=>{var ee,He,We;if(ct||!Nr)return;jr.current=null;const xt=Number(((ee=dt.current)==null?void 0:ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Go=Number(((He=dt.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Xe=new Date().getTime()-((We=Io.current)==null?void 0:We.getTime()),Mt=z==="x"?xt:Go,Fo=Math.abs(Mt)/Xe;if(Math.abs(Mt)>=l2||Fo>.11){kr(Dr.current),u.onDismiss==null||u.onDismiss.call(u,u),Z(z==="x"?xt>0?"right":"left":Go>0?"down":"up"),ra(),ut(!0);return}else{var Yt,Vt;(Yt=dt.current)==null||Yt.style.setProperty("--swipe-amount-x","0px"),(Vt=dt.current)==null||Vt.style.setProperty("--swipe-amount-y","0px")}ln(!1),Oe(!1),q(null)},onPointerMove:ee=>{var He,We,xt;if(!jr.current||!Nr||((He=window.getSelection())==null?void 0:He.toString().length)>0)return;const Xe=ee.clientY-jr.current.y,Mt=ee.clientX-jr.current.x;var Fo;const Yt=(Fo=e.swipeDirections)!=null?Fo:u2(X);!z&&(Math.abs(Mt)>1||Math.abs(Xe)>1)&&q(Math.abs(Mt)>Math.abs(Xe)?"x":"y");let Vt={x:0,y:0};const pp=Za=>1/(1.5+Math.abs(Za)/20);if(z==="y"){if(Yt.includes("top")||Yt.includes("bottom"))if(Yt.includes("top")&&Xe<0||Yt.includes("bottom")&&Xe>0)Vt.y=Xe;else{const Za=Xe*pp(Xe);Vt.y=Math.abs(Za)<Math.abs(Xe)?Za:Xe}}else if(z==="x"&&(Yt.includes("left")||Yt.includes("right")))if(Yt.includes("left")&&Mt<0||Yt.includes("right")&&Mt>0)Vt.x=Mt;else{const Za=Mt*pp(Mt);Vt.x=Math.abs(Za)<Math.abs(Mt)?Za:Mt}(Math.abs(Vt.x)>0||Math.abs(Vt.y)>0)&&ln(!0),(We=dt.current)==null||We.style.setProperty("--swipe-amount-x",`${Vt.x}px`),(xt=dt.current)==null||xt.style.setProperty("--swipe-amount-y",`${Vt.y}px`)}},SE&&!u.jsx&&wt!=="loading"?U.createElement("button",{"aria-label":R,"data-disabled":_u,"data-close-button":!0,onClick:_u||!Nr?()=>{}:()=>{ra(),u.onDismiss==null||u.onDismiss.call(u,u)},className:un(C==null?void 0:C.closeButton,u==null||(a=u.classNames)==null?void 0:a.closeButton)},(mp=P==null?void 0:P.close)!=null?mp:XR):null,(wt||u.icon||u.promise)&&u.icon!==null&&((P==null?void 0:P[wt])!==null||u.icon)?U.createElement("div",{"data-icon":"",className:un(C==null?void 0:C.icon,u==null||(r=u.classNames)==null?void 0:r.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||AE():null,u.type!=="loading"?CE:null):null,U.createElement("div",{"data-content":"",className:un(C==null?void 0:C.content,u==null||(s=u.classNames)==null?void 0:s.content)},U.createElement("div",{"data-title":"",className:un(C==null?void 0:C.title,u==null||(i=u.classNames)==null?void 0:i.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?U.createElement("div",{"data-description":"",className:un(H,xE,C==null?void 0:C.description,u==null||(o=u.classNames)==null?void 0:o.description)},typeof u.description=="function"?u.description():u.description):null),U.isValidElement(u.cancel)?u.cancel:u.cancel&&hl(u.cancel)?U.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||T,onClick:ee=>{hl(u.cancel)&&Nr&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,ee),ra())},className:un(C==null?void 0:C.cancelButton,u==null||(l=u.classNames)==null?void 0:l.cancelButton)},u.cancel.label):null,U.isValidElement(u.action)?u.action:u.action&&hl(u.action)?U.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||k,onClick:ee=>{hl(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,ee),!ee.defaultPrevented&&ra())},className:un(C==null?void 0:C.actionButton,u==null||(c=u.classNames)==null?void 0:c.actionButton)},u.action.label):null)};function nv(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function f2(e,t){const n={};return[e,t].forEach((a,r)=>{const s=r===1,i=s?"--mobile-offset":"--offset",o=s?s2:r2;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${i}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof a=="number"||typeof a=="string"?l(a):typeof a=="object"?["top","right","bottom","left"].forEach(c=>{a[c]===void 0?n[`${i}-${c}`]=o:n[`${i}-${c}`]=typeof a[c]=="number"?`${a[c]}px`:a[c]}):l(o)}),n}const h2=U.forwardRef(function(t,n){const{invert:a,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:c,mobileOffset:d,theme:u="light",richColors:f,duration:h,style:x,visibleToasts:y=a2,toastOptions:w,dir:g=nv(),gap:v=o2,icons:b,containerAriaLabel:S="Notifications"}=t,[E,_]=U.useState([]),A=U.useMemo(()=>Array.from(new Set([r].concat(E.filter(V=>V.position).map(V=>V.position)))),[E,r]),[T,k]=U.useState([]),[M,H]=U.useState(!1),[F,X]=U.useState(!1),[L,I]=U.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),C=U.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),R=U.useRef(null),z=U.useRef(!1),q=U.useCallback(V=>{_(Z=>{var j;return(j=Z.find(D=>D.id===V.id))!=null&&j.delete||gt.dismiss(V.id),Z.filter(({id:D})=>D!==V.id)})},[]);return U.useEffect(()=>gt.subscribe(V=>{if(V.dismiss){requestAnimationFrame(()=>{_(Z=>Z.map(j=>j.id===V.id?{...j,delete:!0}:j))});return}setTimeout(()=>{Dy.flushSync(()=>{_(Z=>{const j=Z.findIndex(D=>D.id===V.id);return j!==-1?[...Z.slice(0,j),{...Z[j],...V},...Z.slice(j+1)]:[V,...Z]})})})}),[E]),U.useEffect(()=>{if(u!=="system"){I(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?I("dark"):I("light")),typeof window>"u")return;const V=window.matchMedia("(prefers-color-scheme: dark)");try{V.addEventListener("change",({matches:Z})=>{I(Z?"dark":"light")})}catch{V.addListener(({matches:j})=>{try{I(j?"dark":"light")}catch(D){console.error(D)}})}},[u]),U.useEffect(()=>{E.length<=1&&H(!1)},[E]),U.useEffect(()=>{const V=Z=>{var j;if(s.every(J=>Z[J]||Z.code===J)){var G;H(!0),(G=C.current)==null||G.focus()}Z.code==="Escape"&&(document.activeElement===C.current||(j=C.current)!=null&&j.contains(document.activeElement))&&H(!1)};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[s]),U.useEffect(()=>{if(C.current)return()=>{R.current&&(R.current.focus({preventScroll:!0}),R.current=null,z.current=!1)}},[C.current]),U.createElement("section",{ref:n,"aria-label":`${S} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},A.map((V,Z)=>{var j;const[D,G]=V.split("-");return E.length?U.createElement("ol",{key:V,dir:g==="auto"?nv():g,tabIndex:-1,ref:C,className:l,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":D,"data-lifted":M&&E.length>1&&!i,"data-x-position":G,style:{"--front-toast-height":`${((j=T[0])==null?void 0:j.height)||0}px`,"--width":`${i2}px`,"--gap":`${v}px`,...x,...f2(c,d)},onBlur:J=>{z.current&&!J.currentTarget.contains(J.relatedTarget)&&(z.current=!1,R.current&&(R.current.focus({preventScroll:!0}),R.current=null))},onFocus:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||z.current||(z.current=!0,R.current=J.relatedTarget)},onMouseEnter:()=>H(!0),onMouseMove:()=>H(!0),onMouseLeave:()=>{F||H(!1)},onDragEnd:()=>H(!1),onPointerDown:J=>{J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false"||X(!0)},onPointerUp:()=>X(!1)},E.filter(J=>!J.position&&Z===0||J.position===V).map((J,K)=>{var Oe,ct;return U.createElement(d2,{key:J.id,icons:b,index:K,toast:J,defaultRichColors:f,duration:(Oe=w==null?void 0:w.duration)!=null?Oe:h,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:a,visibleToasts:y,closeButton:(ct=w==null?void 0:w.closeButton)!=null?ct:o,interacting:F,position:V,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:q,toasts:E.filter(ut=>ut.position==J.position),heights:T.filter(ut=>ut.position==J.position),setHeights:k,expandByDefault:i,gap:v,expanded:M,swipeDirections:t.swipeDirections})})):null}))}),m2=({...e})=>{const{theme:t="system"}=$R();return p.jsx(h2,{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 p2=Ry[" useId ".trim().toString()]||(()=>{}),g2=0;function Bi(e){const[t,n]=m.useState(p2());return Sn(()=>{n(a=>a??String(g2++))},[e]),t?`radix-${t}`:""}const v2=["top","right","bottom","left"],Ia=Math.min,At=Math.max,Ec=Math.round,ml=Math.floor,xn=e=>({x:e,y:e}),y2={left:"right",right:"left",bottom:"top",top:"bottom"},b2={start:"end",end:"start"};function Bf(e,t,n){return At(e,Ia(t,n))}function Zn(e,t){return typeof e=="function"?e(t):e}function Jn(e){return e.split("-")[0]}function Ws(e){return e.split("-")[1]}function fm(e){return e==="x"?"y":"x"}function hm(e){return e==="y"?"height":"width"}function Fn(e){return["top","bottom"].includes(Jn(e))?"y":"x"}function mm(e){return fm(Fn(e))}function w2(e,t,n){n===void 0&&(n=!1);const a=Ws(e),r=mm(e),s=hm(r);let i=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=_c(i)),[i,_c(i)]}function x2(e){const t=_c(e);return[$f(e),t,$f(t)]}function $f(e){return e.replace(/start|end/g,t=>b2[t])}function S2(e,t,n){const a=["left","right"],r=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:a:t?a:r;case"left":case"right":return t?s:i;default:return[]}}function E2(e,t,n,a){const r=Ws(e);let s=S2(Jn(e),n==="start",a);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map($f)))),s}function _c(e){return e.replace(/left|right|bottom|top/g,t=>y2[t])}function _2(e){return{top:0,right:0,bottom:0,left:0,...e}}function lx(e){return typeof e!="number"?_2(e):{top:e,right:e,bottom:e,left:e}}function Tc(e){const{x:t,y:n,width:a,height:r}=e;return{width:a,height:r,top:n,left:t,right:t+a,bottom:n+r,x:t,y:n}}function av(e,t,n){let{reference:a,floating:r}=e;const s=Fn(t),i=mm(t),o=hm(i),l=Jn(t),c=s==="y",d=a.x+a.width/2-r.width/2,u=a.y+a.height/2-r.height/2,f=a[o]/2-r[o]/2;let h;switch(l){case"top":h={x:d,y:a.y-r.height};break;case"bottom":h={x:d,y:a.y+a.height};break;case"right":h={x:a.x+a.width,y:u};break;case"left":h={x:a.x-r.width,y:u};break;default:h={x:a.x,y:a.y}}switch(Ws(t)){case"start":h[i]-=f*(n&&c?-1:1);break;case"end":h[i]+=f*(n&&c?-1:1);break}return h}const T2=async(e,t,n)=>{const{placement:a="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,o=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:u}=av(c,a,l),f=a,h={},x=0;for(let y=0;y<o.length;y++){const{name:w,fn:g}=o[y],{x:v,y:b,data:S,reset:E}=await g({x:d,y:u,initialPlacement:a,placement:f,strategy:r,middlewareData:h,rects:c,platform:i,elements:{reference:e,floating:t}});d=v??d,u=b??u,h={...h,[w]:{...h[w],...S}},E&&x<=50&&(x++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:d,y:u}=av(c,f,l)),y=-1)}return{x:d,y:u,placement:f,strategy:r,middlewareData:h}};async function ro(e,t){var n;t===void 0&&(t={});const{x:a,y:r,platform:s,rects:i,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:h=0}=Zn(t,e),x=lx(h),w=o[f?u==="floating"?"reference":"floating":u],g=Tc(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:d,strategy:l})),v=u==="floating"?{x:a,y:r,width:i.floating.width,height:i.floating.height}:i.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),S=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},E=Tc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-E.top+x.top)/S.y,bottom:(E.bottom-g.bottom+x.bottom)/S.y,left:(g.left-E.left+x.left)/S.x,right:(E.right-g.right+x.right)/S.x}}const A2=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:r,rects:s,platform:i,elements:o,middlewareData:l}=t,{element:c,padding:d=0}=Zn(e,t)||{};if(c==null)return{};const u=lx(d),f={x:n,y:a},h=mm(r),x=hm(h),y=await i.getDimensions(c),w=h==="y",g=w?"top":"left",v=w?"bottom":"right",b=w?"clientHeight":"clientWidth",S=s.reference[x]+s.reference[h]-f[h]-s.floating[x],E=f[h]-s.reference[h],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let A=_?_[b]:0;(!A||!await(i.isElement==null?void 0:i.isElement(_)))&&(A=o.floating[b]||s.floating[x]);const T=S/2-E/2,k=A/2-y[x]/2-1,M=Ia(u[g],k),H=Ia(u[v],k),F=M,X=A-y[x]-H,L=A/2-y[x]/2+T,I=Bf(F,L,X),C=!l.arrow&&Ws(r)!=null&&L!==I&&s.reference[x]/2-(L<F?M:H)-y[x]/2<0,P=C?L<F?L-F:L-X:0;return{[h]:f[h]+P,data:{[h]:I,centerOffset:L-I-P,...C&&{alignmentOffset:P}},reset:C}}}),C2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:r,middlewareData:s,rects:i,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:y=!0,...w}=Zn(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const g=Jn(r),v=Fn(o),b=Jn(o)===o,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=f||(b||!y?[_c(o)]:x2(o)),_=x!=="none";!f&&_&&E.push(...E2(o,y,x,S));const A=[o,...E],T=await ro(t,w),k=[];let M=((a=s.flip)==null?void 0:a.overflows)||[];if(d&&k.push(T[g]),u){const I=w2(r,i,S);k.push(T[I[0]],T[I[1]])}if(M=[...M,{placement:r,overflows:k}],!k.every(I=>I<=0)){var H,F;const I=(((H=s.flip)==null?void 0:H.index)||0)+1,C=A[I];if(C){var X;const R=u==="alignment"?v!==Fn(C):!1,z=((X=M[0])==null?void 0:X.overflows[0])>0;if(!R||z)return{data:{index:I,overflows:M},reset:{placement:C}}}let P=(F=M.filter(R=>R.overflows[0]<=0).sort((R,z)=>R.overflows[1]-z.overflows[1])[0])==null?void 0:F.placement;if(!P)switch(h){case"bestFit":{var L;const R=(L=M.filter(z=>{if(_){const q=Fn(z.placement);return q===v||q==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(q=>q>0).reduce((q,V)=>q+V,0)]).sort((z,q)=>z[1]-q[1])[0])==null?void 0:L[0];R&&(P=R);break}case"initialPlacement":P=o;break}if(r!==P)return{reset:{placement:P}}}return{}}}};function rv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function sv(e){return v2.some(t=>e[t]>=0)}const R2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:a="referenceHidden",...r}=Zn(e,t);switch(a){case"referenceHidden":{const s=await ro(t,{...r,elementContext:"reference"}),i=rv(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:sv(i)}}}case"escaped":{const s=await ro(t,{...r,altBoundary:!0}),i=rv(s,n.floating);return{data:{escapedOffsets:i,escaped:sv(i)}}}default:return{}}}}};async function O2(e,t){const{placement:n,platform:a,elements:r}=e,s=await(a.isRTL==null?void 0:a.isRTL(r.floating)),i=Jn(n),o=Ws(n),l=Fn(n)==="y",c=["left","top"].includes(i)?-1:1,d=s&&l?-1:1,u=Zn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:x}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof x=="number"&&(h=o==="end"?x*-1:x),l?{x:h*d,y:f*c}:{x:f*c,y:h*d}}const k2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:r,y:s,placement:i,middlewareData:o}=t,l=await O2(t,e);return i===((n=o.offset)==null?void 0:n.placement)&&(a=o.arrow)!=null&&a.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},N2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:r}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:o={fn:w=>{let{x:g,y:v}=w;return{x:g,y:v}}},...l}=Zn(e,t),c={x:n,y:a},d=await ro(t,l),u=Fn(Jn(r)),f=fm(u);let h=c[f],x=c[u];if(s){const w=f==="y"?"top":"left",g=f==="y"?"bottom":"right",v=h+d[w],b=h-d[g];h=Bf(v,h,b)}if(i){const w=u==="y"?"top":"left",g=u==="y"?"bottom":"right",v=x+d[w],b=x-d[g];x=Bf(v,x,b)}const y=o.fn({...t,[f]:h,[u]:x});return{...y,data:{x:y.x-n,y:y.y-a,enabled:{[f]:s,[u]:i}}}}}},D2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:r,rects:s,middlewareData:i}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=Zn(e,t),d={x:n,y:a},u=Fn(r),f=fm(u);let h=d[f],x=d[u];const y=Zn(o,t),w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const b=f==="y"?"height":"width",S=s.reference[f]-s.floating[b]+w.mainAxis,E=s.reference[f]+s.reference[b]-w.mainAxis;h<S?h=S:h>E&&(h=E)}if(c){var g,v;const b=f==="y"?"width":"height",S=["top","left"].includes(Jn(r)),E=s.reference[u]-s.floating[b]+(S&&((g=i.offset)==null?void 0:g[u])||0)+(S?0:w.crossAxis),_=s.reference[u]+s.reference[b]+(S?0:((v=i.offset)==null?void 0:v[u])||0)-(S?w.crossAxis:0);x<E?x=E:x>_&&(x=_)}return{[f]:h,[u]:x}}}},j2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:r,rects:s,platform:i,elements:o}=t,{apply:l=()=>{},...c}=Zn(e,t),d=await ro(t,c),u=Jn(r),f=Ws(r),h=Fn(r)==="y",{width:x,height:y}=s.floating;let w,g;u==="top"||u==="bottom"?(w=u,g=f===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(g=u,w=f==="end"?"top":"bottom");const v=y-d.top-d.bottom,b=x-d.left-d.right,S=Ia(y-d[w],v),E=Ia(x-d[g],b),_=!t.middlewareData.shift;let A=S,T=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=b),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(A=v),_&&!f){const M=At(d.left,0),H=At(d.right,0),F=At(d.top,0),X=At(d.bottom,0);h?T=x-2*(M!==0||H!==0?M+H:At(d.left,d.right)):A=y-2*(F!==0||X!==0?F+X:At(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:A});const k=await i.getDimensions(o.floating);return x!==k.width||y!==k.height?{reset:{rects:!0}}:{}}}};function Jc(){return typeof window<"u"}function ei(e){return cx(e)?(e.nodeName||"").toLowerCase():"#document"}function Dt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cn(e){var t;return(t=(cx(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function cx(e){return Jc()?e instanceof Node||e instanceof Dt(e).Node:!1}function tn(e){return Jc()?e instanceof Element||e instanceof Dt(e).Element:!1}function En(e){return Jc()?e instanceof HTMLElement||e instanceof Dt(e).HTMLElement:!1}function iv(e){return!Jc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Dt(e).ShadowRoot}function jo(e){const{overflow:t,overflowX:n,overflowY:a,display:r}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!["inline","contents"].includes(r)}function M2(e){return["table","td","th"].includes(ei(e))}function Wc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function pm(e){const t=gm(),n=tn(e)?nn(e):e;return["transform","translate","scale","rotate","perspective"].some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(a=>(n.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(n.contain||"").includes(a))}function L2(e){let t=qa(e);for(;En(t)&&!Bs(t);){if(pm(t))return t;if(Wc(t))return null;t=qa(t)}return null}function gm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bs(e){return["html","body","#document"].includes(ei(e))}function nn(e){return Dt(e).getComputedStyle(e)}function eu(e){return tn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function qa(e){if(ei(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iv(e)&&e.host||Cn(e);return iv(t)?t.host:t}function ux(e){const t=qa(e);return Bs(t)?e.ownerDocument?e.ownerDocument.body:e.body:En(t)&&jo(t)?t:ux(t)}function so(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=ux(e),s=r===((a=e.ownerDocument)==null?void 0:a.body),i=Dt(r);if(s){const o=Hf(i);return t.concat(i,i.visualViewport||[],jo(r)?r:[],o&&n?so(o):[])}return t.concat(r,so(r,[],n))}function Hf(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function dx(e){const t=nn(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const r=En(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:a,o=Ec(n)!==s||Ec(a)!==i;return o&&(n=s,a=i),{width:n,height:a,$:o}}function vm(e){return tn(e)?e:e.contextElement}function ms(e){const t=vm(e);if(!En(t))return xn(1);const n=t.getBoundingClientRect(),{width:a,height:r,$:s}=dx(t);let i=(s?Ec(n.width):n.width)/a,o=(s?Ec(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}const U2=xn(0);function fx(e){const t=Dt(e);return!gm()||!t.visualViewport?U2:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function P2(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Dt(e)?!1:t}function Er(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=vm(e);let i=xn(1);t&&(a?tn(a)&&(i=ms(a)):i=ms(e));const o=P2(s,n,a)?fx(s):xn(0);let l=(r.left+o.x)/i.x,c=(r.top+o.y)/i.y,d=r.width/i.x,u=r.height/i.y;if(s){const f=Dt(s),h=a&&tn(a)?Dt(a):a;let x=f,y=Hf(x);for(;y&&a&&h!==x;){const w=ms(y),g=y.getBoundingClientRect(),v=nn(y),b=g.left+(y.clientLeft+parseFloat(v.paddingLeft))*w.x,S=g.top+(y.clientTop+parseFloat(v.paddingTop))*w.y;l*=w.x,c*=w.y,d*=w.x,u*=w.y,l+=b,c+=S,x=Dt(y),y=Hf(x)}}return Tc({width:d,height:u,x:l,y:c})}function ym(e,t){const n=eu(e).scrollLeft;return t?t.left+n:Er(Cn(e)).left+n}function hx(e,t,n){n===void 0&&(n=!1);const a=e.getBoundingClientRect(),r=a.left+t.scrollLeft-(n?0:ym(e,a)),s=a.top+t.scrollTop;return{x:r,y:s}}function z2(e){let{elements:t,rect:n,offsetParent:a,strategy:r}=e;const s=r==="fixed",i=Cn(a),o=t?Wc(t.floating):!1;if(a===i||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=xn(1);const d=xn(0),u=En(a);if((u||!u&&!s)&&((ei(a)!=="body"||jo(i))&&(l=eu(a)),En(a))){const h=Er(a);c=ms(a),d.x=h.x+a.clientLeft,d.y=h.y+a.clientTop}const f=i&&!u&&!s?hx(i,l,!0):xn(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}}function B2(e){return Array.from(e.getClientRects())}function $2(e){const t=Cn(e),n=eu(e),a=e.ownerDocument.body,r=At(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),s=At(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let i=-n.scrollLeft+ym(e);const o=-n.scrollTop;return nn(a).direction==="rtl"&&(i+=At(t.clientWidth,a.clientWidth)-r),{width:r,height:s,x:i,y:o}}function H2(e,t){const n=Dt(e),a=Cn(e),r=n.visualViewport;let s=a.clientWidth,i=a.clientHeight,o=0,l=0;if(r){s=r.width,i=r.height;const c=gm();(!c||c&&t==="fixed")&&(o=r.offsetLeft,l=r.offsetTop)}return{width:s,height:i,x:o,y:l}}function I2(e,t){const n=Er(e,!0,t==="fixed"),a=n.top+e.clientTop,r=n.left+e.clientLeft,s=En(e)?ms(e):xn(1),i=e.clientWidth*s.x,o=e.clientHeight*s.y,l=r*s.x,c=a*s.y;return{width:i,height:o,x:l,y:c}}function ov(e,t,n){let a;if(t==="viewport")a=H2(e,n);else if(t==="document")a=$2(Cn(e));else if(tn(t))a=I2(t,n);else{const r=fx(e);a={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Tc(a)}function mx(e,t){const n=qa(e);return n===t||!tn(n)||Bs(n)?!1:nn(n).position==="fixed"||mx(n,t)}function q2(e,t){const n=t.get(e);if(n)return n;let a=so(e,[],!1).filter(o=>tn(o)&&ei(o)!=="body"),r=null;const s=nn(e).position==="fixed";let i=s?qa(e):e;for(;tn(i)&&!Bs(i);){const o=nn(i),l=pm(i);!l&&o.position==="fixed"&&(r=null),(s?!l&&!r:!l&&o.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||jo(i)&&!l&&mx(e,i))?a=a.filter(d=>d!==i):r=o,i=qa(i)}return t.set(e,a),a}function G2(e){let{element:t,boundary:n,rootBoundary:a,strategy:r}=e;const i=[...n==="clippingAncestors"?Wc(t)?[]:q2(t,this._c):[].concat(n),a],o=i[0],l=i.reduce((c,d)=>{const u=ov(t,d,r);return c.top=At(u.top,c.top),c.right=Ia(u.right,c.right),c.bottom=Ia(u.bottom,c.bottom),c.left=At(u.left,c.left),c},ov(t,o,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function F2(e){const{width:t,height:n}=dx(e);return{width:t,height:n}}function Y2(e,t,n){const a=En(t),r=Cn(t),s=n==="fixed",i=Er(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=xn(0);function c(){l.x=ym(r)}if(a||!a&&!s)if((ei(t)!=="body"||jo(r))&&(o=eu(t)),a){const h=Er(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else r&&c();s&&!a&&r&&c();const d=r&&!a&&!s?hx(r,o):xn(0),u=i.left+o.scrollLeft-l.x-d.x,f=i.top+o.scrollTop-l.y-d.y;return{x:u,y:f,width:i.width,height:i.height}}function hd(e){return nn(e).position==="static"}function lv(e,t){if(!En(e)||nn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Cn(e)===n&&(n=n.ownerDocument.body),n}function px(e,t){const n=Dt(e);if(Wc(e))return n;if(!En(e)){let r=qa(e);for(;r&&!Bs(r);){if(tn(r)&&!hd(r))return r;r=qa(r)}return n}let a=lv(e,t);for(;a&&M2(a)&&hd(a);)a=lv(a,t);return a&&Bs(a)&&hd(a)&&!pm(a)?n:a||L2(e)||n}const V2=async function(e){const t=this.getOffsetParent||px,n=this.getDimensions,a=await n(e.floating);return{reference:Y2(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function K2(e){return nn(e).direction==="rtl"}const X2={convertOffsetParentRelativeRectToViewportRelativeRect:z2,getDocumentElement:Cn,getClippingRect:G2,getOffsetParent:px,getElementRects:V2,getClientRects:B2,getDimensions:F2,getScale:ms,isElement:tn,isRTL:K2};function gx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Q2(e,t){let n=null,a;const r=Cn(e);function s(){var o;clearTimeout(a),(o=n)==null||o.disconnect(),n=null}function i(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:h}=c;if(o||t(),!f||!h)return;const x=ml(u),y=ml(r.clientWidth-(d+f)),w=ml(r.clientHeight-(u+h)),g=ml(d),b={rootMargin:-x+"px "+-y+"px "+-w+"px "+-g+"px",threshold:At(0,Ia(1,l))||1};let S=!0;function E(_){const A=_[0].intersectionRatio;if(A!==l){if(!S)return i();A?i(!1,A):a=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!gx(c,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(E,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,b)}n.observe(e)}return i(!0),s}function Z2(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=a,c=vm(e),d=r||s?[...c?so(c):[],...so(t)]:[];d.forEach(g=>{r&&g.addEventListener("scroll",n,{passive:!0}),s&&g.addEventListener("resize",n)});const u=c&&o?Q2(c,n):null;let f=-1,h=null;i&&(h=new ResizeObserver(g=>{let[v]=g;v&&v.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let x,y=l?Er(e):null;l&&w();function w(){const g=Er(e);y&&!gx(y,g)&&n(),y=g,x=requestAnimationFrame(w)}return n(),()=>{var g;d.forEach(v=>{r&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),u==null||u(),(g=h)==null||g.disconnect(),h=null,l&&cancelAnimationFrame(x)}}const J2=k2,W2=N2,eO=C2,tO=j2,nO=R2,cv=A2,aO=D2,rO=(e,t,n)=>{const a=new Map,r={platform:X2,...n},s={...r.platform,_c:a};return T2(e,t,{...r,platform:s})};var Hl=typeof document<"u"?m.useLayoutEffect:m.useEffect;function Ac(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 n,a,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!Ac(e[a],t[a]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,r[a]))return!1;for(a=n;a--!==0;){const s=r[a];if(!(s==="_owner"&&e.$$typeof)&&!Ac(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function vx(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uv(e,t){const n=vx(e);return Math.round(t*n)/n}function md(e){const t=m.useRef(e);return Hl(()=>{t.current=e}),t}function sO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:r,elements:{reference:s,floating:i}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[d,u]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=m.useState(a);Ac(f,a)||h(a);const[x,y]=m.useState(null),[w,g]=m.useState(null),v=m.useCallback(R=>{R!==_.current&&(_.current=R,y(R))},[]),b=m.useCallback(R=>{R!==A.current&&(A.current=R,g(R))},[]),S=s||x,E=i||w,_=m.useRef(null),A=m.useRef(null),T=m.useRef(d),k=l!=null,M=md(l),H=md(r),F=md(c),X=m.useCallback(()=>{if(!_.current||!A.current)return;const R={placement:t,strategy:n,middleware:f};H.current&&(R.platform=H.current),rO(_.current,A.current,R).then(z=>{const q={...z,isPositioned:F.current!==!1};L.current&&!Ac(T.current,q)&&(T.current=q,mo.flushSync(()=>{u(q)}))})},[f,t,n,H,F]);Hl(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,u(R=>({...R,isPositioned:!1})))},[c]);const L=m.useRef(!1);Hl(()=>(L.current=!0,()=>{L.current=!1}),[]),Hl(()=>{if(S&&(_.current=S),E&&(A.current=E),S&&E){if(M.current)return M.current(S,E,X);X()}},[S,E,X,M,k]);const I=m.useMemo(()=>({reference:_,floating:A,setReference:v,setFloating:b}),[v,b]),C=m.useMemo(()=>({reference:S,floating:E}),[S,E]),P=m.useMemo(()=>{const R={position:n,left:0,top:0};if(!C.floating)return R;const z=uv(C.floating,d.x),q=uv(C.floating,d.y);return o?{...R,transform:"translate("+z+"px, "+q+"px)",...vx(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,o,C.floating,d.x,d.y]);return m.useMemo(()=>({...d,update:X,refs:I,elements:C,floatingStyles:P}),[d,X,I,C,P])}const iO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:r}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?cv({element:a.current,padding:r}).fn(n):{}:a?cv({element:a,padding:r}).fn(n):{}}}},oO=(e,t)=>({...J2(e),options:[e,t]}),lO=(e,t)=>({...W2(e),options:[e,t]}),cO=(e,t)=>({...aO(e),options:[e,t]}),uO=(e,t)=>({...eO(e),options:[e,t]}),dO=(e,t)=>({...tO(e),options:[e,t]}),fO=(e,t)=>({...nO(e),options:[e,t]}),hO=(e,t)=>({...iO(e),options:[e,t]});var mO="Arrow",yx=m.forwardRef((e,t)=>{const{children:n,width:a=10,height:r=5,...s}=e;return p.jsx(ce.svg,{...s,ref:t,width:a,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});yx.displayName=mO;var pO=yx;function bm(e){const[t,n]=m.useState(void 0);return Sn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,o;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,o=c.blockSize}else i=e.offsetWidth,o=e.offsetHeight;n({width:i,height:o})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var bx="Popper",[wx,xx]=rn(bx),[kL,Sx]=wx(bx),Ex="PopperAnchor",_x=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...r}=e,s=Sx(Ex,n),i=m.useRef(null),o=Ae(t,i);return m.useEffect(()=>{s.onAnchorChange((a==null?void 0:a.current)||i.current)}),a?null:p.jsx(ce.div,{...r,ref:o})});_x.displayName=Ex;var wm="PopperContent",[gO,vO]=wx(wm),Tx=m.forwardRef((e,t)=>{var K,Oe,ct,ut,on,ln;const{__scopePopper:n,side:a="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:u="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:x,...y}=e,w=Sx(wm,n),[g,v]=m.useState(null),b=Ae(t,Xa=>v(Xa)),[S,E]=m.useState(null),_=bm(S),A=(_==null?void 0:_.width)??0,T=(_==null?void 0:_.height)??0,k=a+(s!=="center"?"-"+s:""),M=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},H=Array.isArray(c)?c:[c],F=H.length>0,X={padding:M,boundary:H.filter(bO),altBoundary:F},{refs:L,floatingStyles:I,placement:C,isPositioned:P,middlewareData:R}=sO({strategy:"fixed",placement:k,whileElementsMounted:(...Xa)=>Z2(...Xa,{animationFrame:h==="always"}),elements:{reference:w.anchor},middleware:[oO({mainAxis:r+T,alignmentAxis:i}),l&&lO({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?cO():void 0,...X}),l&&uO({...X}),dO({...X,apply:({elements:Xa,rects:kr,availableWidth:Su,availableHeight:Ho})=>{const{width:Qa,height:Io}=kr.reference,dt=Xa.floating.style;dt.setProperty("--radix-popper-available-width",`${Su}px`),dt.setProperty("--radix-popper-available-height",`${Ho}px`),dt.setProperty("--radix-popper-anchor-width",`${Qa}px`),dt.setProperty("--radix-popper-anchor-height",`${Io}px`)}}),S&&hO({element:S,padding:o}),wO({arrowWidth:A,arrowHeight:T}),f&&fO({strategy:"referenceHidden",...X})]}),[z,q]=Rx(C),V=en(x);Sn(()=>{P&&(V==null||V())},[P,V]);const Z=(K=R.arrow)==null?void 0:K.x,j=(Oe=R.arrow)==null?void 0:Oe.y,D=((ct=R.arrow)==null?void 0:ct.centerOffset)!==0,[G,J]=m.useState();return Sn(()=>{g&&J(window.getComputedStyle(g).zIndex)},[g]),p.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:P?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(ut=R.transformOrigin)==null?void 0:ut.x,(on=R.transformOrigin)==null?void 0:on.y].join(" "),...((ln=R.hide)==null?void 0:ln.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(gO,{scope:n,placedSide:z,onArrowChange:E,arrowX:Z,arrowY:j,shouldHideArrow:D,children:p.jsx(ce.div,{"data-side":z,"data-align":q,...y,ref:b,style:{...y.style,animation:P?void 0:"none"}})})})});Tx.displayName=wm;var Ax="PopperArrow",yO={top:"bottom",right:"left",bottom:"top",left:"right"},Cx=m.forwardRef(function(t,n){const{__scopePopper:a,...r}=t,s=vO(Ax,a),i=yO[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(pO,{...r,ref:n,style:{...r.style,display:"block"}})})});Cx.displayName=Ax;function bO(e){return e!==null}var wO=e=>({name:"transformOrigin",options:e,fn(t){var w,g,v;const{placement:n,rects:a,middlewareData:r}=t,i=((w=r.arrow)==null?void 0:w.centerOffset)!==0,o=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=Rx(n),u={start:"0%",center:"50%",end:"100%"}[d],f=(((g=r.arrow)==null?void 0:g.x)??0)+o/2,h=(((v=r.arrow)==null?void 0:v.y)??0)+l/2;let x="",y="";return c==="bottom"?(x=i?u:`${f}px`,y=`${-l}px`):c==="top"?(x=i?u:`${f}px`,y=`${a.floating.height+l}px`):c==="right"?(x=`${-l}px`,y=i?u:`${h}px`):c==="left"&&(x=`${a.floating.width+l}px`,y=i?u:`${h}px`),{data:{x,y}}}});function Rx(e){const[t,n="center"]=e.split("-");return[t,n]}var xO=_x,SO=Tx,EO=Cx,[tu,NL]=rn("Tooltip",[xx]),xm=xx(),Ox="TooltipProvider",_O=700,dv="tooltip.open",[TO,kx]=tu(Ox),Nx=e=>{const{__scopeTooltip:t,delayDuration:n=_O,skipDelayDuration:a=300,disableHoverableContent:r=!1,children:s}=e,i=m.useRef(!0),o=m.useRef(!1),l=m.useRef(0);return m.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(TO,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:m.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:m.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,a)},[a]),isPointerInTransitRef:o,onPointerInTransitChange:m.useCallback(c=>{o.current=c},[]),disableHoverableContent:r,children:s})};Nx.displayName=Ox;var Dx="Tooltip",[DL,nu]=tu(Dx),If="TooltipTrigger",AO=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,r=nu(If,n),s=kx(If,n),i=xm(n),o=m.useRef(null),l=Ae(t,o,r.onTriggerChange),c=m.useRef(!1),d=m.useRef(!1),u=m.useCallback(()=>c.current=!1,[]);return m.useEffect(()=>()=>document.removeEventListener("pointerup",u),[u]),p.jsx(xO,{asChild:!0,...i,children:p.jsx(ce.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...a,ref:l,onPointerMove:ie(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:ie(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:ie(e.onPointerDown,()=>{r.open&&r.onClose(),c.current=!0,document.addEventListener("pointerup",u,{once:!0})}),onFocus:ie(e.onFocus,()=>{c.current||r.onOpen()}),onBlur:ie(e.onBlur,r.onClose),onClick:ie(e.onClick,r.onClose)})})});AO.displayName=If;var CO="TooltipPortal",[jL,RO]=tu(CO,{forceMount:void 0}),$s="TooltipContent",jx=m.forwardRef((e,t)=>{const n=RO($s,e.__scopeTooltip),{forceMount:a=n.forceMount,side:r="top",...s}=e,i=nu($s,e.__scopeTooltip);return p.jsx(ta,{present:a||i.open,children:i.disableHoverableContent?p.jsx(Mx,{side:r,...s,ref:t}):p.jsx(OO,{side:r,...s,ref:t})})}),OO=m.forwardRef((e,t)=>{const n=nu($s,e.__scopeTooltip),a=kx($s,e.__scopeTooltip),r=m.useRef(null),s=Ae(t,r),[i,o]=m.useState(null),{trigger:l,onClose:c}=n,d=r.current,{onPointerInTransitChange:u}=a,f=m.useCallback(()=>{o(null),u(!1)},[u]),h=m.useCallback((x,y)=>{const w=x.currentTarget,g={x:x.clientX,y:x.clientY},v=MO(g,w.getBoundingClientRect()),b=LO(g,v),S=UO(y.getBoundingClientRect()),E=zO([...b,...S]);o(E),u(!0)},[u]);return m.useEffect(()=>()=>f(),[f]),m.useEffect(()=>{if(l&&d){const x=w=>h(w,d),y=w=>h(w,l);return l.addEventListener("pointerleave",x),d.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",x),d.removeEventListener("pointerleave",y)}}},[l,d,h,f]),m.useEffect(()=>{if(i){const x=y=>{const w=y.target,g={x:y.clientX,y:y.clientY},v=(l==null?void 0:l.contains(w))||(d==null?void 0:d.contains(w)),b=!PO(g,i);v?f():b&&(f(),c())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,d,i,c,f]),p.jsx(Mx,{...e,ref:s})}),[kO,NO]=tu(Dx,{isInside:!1}),DO=gw("TooltipContent"),Mx=m.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:i,...o}=e,l=nu($s,n),c=xm(n),{onClose:d}=l;return m.useEffect(()=>(document.addEventListener(dv,d),()=>document.removeEventListener(dv,d)),[d]),m.useEffect(()=>{if(l.trigger){const u=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&d()};return window.addEventListener("scroll",u,{capture:!0}),()=>window.removeEventListener("scroll",u,{capture:!0})}},[l.trigger,d]),p.jsx(Xc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:u=>u.preventDefault(),onDismiss:d,children:p.jsxs(SO,{"data-state":l.stateAttribute,...c,...o,ref:t,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(DO,{children:a}),p.jsx(kO,{scope:n,isInside:!0,children:p.jsx(nC,{id:l.contentId,role:"tooltip",children:r||a})})]})})});jx.displayName=$s;var Lx="TooltipArrow",jO=m.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,r=xm(n);return NO(Lx,n).isInside?null:p.jsx(EO,{...r,...a,ref:t})});jO.displayName=Lx;function MO(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,a,r,s)){case s:return"left";case r:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function LO(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function UO(e){const{top:t,right:n,bottom:a,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:a},{x:r,y:a}]}function PO(e,t){const{x:n,y:a}=e;let r=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const o=t[s],l=t[i],c=o.x,d=o.y,u=l.x,f=l.y;d>a!=f>a&&n<(u-c)*(a-d)/(f-d)+c&&(r=!r)}return r}function zO(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),BO(t)}function BO(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const r=e[a];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const r=e[a];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var $O=Nx,Ux=jx;const HO=$O,IO=m.forwardRef(({className:e,sideOffset:t=4,...n},a)=>p.jsx(Ux,{ref:a,sideOffset:t,className:pe("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));IO.displayName=Ux.displayName;var au=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(){}},ru=typeof window>"u"||"Deno"in globalThis;function Kt(){}function qO(e,t){return typeof e=="function"?e(t):e}function GO(e){return typeof e=="number"&&e>=0&&e!==1/0}function FO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fv(e,t){return typeof e=="function"?e(t):e}function YO(e,t){return typeof e=="function"?e(t):e}function hv(e,t){const{type:n="all",exact:a,fetchStatus:r,predicate:s,queryKey:i,stale:o}=e;if(i){if(a){if(t.queryHash!==Sm(i,t.options))return!1}else if(!oo(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||r&&r!==t.state.fetchStatus||s&&!s(t))}function mv(e,t){const{exact:n,status:a,predicate:r,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(io(t.options.mutationKey)!==io(s))return!1}else if(!oo(t.options.mutationKey,s))return!1}return!(a&&t.state.status!==a||r&&!r(t))}function Sm(e,t){return((t==null?void 0:t.queryKeyHashFn)||io)(e)}function io(e){return JSON.stringify(e,(t,n)=>qf(n)?Object.keys(n).sort().reduce((a,r)=>(a[r]=n[r],a),{}):n)}function oo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>oo(e[n],t[n])):!1}function Px(e,t){if(e===t)return e;const n=pv(e)&&pv(t);if(n||qf(e)&&qf(t)){const a=n?e:Object.keys(e),r=a.length,s=n?t:Object.keys(t),i=s.length,o=n?[]:{};let l=0;for(let c=0;c<i;c++){const d=n?c:s[c];(!n&&a.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(o[d]=void 0,l++):(o[d]=Px(e[d],t[d]),o[d]===e[d]&&e[d]!==void 0&&l++)}return r===i&&l===r?e:o}return t}function pv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qf(e){if(!gv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!gv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function gv(e){return Object.prototype.toString.call(e)==="[object Object]"}function VO(e){return new Promise(t=>{setTimeout(t,e)})}function KO(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Px(e,t):t}function XO(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function QO(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var Em=Symbol();function zx(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Em?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var or,xa,bs,oy,ZO=(oy=class extends au{constructor(){super();ue(this,or);ue(this,xa);ue(this,bs);Q(this,bs,t=>{if(!ru&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,xa)||this.setEventListener(O(this,bs))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,xa))==null||t.call(this),Q(this,xa,void 0))}setEventListener(t){var n;Q(this,bs,t),(n=O(this,xa))==null||n.call(this),Q(this,xa,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){O(this,or)!==t&&(Q(this,or,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof O(this,or)=="boolean"?O(this,or):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},or=new WeakMap,xa=new WeakMap,bs=new WeakMap,oy),Bx=new ZO,ws,Sa,xs,ly,JO=(ly=class extends au{constructor(){super();ue(this,ws,!0);ue(this,Sa);ue(this,xs);Q(this,xs,t=>{if(!ru&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}})}onSubscribe(){O(this,Sa)||this.setEventListener(O(this,xs))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,Sa))==null||t.call(this),Q(this,Sa,void 0))}setEventListener(t){var n;Q(this,xs,t),(n=O(this,Sa))==null||n.call(this),Q(this,Sa,t(this.setOnline.bind(this)))}setOnline(t){O(this,ws)!==t&&(Q(this,ws,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return O(this,ws)}},ws=new WeakMap,Sa=new WeakMap,xs=new WeakMap,ly),Cc=new JO;function WO(){let e,t;const n=new Promise((r,s)=>{e=r,t=s});n.status="pending",n.catch(()=>{});function a(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{a({status:"fulfilled",value:r}),e(r)},n.reject=r=>{a({status:"rejected",reason:r}),t(r)},n}function ek(e){return Math.min(1e3*2**e,3e4)}function $x(e){return(e??"online")==="online"?Cc.isOnline():!0}var Hx=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function pd(e){return e instanceof Hx}function Ix(e){let t=!1,n=0,a=!1,r;const s=WO(),i=y=>{var w;a||(f(new Hx(y)),(w=e.abort)==null||w.call(e))},o=()=>{t=!0},l=()=>{t=!1},c=()=>Bx.isFocused()&&(e.networkMode==="always"||Cc.isOnline())&&e.canRun(),d=()=>$x(e.networkMode)&&e.canRun(),u=y=>{var w;a||(a=!0,(w=e.onSuccess)==null||w.call(e,y),r==null||r(),s.resolve(y))},f=y=>{var w;a||(a=!0,(w=e.onError)==null||w.call(e,y),r==null||r(),s.reject(y))},h=()=>new Promise(y=>{var w;r=g=>{(a||c())&&y(g)},(w=e.onPause)==null||w.call(e)}).then(()=>{var y;r=void 0,a||(y=e.onContinue)==null||y.call(e)}),x=()=>{if(a)return;let y;const w=n===0?e.initialPromise:void 0;try{y=w??e.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(u).catch(g=>{var _;if(a)return;const v=e.retry??(ru?0:3),b=e.retryDelay??ek,S=typeof b=="function"?b(n,g):b,E=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,g);if(t||!E){f(g);return}n++,(_=e.onFail)==null||_.call(e,n,g),VO(S).then(()=>c()?void 0:h()).then(()=>{t?f(g):x()})})};return{promise:s,cancel:i,continue:()=>(r==null||r(),s),cancelRetry:o,continueRetry:l,canStart:d,start:()=>(d()?x():h().then(x),s)}}var tk=e=>setTimeout(e,0);function nk(){let e=[],t=0,n=o=>{o()},a=o=>{o()},r=tk;const s=o=>{t?e.push(o):r(()=>{n(o)})},i=()=>{const o=e;e=[],o.length&&r(()=>{a(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;t++;try{l=o()}finally{t--,t||i()}return l},batchCalls:o=>(...l)=>{s(()=>{o(...l)})},schedule:s,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{a=o},setScheduler:o=>{r=o}}}var st=nk(),lr,cy,qx=(cy=class{constructor(){ue(this,lr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GO(this.gcTime)&&Q(this,lr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ru?1/0:5*60*1e3))}clearGcTimeout(){O(this,lr)&&(clearTimeout(O(this,lr)),Q(this,lr,void 0))}},lr=new WeakMap,cy),Ss,Es,Lt,cr,tt,fo,ur,Xt,jn,uy,ak=(uy=class extends qx{constructor(t){super();ue(this,Xt);ue(this,Ss);ue(this,Es);ue(this,Lt);ue(this,cr);ue(this,tt);ue(this,fo);ue(this,ur);Q(this,ur,!1),Q(this,fo,t.defaultOptions),this.setOptions(t.options),this.observers=[],Q(this,cr,t.client),Q(this,Lt,O(this,cr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Q(this,Ss,sk(this.options)),this.state=t.state??O(this,Ss),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=O(this,tt))==null?void 0:t.promise}setOptions(t){this.options={...O(this,fo),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&O(this,Lt).remove(this)}setData(t,n){const a=KO(this.state.data,t,this.options);return et(this,Xt,jn).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){et(this,Xt,jn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,r;const n=(a=O(this,tt))==null?void 0:a.promise;return(r=O(this,tt))==null||r.cancel(t),n?n.then(Kt).catch(Kt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,Ss))}isActive(){return this.observers.some(t=>YO(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Em||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!FO(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,tt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,tt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),O(this,Lt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(O(this,tt)&&(O(this,ur)?O(this,tt).cancel({revert:!0}):O(this,tt).cancelRetry()),this.scheduleGc()),O(this,Lt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||et(this,Xt,jn).call(this,{type:"invalidate"})}fetch(t,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,tt))return O(this,tt).continueRetry(),O(this,tt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const u=this.observers.find(f=>f.options.queryFn);u&&this.setOptions(u.options)}const a=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(Q(this,ur,!0),a.signal)})},s=()=>{const u=zx(this.options,n),f={client:O(this,cr),queryKey:this.queryKey,meta:this.meta};return r(f),Q(this,ur,!1),this.options.persister?this.options.persister(u,f,this):u(f)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:O(this,cr),state:this.state,fetchFn:s};r(i),(l=this.options.behavior)==null||l.onFetch(i,this),Q(this,Es,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=i.fetchOptions)==null?void 0:c.meta))&&et(this,Xt,jn).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta});const o=u=>{var f,h,x,y;pd(u)&&u.silent||et(this,Xt,jn).call(this,{type:"error",error:u}),pd(u)||((h=(f=O(this,Lt).config).onError)==null||h.call(f,u,this),(y=(x=O(this,Lt).config).onSettled)==null||y.call(x,this.state.data,u,this)),this.scheduleGc()};return Q(this,tt,Ix({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:a.abort.bind(a),onSuccess:u=>{var f,h,x,y;if(u===void 0){o(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(w){o(w);return}(h=(f=O(this,Lt).config).onSuccess)==null||h.call(f,u,this),(y=(x=O(this,Lt).config).onSettled)==null||y.call(x,u,this.state.error,this),this.scheduleGc()},onError:o,onFail:(u,f)=>{et(this,Xt,jn).call(this,{type:"failed",failureCount:u,error:f})},onPause:()=>{et(this,Xt,jn).call(this,{type:"pause"})},onContinue:()=>{et(this,Xt,jn).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),O(this,tt).start()}},Ss=new WeakMap,Es=new WeakMap,Lt=new WeakMap,cr=new WeakMap,tt=new WeakMap,fo=new WeakMap,ur=new WeakMap,Xt=new WeakSet,jn=function(t){const n=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...rk(a.data,this.options),fetchMeta:t.meta??null};case"success":return{...a,data:t.data,dataUpdateCount:a.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return pd(r)&&r.revert&&O(this,Es)?{...O(this,Es),fetchStatus:"idle"}:{...a,error:r,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=n(this.state),st.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),O(this,Lt).notify({query:this,type:"updated",action:t})})},uy);function rk(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$x(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function sk(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var fn,dy,ik=(dy=class extends au{constructor(t={}){super();ue(this,fn);this.config=t,Q(this,fn,new Map)}build(t,n,a){const r=n.queryKey,s=n.queryHash??Sm(r,n);let i=this.get(s);return i||(i=new ak({client:t,queryKey:r,queryHash:s,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){O(this,fn).has(t.queryHash)||(O(this,fn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=O(this,fn).get(t.queryHash);n&&(t.destroy(),n===t&&O(this,fn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){st.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,fn).get(t)}getAll(){return[...O(this,fn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>hv(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>hv(t,a)):n}notify(t){st.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){st.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){st.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},fn=new WeakMap,dy),hn,rt,dr,mn,ca,fy,ok=(fy=class extends qx{constructor(t){super();ue(this,mn);ue(this,hn);ue(this,rt);ue(this,dr);this.mutationId=t.mutationId,Q(this,rt,t.mutationCache),Q(this,hn,[]),this.state=t.state||lk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,hn).includes(t)||(O(this,hn).push(t),this.clearGcTimeout(),O(this,rt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Q(this,hn,O(this,hn).filter(n=>n!==t)),this.scheduleGc(),O(this,rt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,hn).length||(this.state.status==="pending"?this.scheduleGc():O(this,rt).remove(this))}continue(){var t;return((t=O(this,dr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,l,c,d,u,f,h,x,y,w,g,v,b,S,E,_,A,T;const n=()=>{et(this,mn,ca).call(this,{type:"continue"})};Q(this,dr,Ix({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,M)=>{et(this,mn,ca).call(this,{type:"failed",failureCount:k,error:M})},onPause:()=>{et(this,mn,ca).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>O(this,rt).canRun(this)}));const a=this.state.status==="pending",r=!O(this,dr).canStart();try{if(a)n();else{et(this,mn,ca).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(s=O(this,rt).config).onMutate)==null?void 0:i.call(s,t,this));const M=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t));M!==this.state.context&&et(this,mn,ca).call(this,{type:"pending",context:M,variables:t,isPaused:r})}const k=await O(this,dr).start();return await((d=(c=O(this,rt).config).onSuccess)==null?void 0:d.call(c,k,t,this.state.context,this)),await((f=(u=this.options).onSuccess)==null?void 0:f.call(u,k,t,this.state.context)),await((x=(h=O(this,rt).config).onSettled)==null?void 0:x.call(h,k,null,this.state.variables,this.state.context,this)),await((w=(y=this.options).onSettled)==null?void 0:w.call(y,k,null,t,this.state.context)),et(this,mn,ca).call(this,{type:"success",data:k}),k}catch(k){try{throw await((v=(g=O(this,rt).config).onError)==null?void 0:v.call(g,k,t,this.state.context,this)),await((S=(b=this.options).onError)==null?void 0:S.call(b,k,t,this.state.context)),await((_=(E=O(this,rt).config).onSettled)==null?void 0:_.call(E,void 0,k,this.state.variables,this.state.context,this)),await((T=(A=this.options).onSettled)==null?void 0:T.call(A,void 0,k,t,this.state.context)),k}finally{et(this,mn,ca).call(this,{type:"error",error:k})}}finally{O(this,rt).runNext(this)}}},hn=new WeakMap,rt=new WeakMap,dr=new WeakMap,mn=new WeakSet,ca=function(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,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{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),st.batch(()=>{O(this,hn).forEach(a=>{a.onMutationUpdate(t)}),O(this,rt).notify({mutation:this,type:"updated",action:t})})},fy);function lk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ln,Qt,ho,hy,ck=(hy=class extends au{constructor(t={}){super();ue(this,Ln);ue(this,Qt);ue(this,ho);this.config=t,Q(this,Ln,new Set),Q(this,Qt,new Map),Q(this,ho,0)}build(t,n,a){const r=new ok({mutationCache:this,mutationId:++Yo(this,ho)._,options:t.defaultMutationOptions(n),state:a});return this.add(r),r}add(t){O(this,Ln).add(t);const n=pl(t);if(typeof n=="string"){const a=O(this,Qt).get(n);a?a.push(t):O(this,Qt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(O(this,Ln).delete(t)){const n=pl(t);if(typeof n=="string"){const a=O(this,Qt).get(n);if(a)if(a.length>1){const r=a.indexOf(t);r!==-1&&a.splice(r,1)}else a[0]===t&&O(this,Qt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=pl(t);if(typeof n=="string"){const a=O(this,Qt).get(n),r=a==null?void 0:a.find(s=>s.state.status==="pending");return!r||r===t}else return!0}runNext(t){var a;const n=pl(t);if(typeof n=="string"){const r=(a=O(this,Qt).get(n))==null?void 0:a.find(s=>s!==t&&s.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){st.batch(()=>{O(this,Ln).forEach(t=>{this.notify({type:"removed",mutation:t})}),O(this,Ln).clear(),O(this,Qt).clear()})}getAll(){return Array.from(O(this,Ln))}find(t){const n={exact:!0,...t};return this.getAll().find(a=>mv(n,a))}findAll(t={}){return this.getAll().filter(n=>mv(t,n))}notify(t){st.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return st.batch(()=>Promise.all(t.map(n=>n.continue().catch(Kt))))}},Ln=new WeakMap,Qt=new WeakMap,ho=new WeakMap,hy);function pl(e){var t;return(t=e.options.scope)==null?void 0:t.id}function vv(e){return{onFetch:(t,n)=>{var d,u,f,h,x;const a=t.options,r=(f=(u=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:u.fetchMore)==null?void 0:f.direction,s=((h=t.state.data)==null?void 0:h.pages)||[],i=((x=t.state.data)==null?void 0:x.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let y=!1;const w=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},g=zx(t.options,t.fetchOptions),v=async(b,S,E)=>{if(y)return Promise.reject();if(S==null&&b.pages.length)return Promise.resolve(b);const _={client:t.client,queryKey:t.queryKey,pageParam:S,direction:E?"backward":"forward",meta:t.options.meta};w(_);const A=await g(_),{maxPages:T}=t.options,k=E?QO:XO;return{pages:k(b.pages,A,T),pageParams:k(b.pageParams,S,T)}};if(r&&s.length){const b=r==="backward",S=b?uk:yv,E={pages:s,pageParams:i},_=S(a,E);o=await v(E,_,b)}else{const b=e??s.length;do{const S=l===0?i[0]??a.initialPageParam:yv(a,o);if(l>0&&S==null)break;o=await v(o,S),l++}while(l<b)}return o};t.options.persister?t.fetchFn=()=>{var y,w;return(w=(y=t.options).persister)==null?void 0:w.call(y,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function yv(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function uk(e,{pages:t,pageParams:n}){var a;return t.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,t[0],t,n[0],n):void 0}var ke,Ea,_a,_s,Ts,Ta,As,Cs,my,dk=(my=class{constructor(e={}){ue(this,ke);ue(this,Ea);ue(this,_a);ue(this,_s);ue(this,Ts);ue(this,Ta);ue(this,As);ue(this,Cs);Q(this,ke,e.queryCache||new ik),Q(this,Ea,e.mutationCache||new ck),Q(this,_a,e.defaultOptions||{}),Q(this,_s,new Map),Q(this,Ts,new Map),Q(this,Ta,0)}mount(){Yo(this,Ta)._++,O(this,Ta)===1&&(Q(this,As,Bx.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,ke).onFocus())})),Q(this,Cs,Cc.subscribe(async e=>{e&&(await this.resumePausedMutations(),O(this,ke).onOnline())})))}unmount(){var e,t;Yo(this,Ta)._--,O(this,Ta)===0&&((e=O(this,As))==null||e.call(this),Q(this,As,void 0),(t=O(this,Cs))==null||t.call(this),Q(this,Cs,void 0))}isFetching(e){return O(this,ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Ea).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=O(this,ke).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(fv(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return O(this,ke).findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),r=O(this,ke).get(a.queryHash),s=r==null?void 0:r.state.data,i=qO(t,s);if(i!==void 0)return O(this,ke).build(this,a).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return st.batch(()=>O(this,ke).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=O(this,ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=O(this,ke);st.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=O(this,ke);return st.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=st.batch(()=>O(this,ke).findAll(e).map(r=>r.cancel(n)));return Promise.all(a).then(Kt).catch(Kt)}invalidateQueries(e,t={}){return st.batch(()=>(O(this,ke).findAll(e).forEach(n=>{n.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 n={...t,cancelRefetch:t.cancelRefetch??!0},a=st.batch(()=>O(this,ke).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let s=r.fetch(void 0,n);return n.throwOnError||(s=s.catch(Kt)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(a).then(Kt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=O(this,ke).build(this,t);return n.isStaleByTime(fv(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Kt).catch(Kt)}fetchInfiniteQuery(e){return e.behavior=vv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Kt).catch(Kt)}ensureInfiniteQueryData(e){return e.behavior=vv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Cc.isOnline()?O(this,Ea).resumePausedMutations():Promise.resolve()}getQueryCache(){return O(this,ke)}getMutationCache(){return O(this,Ea)}getDefaultOptions(){return O(this,_a)}setDefaultOptions(e){Q(this,_a,e)}setQueryDefaults(e,t){O(this,_s).set(io(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,_s).values()],n={};return t.forEach(a=>{oo(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){O(this,Ts).set(io(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,Ts).values()],n={};return t.forEach(a=>{oo(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...O(this,_a).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sm(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===Em&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,_a).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,ke).clear(),O(this,Ea).clear()}},ke=new WeakMap,Ea=new WeakMap,_a=new WeakMap,_s=new WeakMap,Ts=new WeakMap,Ta=new WeakMap,As=new WeakMap,Cs=new WeakMap,my),fk=m.createContext(void 0),hk=({client:e,children:t})=>(m.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(fk.Provider,{value:e,children:t})),_m={};Object.defineProperty(_m,"__esModule",{value:!0});_m.parse=wk;_m.serialize=xk;const mk=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,pk=/^[\u0021-\u003A\u003C-\u007E]*$/,gk=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,vk=/^[\u0020-\u003A\u003D-\u007E]*$/,yk=Object.prototype.toString,bk=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function wk(e,t){const n=new bk,a=e.length;if(a<2)return n;const r=(t==null?void 0:t.decode)||Sk;let s=0;do{const i=e.indexOf("=",s);if(i===-1)break;const o=e.indexOf(";",s),l=o===-1?a:o;if(i>l){s=e.lastIndexOf(";",i-1)+1;continue}const c=bv(e,s,i),d=wv(e,i,c),u=e.slice(c,d);if(n[u]===void 0){let f=bv(e,i+1,l),h=wv(e,l,f);const x=r(e.slice(f,h));n[u]=x}s=l+1}while(s<a);return n}function bv(e,t,n){do{const a=e.charCodeAt(t);if(a!==32&&a!==9)return t}while(++t<n);return n}function wv(e,t,n){for(;t>n;){const a=e.charCodeAt(--t);if(a!==32&&a!==9)return t+1}return n}function xk(e,t,n){const a=(n==null?void 0:n.encode)||encodeURIComponent;if(!mk.test(e))throw new TypeError(`argument name is invalid: ${e}`);const r=a(t);if(!pk.test(r))throw new TypeError(`argument val is invalid: ${t}`);let s=e+"="+r;if(!n)return s;if(n.maxAge!==void 0){if(!Number.isInteger(n.maxAge))throw new TypeError(`option maxAge is invalid: ${n.maxAge}`);s+="; Max-Age="+n.maxAge}if(n.domain){if(!gk.test(n.domain))throw new TypeError(`option domain is invalid: ${n.domain}`);s+="; Domain="+n.domain}if(n.path){if(!vk.test(n.path))throw new TypeError(`option path is invalid: ${n.path}`);s+="; Path="+n.path}if(n.expires){if(!Ek(n.expires)||!Number.isFinite(n.expires.valueOf()))throw new TypeError(`option expires is invalid: ${n.expires}`);s+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.partitioned&&(s+="; Partitioned"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():void 0){case"low":s+="; Priority=Low";break;case"medium":s+="; Priority=Medium";break;case"high":s+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${n.priority}`)}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"none":s+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${n.sameSite}`)}return s}function Sk(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function Ek(e){return yk.call(e)==="[object Date]"}var xv="popstate";function _k(e={}){function t(a,r){let{pathname:s,search:i,hash:o}=a.location;return Gf("",{pathname:s,search:i,hash:o},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(a,r){return typeof r=="string"?r:lo(r)}return Ak(t,n,null,e)}function Re(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _n(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Tk(){return Math.random().toString(36).substring(2,10)}function Sv(e,t){return{usr:e.state,key:e.key,idx:t}}function Gf(e,t,n=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ti(t):t,state:n,key:t&&t.key||a||Tk()}}function lo({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function ti(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Ak(e,t,n,a={}){let{window:r=document.defaultView,v5Compat:s=!1}=a,i=r.history,o="POP",l=null,c=d();c==null&&(c=0,i.replaceState({...i.state,idx:c},""));function d(){return(i.state||{idx:null}).idx}function u(){o="POP";let w=d(),g=w==null?null:w-c;c=w,l&&l({action:o,location:y.location,delta:g})}function f(w,g){o="PUSH";let v=Gf(y.location,w,g);c=d()+1;let b=Sv(v,c),S=y.createHref(v);try{i.pushState(b,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;r.location.assign(S)}s&&l&&l({action:o,location:y.location,delta:1})}function h(w,g){o="REPLACE";let v=Gf(y.location,w,g);c=d();let b=Sv(v,c),S=y.createHref(v);i.replaceState(b,"",S),s&&l&&l({action:o,location:y.location,delta:0})}function x(w){return Ck(w)}let y={get action(){return o},get location(){return e(r,i)},listen(w){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(xv,u),l=w,()=>{r.removeEventListener(xv,u),l=null}},createHref(w){return t(r,w)},createURL:x,encodeLocation(w){let g=x(w);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:h,go(w){return i.go(w)}};return y}function Ck(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Re(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:lo(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function Gx(e,t,n="/"){return Rk(e,t,n,!1)}function Rk(e,t,n,a){let r=typeof t=="string"?ti(t):t,s=Wn(r.pathname||"/",n);if(s==null)return null;let i=Fx(e);Ok(i);let o=null;for(let l=0;o==null&&l<i.length;++l){let c=$k(s);o=zk(i[l],c,a)}return o}function Fx(e,t=[],n=[],a=""){let r=(s,i,o)=>{let l={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:i,route:s};l.relativePath.startsWith("/")&&(Re(l.relativePath.startsWith(a),`Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(a.length));let c=Yn([a,l.relativePath]),d=n.concat(l);s.children&&s.children.length>0&&(Re(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),Fx(s.children,t,d,c)),!(s.path==null&&!s.index)&&t.push({path:c,score:Uk(c,s.index),routesMeta:d})};return e.forEach((s,i)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))r(s,i);else for(let l of Yx(s.path))r(s,i,l)}),t}function Yx(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,r=n.endsWith("?"),s=n.replace(/\?$/,"");if(a.length===0)return r?[s,""]:[s];let i=Yx(a.join("/")),o=[];return o.push(...i.map(l=>l===""?s:[s,l].join("/"))),r&&o.push(...i),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ok(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Pk(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var kk=/^:[\w-]+$/,Nk=3,Dk=2,jk=1,Mk=10,Lk=-2,Ev=e=>e==="*";function Uk(e,t){let n=e.split("/"),a=n.length;return n.some(Ev)&&(a+=Lk),t&&(a+=Dk),n.filter(r=>!Ev(r)).reduce((r,s)=>r+(kk.test(s)?Nk:s===""?jk:Mk),a)}function Pk(e,t){return e.length===t.length&&e.slice(0,-1).every((a,r)=>a===t[r])?e[e.length-1]-t[t.length-1]:0}function zk(e,t,n=!1){let{routesMeta:a}=e,r={},s="/",i=[];for(let o=0;o<a.length;++o){let l=a[o],c=o===a.length-1,d=s==="/"?t:t.slice(s.length)||"/",u=Rc({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),f=l.route;if(!u&&c&&n&&!a[a.length-1].route.index&&(u=Rc({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!u)return null;Object.assign(r,u.params),i.push({params:r,pathname:Yn([s,u.pathname]),pathnameBase:Gk(Yn([s,u.pathnameBase])),route:f}),u.pathnameBase!=="/"&&(s=Yn([s,u.pathnameBase]))}return i}function Rc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=Bk(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let s=r[0],i=s.replace(/(.)\/+$/,"$1"),o=r.slice(1);return{params:a.reduce((c,{paramName:d,isOptional:u},f)=>{if(d==="*"){let x=o[f]||"";i=s.slice(0,s.length-x.length).replace(/(.)\/+$/,"$1")}const h=o[f];return u&&!h?c[d]=void 0:c[d]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:i,pattern:e}}function Bk(e,t=!1,n=!0){_n(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 a=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,o,l)=>(a.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),a]}function $k(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return _n(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Wn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}function Hk(e,t="/"){let{pathname:n,search:a="",hash:r=""}=typeof e=="string"?ti(e):e;return{pathname:n?n.startsWith("/")?n:Ik(n,t):t,search:Fk(a),hash:Yk(r)}}function Ik(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function gd(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function qk(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Vx(e){let t=qk(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Kx(e,t,n,a=!1){let r;typeof e=="string"?r=ti(e):(r={...e},Re(!r.pathname||!r.pathname.includes("?"),gd("?","pathname","search",r)),Re(!r.pathname||!r.pathname.includes("#"),gd("#","pathname","hash",r)),Re(!r.search||!r.search.includes("#"),gd("#","search","hash",r)));let s=e===""||r.pathname==="",i=s?"/":r.pathname,o;if(i==null)o=n;else{let u=t.length-1;if(!a&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),u-=1;r.pathname=f.join("/")}o=u>=0?t[u]:"/"}let l=Hk(r,o),c=i&&i!=="/"&&i.endsWith("/"),d=(s||i===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}var Yn=e=>e.join("/").replace(/\/\/+/g,"/"),Gk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Fk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Yk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Vk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Xx=["POST","PUT","PATCH","DELETE"];new Set(Xx);var Kk=["GET",...Xx];new Set(Kk);var ni=m.createContext(null);ni.displayName="DataRouter";var su=m.createContext(null);su.displayName="DataRouterState";var Qx=m.createContext({isTransitioning:!1});Qx.displayName="ViewTransition";var Xk=m.createContext(new Map);Xk.displayName="Fetchers";var Qk=m.createContext(null);Qk.displayName="Await";var Rn=m.createContext(null);Rn.displayName="Navigation";var Mo=m.createContext(null);Mo.displayName="Location";var na=m.createContext({outlet:null,matches:[],isDataRoute:!1});na.displayName="Route";var Tm=m.createContext(null);Tm.displayName="RouteError";function Zk(e,{relative:t}={}){Re(Lo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=m.useContext(Rn),{hash:r,pathname:s,search:i}=Uo(e,{relative:t}),o=s;return n!=="/"&&(o=s==="/"?n:Yn([n,s])),a.createHref({pathname:o,search:i,hash:r})}function Lo(){return m.useContext(Mo)!=null}function Va(){return Re(Lo(),"useLocation() may be used only in the context of a <Router> component."),m.useContext(Mo).location}var Zx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jx(e){m.useContext(Rn).static||m.useLayoutEffect(e)}function Jk(){let{isDataRoute:e}=m.useContext(na);return e?dN():Wk()}function Wk(){Re(Lo(),"useNavigate() may be used only in the context of a <Router> component.");let e=m.useContext(ni),{basename:t,navigator:n}=m.useContext(Rn),{matches:a}=m.useContext(na),{pathname:r}=Va(),s=JSON.stringify(Vx(a)),i=m.useRef(!1);return Jx(()=>{i.current=!0}),m.useCallback((l,c={})=>{if(_n(i.current,Zx),!i.current)return;if(typeof l=="number"){n.go(l);return}let d=Kx(l,JSON.parse(s),r,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Yn([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,s,r,e])}m.createContext(null);function Uo(e,{relative:t}={}){let{matches:n}=m.useContext(na),{pathname:a}=Va(),r=JSON.stringify(Vx(n));return m.useMemo(()=>Kx(e,JSON.parse(r),a,t==="path"),[e,r,a,t])}function eN(e,t){return Wx(e,t)}function Wx(e,t,n,a){var v;Re(Lo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r,static:s}=m.useContext(Rn),{matches:i}=m.useContext(na),o=i[i.length-1],l=o?o.params:{},c=o?o.pathname:"/",d=o?o.pathnameBase:"/",u=o&&o.route;{let b=u&&u.path||"";eS(c,!u||b.endsWith("*")||b.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${b}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
160
|
+
|
|
161
|
+
Please change the parent <Route path="${b}"> to <Route path="${b==="/"?"*":`${b}/*`}">.`)}let f=Va(),h;if(t){let b=typeof t=="string"?ti(t):t;Re(d==="/"||((v=b.pathname)==null?void 0:v.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${b.pathname}" was given in the \`location\` prop.`),h=b}else h=f;let x=h.pathname||"/",y=x;if(d!=="/"){let b=d.replace(/^\//,"").split("/");y="/"+x.replace(/^\//,"").split("/").slice(b.length).join("/")}let w=!s&&n&&n.matches&&n.matches.length>0?n.matches:Gx(e,{pathname:y});_n(u||w!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),_n(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=sN(w&&w.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:Yn([d,r.encodeLocation?r.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?d:Yn([d,r.encodeLocation?r.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,a);return t&&g?m.createElement(Mo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},g):g}function tN(){let e=uN(),t=Vk(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:a},s={padding:"2px 4px",backgroundColor:a},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=m.createElement(m.Fragment,null,m.createElement("p",null,"💿 Hey developer 👋"),m.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",m.createElement("code",{style:s},"ErrorBoundary")," or"," ",m.createElement("code",{style:s},"errorElement")," prop on your route.")),m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:r},n):null,i)}var nN=m.createElement(tN,null),aN=class extends m.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?m.createElement(na.Provider,{value:this.props.routeContext},m.createElement(Tm.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function rN({routeContext:e,match:t,children:n}){let a=m.useContext(ni);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),m.createElement(na.Provider,{value:e},n)}function sN(e,t=[],n=null,a=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let r=e,s=n==null?void 0:n.errors;if(s!=null){let l=r.findIndex(c=>c.route.id&&(s==null?void 0:s[c.route.id])!==void 0);Re(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),r=r.slice(0,Math.min(r.length,l+1))}let i=!1,o=-1;if(n)for(let l=0;l<r.length;l++){let c=r[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(o=l),c.route.id){let{loaderData:d,errors:u}=n,f=c.route.loader&&!d.hasOwnProperty(c.route.id)&&(!u||u[c.route.id]===void 0);if(c.route.lazy||f){i=!0,o>=0?r=r.slice(0,o+1):r=[r[0]];break}}}return r.reduceRight((l,c,d)=>{let u,f=!1,h=null,x=null;n&&(u=s&&c.route.id?s[c.route.id]:void 0,h=c.route.errorElement||nN,i&&(o<0&&d===0?(eS("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,x=null):o===d&&(f=!0,x=c.route.hydrateFallbackElement||null)));let y=t.concat(r.slice(0,d+1)),w=()=>{let g;return u?g=h:f?g=x:c.route.Component?g=m.createElement(c.route.Component,null):c.route.element?g=c.route.element:g=l,m.createElement(rN,{match:c,routeContext:{outlet:l,matches:y,isDataRoute:n!=null},children:g})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?m.createElement(aN,{location:n.location,revalidation:n.revalidation,component:h,error:u,children:w(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):w()},null)}function Am(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iN(e){let t=m.useContext(ni);return Re(t,Am(e)),t}function oN(e){let t=m.useContext(su);return Re(t,Am(e)),t}function lN(e){let t=m.useContext(na);return Re(t,Am(e)),t}function Cm(e){let t=lN(e),n=t.matches[t.matches.length-1];return Re(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function cN(){return Cm("useRouteId")}function uN(){var a;let e=m.useContext(Tm),t=oN("useRouteError"),n=Cm("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function dN(){let{router:e}=iN("useNavigate"),t=Cm("useNavigate"),n=m.useRef(!1);return Jx(()=>{n.current=!0}),m.useCallback(async(r,s={})=>{_n(n.current,Zx),n.current&&(typeof r=="number"?e.navigate(r):await e.navigate(r,{fromRouteId:t,...s}))},[e,t])}var _v={};function eS(e,t,n){!t&&!_v[e]&&(_v[e]=!0,_n(!1,n))}m.memo(fN);function fN({routes:e,future:t,state:n}){return Wx(e,void 0,n,t)}function Ff(e){Re(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function hN({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:r,static:s=!1}){Re(!Lo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),o=m.useMemo(()=>({basename:i,navigator:r,static:s,future:{}}),[i,r,s]);typeof n=="string"&&(n=ti(n));let{pathname:l="/",search:c="",hash:d="",state:u=null,key:f="default"}=n,h=m.useMemo(()=>{let x=Wn(l,i);return x==null?null:{location:{pathname:x,search:c,hash:d,state:u,key:f},navigationType:a}},[i,l,c,d,u,f,a]);return _n(h!=null,`<Router basename="${i}"> is not able to match the URL "${l}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:m.createElement(Rn.Provider,{value:o},m.createElement(Mo.Provider,{children:t,value:h}))}function mN({children:e,location:t}){return eN(Yf(e),t)}function Yf(e,t=[]){let n=[];return m.Children.forEach(e,(a,r)=>{if(!m.isValidElement(a))return;let s=[...t,r];if(a.type===m.Fragment){n.push.apply(n,Yf(a.props.children,s));return}Re(a.type===Ff,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Re(!a.props.index||!a.props.children,"An index route cannot have child routes.");let i={id:a.props.id||s.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(i.children=Yf(a.props.children,s)),n.push(i)}),n}var Il="get",ql="application/x-www-form-urlencoded";function iu(e){return e!=null&&typeof e.tagName=="string"}function pN(e){return iu(e)&&e.tagName.toLowerCase()==="button"}function gN(e){return iu(e)&&e.tagName.toLowerCase()==="form"}function vN(e){return iu(e)&&e.tagName.toLowerCase()==="input"}function yN(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bN(e,t){return e.button===0&&(!t||t==="_self")&&!yN(e)}var gl=null;function wN(){if(gl===null)try{new FormData(document.createElement("form"),0),gl=!1}catch{gl=!0}return gl}var xN=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vd(e){return e!=null&&!xN.has(e)?(_n(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ql}"`),null):e}function SN(e,t){let n,a,r,s,i;if(gN(e)){let o=e.getAttribute("action");a=o?Wn(o,t):null,n=e.getAttribute("method")||Il,r=vd(e.getAttribute("enctype"))||ql,s=new FormData(e)}else if(pN(e)||vN(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||o.getAttribute("action");if(a=l?Wn(l,t):null,n=e.getAttribute("formmethod")||o.getAttribute("method")||Il,r=vd(e.getAttribute("formenctype"))||vd(o.getAttribute("enctype"))||ql,s=new FormData(o,e),!wN()){let{name:c,type:d,value:u}=e;if(d==="image"){let f=c?`${c}.`:"";s.append(`${f}x`,"0"),s.append(`${f}y`,"0")}else c&&s.append(c,u)}}else{if(iu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Il,a=null,r=ql,i=e}return s&&r==="text/plain"&&(i=s,s=void 0),{action:a,method:n.toLowerCase(),encType:r,formData:s,body:i}}function Rm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function EN(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function _N(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function TN(e,t,n){let a=await Promise.all(e.map(async r=>{let s=t.routes[r.route.id];if(s){let i=await EN(s,n);return i.links?i.links():[]}return[]}));return ON(a.flat(1).filter(_N).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function Tv(e,t,n,a,r,s){let i=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,o=(l,c)=>{var d;return n[c].pathname!==l.pathname||((d=n[c].route.path)==null?void 0:d.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return s==="assets"?t.filter((l,c)=>i(l,c)||o(l,c)):s==="data"?t.filter((l,c)=>{var u;let d=a.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(i(l,c)||o(l,c))return!0;if(l.route.shouldRevalidate){let f=l.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((u=n[0])==null?void 0:u.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function AN(e,t,{includeHydrateFallback:n}={}){return CN(e.map(a=>{let r=t.routes[a.route.id];if(!r)return[];let s=[r.module];return r.clientActionModule&&(s=s.concat(r.clientActionModule)),r.clientLoaderModule&&(s=s.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(s=s.concat(r.hydrateFallbackModule)),r.imports&&(s=s.concat(r.imports)),s}).flat(1))}function CN(e){return[...new Set(e)]}function RN(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function ON(e,t){let n=new Set;return new Set(t),e.reduce((a,r)=>{let s=JSON.stringify(RN(r));return n.has(s)||(n.add(s),a.push({key:s,link:r})),a},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var kN=new Set([100,101,204,205]);function NN(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&Wn(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function tS(){let e=m.useContext(ni);return Rm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function DN(){let e=m.useContext(su);return Rm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Om=m.createContext(void 0);Om.displayName="FrameworkContext";function nS(){let e=m.useContext(Om);return Rm(e,"You must render this element inside a <HydratedRouter> element"),e}function jN(e,t){let n=m.useContext(Om),[a,r]=m.useState(!1),[s,i]=m.useState(!1),{onFocus:o,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:u}=t,f=m.useRef(null);m.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let y=g=>{g.forEach(v=>{i(v.isIntersecting)})},w=new IntersectionObserver(y,{threshold:.5});return f.current&&w.observe(f.current),()=>{w.disconnect()}}},[e]),m.useEffect(()=>{if(a){let y=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(y)}}},[a]);let h=()=>{r(!0)},x=()=>{r(!1),i(!1)};return n?e!=="intent"?[s,f,{}]:[s,f,{onFocus:mi(o,h),onBlur:mi(l,x),onMouseEnter:mi(c,h),onMouseLeave:mi(d,x),onTouchStart:mi(u,h)}]:[!1,f,{}]}function mi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function MN({page:e,...t}){let{router:n}=tS(),a=m.useMemo(()=>Gx(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?m.createElement(UN,{page:e,matches:a,...t}):null}function LN(e){let{manifest:t,routeModules:n}=nS(),[a,r]=m.useState([]);return m.useEffect(()=>{let s=!1;return TN(e,t,n).then(i=>{s||r(i)}),()=>{s=!0}},[e,t,n]),a}function UN({page:e,matches:t,...n}){let a=Va(),{manifest:r,routeModules:s}=nS(),{basename:i}=tS(),{loaderData:o,matches:l}=DN(),c=m.useMemo(()=>Tv(e,t,l,r,a,"data"),[e,t,l,r,a]),d=m.useMemo(()=>Tv(e,t,l,r,a,"assets"),[e,t,l,r,a]),u=m.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let x=new Set,y=!1;if(t.forEach(g=>{var b;let v=r.routes[g.route.id];!v||!v.hasLoader||(!c.some(S=>S.route.id===g.route.id)&&g.route.id in o&&((b=s[g.route.id])!=null&&b.shouldRevalidate)||v.hasClientLoader?y=!0:x.add(g.route.id))}),x.size===0)return[];let w=NN(e,i);return y&&x.size>0&&w.searchParams.set("_routes",t.filter(g=>x.has(g.route.id)).map(g=>g.route.id).join(",")),[w.pathname+w.search]},[i,o,a,r,c,t,e,s]),f=m.useMemo(()=>AN(d,r),[d,r]),h=LN(d);return m.createElement(m.Fragment,null,u.map(x=>m.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),f.map(x=>m.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),h.map(({key:x,link:y})=>m.createElement("link",{key:x,...y})))}function PN(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var aS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{aS&&(window.__reactRouterVersion="7.6.0")}catch{}function zN({basename:e,children:t,window:n}){let a=m.useRef();a.current==null&&(a.current=_k({window:n,v5Compat:!0}));let r=a.current,[s,i]=m.useState({action:r.action,location:r.location}),o=m.useCallback(l=>{m.startTransition(()=>i(l))},[i]);return m.useLayoutEffect(()=>r.listen(o),[r,o]),m.createElement(hN,{basename:e,children:t,location:s.location,navigationType:s.action,navigator:r})}var rS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sS=m.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:r,reloadDocument:s,replace:i,state:o,target:l,to:c,preventScrollReset:d,viewTransition:u,...f},h){let{basename:x}=m.useContext(Rn),y=typeof c=="string"&&rS.test(c),w,g=!1;if(typeof c=="string"&&y&&(w=c,aS))try{let k=new URL(window.location.href),M=c.startsWith("//")?new URL(k.protocol+c):new URL(c),H=Wn(M.pathname,x);M.origin===k.origin&&H!=null?c=H+M.search+M.hash:g=!0}catch{_n(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=Zk(c,{relative:r}),[b,S,E]=jN(a,f),_=IN(c,{replace:i,state:o,target:l,preventScrollReset:d,relative:r,viewTransition:u});function A(k){t&&t(k),k.defaultPrevented||_(k)}let T=m.createElement("a",{...f,...E,href:w||v,onClick:g||s?t:A,ref:PN(h,S),target:l,"data-discover":!y&&n==="render"?"true":void 0});return b&&!y?m.createElement(m.Fragment,null,T,m.createElement(MN,{page:v})):T});sS.displayName="Link";var BN=m.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:r=!1,style:s,to:i,viewTransition:o,children:l,...c},d){let u=Uo(i,{relative:c.relative}),f=Va(),h=m.useContext(su),{navigator:x,basename:y}=m.useContext(Rn),w=h!=null&&VN(u)&&o===!0,g=x.encodeLocation?x.encodeLocation(u).pathname:u.pathname,v=f.pathname,b=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(v=v.toLowerCase(),b=b?b.toLowerCase():null,g=g.toLowerCase()),b&&y&&(b=Wn(b,y)||b);const S=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let E=v===g||!r&&v.startsWith(g)&&v.charAt(S)==="/",_=b!=null&&(b===g||!r&&b.startsWith(g)&&b.charAt(g.length)==="/"),A={isActive:E,isPending:_,isTransitioning:w},T=E?t:void 0,k;typeof a=="function"?k=a(A):k=[a,E?"active":null,_?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let M=typeof s=="function"?s(A):s;return m.createElement(sS,{...c,"aria-current":T,className:k,ref:d,style:M,to:i,viewTransition:o},typeof l=="function"?l(A):l)});BN.displayName="NavLink";var $N=m.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:r,state:s,method:i=Il,action:o,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:u,...f},h)=>{let x=FN(),y=YN(o,{relative:c}),w=i.toLowerCase()==="get"?"get":"post",g=typeof o=="string"&&rS.test(o),v=b=>{if(l&&l(b),b.defaultPrevented)return;b.preventDefault();let S=b.nativeEvent.submitter,E=(S==null?void 0:S.getAttribute("formmethod"))||i;x(S||b.currentTarget,{fetcherKey:t,method:E,navigate:n,replace:r,state:s,relative:c,preventScrollReset:d,viewTransition:u})};return m.createElement("form",{ref:h,method:w,action:y,onSubmit:a?l:v,...f,"data-discover":!g&&e==="render"?"true":void 0})});$N.displayName="Form";function HN(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function iS(e){let t=m.useContext(ni);return Re(t,HN(e)),t}function IN(e,{target:t,replace:n,state:a,preventScrollReset:r,relative:s,viewTransition:i}={}){let o=Jk(),l=Va(),c=Uo(e,{relative:s});return m.useCallback(d=>{if(bN(d,t)){d.preventDefault();let u=n!==void 0?n:lo(l)===lo(c);o(e,{replace:u,state:a,preventScrollReset:r,relative:s,viewTransition:i})}},[l,o,c,n,a,t,e,r,s,i])}var qN=0,GN=()=>`__${String(++qN)}__`;function FN(){let{router:e}=iS("useSubmit"),{basename:t}=m.useContext(Rn),n=cN();return m.useCallback(async(a,r={})=>{let{action:s,method:i,encType:o,formData:l,body:c}=SN(a,t);if(r.navigate===!1){let d=r.fetcherKey||GN();await e.fetch(d,n,r.action||s,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||i,formEncType:r.encType||o,flushSync:r.flushSync})}else await e.navigate(r.action||s,{preventScrollReset:r.preventScrollReset,formData:l,body:c,formMethod:r.method||i,formEncType:r.encType||o,replace:r.replace,state:r.state,fromRouteId:n,flushSync:r.flushSync,viewTransition:r.viewTransition})},[e,t,n])}function YN(e,{relative:t}={}){let{basename:n}=m.useContext(Rn),a=m.useContext(na);Re(a,"useFormAction must be used inside a RouteContext");let[r]=a.matches.slice(-1),s={...Uo(e||".",{relative:t})},i=Va();if(e==null){s.search=i.search;let o=new URLSearchParams(s.search),l=o.getAll("index");if(l.some(d=>d==="")){o.delete("index"),l.filter(u=>u).forEach(u=>o.append("index",u));let d=o.toString();s.search=d?`?${d}`:""}}return(!e||e===".")&&r.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Yn([n,s.pathname])),lo(s)}function VN(e,t={}){let n=m.useContext(Qx);Re(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=iS("useViewTransitionState"),r=Uo(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Wn(n.currentLocation.pathname,a)||n.currentLocation.pathname,i=Wn(n.nextLocation.pathname,a)||n.nextLocation.pathname;return Rc(r.pathname,i)!=null||Rc(r.pathname,s)!=null}[...kN];const km=lm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ee=m.forwardRef(({className:e,variant:t,size:n,asChild:a=!1,...r},s)=>{const i=a?DA:"button";return p.jsx(i,{className:pe(km({variant:t,size:n,className:e})),ref:s,...r})});Ee.displayName="Button";var yd="focusScope.autoFocusOnMount",bd="focusScope.autoFocusOnUnmount",Av={bubbles:!1,cancelable:!0},KN="FocusScope",oS=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...i}=e,[o,l]=m.useState(null),c=en(r),d=en(s),u=m.useRef(null),f=Ae(t,y=>l(y)),h=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(a){let y=function(b){if(h.paused||!o)return;const S=b.target;o.contains(S)?u.current=S:ua(u.current,{select:!0})},w=function(b){if(h.paused||!o)return;const S=b.relatedTarget;S!==null&&(o.contains(S)||ua(u.current,{select:!0}))},g=function(b){if(document.activeElement===document.body)for(const E of b)E.removedNodes.length>0&&ua(o)};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const v=new MutationObserver(g);return o&&v.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),v.disconnect()}}},[a,o,h.paused]),m.useEffect(()=>{if(o){Rv.add(h);const y=document.activeElement;if(!o.contains(y)){const g=new CustomEvent(yd,Av);o.addEventListener(yd,c),o.dispatchEvent(g),g.defaultPrevented||(XN(eD(lS(o)),{select:!0}),document.activeElement===y&&ua(o))}return()=>{o.removeEventListener(yd,c),setTimeout(()=>{const g=new CustomEvent(bd,Av);o.addEventListener(bd,d),o.dispatchEvent(g),g.defaultPrevented||ua(y??document.body,{select:!0}),o.removeEventListener(bd,d),Rv.remove(h)},0)}}},[o,c,d,h]);const x=m.useCallback(y=>{if(!n&&!a||h.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(w&&g){const v=y.currentTarget,[b,S]=QN(v);b&&S?!y.shiftKey&&g===S?(y.preventDefault(),n&&ua(b,{select:!0})):y.shiftKey&&g===b&&(y.preventDefault(),n&&ua(S,{select:!0})):g===v&&y.preventDefault()}},[n,a,h.paused]);return p.jsx(ce.div,{tabIndex:-1,...i,ref:f,onKeyDown:x})});oS.displayName=KN;function XN(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(ua(a,{select:t}),document.activeElement!==n)return}function QN(e){const t=lS(e),n=Cv(t,e),a=Cv(t.reverse(),e);return[n,a]}function lS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const r=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||r?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Cv(e,t){for(const n of e)if(!ZN(n,{upTo:t}))return n}function ZN(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 JN(e){return e instanceof HTMLInputElement&&"select"in e}function ua(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&JN(e)&&t&&e.select()}}var Rv=WN();function WN(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ov(e,t),e.unshift(t)},remove(t){var n;e=Ov(e,t),(n=e[0])==null||n.resume()}}}function Ov(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function eD(e){return e.filter(t=>t.tagName!=="A")}var wd=0;function tD(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??kv()),document.body.insertAdjacentElement("beforeend",e[1]??kv()),wd++,()=>{wd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wd--}},[])}function kv(){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 gn=function(){return gn=Object.assign||function(t){for(var n,a=1,r=arguments.length;a<r;a++){n=arguments[a];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},gn.apply(this,arguments)};function cS(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n}function nD(e,t,n){if(n||arguments.length===2)for(var a=0,r=t.length,s;a<r;a++)(s||!(a in t))&&(s||(s=Array.prototype.slice.call(t,0,a)),s[a]=t[a]);return e.concat(s||Array.prototype.slice.call(t))}var Gl="right-scroll-bar-position",Fl="width-before-scroll-bar",aD="with-scroll-bars-hidden",rD="--removed-body-scroll-bar-size";function xd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sD(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var r=n.value;r!==a&&(n.value=a,n.callback(a,r))}}}})[0];return n.callback=t,n.facade}var iD=typeof window<"u"?m.useLayoutEffect:m.useEffect,Nv=new WeakMap;function oD(e,t){var n=sD(null,function(a){return e.forEach(function(r){return xd(r,a)})});return iD(function(){var a=Nv.get(n);if(a){var r=new Set(a),s=new Set(e),i=n.current;r.forEach(function(o){s.has(o)||xd(o,null)}),s.forEach(function(o){r.has(o)||xd(o,i)})}Nv.set(n,e)},[e]),n}function lD(e){return e}function cD(e,t){t===void 0&&(t=lD);var n=[],a=!1,r={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,a);return n.push(i),function(){n=n.filter(function(o){return o!==i})}},assignSyncMedium:function(s){for(a=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(o){return s(o)},filter:function(){return n}}},assignMedium:function(s){a=!0;var i=[];if(n.length){var o=n;n=[],o.forEach(s),i=n}var l=function(){var d=i;i=[],d.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),n}}}};return r}function uD(e){e===void 0&&(e={});var t=cD(null);return t.options=gn({async:!0,ssr:!1},e),t}var uS=function(e){var t=e.sideCar,n=cS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return m.createElement(a,gn({},n))};uS.isSideCarExport=!0;function dD(e,t){return e.useMedium(t),uS}var dS=uD(),Sd=function(){},ou=m.forwardRef(function(e,t){var n=m.useRef(null),a=m.useState({onScrollCapture:Sd,onWheelCapture:Sd,onTouchMoveCapture:Sd}),r=a[0],s=a[1],i=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,u=e.shards,f=e.sideCar,h=e.noRelative,x=e.noIsolation,y=e.inert,w=e.allowPinchZoom,g=e.as,v=g===void 0?"div":g,b=e.gapMode,S=cS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=f,_=oD([n,t]),A=gn(gn({},S),r);return m.createElement(m.Fragment,null,d&&m.createElement(E,{sideCar:dS,removeScrollBar:c,shards:u,noRelative:h,noIsolation:x,inert:y,setCallbacks:s,allowPinchZoom:!!w,lockRef:n,gapMode:b}),i?m.cloneElement(m.Children.only(o),gn(gn({},A),{ref:_})):m.createElement(v,gn({},A,{className:l,ref:_}),o))});ou.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ou.classNames={fullWidth:Fl,zeroRight:Gl};var fD=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fD();return t&&e.setAttribute("nonce",t),e}function mD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function pD(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=hD())&&(mD(t,n),pD(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vD=function(){var e=gD();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},fS=function(){var e=vD(),t=function(n){var a=n.styles,r=n.dynamic;return e(a,r),null};return t},yD={left:0,top:0,right:0,gap:0},Ed=function(e){return parseInt(e||"",10)||0},bD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Ed(n),Ed(a),Ed(r)]},wD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yD;var t=bD(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},xD=fS(),ps="data-scroll-locked",SD=function(e,t,n,a){var r=e.left,s=e.top,i=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
162
|
+
.`.concat(aD,` {
|
|
163
|
+
overflow: hidden `).concat(a,`;
|
|
164
|
+
padding-right: `).concat(o,"px ").concat(a,`;
|
|
165
|
+
}
|
|
166
|
+
body[`).concat(ps,`] {
|
|
167
|
+
overflow: hidden `).concat(a,`;
|
|
168
|
+
overscroll-behavior: contain;
|
|
169
|
+
`).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&`
|
|
170
|
+
padding-left: `.concat(r,`px;
|
|
171
|
+
padding-top: `).concat(s,`px;
|
|
172
|
+
padding-right: `).concat(i,`px;
|
|
173
|
+
margin-left:0;
|
|
174
|
+
margin-top:0;
|
|
175
|
+
margin-right: `).concat(o,"px ").concat(a,`;
|
|
176
|
+
`),n==="padding"&&"padding-right: ".concat(o,"px ").concat(a,";")].filter(Boolean).join(""),`
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.`).concat(Gl,` {
|
|
180
|
+
right: `).concat(o,"px ").concat(a,`;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.`).concat(Fl,` {
|
|
184
|
+
margin-right: `).concat(o,"px ").concat(a,`;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.`).concat(Gl," .").concat(Gl,` {
|
|
188
|
+
right: 0 `).concat(a,`;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.`).concat(Fl," .").concat(Fl,` {
|
|
192
|
+
margin-right: 0 `).concat(a,`;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
body[`).concat(ps,`] {
|
|
196
|
+
`).concat(rD,": ").concat(o,`px;
|
|
197
|
+
}
|
|
198
|
+
`)},Dv=function(){var e=parseInt(document.body.getAttribute(ps)||"0",10);return isFinite(e)?e:0},ED=function(){m.useEffect(function(){return document.body.setAttribute(ps,(Dv()+1).toString()),function(){var e=Dv()-1;e<=0?document.body.removeAttribute(ps):document.body.setAttribute(ps,e.toString())}},[])},_D=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,r=a===void 0?"margin":a;ED();var s=m.useMemo(function(){return wD(r)},[r]);return m.createElement(xD,{styles:SD(s,!t,r,n?"":"!important")})},Vf=!1;if(typeof window<"u")try{var vl=Object.defineProperty({},"passive",{get:function(){return Vf=!0,!0}});window.addEventListener("test",vl,vl),window.removeEventListener("test",vl,vl)}catch{Vf=!1}var Pr=Vf?{passive:!1}:!1,TD=function(e){return e.tagName==="TEXTAREA"},hS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!TD(e)&&n[t]==="visible")},AD=function(e){return hS(e,"overflowY")},CD=function(e){return hS(e,"overflowX")},jv=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var r=mS(e,a);if(r){var s=pS(e,a),i=s[1],o=s[2];if(i>o)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},RD=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},OD=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},mS=function(e,t){return e==="v"?AD(t):CD(t)},pS=function(e,t){return e==="v"?RD(t):OD(t)},kD=function(e,t){return e==="h"&&t==="rtl"?-1:1},ND=function(e,t,n,a,r){var s=kD(e,window.getComputedStyle(t).direction),i=s*a,o=n.target,l=t.contains(o),c=!1,d=i>0,u=0,f=0;do{var h=pS(e,o),x=h[0],y=h[1],w=h[2],g=y-w-s*x;(x||g)&&mS(e,o)&&(u+=g,f+=x),o=o.parentNode.host||o.parentNode}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(d&&Math.abs(u)<1||!d&&Math.abs(f)<1)&&(c=!0),c},yl=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mv=function(e){return[e.deltaX,e.deltaY]},Lv=function(e){return e&&"current"in e?e.current:e},DD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jD=function(e){return`
|
|
199
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
200
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
201
|
+
`)},MD=0,zr=[];function LD(e){var t=m.useRef([]),n=m.useRef([0,0]),a=m.useRef(),r=m.useState(MD++)[0],s=m.useState(fS)[0],i=m.useRef(e);m.useEffect(function(){i.current=e},[e]),m.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var y=nD([e.lockRef.current],(e.shards||[]).map(Lv),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var o=m.useCallback(function(y,w){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!i.current.allowPinchZoom;var g=yl(y),v=n.current,b="deltaX"in y?y.deltaX:v[0]-g[0],S="deltaY"in y?y.deltaY:v[1]-g[1],E,_=y.target,A=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in y&&A==="h"&&_.type==="range")return!1;var T=jv(A,_);if(!T)return!0;if(T?E=A:(E=A==="v"?"h":"v",T=jv(A,_)),!T)return!1;if(!a.current&&"changedTouches"in y&&(b||S)&&(a.current=E),!E)return!0;var k=a.current||E;return ND(k,w,y,k==="h"?b:S)},[]),l=m.useCallback(function(y){var w=y;if(!(!zr.length||zr[zr.length-1]!==s)){var g="deltaY"in w?Mv(w):yl(w),v=t.current.filter(function(E){return E.name===w.type&&(E.target===w.target||w.target===E.shadowParent)&&DD(E.delta,g)})[0];if(v&&v.should){w.cancelable&&w.preventDefault();return}if(!v){var b=(i.current.shards||[]).map(Lv).filter(Boolean).filter(function(E){return E.contains(w.target)}),S=b.length>0?o(w,b[0]):!i.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),c=m.useCallback(function(y,w,g,v){var b={name:y,delta:w,target:g,should:v,shadowParent:UD(g)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),d=m.useCallback(function(y){n.current=yl(y),a.current=void 0},[]),u=m.useCallback(function(y){c(y.type,Mv(y),y.target,o(y,e.lockRef.current))},[]),f=m.useCallback(function(y){c(y.type,yl(y),y.target,o(y,e.lockRef.current))},[]);m.useEffect(function(){return zr.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Pr),document.addEventListener("touchmove",l,Pr),document.addEventListener("touchstart",d,Pr),function(){zr=zr.filter(function(y){return y!==s}),document.removeEventListener("wheel",l,Pr),document.removeEventListener("touchmove",l,Pr),document.removeEventListener("touchstart",d,Pr)}},[]);var h=e.removeScrollBar,x=e.inert;return m.createElement(m.Fragment,null,x?m.createElement(s,{styles:jD(r)}):null,h?m.createElement(_D,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function UD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const PD=dD(dS,LD);var gS=m.forwardRef(function(e,t){return m.createElement(ou,gn({},e,{ref:t,sideCar:PD}))});gS.classNames=ou.classNames;var zD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Br=new WeakMap,bl=new WeakMap,wl={},_d=0,vS=function(e){return e&&(e.host||vS(e.parentNode))},BD=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=vS(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},$D=function(e,t,n,a){var r=BD(t,Array.isArray(e)?e:[e]);wl[n]||(wl[n]=new WeakMap);var s=wl[n],i=[],o=new Set,l=new Set(r),c=function(u){!u||o.has(u)||(o.add(u),c(u.parentNode))};r.forEach(c);var d=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(f){if(o.has(f))d(f);else try{var h=f.getAttribute(a),x=h!==null&&h!=="false",y=(Br.get(f)||0)+1,w=(s.get(f)||0)+1;Br.set(f,y),s.set(f,w),i.push(f),y===1&&x&&bl.set(f,!0),w===1&&f.setAttribute(n,"true"),x||f.setAttribute(a,"true")}catch(g){console.error("aria-hidden: cannot operate on ",f,g)}})};return d(t),o.clear(),_d++,function(){i.forEach(function(u){var f=Br.get(u)-1,h=s.get(u)-1;Br.set(u,f),s.set(u,h),f||(bl.has(u)||u.removeAttribute(a),bl.delete(u)),h||u.removeAttribute(n)}),_d--,_d||(Br=new WeakMap,Br=new WeakMap,bl=new WeakMap,wl={})}},HD=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),r=zD(e);return r?(a.push.apply(a,Array.from(r.querySelectorAll("[aria-live]"))),$D(a,r,n,"aria-hidden")):function(){return null}},lu="Dialog",[yS,bS]=rn(lu),[ID,sn]=yS(lu),wS=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:r,onOpenChange:s,modal:i=!0}=e,o=m.useRef(null),l=m.useRef(null),[c,d]=Qs({prop:a,defaultProp:r??!1,onChange:s,caller:lu});return p.jsx(ID,{scope:t,triggerRef:o,contentRef:l,contentId:Bi(),titleId:Bi(),descriptionId:Bi(),open:c,onOpenChange:d,onOpenToggle:m.useCallback(()=>d(u=>!u),[d]),modal:i,children:n})};wS.displayName=lu;var xS="DialogTrigger",SS=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=sn(xS,n),s=Ae(t,r.triggerRef);return p.jsx(ce.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":jm(r.open),...a,ref:s,onClick:ie(e.onClick,r.onOpenToggle)})});SS.displayName=xS;var Nm="DialogPortal",[qD,ES]=yS(Nm,{forceMount:void 0}),_S=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:r}=e,s=sn(Nm,t);return p.jsx(qD,{scope:t,forceMount:n,children:m.Children.map(a,i=>p.jsx(ta,{present:n||s.open,children:p.jsx(rm,{asChild:!0,container:r,children:i})}))})};_S.displayName=Nm;var Oc="DialogOverlay",TS=m.forwardRef((e,t)=>{const n=ES(Oc,e.__scopeDialog),{forceMount:a=n.forceMount,...r}=e,s=sn(Oc,e.__scopeDialog);return s.modal?p.jsx(ta,{present:a||s.open,children:p.jsx(FD,{...r,ref:t})}):null});TS.displayName=Oc;var GD=ao("DialogOverlay.RemoveScroll"),FD=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=sn(Oc,n);return p.jsx(gS,{as:GD,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(ce.div,{"data-state":jm(r.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),_r="DialogContent",AS=m.forwardRef((e,t)=>{const n=ES(_r,e.__scopeDialog),{forceMount:a=n.forceMount,...r}=e,s=sn(_r,e.__scopeDialog);return p.jsx(ta,{present:a||s.open,children:s.modal?p.jsx(YD,{...r,ref:t}):p.jsx(VD,{...r,ref:t})})});AS.displayName=_r;var YD=m.forwardRef((e,t)=>{const n=sn(_r,e.__scopeDialog),a=m.useRef(null),r=Ae(t,n.contentRef,a);return m.useEffect(()=>{const s=a.current;if(s)return HD(s)},[]),p.jsx(CS,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ie(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:ie(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,o=i.button===0&&i.ctrlKey===!0;(i.button===2||o)&&s.preventDefault()}),onFocusOutside:ie(e.onFocusOutside,s=>s.preventDefault())})}),VD=m.forwardRef((e,t)=>{const n=sn(_r,e.__scopeDialog),a=m.useRef(!1),r=m.useRef(!1);return p.jsx(CS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,o;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(a.current||(o=n.triggerRef.current)==null||o.focus(),s.preventDefault()),a.current=!1,r.current=!1},onInteractOutside:s=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(a.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),CS=m.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:s,...i}=e,o=sn(_r,n),l=m.useRef(null),c=Ae(t,l);return tD(),p.jsxs(p.Fragment,{children:[p.jsx(oS,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Xc,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":jm(o.open),...i,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(XD,{titleId:o.titleId}),p.jsx(ZD,{contentRef:l,descriptionId:o.descriptionId})]})]})}),Dm="DialogTitle",RS=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=sn(Dm,n);return p.jsx(ce.h2,{id:r.titleId,...a,ref:t})});RS.displayName=Dm;var OS="DialogDescription",kS=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=sn(OS,n);return p.jsx(ce.p,{id:r.descriptionId,...a,ref:t})});kS.displayName=OS;var NS="DialogClose",DS=m.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=sn(NS,n);return p.jsx(ce.button,{type:"button",...a,ref:t,onClick:ie(e.onClick,()=>r.onOpenChange(!1))})});DS.displayName=NS;function jm(e){return e?"open":"closed"}var jS="DialogTitleWarning",[KD,MS]=kA(jS,{contentName:_r,titleName:Dm,docsSlug:"dialog"}),XD=({titleId:e})=>{const t=MS(jS),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
202
|
+
|
|
203
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
204
|
+
|
|
205
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return m.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},QD="DialogDescriptionWarning",ZD=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${MS(QD).contentName}}.`;return m.useEffect(()=>{var s;const r=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},LS=wS,JD=SS,US=_S,Mm=TS,Lm=AS,Um=RS,Pm=kS,zm=DS;const PS=LS,WD=US,zS=m.forwardRef(({className:e,...t},n)=>p.jsx(Mm,{ref:n,className:pe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));zS.displayName=Mm.displayName;const Bm=m.forwardRef(({className:e,children:t,...n},a)=>p.jsxs(WD,{children:[p.jsx(zS,{}),p.jsxs(Lm,{ref:a,className:pe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,p.jsxs(zm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(um,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Bm.displayName=Lm.displayName;const $m=({className:e,...t})=>p.jsx("div",{className:pe("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});$m.displayName="DialogHeader";const Hm=({className:e,...t})=>p.jsx("div",{className:pe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Hm.displayName="DialogFooter";const Im=m.forwardRef(({className:e,...t},n)=>p.jsx(Um,{ref:n,className:pe("text-lg font-semibold leading-none tracking-tight",e),...t}));Im.displayName=Um.displayName;const BS=m.forwardRef(({className:e,...t},n)=>p.jsx(Pm,{ref:n,className:pe("text-sm text-muted-foreground",e),...t}));BS.displayName=Pm.displayName;var ej="Label",$S=m.forwardRef((e,t)=>p.jsx(ce.label,{...e,ref:t,onMouseDown:n=>{var r;n.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));$S.displayName=ej;var HS=$S;const tj=lm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ge=m.forwardRef(({className:e,...t},n)=>p.jsx(HS,{ref:n,className:pe(tj(),e),...t}));Ge.displayName=HS.displayName;const gs=m.forwardRef(({className:e,type:t,...n},a)=>p.jsx("input",{type:t,className:pe("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...n}));gs.displayName="Input";const cu=m.forwardRef(({className:e,...t},n)=>p.jsx("textarea",{className:pe("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));cu.displayName="Textarea";function IS(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var uu="Checkbox",[nj,ML]=rn(uu),[aj,qm]=nj(uu);function rj(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:r,disabled:s,form:i,name:o,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:u}=e,[f,h]=Qs({prop:n,defaultProp:r??!1,onChange:l,caller:uu}),[x,y]=m.useState(null),[w,g]=m.useState(null),v=m.useRef(!1),b=x?!!i||!!x.closest("form"):!0,S={checked:f,disabled:s,setChecked:h,control:x,setControl:y,name:o,form:i,value:d,hasConsumerStoppedPropagationRef:v,required:c,defaultChecked:za(r)?!1:r,isFormControl:b,bubbleInput:w,setBubbleInput:g};return p.jsx(aj,{scope:t,...S,children:sj(u)?u(S):a})}var qS="CheckboxTrigger",GS=m.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},r)=>{const{control:s,value:i,disabled:o,checked:l,required:c,setControl:d,setChecked:u,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:x}=qm(qS,e),y=Ae(r,d),w=m.useRef(l);return m.useEffect(()=>{const g=s==null?void 0:s.form;if(g){const v=()=>u(w.current);return g.addEventListener("reset",v),()=>g.removeEventListener("reset",v)}},[s,u]),p.jsx(ce.button,{type:"button",role:"checkbox","aria-checked":za(l)?"mixed":l,"aria-required":c,"data-state":XS(l),"data-disabled":o?"":void 0,disabled:o,value:i,...a,ref:y,onKeyDown:ie(t,g=>{g.key==="Enter"&&g.preventDefault()}),onClick:ie(n,g=>{u(v=>za(v)?!0:!v),x&&h&&(f.current=g.isPropagationStopped(),f.current||g.stopPropagation())})})});GS.displayName=qS;var Gm=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:r,defaultChecked:s,required:i,disabled:o,value:l,onCheckedChange:c,form:d,...u}=e;return p.jsx(rj,{__scopeCheckbox:n,checked:r,defaultChecked:s,disabled:o,required:i,onCheckedChange:c,name:a,form:d,value:l,internal_do_not_use_render:({isFormControl:f})=>p.jsxs(p.Fragment,{children:[p.jsx(GS,{...u,ref:t,__scopeCheckbox:n}),f&&p.jsx(KS,{__scopeCheckbox:n})]})})});Gm.displayName=uu;var FS="CheckboxIndicator",YS=m.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...r}=e,s=qm(FS,n);return p.jsx(ta,{present:a||za(s.checked)||s.checked===!0,children:p.jsx(ce.span,{"data-state":XS(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});YS.displayName=FS;var VS="CheckboxBubbleInput",KS=m.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:r,checked:s,defaultChecked:i,required:o,disabled:l,name:c,value:d,form:u,bubbleInput:f,setBubbleInput:h}=qm(VS,e),x=Ae(n,h),y=IS(s),w=bm(a);m.useEffect(()=>{const v=f;if(!v)return;const b=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(b,"checked").set,_=!r.current;if(y!==s&&E){const A=new Event("click",{bubbles:_});v.indeterminate=za(s),E.call(v,za(s)?!1:s),v.dispatchEvent(A)}},[f,y,s,r]);const g=m.useRef(za(s)?!1:s);return p.jsx(ce.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??g.current,required:o,disabled:l,name:c,value:d,form:u,...t,tabIndex:-1,ref:x,style:{...t.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});KS.displayName=VS;function sj(e){return typeof e=="function"}function za(e){return e==="indeterminate"}function XS(e){return za(e)?"indeterminate":e?"checked":"unchecked"}const Fm=m.forwardRef(({className:e,...t},n)=>p.jsx(Gm,{ref:n,className:pe("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:p.jsx(YS,{className:pe("flex items-center justify-center text-current"),children:p.jsx(OC,{className:"h-4 w-4"})})}));Fm.displayName=Gm.displayName;const ij="modulepreload",oj=function(e){return"/"+e},Uv={},Hs=function(t,n,a){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),o=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(l=>{if(l=oj(l),l in Uv)return;Uv[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":ij,c||(u.as="script"),u.crossOrigin="",u.href=l,o&&u.setAttribute("nonce",o),document.head.appendChild(u),c)return new Promise((f,h)=>{u.addEventListener("load",f),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(i){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i}return r.then(i=>{for(const o of i||[])o.status==="rejected"&&s(o.reason);return t().catch(s)})},lj=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Hs(async()=>{const{default:a}=await Promise.resolve().then(()=>ai);return{default:a}},[]).then(({default:a})=>a(...n)):t=fetch,(...n)=>t(...n)};class Ym extends Error{constructor(t,n="FunctionsError",a){super(t),this.name=n,this.context=a}}class cj extends Ym{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class uj extends Ym{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class dj extends Ym{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Kf;(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"})(Kf||(Kf={}));var fj=function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function o(d){try{c(a.next(d))}catch(u){i(u)}}function l(d){try{c(a.throw(d))}catch(u){i(u)}}function c(d){d.done?s(d.value):r(d.value).then(o,l)}c((a=a.apply(e,t||[])).next())})};class hj{constructor(t,{headers:n={},customFetch:a,region:r=Kf.Any}={}){this.url=t,this.headers=n,this.region=r,this.fetch=lj(a)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var a;return fj(this,void 0,void 0,function*(){try{const{headers:r,method:s,body:i}=n;let o={},{region:l}=n;l||(l=this.region),l&&l!=="any"&&(o["x-region"]=l);let c;i&&(r&&!Object.prototype.hasOwnProperty.call(r,"Content-Type")||!r)&&(typeof Blob<"u"&&i instanceof Blob||i instanceof ArrayBuffer?(o["Content-Type"]="application/octet-stream",c=i):typeof i=="string"?(o["Content-Type"]="text/plain",c=i):typeof FormData<"u"&&i instanceof FormData?c=i:(o["Content-Type"]="application/json",c=JSON.stringify(i)));const d=yield this.fetch(`${this.url}/${t}`,{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},o),this.headers),r),body:c}).catch(x=>{throw new cj(x)}),u=d.headers.get("x-relay-error");if(u&&u==="true")throw new uj(d);if(!d.ok)throw new dj(d);let f=((a=d.headers.get("Content-Type"))!==null&&a!==void 0?a:"text/plain").split(";")[0].trim(),h;return f==="application/json"?h=yield d.json():f==="application/octet-stream"?h=yield d.blob():f==="text/event-stream"?h=d:f==="multipart/form-data"?h=yield d.formData():h=yield d.text(),{data:h,error:null}}catch(r){return{data:null,error:r}}})}}var vt={},Vm={},du={},Po={},fu={},hu={},mj=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},Is=mj();const pj=Is.fetch,QS=Is.fetch.bind(Is),ZS=Is.Headers,gj=Is.Request,vj=Is.Response,ai=Object.freeze(Object.defineProperty({__proto__:null,Headers:ZS,Request:gj,Response:vj,default:QS,fetch:pj},Symbol.toStringTag,{value:"Module"})),yj=OE(ai);var mu={};Object.defineProperty(mu,"__esModule",{value:!0});let bj=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}};mu.default=bj;var JS=qt&&qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hu,"__esModule",{value:!0});const wj=JS(yj),xj=JS(mu);let Sj=class{constructor(t){this.shouldThrowOnError=!1,this.method=t.method,this.url=t.url,this.headers=t.headers,this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=t.shouldThrowOnError,this.signal=t.signal,this.isMaybeSingle=t.isMaybeSingle,t.fetch?this.fetch=t.fetch:typeof fetch>"u"?this.fetch=wj.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,n){return this.headers=Object.assign({},this.headers),this.headers[t]=n,this}then(t,n){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const a=this.fetch;let r=a(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async s=>{var i,o,l;let c=null,d=null,u=null,f=s.status,h=s.statusText;if(s.ok){if(this.method!=="HEAD"){const g=await s.text();g===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?d=g:d=JSON.parse(g))}const y=(i=this.headers.Prefer)===null||i===void 0?void 0:i.match(/count=(exact|planned|estimated)/),w=(o=s.headers.get("content-range"))===null||o===void 0?void 0:o.split("/");y&&w&&w.length>1&&(u=parseInt(w[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(d)&&(d.length>1?(c={code:"PGRST116",details:`Results contain ${d.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},d=null,u=null,f=406,h="Not Acceptable"):d.length===1?d=d[0]:d=null)}else{const y=await s.text();try{c=JSON.parse(y),Array.isArray(c)&&s.status===404&&(d=[],c=null,f=200,h="OK")}catch{s.status===404&&y===""?(f=204,h="No Content"):c={message:y}}if(c&&this.isMaybeSingle&&(!((l=c==null?void 0:c.details)===null||l===void 0)&&l.includes("0 rows"))&&(c=null,f=200,h="OK"),c&&this.shouldThrowOnError)throw new xj.default(c)}return{error:c,data:d,count:u,status:f,statusText:h}});return this.shouldThrowOnError||(r=r.catch(s=>{var i,o,l;return{error:{message:`${(i=s==null?void 0:s.name)!==null&&i!==void 0?i:"FetchError"}: ${s==null?void 0:s.message}`,details:`${(o=s==null?void 0:s.stack)!==null&&o!==void 0?o:""}`,hint:"",code:`${(l=s==null?void 0:s.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),r.then(t,n)}returns(){return this}overrideTypes(){return this}};hu.default=Sj;var Ej=qt&&qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fu,"__esModule",{value:!0});const _j=Ej(hu);let Tj=class extends _j.default{select(t){let n=!1;const a=(t??"*").split("").map(r=>/\s/.test(r)&&!n?"":(r==='"'&&(n=!n),r)).join("");return this.url.searchParams.set("select",a),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:a,foreignTable:r,referencedTable:s=r}={}){const i=s?`${s}.order`:"order",o=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${o?`${o},`:""}${t}.${n?"asc":"desc"}${a===void 0?"":a?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:a=n}={}){const r=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,n,{foreignTable:a,referencedTable:r=a}={}){const s=typeof r>"u"?"offset":`${r}.offset`,i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(i,`${n-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}explain({analyze:t=!1,verbose:n=!1,settings:a=!1,buffers:r=!1,wal:s=!1,format:i="text"}={}){var o;const l=[t?"analyze":null,n?"verbose":null,a?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),c=(o=this.headers.Accept)!==null&&o!==void 0?o:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${i}; for="${c}"; options=${l};`,i==="json"?this:this}rollback(){var t;return((t=this.headers.Prefer)!==null&&t!==void 0?t:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}};fu.default=Tj;var Aj=qt&&qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Po,"__esModule",{value:!0});const Cj=Aj(fu);let Rj=class extends Cj.default{eq(t,n){return this.url.searchParams.append(t,`eq.${n}`),this}neq(t,n){return this.url.searchParams.append(t,`neq.${n}`),this}gt(t,n){return this.url.searchParams.append(t,`gt.${n}`),this}gte(t,n){return this.url.searchParams.append(t,`gte.${n}`),this}lt(t,n){return this.url.searchParams.append(t,`lt.${n}`),this}lte(t,n){return this.url.searchParams.append(t,`lte.${n}`),this}like(t,n){return this.url.searchParams.append(t,`like.${n}`),this}likeAllOf(t,n){return this.url.searchParams.append(t,`like(all).{${n.join(",")}}`),this}likeAnyOf(t,n){return this.url.searchParams.append(t,`like(any).{${n.join(",")}}`),this}ilike(t,n){return this.url.searchParams.append(t,`ilike.${n}`),this}ilikeAllOf(t,n){return this.url.searchParams.append(t,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(t,n){return this.url.searchParams.append(t,`ilike(any).{${n.join(",")}}`),this}is(t,n){return this.url.searchParams.append(t,`is.${n}`),this}in(t,n){const a=Array.from(new Set(n)).map(r=>typeof r=="string"&&new RegExp("[,()]").test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${a})`),this}contains(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cs.{${n.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(n)}`),this}containedBy(t,n){return typeof n=="string"?this.url.searchParams.append(t,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(t,`cd.{${n.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(n)}`),this}rangeGt(t,n){return this.url.searchParams.append(t,`sr.${n}`),this}rangeGte(t,n){return this.url.searchParams.append(t,`nxl.${n}`),this}rangeLt(t,n){return this.url.searchParams.append(t,`sl.${n}`),this}rangeLte(t,n){return this.url.searchParams.append(t,`nxr.${n}`),this}rangeAdjacent(t,n){return this.url.searchParams.append(t,`adj.${n}`),this}overlaps(t,n){return typeof n=="string"?this.url.searchParams.append(t,`ov.${n}`):this.url.searchParams.append(t,`ov.{${n.join(",")}}`),this}textSearch(t,n,{config:a,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const i=a===void 0?"":`(${a})`;return this.url.searchParams.append(t,`${s}fts${i}.${n}`),this}match(t){return Object.entries(t).forEach(([n,a])=>{this.url.searchParams.append(n,`eq.${a}`)}),this}not(t,n,a){return this.url.searchParams.append(t,`not.${n}.${a}`),this}or(t,{foreignTable:n,referencedTable:a=n}={}){const r=a?`${a}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,n,a){return this.url.searchParams.append(t,`${n}.${a}`),this}};Po.default=Rj;var Oj=qt&&qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(du,"__esModule",{value:!0});const pi=Oj(Po);let kj=class{constructor(t,{headers:n={},schema:a,fetch:r}){this.url=t,this.headers=n,this.schema=a,this.fetch=r}select(t,{head:n=!1,count:a}={}){const r=n?"HEAD":"GET";let s=!1;const i=(t??"*").split("").map(o=>/\s/.test(o)&&!s?"":(o==='"'&&(s=!s),o)).join("");return this.url.searchParams.set("select",i),a&&(this.headers.Prefer=`count=${a}`),new pi.default({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:a=!0}={}){const r="POST",s=[];if(this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),a||s.push("missing=default"),this.headers.Prefer=s.join(","),Array.isArray(t)){const i=t.reduce((o,l)=>o.concat(Object.keys(l)),[]);if(i.length>0){const o=[...new Set(i)].map(l=>`"${l}"`);this.url.searchParams.set("columns",o.join(","))}}return new pi.default({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:a=!1,count:r,defaultToNull:s=!0}={}){const i="POST",o=[`resolution=${a?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&o.push(this.headers.Prefer),r&&o.push(`count=${r}`),s||o.push("missing=default"),this.headers.Prefer=o.join(","),Array.isArray(t)){const l=t.reduce((c,d)=>c.concat(Object.keys(d)),[]);if(l.length>0){const c=[...new Set(l)].map(d=>`"${d}"`);this.url.searchParams.set("columns",c.join(","))}}return new pi.default({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const a="PATCH",r=[];return this.headers.Prefer&&r.push(this.headers.Prefer),n&&r.push(`count=${n}`),this.headers.Prefer=r.join(","),new pi.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",a=[];return t&&a.push(`count=${t}`),this.headers.Prefer&&a.unshift(this.headers.Prefer),this.headers.Prefer=a.join(","),new pi.default({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}};du.default=kj;var pu={},gu={};Object.defineProperty(gu,"__esModule",{value:!0});gu.version=void 0;gu.version="0.0.0-automated";Object.defineProperty(pu,"__esModule",{value:!0});pu.DEFAULT_HEADERS=void 0;const Nj=gu;pu.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${Nj.version}`};var WS=qt&&qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Vm,"__esModule",{value:!0});const Dj=WS(du),jj=WS(Po),Mj=pu;let Lj=class e1{constructor(t,{headers:n={},schema:a,fetch:r}={}){this.url=t,this.headers=Object.assign(Object.assign({},Mj.DEFAULT_HEADERS),n),this.schemaName=a,this.fetch=r}from(t){const n=new URL(`${this.url}/${t}`);return new Dj.default(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new e1(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:a=!1,get:r=!1,count:s}={}){let i;const o=new URL(`${this.url}/rpc/${t}`);let l;a||r?(i=a?"HEAD":"GET",Object.entries(n).filter(([d,u])=>u!==void 0).map(([d,u])=>[d,Array.isArray(u)?`{${u.join(",")}}`:`${u}`]).forEach(([d,u])=>{o.searchParams.append(d,u)})):(i="POST",l=n);const c=Object.assign({},this.headers);return s&&(c.Prefer=`count=${s}`),new jj.default({method:i,url:o,headers:c,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}};Vm.default=Lj;var ri=qt&&qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vt,"__esModule",{value:!0});vt.PostgrestError=vt.PostgrestBuilder=vt.PostgrestTransformBuilder=vt.PostgrestFilterBuilder=vt.PostgrestQueryBuilder=vt.PostgrestClient=void 0;const t1=ri(Vm);vt.PostgrestClient=t1.default;const n1=ri(du);vt.PostgrestQueryBuilder=n1.default;const a1=ri(Po);vt.PostgrestFilterBuilder=a1.default;const r1=ri(fu);vt.PostgrestTransformBuilder=r1.default;const s1=ri(hu);vt.PostgrestBuilder=s1.default;const i1=ri(mu);vt.PostgrestError=i1.default;var Uj=vt.default={PostgrestClient:t1.default,PostgrestQueryBuilder:n1.default,PostgrestFilterBuilder:a1.default,PostgrestTransformBuilder:r1.default,PostgrestBuilder:s1.default,PostgrestError:i1.default};const{PostgrestClient:Pj,PostgrestQueryBuilder:$L,PostgrestFilterBuilder:HL,PostgrestTransformBuilder:IL,PostgrestBuilder:qL,PostgrestError:GL}=Uj,zj="2.11.2",Bj={"X-Client-Info":`realtime-js/${zj}`},$j="1.0.0",o1=1e4,Hj=1e3;var vs;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(vs||(vs={}));var _t;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(_t||(_t={}));var Jt;(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"})(Jt||(Jt={}));var Xf;(function(e){e.websocket="websocket"})(Xf||(Xf={}));var sr;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(sr||(sr={}));class Ij{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),a=new TextDecoder;return this._decodeBroadcast(t,n,a)}_decodeBroadcast(t,n,a){const r=n.getUint8(1),s=n.getUint8(2);let i=this.HEADER_LENGTH+2;const o=a.decode(t.slice(i,i+r));i=i+r;const l=a.decode(t.slice(i,i+s));i=i+s;const c=JSON.parse(a.decode(t.slice(i,t.byteLength)));return{ref:null,topic:o,event:l,payload:c}}}class l1{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}}var be;(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"})(be||(be={}));const Pv=(e,t,n={})=>{var a;const r=(a=n.skipTypes)!==null&&a!==void 0?a:[];return Object.keys(t).reduce((s,i)=>(s[i]=qj(i,e,t,r),s),{})},qj=(e,t,n,a)=>{const r=t.find(o=>o.name===e),s=r==null?void 0:r.type,i=n[e];return s&&!a.includes(s)?c1(s,i):Qf(i)},c1=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return Vj(t,n)}switch(e){case be.bool:return Gj(t);case be.float4:case be.float8:case be.int2:case be.int4:case be.int8:case be.numeric:case be.oid:return Fj(t);case be.json:case be.jsonb:return Yj(t);case be.timestamp:return Kj(t);case be.abstime:case be.date:case be.daterange:case be.int4range:case be.int8range:case be.money:case be.reltime:case be.text:case be.time:case be.timestamptz:case be.timetz:case be.tsrange:case be.tstzrange:return Qf(t);default:return Qf(t)}},Qf=e=>e,Gj=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Fj=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},Yj=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},Vj=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,a=e[n];if(e[0]==="{"&&a==="}"){let s;const i=e.slice(1,n);try{s=JSON.parse("["+i+"]")}catch{s=i?i.split(","):[]}return s.map(o=>c1(t,o))}return e},Kj=e=>typeof e=="string"?e.replace(" ","T"):e,u1=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class Td{constructor(t,n,a={},r=o1){this.channel=t,this.event=n,this.payload=a,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var a;return this._hasReceived(t)&&n((a=this.receivedResp)===null||a===void 0?void 0:a.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}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:n}){this.recHooks.filter(a=>a.status===t).forEach(a=>a.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var zv;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(zv||(zv={}));class $i{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const a=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(a.state,{},r=>{const{onJoin:s,onLeave:i,onSync:o}=this.caller;this.joinRef=this.channel._joinRef(),this.state=$i.syncState(this.state,r,s,i),this.pendingDiffs.forEach(l=>{this.state=$i.syncDiff(this.state,l,s,i)}),this.pendingDiffs=[],o()}),this.channel._on(a.diff,{},r=>{const{onJoin:s,onLeave:i,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(r):(this.state=$i.syncDiff(this.state,r,s,i),o())}),this.onJoin((r,s,i)=>{this.channel._trigger("presence",{event:"join",key:r,currentPresences:s,newPresences:i})}),this.onLeave((r,s,i)=>{this.channel._trigger("presence",{event:"leave",key:r,currentPresences:s,leftPresences:i})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,a,r){const s=this.cloneDeep(t),i=this.transformState(n),o={},l={};return this.map(s,(c,d)=>{i[c]||(l[c]=d)}),this.map(i,(c,d)=>{const u=s[c];if(u){const f=d.map(w=>w.presence_ref),h=u.map(w=>w.presence_ref),x=d.filter(w=>h.indexOf(w.presence_ref)<0),y=u.filter(w=>f.indexOf(w.presence_ref)<0);x.length>0&&(o[c]=x),y.length>0&&(l[c]=y)}else o[c]=d}),this.syncDiff(s,{joins:o,leaves:l},a,r)}static syncDiff(t,n,a,r){const{joins:s,leaves:i}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return a||(a=()=>{}),r||(r=()=>{}),this.map(s,(o,l)=>{var c;const d=(c=t[o])!==null&&c!==void 0?c:[];if(t[o]=this.cloneDeep(l),d.length>0){const u=t[o].map(h=>h.presence_ref),f=d.filter(h=>u.indexOf(h.presence_ref)<0);t[o].unshift(...f)}a(o,d,l)}),this.map(i,(o,l)=>{let c=t[o];if(!c)return;const d=l.map(u=>u.presence_ref);c=c.filter(u=>d.indexOf(u.presence_ref)<0),t[o]=c,r(o,c,l),c.length===0&&delete t[o]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(a=>n(a,t[a]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,a)=>{const r=t[a];return"metas"in r?n[a]=r.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):n[a]=r,n},{})}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 Bv;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(Bv||(Bv={}));var $v;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})($v||($v={}));var Mn;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Mn||(Mn={}));class Km{constructor(t,n={config:{}},a){this.topic=t,this.params=n,this.socket=a,this.bindings={},this.state=_t.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new Td(this,Jt.join,this.params,this.timeout),this.rejoinTimer=new l1(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=_t.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=_t.closed,this.socket._remove(this)}),this._onError(r=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,r),this.state=_t.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=_t.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Jt.reply,{},(r,s)=>{this._trigger(this._replyEventName(s),r)}),this.presence=new $i(this),this.broadcastEndpointURL=u1(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(t,n=this.timeout){var a,r;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:s,presence:i,private:o}}=this.params;this._onError(d=>t==null?void 0:t(Mn.CHANNEL_ERROR,d)),this._onClose(()=>t==null?void 0:t(Mn.CLOSED));const l={},c={broadcast:s,presence:i,postgres_changes:(r=(a=this.bindings.postgres_changes)===null||a===void 0?void 0:a.map(d=>d.filter))!==null&&r!==void 0?r:[],private:o};this.socket.accessTokenValue&&(l.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:c},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:d})=>{var u;if(this.socket.setAuth(),d===void 0){t==null||t(Mn.SUBSCRIBED);return}else{const f=this.bindings.postgres_changes,h=(u=f==null?void 0:f.length)!==null&&u!==void 0?u:0,x=[];for(let y=0;y<h;y++){const w=f[y],{filter:{event:g,schema:v,table:b,filter:S}}=w,E=d&&d[y];if(E&&E.event===g&&E.schema===v&&E.table===b&&E.filter===S)x.push(Object.assign(Object.assign({},w),{id:E.id}));else{this.unsubscribe(),t==null||t(Mn.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=x,t&&t(Mn.SUBSCRIBED);return}}).receive("error",d=>{t==null||t(Mn.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Mn.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,a){return this._on(t,n,a)}async send(t,n={}){var a,r;if(!this._canPush()&&t.type==="broadcast"){const{event:s,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:s,payload:i,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(a=n.timeout)!==null&&a!==void 0?a:this.timeout);return await((r=c.body)===null||r===void 0?void 0:r.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var i,o,l;const c=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(o=(i=this.params)===null||i===void 0?void 0:i.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),c.receive("ok",()=>s("ok")),c.receive("error",()=>s("error")),c.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=_t.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Jt.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(a=>{const r=new Td(this,Jt.leave,{},t);r.receive("ok",()=>{n(),a("ok")}).receive("timeout",()=>{n(),a("timed out")}).receive("error",()=>{a("error")}),r.send(),this._canPush()||r.trigger("ok",{})})}async _fetchWithTimeout(t,n,a){const r=new AbortController,s=setTimeout(()=>r.abort(),a),i=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:r.signal}));return clearTimeout(s),i}_push(t,n,a=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new Td(this,t,n,a);return this._canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}_onMessage(t,n,a){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,a){var r,s;const i=t.toLocaleLowerCase(),{close:o,error:l,leave:c,join:d}=Jt;if(a&&[o,l,c,d].indexOf(i)>=0&&a!==this._joinRef())return;let f=this._onMessage(i,n,a);if(n&&!f)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(i)?(r=this.bindings.postgres_changes)===null||r===void 0||r.filter(h=>{var x,y,w;return((x=h.filter)===null||x===void 0?void 0:x.event)==="*"||((w=(y=h.filter)===null||y===void 0?void 0:y.event)===null||w===void 0?void 0:w.toLocaleLowerCase())===i}).map(h=>h.callback(f,a)):(s=this.bindings[i])===null||s===void 0||s.filter(h=>{var x,y,w,g,v,b;if(["broadcast","presence","postgres_changes"].includes(i))if("id"in h){const S=h.id,E=(x=h.filter)===null||x===void 0?void 0:x.event;return S&&((y=n.ids)===null||y===void 0?void 0:y.includes(S))&&(E==="*"||(E==null?void 0:E.toLocaleLowerCase())===((w=n.data)===null||w===void 0?void 0:w.type.toLocaleLowerCase()))}else{const S=(v=(g=h==null?void 0:h.filter)===null||g===void 0?void 0:g.event)===null||v===void 0?void 0:v.toLocaleLowerCase();return S==="*"||S===((b=n==null?void 0:n.event)===null||b===void 0?void 0:b.toLocaleLowerCase())}else return h.type.toLocaleLowerCase()===i}).map(h=>{if(typeof f=="object"&&"ids"in f){const x=f.data,{schema:y,table:w,commit_timestamp:g,type:v,errors:b}=x;f=Object.assign(Object.assign({},{schema:y,table:w,commit_timestamp:g,eventType:v,new:{},old:{},errors:b}),this._getPayloadRecords(x))}h.callback(f,a)})}_isClosed(){return this.state===_t.closed}_isJoined(){return this.state===_t.joined}_isJoining(){return this.state===_t.joining}_isLeaving(){return this.state===_t.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,a){const r=t.toLocaleLowerCase(),s={type:r,filter:n,callback:a};return this.bindings[r]?this.bindings[r].push(s):this.bindings[r]=[s],this}_off(t,n){const a=t.toLocaleLowerCase();return this.bindings[a]=this.bindings[a].filter(r=>{var s;return!(((s=r.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===a&&Km.isEqual(r.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const a in t)if(t[a]!==n[a])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Jt.close,{},t)}_onError(t){this._on(Jt.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=_t.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=Pv(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=Pv(t.columns,t.old_record)),n}}const Xj=()=>{},Qj=typeof WebSocket<"u",Zj=`
|
|
206
|
+
addEventListener("message", (e) => {
|
|
207
|
+
if (e.data.event === "start") {
|
|
208
|
+
setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);
|
|
209
|
+
}
|
|
210
|
+
});`;class Jj{constructor(t,n){var a;this.accessTokenValue=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=Bj,this.params={},this.timeout=o1,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=Xj,this.conn=null,this.sendBuffer=[],this.serializer=new Ij,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=s=>{let i;return s?i=s:typeof fetch>"u"?i=(...o)=>Hs(async()=>{const{default:l}=await Promise.resolve().then(()=>ai);return{default:l}},void 0).then(({default:l})=>l(...o)):i=fetch,(...o)=>i(...o)},this.endPoint=`${t}/${Xf.websocket}`,this.httpEndpoint=u1(t),n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const r=(a=n==null?void 0:n.params)===null||a===void 0?void 0:a.apikey;if(r&&(this.accessTokenValue=r,this.apiKey=r),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:s=>[1e3,2e3,5e3,1e4][s-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(s,i)=>i(JSON.stringify(s)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new l1(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch),n!=null&&n.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(n==null?void 0:n.worker)||!1,this.workerUrl=n==null?void 0:n.workerUrl}this.accessToken=(n==null?void 0:n.accessToken)||null}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers});return}if(Qj){this.conn=new WebSocket(this.endpointURL()),this.setupConnection();return}this.conn=new Wj(this.endpointURL(),void 0,{close:()=>{this.conn=null}}),Hs(async()=>{const{default:t}=await import("./browser-CtsaYQuQ.js").then(n=>n.b);return{default:t}},[]).then(({default:t})=>{this.conn=new t(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:$j}))}disconnect(t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),t}log(t,n,a){this.logger(t,n,a)}connectionState(){switch(this.conn&&this.conn.readyState){case vs.connecting:return sr.Connecting;case vs.open:return sr.Open;case vs.closing:return sr.Closing;default:return sr.Closed}}isConnected(){return this.connectionState()===sr.Open}channel(t,n={config:{}}){const a=new Km(`realtime:${t}`,n,this);return this.channels.push(a),a}push(t){const{topic:n,event:a,payload:r,ref:s}=t,i=()=>{this.encode(t,o=>{var l;(l=this.conn)===null||l===void 0||l.send(o)})};this.log("push",`${n} ${a} (${s})`,r),this.isConnected()?i():this.sendBuffer.push(i)}async setAuth(t=null){let n=t||this.accessToken&&await this.accessToken()||this.accessTokenValue;if(n){let a=null;try{a=JSON.parse(atob(n.split(".")[1]))}catch{}if(a&&a.exp&&!(Math.floor(Date.now()/1e3)-a.exp<0))return this.log("auth",`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${a.exp}`),Promise.reject(`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${a.exp}`);this.accessTokenValue=n,this.channels.forEach(r=>{n&&r.updateJoinPayload({access_token:n}),r.joinedOnce&&r._isJoined()&&r._push(Jt.access_token,{access_token:n})})}}async sendHeartbeat(){var t;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(t=this.conn)===null||t===void 0||t.close(Hj,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth()}}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 n=this.channels.find(a=>a.topic===t&&(a._isJoined()||a._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n._joinRef()!==t._joinRef())}setupConnection(){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))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:a,event:r,payload:s,ref:i}=n;i&&i===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${s.status||""} ${a} ${r} ${i&&"("+i+")"||""}`,s),this.channels.filter(o=>o._isMember(a)).forEach(o=>o._trigger(r,s,i)),this.stateChangeCallbacks.message.forEach(o=>o(n))})}async _onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs);else{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=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(t=>t())}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(t))}_onConnError(t){this.log("transport",t.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(Jt.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const a=t.match(/\?/)?"&":"?",r=new URLSearchParams(n);return`${t}${a}${r}`}_workerObjectUrl(t){let n;if(t)n=t;else{const a=new Blob([Zj],{type:"application/javascript"});n=URL.createObjectURL(a)}return n}}class Wj{constructor(t,n,a){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=vs.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=a.close}}class Xm extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function Ie(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class eM extends Xm{constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class Zf extends Xm{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var tM=function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function o(d){try{c(a.next(d))}catch(u){i(u)}}function l(d){try{c(a.throw(d))}catch(u){i(u)}}function c(d){d.done?s(d.value):r(d.value).then(o,l)}c((a=a.apply(e,t||[])).next())})};const d1=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Hs(async()=>{const{default:a}=await Promise.resolve().then(()=>ai);return{default:a}},void 0).then(({default:a})=>a(...n)):t=fetch,(...n)=>t(...n)},nM=()=>tM(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Hs(()=>Promise.resolve().then(()=>ai),void 0)).Response:Response}),Jf=e=>{if(Array.isArray(e))return e.map(n=>Jf(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,a])=>{const r=n.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));t[r]=Jf(a)}),t};var Or=function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function o(d){try{c(a.next(d))}catch(u){i(u)}}function l(d){try{c(a.throw(d))}catch(u){i(u)}}function c(d){d.done?s(d.value):r(d.value).then(o,l)}c((a=a.apply(e,t||[])).next())})};const Ad=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),aM=(e,t,n)=>Or(void 0,void 0,void 0,function*(){const a=yield nM();e instanceof a&&!(n!=null&&n.noResolveJson)?e.json().then(r=>{t(new eM(Ad(r),e.status||500))}).catch(r=>{t(new Zf(Ad(r),r))}):t(new Zf(Ad(e),e))}),rM=(e,t,n,a)=>{const r={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?r:(r.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),a&&(r.body=JSON.stringify(a)),Object.assign(Object.assign({},r),n))};function zo(e,t,n,a,r,s){return Or(this,void 0,void 0,function*(){return new Promise((i,o)=>{e(n,rM(t,a,r,s)).then(l=>{if(!l.ok)throw l;return a!=null&&a.noResolveJson?l:l.json()}).then(l=>i(l)).catch(l=>aM(l,o,a))})})}function kc(e,t,n,a){return Or(this,void 0,void 0,function*(){return zo(e,"GET",t,n,a)})}function pa(e,t,n,a,r){return Or(this,void 0,void 0,function*(){return zo(e,"POST",t,a,r,n)})}function sM(e,t,n,a,r){return Or(this,void 0,void 0,function*(){return zo(e,"PUT",t,a,r,n)})}function iM(e,t,n,a){return Or(this,void 0,void 0,function*(){return zo(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),a)})}function f1(e,t,n,a,r){return Or(this,void 0,void 0,function*(){return zo(e,"DELETE",t,a,r,n)})}var ft=function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function o(d){try{c(a.next(d))}catch(u){i(u)}}function l(d){try{c(a.throw(d))}catch(u){i(u)}}function c(d){d.done?s(d.value):r(d.value).then(o,l)}c((a=a.apply(e,t||[])).next())})};const oM={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Hv={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class lM{constructor(t,n={},a,r){this.url=t,this.headers=n,this.bucketId=a,this.fetch=d1(r)}uploadOrUpdate(t,n,a,r){return ft(this,void 0,void 0,function*(){try{let s;const i=Object.assign(Object.assign({},Hv),r);let o=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(i.upsert)});const l=i.metadata;typeof Blob<"u"&&a instanceof Blob?(s=new FormData,s.append("cacheControl",i.cacheControl),l&&s.append("metadata",this.encodeMetadata(l)),s.append("",a)):typeof FormData<"u"&&a instanceof FormData?(s=a,s.append("cacheControl",i.cacheControl),l&&s.append("metadata",this.encodeMetadata(l))):(s=a,o["cache-control"]=`max-age=${i.cacheControl}`,o["content-type"]=i.contentType,l&&(o["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),r!=null&&r.headers&&(o=Object.assign(Object.assign({},o),r.headers));const c=this._removeEmptyFolders(n),d=this._getFinalPath(c),u=yield this.fetch(`${this.url}/object/${d}`,Object.assign({method:t,body:s,headers:o},i!=null&&i.duplex?{duplex:i.duplex}:{})),f=yield u.json();return u.ok?{data:{path:c,id:f.Id,fullPath:f.Key},error:null}:{data:null,error:f}}catch(s){if(Ie(s))return{data:null,error:s};throw s}})}upload(t,n,a){return ft(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,a)})}uploadToSignedUrl(t,n,a,r){return ft(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(t),i=this._getFinalPath(s),o=new URL(this.url+`/object/upload/sign/${i}`);o.searchParams.set("token",n);try{let l;const c=Object.assign({upsert:Hv.upsert},r),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&a instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",a)):typeof FormData<"u"&&a instanceof FormData?(l=a,l.append("cacheControl",c.cacheControl)):(l=a,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType);const u=yield this.fetch(o.toString(),{method:"PUT",body:l,headers:d}),f=yield u.json();return u.ok?{data:{path:s,fullPath:f.Key},error:null}:{data:null,error:f}}catch(l){if(Ie(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return ft(this,void 0,void 0,function*(){try{let a=this._getFinalPath(t);const r=Object.assign({},this.headers);n!=null&&n.upsert&&(r["x-upsert"]="true");const s=yield pa(this.fetch,`${this.url}/object/upload/sign/${a}`,{},{headers:r}),i=new URL(this.url+s.url),o=i.searchParams.get("token");if(!o)throw new Xm("No token returned by API");return{data:{signedUrl:i.toString(),path:t,token:o},error:null}}catch(a){if(Ie(a))return{data:null,error:a};throw a}})}update(t,n,a){return ft(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,a)})}move(t,n,a){return ft(this,void 0,void 0,function*(){try{return{data:yield pa(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:a==null?void 0:a.destinationBucket},{headers:this.headers}),error:null}}catch(r){if(Ie(r))return{data:null,error:r};throw r}})}copy(t,n,a){return ft(this,void 0,void 0,function*(){try{return{data:{path:(yield pa(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:a==null?void 0:a.destinationBucket},{headers:this.headers})).Key},error:null}}catch(r){if(Ie(r))return{data:null,error:r};throw r}})}createSignedUrl(t,n,a){return ft(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t),s=yield pa(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:n},a!=null&&a.transform?{transform:a.transform}:{}),{headers:this.headers});const i=a!=null&&a.download?`&download=${a.download===!0?"":a.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${i}`)},{data:s,error:null}}catch(r){if(Ie(r))return{data:null,error:r};throw r}})}createSignedUrls(t,n,a){return ft(this,void 0,void 0,function*(){try{const r=yield pa(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),s=a!=null&&a.download?`&download=${a.download===!0?"":a.download}`:"";return{data:r.map(i=>Object.assign(Object.assign({},i),{signedUrl:i.signedURL?encodeURI(`${this.url}${i.signedURL}${s}`):null})),error:null}}catch(r){if(Ie(r))return{data:null,error:r};throw r}})}download(t,n){return ft(this,void 0,void 0,function*(){const r=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),i=s?`?${s}`:"";try{const o=this._getFinalPath(t);return{data:yield(yield kc(this.fetch,`${this.url}/${r}/${o}${i}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(o){if(Ie(o))return{data:null,error:o};throw o}})}info(t){return ft(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const a=yield kc(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:Jf(a),error:null}}catch(a){if(Ie(a))return{data:null,error:a};throw a}})}exists(t){return ft(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield iM(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(a){if(Ie(a)&&a instanceof Zf){const r=a.originalError;if([400,404].includes(r==null?void 0:r.status))return{data:!1,error:a}}throw a}})}getPublicUrl(t,n){const a=this._getFinalPath(t),r=[],s=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";s!==""&&r.push(s);const o=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&r.push(l);let c=r.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${o}/public/${a}${c}`)}}}remove(t){return ft(this,void 0,void 0,function*(){try{return{data:yield f1(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(Ie(n))return{data:null,error:n};throw n}})}list(t,n,a){return ft(this,void 0,void 0,function*(){try{const r=Object.assign(Object.assign(Object.assign({},oM),n),{prefix:t||""});return{data:yield pa(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},a),error:null}}catch(r){if(Ie(r))return{data:null,error:r};throw r}})}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}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const cM="2.7.1",uM={"X-Client-Info":`storage-js/${cM}`};var $r=function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function o(d){try{c(a.next(d))}catch(u){i(u)}}function l(d){try{c(a.throw(d))}catch(u){i(u)}}function c(d){d.done?s(d.value):r(d.value).then(o,l)}c((a=a.apply(e,t||[])).next())})};class dM{constructor(t,n={},a){this.url=t,this.headers=Object.assign(Object.assign({},uM),n),this.fetch=d1(a)}listBuckets(){return $r(this,void 0,void 0,function*(){try{return{data:yield kc(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(Ie(t))return{data:null,error:t};throw t}})}getBucket(t){return $r(this,void 0,void 0,function*(){try{return{data:yield kc(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(Ie(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return $r(this,void 0,void 0,function*(){try{return{data:yield pa(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(a){if(Ie(a))return{data:null,error:a};throw a}})}updateBucket(t,n){return $r(this,void 0,void 0,function*(){try{return{data:yield sM(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(a){if(Ie(a))return{data:null,error:a};throw a}})}emptyBucket(t){return $r(this,void 0,void 0,function*(){try{return{data:yield pa(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(Ie(n))return{data:null,error:n};throw n}})}deleteBucket(t){return $r(this,void 0,void 0,function*(){try{return{data:yield f1(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(Ie(n))return{data:null,error:n};throw n}})}}class fM extends dM{constructor(t,n={},a){super(t,n,a)}from(t){return new lM(this.url,this.headers,t,this.fetch)}}const hM="2.49.7";let Si="";typeof Deno<"u"?Si="deno":typeof document<"u"?Si="web":typeof navigator<"u"&&navigator.product==="ReactNative"?Si="react-native":Si="node";const mM={"X-Client-Info":`supabase-js-${Si}/${hM}`},pM={headers:mM},gM={schema:"public"},vM={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},yM={};var bM=function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function o(d){try{c(a.next(d))}catch(u){i(u)}}function l(d){try{c(a.throw(d))}catch(u){i(u)}}function c(d){d.done?s(d.value):r(d.value).then(o,l)}c((a=a.apply(e,t||[])).next())})};const wM=e=>{let t;return e?t=e:typeof fetch>"u"?t=QS:t=fetch,(...n)=>t(...n)},xM=()=>typeof Headers>"u"?ZS:Headers,SM=(e,t,n)=>{const a=wM(n),r=xM();return(s,i)=>bM(void 0,void 0,void 0,function*(){var o;const l=(o=yield t())!==null&&o!==void 0?o:e;let c=new r(i==null?void 0:i.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),a(s,Object.assign(Object.assign({},i),{headers:c}))})};var EM=function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function o(d){try{c(a.next(d))}catch(u){i(u)}}function l(d){try{c(a.throw(d))}catch(u){i(u)}}function c(d){d.done?s(d.value):r(d.value).then(o,l)}c((a=a.apply(e,t||[])).next())})};function _M(e){return e.replace(/\/$/,"")}function TM(e,t){var n,a;const{db:r,auth:s,realtime:i,global:o}=e,{db:l,auth:c,realtime:d,global:u}=t,f={db:Object.assign(Object.assign({},l),r),auth:Object.assign(Object.assign({},c),s),realtime:Object.assign(Object.assign({},d),i),global:Object.assign(Object.assign(Object.assign({},u),o),{headers:Object.assign(Object.assign({},(n=u==null?void 0:u.headers)!==null&&n!==void 0?n:{}),(a=o==null?void 0:o.headers)!==null&&a!==void 0?a:{})}),accessToken:()=>EM(this,void 0,void 0,function*(){return""})};return e.accessToken?f.accessToken=e.accessToken:delete f.accessToken,f}const h1="2.69.1",Vr=30*1e3,Wf=3,Cd=Wf*Vr,AM="http://localhost:9999",CM="supabase.auth.token",RM={"X-Client-Info":`gotrue-js/${h1}`},eh="X-Supabase-Api-Version",m1={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},OM=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,kM=6e5;class Qm extends Error{constructor(t,n,a){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=a}}function W(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class NM extends Qm{constructor(t,n,a){super(t,n,a),this.name="AuthApiError",this.status=n,this.code=a}}function DM(e){return W(e)&&e.name==="AuthApiError"}class p1 extends Qm{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class Ka extends Qm{constructor(t,n,a,r){super(t,a,r),this.name=n,this.status=a}}class da extends Ka{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function jM(e){return W(e)&&e.name==="AuthSessionMissingError"}class Rd extends Ka{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class xl extends Ka{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class Sl extends Ka{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function MM(e){return W(e)&&e.name==="AuthImplicitGrantRedirectError"}class Iv extends Ka{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class th extends Ka{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Od(e){return W(e)&&e.name==="AuthRetryableFetchError"}class qv extends Ka{constructor(t,n,a){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=a}}class Hi extends Ka{constructor(t){super(t,"AuthInvalidJwtError",400,"invalid_jwt")}}const Gv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),Fv=`
|
|
211
|
+
\r=`.split(""),LM=(()=>{const e=new Array(128);for(let t=0;t<e.length;t+=1)e[t]=-1;for(let t=0;t<Fv.length;t+=1)e[Fv[t].charCodeAt(0)]=-2;for(let t=0;t<Gv.length;t+=1)e[Gv[t].charCodeAt(0)]=t;return e})();function g1(e,t,n){const a=LM[e];if(a>-1)for(t.queue=t.queue<<6|a,t.queuedBits+=6;t.queuedBits>=8;)n(t.queue>>t.queuedBits-8&255),t.queuedBits-=8;else{if(a===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(e)}"`)}}function Yv(e){const t=[],n=i=>{t.push(String.fromCodePoint(i))},a={utf8seq:0,codepoint:0},r={queue:0,queuedBits:0},s=i=>{zM(i,a,n)};for(let i=0;i<e.length;i+=1)g1(e.charCodeAt(i),r,s);return t.join("")}function UM(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 PM(e,t){for(let n=0;n<e.length;n+=1){let a=e.charCodeAt(n);if(a>55295&&a<=56319){const r=(a-55296)*1024&65535;a=(e.charCodeAt(n+1)-56320&65535|r)+65536,n+=1}UM(a,t)}}function zM(e,t,n){if(t.utf8seq===0){if(e<=127){n(e);return}for(let a=1;a<6;a+=1)if(!(e>>7-a&1)){t.utf8seq=a;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&&n(t.codepoint)}}function BM(e){const t=[],n={queue:0,queuedBits:0},a=r=>{t.push(r)};for(let r=0;r<e.length;r+=1)g1(e.charCodeAt(r),n,a);return new Uint8Array(t)}function $M(e){const t=[];return PM(e,n=>t.push(n)),new Uint8Array(t)}function HM(e){return Math.round(Date.now()/1e3)+e}function IM(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const dn=()=>typeof window<"u"&&typeof document<"u",er={tested:!1,writable:!1},Ii=()=>{if(!dn())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(er.tested)return er.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),er.tested=!0,er.writable=!0}catch{er.tested=!0,er.writable=!1}return er.writable};function qM(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((r,s)=>{t[s]=r})}catch{}return n.searchParams.forEach((a,r)=>{t[r]=a}),t}const v1=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Hs(async()=>{const{default:a}=await Promise.resolve().then(()=>ai);return{default:a}},void 0).then(({default:a})=>a(...n)):t=fetch,(...n)=>t(...n)},GM=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",y1=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},El=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},_l=async(e,t)=>{await e.removeItem(t)};class vu{constructor(){this.promise=new vu.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}vu.promiseConstructor=Promise;function kd(e){const t=e.split(".");if(t.length!==3)throw new Hi("Invalid JWT structure");for(let a=0;a<t.length;a++)if(!OM.test(t[a]))throw new Hi("JWT not in base64url format");return{header:JSON.parse(Yv(t[0])),payload:JSON.parse(Yv(t[1])),signature:BM(t[2]),raw:{header:t[0],payload:t[1]}}}async function FM(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function YM(e,t){return new Promise((a,r)=>{(async()=>{for(let s=0;s<1/0;s++)try{const i=await e(s);if(!t(s,null,i)){a(i);return}}catch(i){if(!t(s,i)){r(i);return}}})()})}function VM(e){return("0"+e.toString(16)).substr(-2)}function KM(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",a=n.length;let r="";for(let s=0;s<56;s++)r+=n.charAt(Math.floor(Math.random()*a));return r}return crypto.getRandomValues(t),Array.from(t,VM).join("")}async function XM(e){const n=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",n),r=new Uint8Array(a);return Array.from(r).map(s=>String.fromCharCode(s)).join("")}async function QM(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 n=await XM(e);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Hr(e,t,n=!1){const a=KM();let r=a;n&&(r+="/PASSWORD_RECOVERY"),await y1(e,`${t}-code-verifier`,r);const s=await QM(a);return[s,a===s?"plain":"s256"]}const ZM=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function JM(e){const t=e.headers.get(eh);if(!t||!t.match(ZM))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}function WM(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 e4(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")}}var t4=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};const rr=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),n4=[502,503,504];async function Vv(e){var t;if(!GM(e))throw new th(rr(e),0);if(n4.includes(e.status))throw new th(rr(e),e.status);let n;try{n=await e.json()}catch(s){throw new p1(rr(s),s)}let a;const r=JM(e);if(r&&r.getTime()>=m1["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?a=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(a=n.error_code),a){if(a==="weak_password")throw new qv(rr(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(a==="session_not_found")throw new da}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((s,i)=>s&&typeof i=="string",!0))throw new qv(rr(n),e.status,n.weak_password.reasons);throw new NM(rr(n),e.status||500,a)}const a4=(e,t,n,a)=>{const r={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?r:(r.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),r.body=JSON.stringify(a),Object.assign(Object.assign({},r),n))};async function oe(e,t,n,a){var r;const s=Object.assign({},a==null?void 0:a.headers);s[eh]||(s[eh]=m1["2024-01-01"].name),a!=null&&a.jwt&&(s.Authorization=`Bearer ${a.jwt}`);const i=(r=a==null?void 0:a.query)!==null&&r!==void 0?r:{};a!=null&&a.redirectTo&&(i.redirect_to=a.redirectTo);const o=Object.keys(i).length?"?"+new URLSearchParams(i).toString():"",l=await r4(e,t,n+o,{headers:s,noResolveJson:a==null?void 0:a.noResolveJson},{},a==null?void 0:a.body);return a!=null&&a.xform?a==null?void 0:a.xform(l):{data:Object.assign({},l),error:null}}async function r4(e,t,n,a,r,s){const i=a4(t,a,r,s);let o;try{o=await e(n,Object.assign({},i))}catch(l){throw console.error(l),new th(rr(l),0)}if(o.ok||await Vv(o),a!=null&&a.noResolveJson)return o;try{return await o.json()}catch(l){await Vv(l)}}function fa(e){var t;let n=null;l4(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=HM(e.expires_in)));const a=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:a},error:null}}function Kv(e){const t=fa(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((n,a)=>n&&typeof a=="string",!0)&&(t.data.weak_password=e.weak_password),t}function wa(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function s4(e){return{data:e,error:null}}function i4(e){const{action_link:t,email_otp:n,hashed_token:a,redirect_to:r,verification_type:s}=e,i=t4(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:t,email_otp:n,hashed_token:a,redirect_to:r,verification_type:s},l=Object.assign({},i);return{data:{properties:o,user:l},error:null}}function o4(e){return e}function l4(e){return e.access_token&&e.refresh_token&&e.expires_in}var c4=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};class u4{constructor({url:t="",headers:n={},fetch:a}){this.url=t,this.headers=n,this.fetch=v1(a),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n="global"){try{return await oe(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(a){if(W(a))return{data:null,error:a};throw a}}async inviteUserByEmail(t,n={}){try{return await oe(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:wa})}catch(a){if(W(a))return{data:{user:null},error:a};throw a}}async generateLink(t){try{const{options:n}=t,a=c4(t,["options"]),r=Object.assign(Object.assign({},a),n);return"newEmail"in a&&(r.new_email=a==null?void 0:a.newEmail,delete r.newEmail),await oe(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:i4,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(W(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await oe(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:wa})}catch(n){if(W(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,a,r,s,i,o,l;try{const c={nextPage:null,lastPage:0,total:0},d=await oe(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(a=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&a!==void 0?a:"",per_page:(s=(r=t==null?void 0:t.perPage)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""},xform:o4});if(d.error)throw d.error;const u=await d.json(),f=(i=d.headers.get("x-total-count"))!==null&&i!==void 0?i:0,h=(l=(o=d.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(x=>{const y=parseInt(x.split(";")[0].split("=")[1].substring(0,1)),w=JSON.parse(x.split(";")[1].split("=")[1]);c[`${w}Page`]=y}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},u),c),error:null}}catch(c){if(W(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){try{return await oe(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:wa})}catch(n){if(W(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){try{return await oe(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:wa})}catch(a){if(W(a))return{data:{user:null},error:a};throw a}}async deleteUser(t,n=!1){try{return await oe(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:wa})}catch(a){if(W(a))return{data:{user:null},error:a};throw a}}async _listFactors(t){try{const{data:n,error:a}=await oe(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:r=>({data:{factors:r},error:null})});return{data:n,error:a}}catch(n){if(W(n))return{data:null,error:n};throw n}}async _deleteFactor(t){try{return{data:await oe(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(W(n))return{data:null,error:n};throw n}}}const d4={getItem:e=>Ii()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{Ii()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{Ii()&&globalThis.localStorage.removeItem(e)}};function Xv(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function f4(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const Ir={debug:!!(globalThis&&Ii()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class b1 extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class h4 extends b1{}async function m4(e,t,n){Ir.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const a=new globalThis.AbortController;return t>0&&setTimeout(()=>{a.abort(),Ir.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:a.signal},async r=>{if(r){Ir.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,r.name);try{return await n()}finally{Ir.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,r.name)}}else{if(t===0)throw Ir.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new h4(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(Ir.debug)try{const s=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(s,null," "))}catch(s){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",s)}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 n()}}))}f4();const p4={url:AM,storageKey:CM,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:RM,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function Qv(e,t,n){return await n()}class co{constructor(t){var n,a;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=co.nextInstanceID,co.nextInstanceID+=1,this.instanceID>0&&dn()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const r=Object.assign(Object.assign({},p4),t);if(this.logDebugMessages=!!r.debug,typeof r.debug=="function"&&(this.logger=r.debug),this.persistSession=r.persistSession,this.storageKey=r.storageKey,this.autoRefreshToken=r.autoRefreshToken,this.admin=new u4({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=v1(r.fetch),this.lock=r.lock||Qv,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,r.lock?this.lock=r.lock:dn()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=m4:this.lock=Qv,this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?r.storage?this.storage=r.storage:Ii()?this.storage=d4:(this.memoryStorage={},this.storage=Xv(this.memoryStorage)):(this.memoryStorage={},this.storage=Xv(this.memoryStorage)),dn()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(s){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",s)}(a=this.broadcastChannel)===null||a===void 0||a.addEventListener("message",async s=>{this._debug("received broadcast notification from other tab or client",s),await this._notifyAllSubscribers(s.data.event,s.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${h1}) ${new Date().toISOString()}`,...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{const n=qM(window.location.href);let a="none";if(this._isImplicitGrantCallback(n)?a="implicit":await this._isPKCECallback(n)&&(a="pkce"),dn()&&this.detectSessionInUrl&&a!=="none"){const{data:r,error:s}=await this._getSessionFromURL(n,a);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),MM(s)){const l=(t=s.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:s}}return await this._removeSession(),{error:s}}const{session:i,redirectType:o}=r;return this._debug("#_initialize()","detected session in URL",i,"redirect type",o),await this._saveSession(i),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return W(n)?{error:n}:{error:new p1("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,a,r;try{const s=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(a=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&a!==void 0?a:{},gotrue_meta_security:{captcha_token:(r=t==null?void 0:t.options)===null||r===void 0?void 0:r.captchaToken}},xform:fa}),{data:i,error:o}=s;if(o||!i)return{data:{user:null,session:null},error:o};const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(W(s))return{data:{user:null,session:null},error:s};throw s}}async signUp(t){var n,a,r;try{let s;if("email"in t){const{email:d,password:u,options:f}=t;let h=null,x=null;this.flowType==="pkce"&&([h,x]=await Hr(this.storage,this.storageKey)),s=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:d,password:u,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:x},xform:fa})}else if("phone"in t){const{phone:d,password:u,options:f}=t;s=await oe(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:u,data:(a=f==null?void 0:f.data)!==null&&a!==void 0?a:{},channel:(r=f==null?void 0:f.channel)!==null&&r!==void 0?r:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:fa})}else throw new xl("You must provide either an email or phone number and a password");const{data:i,error:o}=s;if(o||!i)return{data:{user:null,session:null},error:o};const l=i.session,c=i.user;return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(s){if(W(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithPassword(t){try{let n;if("email"in t){const{email:s,password:i,options:o}=t;n=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Kv})}else if("phone"in t){const{phone:s,password:i,options:o}=t;n=await oe(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:Kv})}else throw new xl("You must provide either an email or phone number and a password");const{data:a,error:r}=n;return r?{data:{user:null,session:null},error:r}:!a||!a.session||!a.user?{data:{user:null,session:null},error:new Rd}:(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:Object.assign({user:a.user,session:a.session},a.weak_password?{weakPassword:a.weak_password}:null),error:r})}catch(n){if(W(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,a,r,s;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(r=t.options)===null||r===void 0?void 0:r.queryParams,skipBrowserRedirect:(s=t.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async _exchangeCodeForSession(t){const n=await El(this.storage,`${this.storageKey}-code-verifier`),[a,r]=(n??"").split("/");try{const{data:s,error:i}=await oe(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:a},xform:fa});if(await _l(this.storage,`${this.storageKey}-code-verifier`),i)throw i;return!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new Rd}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:r??null}),error:i})}catch(s){if(W(s))return{data:{user:null,session:null,redirectType:null},error:s};throw s}}async signInWithIdToken(t){try{const{options:n,provider:a,token:r,access_token:s,nonce:i}=t,o=await oe(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:a,id_token:r,access_token:s,nonce:i,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:fa}),{data:l,error:c}=o;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Rd}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(n){if(W(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,a,r,s,i;try{if("email"in t){const{email:o,options:l}=t;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await Hr(this.storage,this.storageKey));const{error:u}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(a=l==null?void 0:l.shouldCreateUser)!==null&&a!==void 0?a:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:u}}if("phone"in t){const{phone:o,options:l}=t,{data:c,error:d}=await oe(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(r=l==null?void 0:l.data)!==null&&r!==void 0?r:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!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{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d}}throw new xl("You must provide either an email or phone number.")}catch(o){if(W(o))return{data:{user:null,session:null},error:o};throw o}}async verifyOtp(t){var n,a;try{let r,s;"options"in t&&(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo,s=(a=t.options)===null||a===void 0?void 0:a.captchaToken);const{data:i,error:o}=await oe(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:r,xform:fa});if(o)throw o;if(!i)throw new Error("An error occurred on token verification.");const l=i.session,c=i.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(r){if(W(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithSSO(t){var n,a,r;try{let s=null,i=null;return this.flowType==="pkce"&&([s,i]=await Hr(this.storage,this.storageKey)),await oe(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:(a=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&a!==void 0?a:void 0}),!((r=t==null?void 0:t.options)===null||r===void 0)&&r.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:i}),headers:this.headers,xform:s4})}catch(s){if(W(s))return{data:null,error:s};throw s}}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:n},error:a}=t;if(a)throw a;if(!n)throw new da;const{error:r}=await oe(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:r}})}catch(t){if(W(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:a,type:r,options:s}=t,{error:i}=await oe(this.fetch,"POST",n,{headers:this.headers,body:{email:a,type:r,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}},redirectTo:s==null?void 0:s.emailRedirectTo});return{data:{user:null,session:null},error:i}}else if("phone"in t){const{phone:a,type:r,options:s}=t,{data:i,error:o}=await oe(this.fetch,"POST",n,{headers:this.headers,body:{phone:a,type:r,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:i==null?void 0:i.message_id},error:o}}throw new xl("You must provide either an email or phone number and a type")}catch(n){if(W(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const a=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),r=(async()=>(await a,await n()))();return this.pendingInLock.push((async()=>{try{await r}catch{}})()),r}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const a=n();for(this.pendingInLock.push((async()=>{try{await a}catch{}})()),await a;this.pendingInLock.length;){const r=[...this.pendingInLock];await Promise.all(r),this.pendingInLock.splice(0,r.length)}return await a}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 n=await this.__loadSession();return await t(n)}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 n=await El(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const a=t.expires_at?t.expires_at*1e3-Date.now()<Cd:!1;if(this._debug("#__loadSession()",`session has${a?"":" not"} expired`,"expires_at",t.expires_at),!a){if(this.storage.isServer){let i=this.suppressGetSessionWarning;t=new Proxy(t,{get:(l,c,d)=>(!i&&c==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),i=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,c,d))})}return{data:{session:t},error:null}}const{session:r,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{session:null},error:s}:{data:{session:r},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 oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:wa}):await this._useSession(async n=>{var a,r,s;const{data:i,error:o}=n;if(o)throw o;return!(!((a=i.session)===null||a===void 0)&&a.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new da}:await oe(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(r=i.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0,xform:wa})})}catch(n){if(W(n))return jM(n)&&(await this._removeSession(),await _l(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async a=>{const{data:r,error:s}=a;if(s)throw s;if(!r.session)throw new da;const i=r.session;let o=null,l=null;this.flowType==="pkce"&&t.email!=null&&([o,l]=await Hr(this.storage,this.storageKey));const{data:c,error:d}=await oe(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:o,code_challenge_method:l}),jwt:i.access_token,xform:wa});if(d)throw d;return i.user=c.user,await this._saveSession(i),await this._notifyAllSubscribers("USER_UPDATED",i),{data:{user:i.user},error:null}})}catch(a){if(W(a))return{data:{user:null},error:a};throw a}}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 da;const n=Date.now()/1e3;let a=n,r=!0,s=null;const{payload:i}=kd(t.access_token);if(i.exp&&(a=i.exp,r=a<=n),r){const{session:o,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!o)return{data:{user:null,session:null},error:null};s=o}else{const{data:o,error:l}=await this._getUser(t.access_token);if(l)throw l;s={access_token:t.access_token,refresh_token:t.refresh_token,user:o.user,token_type:"bearer",expires_in:a-n,expires_at:a},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(n){if(W(n))return{data:{session:null,user:null},error:n};throw n}}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 n=>{var a;if(!t){const{data:i,error:o}=n;if(o)throw o;t=(a=i.session)!==null&&a!==void 0?a:void 0}if(!(t!=null&&t.refresh_token))throw new da;const{session:r,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{user:null,session:null},error:s}:r?{data:{user:r.user,session:r},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(W(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!dn())throw new Sl("No browser detected.");if(t.error||t.error_description||t.error_code)throw new Sl(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Iv("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new Sl("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new Iv("No code detected.");const{data:v,error:b}=await this._exchangeCodeForSession(t.code);if(b)throw b;const S=new URL(window.location.href);return S.searchParams.delete("code"),window.history.replaceState(window.history.state,"",S.toString()),{data:{session:v.session,redirectType:null},error:null}}const{provider_token:a,provider_refresh_token:r,access_token:s,refresh_token:i,expires_in:o,expires_at:l,token_type:c}=t;if(!s||!o||!i||!c)throw new Sl("No session defined in URL");const d=Math.round(Date.now()/1e3),u=parseInt(o);let f=d+u;l&&(f=parseInt(l));const h=f-d;h*1e3<=Vr&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${h}s, should have been closer to ${u}s`);const x=f-u;d-x>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",x,f,d):d-x<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",x,f,d);const{data:y,error:w}=await this._getUser(s);if(w)throw w;const g={provider_token:a,provider_refresh_token:r,access_token:s,expires_in:u,expires_at:f,refresh_token:i,token_type:c,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:g,redirectType:t.type},error:null}}catch(a){if(W(a))return{data:{session:null,redirectType:null},error:a};throw a}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await El(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}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 n=>{var a;const{data:r,error:s}=n;if(s)return{error:s};const i=(a=r.session)===null||a===void 0?void 0:a.access_token;if(i){const{error:o}=await this.admin.signOut(i,t);if(o&&!(DM(o)&&(o.status===404||o.status===401||o.status===403)))return{error:o}}return t!=="others"&&(await this._removeSession(),await _l(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=IM(),a={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,a),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:a}}}async _emitInitialSession(t){return await this._useSession(async n=>{var a,r;try{const{data:{session:s},error:i}=n;if(i)throw i;await((a=this.stateChangeEmitters.get(t))===null||a===void 0?void 0:a.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),console.error(s)}})}async resetPasswordForEmail(t,n={}){let a=null,r=null;this.flowType==="pkce"&&([a,r]=await Hr(this.storage,this.storageKey,!0));try{return await oe(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:a,code_challenge_method:r,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(W(s))return{data:null,error:s};throw s}}async getUserIdentities(){var t;try{const{data:n,error:a}=await this.getUser();if(a)throw a;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(W(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:a,error:r}=await this._useSession(async s=>{var i,o,l,c,d;const{data:u,error:f}=s;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:(o=t.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await oe(this.fetch,"GET",h,{headers:this.headers,jwt:(d=(c=u.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(r)throw r;return dn()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(a==null?void 0:a.url),{data:{provider:t.provider,url:a==null?void 0:a.url},error:null}}catch(a){if(W(a))return{data:{provider:t.provider,url:null},error:a};throw a}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var a,r;const{data:s,error:i}=n;if(i)throw i;return await oe(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(r=(a=s.session)===null||a===void 0?void 0:a.access_token)!==null&&r!==void 0?r:void 0})})}catch(n){if(W(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const a=Date.now();return await YM(async r=>(r>0&&await FM(200*Math.pow(2,r-1)),this._debug(n,"refreshing attempt",r),await oe(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:fa})),(r,s)=>{const i=200*Math.pow(2,r);return s&&Od(s)&&Date.now()+i-a<Vr})}catch(a){if(this._debug(n,"error",a),W(a))return{data:{session:null,user:null},error:a};throw a}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const a=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",a),dn()&&!n.skipBrowserRedirect&&window.location.assign(a),{data:{provider:t,url:a},error:null}}async _recoverAndRefresh(){var t;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const a=await El(this.storage,this.storageKey);if(this._debug(n,"session from storage",a),!this._isValidSession(a)){this._debug(n,"session is not valid"),a!==null&&await this._removeSession();return}const r=((t=a.expires_at)!==null&&t!==void 0?t:1/0)*1e3-Date.now()<Cd;if(this._debug(n,`session has${r?"":" not"} expired with margin of ${Cd}s`),r){if(this.autoRefreshToken&&a.refresh_token){const{error:s}=await this._callRefreshToken(a.refresh_token);s&&(console.error(s),Od(s)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",s),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",a)}catch(a){this._debug(n,"error",a),console.error(a);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var n,a;if(!t)throw new da;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const r=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(r,"begin");try{this.refreshingDeferred=new vu;const{data:s,error:i}=await this._refreshAccessToken(t);if(i)throw i;if(!s.session)throw new da;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const o={session:s.session,error:null};return this.refreshingDeferred.resolve(o),o}catch(s){if(this._debug(r,"error",s),W(s)){const i={session:null,error:s};return Od(s)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(i),i}throw(a=this.refreshingDeferred)===null||a===void 0||a.reject(s),s}finally{this.refreshingDeferred=null,this._debug(r,"end")}}async _notifyAllSubscribers(t,n,a=!0){const r=`#_notifyAllSubscribers(${t})`;this._debug(r,"begin",n,`broadcast = ${a}`);try{this.broadcastChannel&&a&&this.broadcastChannel.postMessage({event:t,session:n});const s=[],i=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(t,n)}catch(l){s.push(l)}});if(await Promise.all(i),s.length>0){for(let o=0;o<s.length;o+=1)console.error(s[o]);throw s[0]}}finally{this._debug(r,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await y1(this.storage,this.storageKey,t)}async _removeSession(){this._debug("#_removeSession()"),await _l(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&dn()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Vr);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 n=>{const{data:{session:a}}=n;if(!a||!a.refresh_token||!a.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const r=Math.floor((a.expires_at*1e3-t)/Vr);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts ${Vr}ms, refresh threshold is ${Wf} ticks`),r<=Wf&&await this._callRefreshToken(a.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof b1)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!dn()||!(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 n=`#_onVisibilityChanged(${t})`;this._debug(n,"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(n,"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,n,a){const r=[`provider=${encodeURIComponent(n)}`];if(a!=null&&a.redirectTo&&r.push(`redirect_to=${encodeURIComponent(a.redirectTo)}`),a!=null&&a.scopes&&r.push(`scopes=${encodeURIComponent(a.scopes)}`),this.flowType==="pkce"){const[s,i]=await Hr(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(i)}`});r.push(o.toString())}if(a!=null&&a.queryParams){const s=new URLSearchParams(a.queryParams);r.push(s.toString())}return a!=null&&a.skipBrowserRedirect&&r.push(`skip_http_redirect=${a.skipBrowserRedirect}`),`${t}?${r.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var a;const{data:r,error:s}=n;return s?{data:null,error:s}:await oe(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(a=r==null?void 0:r.session)===null||a===void 0?void 0:a.access_token})})}catch(n){if(W(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var a,r;const{data:s,error:i}=n;if(i)return{data:null,error:i};const o=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:l,error:c}=await oe(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(a=s==null?void 0:s.session)===null||a===void 0?void 0:a.access_token});return c?{data:null,error:c}:(t.factorType==="totp"&&(!((r=l==null?void 0:l.totp)===null||r===void 0)&&r.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(W(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var a;const{data:r,error:s}=n;if(s)return{data:null,error:s};const{data:i,error:o}=await oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(a=r==null?void 0:r.session)===null||a===void 0?void 0:a.access_token});return o?{data:null,error:o}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+i.expires_in},i)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",i),{data:i,error:o})})}catch(n){if(W(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var a;const{data:r,error:s}=n;return s?{data:null,error:s}:await oe(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(a=r==null?void 0:r.session)===null||a===void 0?void 0:a.access_token})})}catch(n){if(W(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:a}=await this._challenge({factorId:t.factorId});return a?{data:null,error:a}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const a=(t==null?void 0:t.factors)||[],r=a.filter(i=>i.factor_type==="totp"&&i.status==="verified"),s=a.filter(i=>i.factor_type==="phone"&&i.status==="verified");return{data:{all:a,totp:r,phone:s},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,a;const{data:{session:r},error:s}=t;if(s)return{data:null,error:s};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:i}=kd(r.access_token);let o=null;i.aal&&(o=i.aal);let l=o;((a=(n=r.user.factors)===null||n===void 0?void 0:n.filter(u=>u.status==="verified"))!==null&&a!==void 0?a:[]).length>0&&(l="aal2");const d=i.amr||[];return{data:{currentLevel:o,nextLevel:l,currentAuthenticationMethods:d},error:null}}))}async fetchJwk(t,n={keys:[]}){let a=n.keys.find(i=>i.kid===t);if(a||(a=this.jwks.keys.find(i=>i.kid===t),a&&this.jwks_cached_at+kM>Date.now()))return a;const{data:r,error:s}=await oe(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(s)throw s;if(!r.keys||r.keys.length===0)throw new Hi("JWKS is empty");if(this.jwks=r,this.jwks_cached_at=Date.now(),a=r.keys.find(i=>i.kid===t),!a)throw new Hi("No matching signing key found in JWKS");return a}async getClaims(t,n={keys:[]}){try{let a=t;if(!a){const{data:h,error:x}=await this.getSession();if(x||!h.session)return{data:null,error:x};a=h.session.access_token}const{header:r,payload:s,signature:i,raw:{header:o,payload:l}}=kd(a);if(WM(s.exp),!r.kid||r.alg==="HS256"||!("crypto"in globalThis&&"subtle"in globalThis.crypto)){const{error:h}=await this.getUser(a);if(h)throw h;return{data:{claims:s,header:r,signature:i},error:null}}const c=e4(r.alg),d=await this.fetchJwk(r.kid,n),u=await crypto.subtle.importKey("jwk",d,c,!0,["verify"]);if(!await crypto.subtle.verify(c,u,i,$M(`${o}.${l}`)))throw new Hi("Invalid JWT signature");return{data:{claims:s,header:r,signature:i},error:null}}catch(a){if(W(a))return{data:null,error:a};throw a}}}co.nextInstanceID=0;const g4=co;class v4 extends g4{constructor(t){super(t)}}var y4=function(e,t,n,a){function r(s){return s instanceof n?s:new n(function(i){i(s)})}return new(n||(n=Promise))(function(s,i){function o(d){try{c(a.next(d))}catch(u){i(u)}}function l(d){try{c(a.throw(d))}catch(u){i(u)}}function c(d){d.done?s(d.value):r(d.value).then(o,l)}c((a=a.apply(e,t||[])).next())})};class b4{constructor(t,n,a){var r,s,i;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const o=_M(t),l=new URL(o);this.realtimeUrl=new URL("/realtime/v1",l),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("/auth/v1",l),this.storageUrl=new URL("/storage/v1",l),this.functionsUrl=new URL("/functions/v1",l);const c=`sb-${l.hostname.split(".")[0]}-auth-token`,d={db:gM,realtime:yM,auth:Object.assign(Object.assign({},vM),{storageKey:c}),global:pM},u=TM(a??{},d);this.storageKey=(r=u.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=u.global.headers)!==null&&s!==void 0?s:{},u.accessToken?(this.accessToken=u.accessToken,this.auth=new Proxy({},{get:(f,h)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(h)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((i=u.auth)!==null&&i!==void 0?i:{},this.headers,u.global.fetch),this.fetch=SM(n,this._getAccessToken.bind(this),u.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},u.realtime)),this.rest=new Pj(`${o}/rest/v1`,{headers:this.headers,schema:u.db.schema,fetch:this.fetch}),u.accessToken||this._listenForAuthEvents()}get functions(){return new hj(this.functionsUrl.href,{headers:this.headers,customFetch:this.fetch})}get storage(){return new fM(this.storageUrl.href,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},a={}){return this.rest.rpc(t,n,a)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return y4(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:a}=yield this.auth.getSession();return(n=(t=a.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:a,storage:r,storageKey:s,flowType:i,lock:o,debug:l},c,d){const u={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new v4({url:this.authUrl.href,headers:Object.assign(Object.assign({},u),c),storageKey:s,autoRefreshToken:t,persistSession:n,detectSessionInUrl:a,storage:r,flowType:i,lock:o,debug:l,fetch:d,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(t){return new Jj(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((n,a)=>{this._handleTokenChanged(n,"CLIENT",a==null?void 0:a.access_token)})}_handleTokenChanged(t,n,a){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==a?this.changedAccessToken=a:t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const yu=(e,t,n)=>new b4(e,t,n),Zv="https://hxxaymvjwvzmmjekoxsk.supabase.co",Jv="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Imh4eGF5bXZqd3Z6bW1qZWtveHNrIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDcxOTY1NjksImV4cCI6MjA2Mjc3MjU2OX0.VyrQ5l6j5DPG6kn6FwpChXbn13lEbCEDrovbGTFkEkw",Zm="custom-supabase-url",Jm="custom-supabase-key",Bo=()=>{try{const e=localStorage.getItem(Zm),t=localStorage.getItem(Jm);return{supabaseUrl:e||Zv,supabaseKey:t||Jv}}catch(e){return console.error("Error retrieving Supabase credentials from localStorage:",e),{supabaseUrl:Zv,supabaseKey:Jv}}},w4=()=>{try{return localStorage.removeItem(Zm),localStorage.removeItem(Jm),console.log("Supabase credentials cleared, reverting to defaults"),!0}catch(e){return console.error("Error clearing Supabase credentials:",e),!1}},Nd=(e,t)=>{try{return localStorage.setItem(Zm,e),localStorage.setItem(Jm,t),console.log("Supabase credentials saved to localStorage"),!0}catch(n){return console.error("Error saving Supabase credentials:",n),!1}};let Wv;const x4=()=>{const{supabaseUrl:e,supabaseKey:t}=Bo();return Wv=yu(e,t,{auth:{autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0}}),Wv},S4=x4(),nh=()=>{const{supabaseUrl:e,supabaseKey:t}=Bo();return yu(e,t,{auth:{autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0}})},E4=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,ey=`
|
|
212
|
+
-- Create the prompts table with exact column names expected by the code
|
|
213
|
+
CREATE TABLE IF NOT EXISTS prompts (
|
|
214
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
215
|
+
content TEXT NOT NULL,
|
|
216
|
+
tags TEXT[] DEFAULT '{}',
|
|
217
|
+
createdat TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
|
218
|
+
title TEXT,
|
|
219
|
+
category TEXT DEFAULT 'task',
|
|
220
|
+
description TEXT DEFAULT '',
|
|
221
|
+
user_id TEXT NOT NULL,
|
|
222
|
+
ispublic BOOLEAN DEFAULT false,
|
|
223
|
+
likes INTEGER DEFAULT 0,
|
|
224
|
+
views INTEGER DEFAULT 0,
|
|
225
|
+
comments INTEGER DEFAULT 0
|
|
226
|
+
);
|
|
227
|
+
|
|
228
|
+
-- Create indexes for better performance
|
|
229
|
+
CREATE INDEX IF NOT EXISTS idx_prompts_user_id ON prompts(user_id);
|
|
230
|
+
CREATE INDEX IF NOT EXISTS idx_prompts_createdat ON prompts(createdat);
|
|
231
|
+
CREATE INDEX IF NOT EXISTS idx_prompts_tags ON prompts USING GIN(tags);
|
|
232
|
+
|
|
233
|
+
-- Enable Row Level Security
|
|
234
|
+
ALTER TABLE prompts ENABLE ROW LEVEL SECURITY;
|
|
235
|
+
|
|
236
|
+
-- Drop any existing policies to start fresh
|
|
237
|
+
DROP POLICY IF EXISTS "Users can view their own prompts" ON prompts;
|
|
238
|
+
DROP POLICY IF EXISTS "Users can insert their own prompts" ON prompts;
|
|
239
|
+
DROP POLICY IF EXISTS "Users can update their own prompts" ON prompts;
|
|
240
|
+
DROP POLICY IF EXISTS "Users can delete their own prompts" ON prompts;
|
|
241
|
+
DROP POLICY IF EXISTS "Allow all access" ON prompts;
|
|
242
|
+
DROP POLICY IF EXISTS "Temporary allow all" ON prompts;
|
|
243
|
+
|
|
244
|
+
-- Create permissive policy for all operations (you can restrict this later)
|
|
245
|
+
CREATE POLICY "Allow all operations for now" ON prompts FOR ALL USING (true);
|
|
246
|
+
`,bu=S4,uo=async e=>{try{console.log("Checking if prompts table exists...");const{error:t}=await e.from("prompts").select("id").limit(1);return!t||t.code!=="42P01"?(console.log("Table exists or accessible"),!0):(console.log("Table does not exist (42P01 error)"),!1)}catch(t){return console.error("Error checking if table exists:",t),!1}},Wm=async e=>{try{return await uo(e)?!0:(console.log("Prompts table doesn't exist. Manual creation required using Supabase SQL Editor."),!1)}catch(t){return console.error("Error checking prompts table:",t),!1}},ep=async e=>{var t,n;try{const{data:a}=await e.auth.getSession();if((n=(t=a==null?void 0:a.session)==null?void 0:t.user)!=null&&n.id)return console.log("Using authenticated user ID:",a.session.user.id),a.session.user.id;let r=localStorage.getItem("custom-user-id");if(r&&r.trim())return console.log("Using custom user ID:",r),r.trim();let s=localStorage.getItem("supabase-anonymous-id");return s?console.log("Using existing anonymous ID:",s):(s=`anon-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,localStorage.setItem("supabase-anonymous-id",s),console.log("Generated new anonymous ID:",s)),s}catch(a){console.error("Error getting user ID:",a);const r=`anon-${Date.now()}`;return console.log("Using fallback ID:",r),r}},_4=e=>{try{if(!e||!e.trim())return localStorage.removeItem("custom-user-id"),console.log("Custom user ID cleared"),!0;const t=e.trim();return localStorage.setItem("custom-user-id",t),console.log("Custom user ID set:",t),!0}catch(t){return console.error("Error setting custom user ID:",t),!1}},ty=async()=>await ep(bu),T4=async()=>{const e=bu;try{if(console.log("Fetching prompts from Supabase..."),!await Wm(e))return console.error("Prompts table is not available"),[];const n=await ep(e);console.log("Current user ID:",n);const{data:a,error:r}=await e.from("prompts").select("*").eq("user_id",n);return r?(console.error("Error fetching prompts from Supabase:",r),[]):!a||!Array.isArray(a)?(console.log("No prompts found in Supabase for this user"),[]):(console.log(`Found ${a.length} prompts in Supabase for user ${n}`),a.map(s=>({id:s.id||"",text:s.content||"",tags:Array.isArray(s.tags)?s.tags.map(i=>({id:i,name:i})):[],createdAt:s.createdat||new Date().toISOString(),type:s.category||"task"})))}catch(t){return console.error("Exception while fetching prompts:",t),[]}},A4=async e=>{const t=bu;try{let n=e.id;if(!E4.test(n)){const o=crypto.randomUUID();console.log(`Invalid UUID "${e.id}" detected, regenerating to "${o}"`),n=o}if(console.log("Saving prompt to Supabase:",n),!await Wm(t))return console.error("Prompts table is not available"),!1;const r=await ep(t);console.log("Current user ID for saving:",r);const s={id:n,content:e.text,tags:e.tags.map(o=>o.name),createdat:e.createdAt,title:e.text.substring(0,50),category:e.type||"task",description:"",user_id:r,ispublic:!1,likes:0,views:0,comments:0};console.log("Saving prompt data:",s);const{error:i}=await t.from("prompts").upsert(s,{onConflict:"id"});return i?(console.error("Error saving prompt to Supabase:",i),!1):(console.log("Successfully saved prompt to Supabase:",e.id),!0)}catch(n){return console.error("Exception while saving prompt:",n),!1}},C4=async e=>{const t=bu;try{if(!await Wm(t))return console.error("Prompts table is not available"),!1;const{error:a}=await t.from("prompts").delete().eq("id",e);return a?(console.error("Error deleting prompt from Supabase:",a),!1):!0}catch(n){return console.error("Exception while deleting prompt:",n),!1}},R4=async()=>{const{supabaseUrl:e,supabaseKey:t}=Bo(),n={url:e.substring(0,15)+"...",keyLength:t.length,networkConnectivity:!1,corsIssue:!1,authConnection:!1,dataConnection:!1,tableExists:!1,error:void 0};try{const a=await fetch("https://www.google.com",{method:"HEAD",mode:"no-cors",cache:"no-cache"}).then(()=>!0).catch(()=>!1);if(n.networkConnectivity=a,!a)return n.error="Network connectivity issue detected. Please check your internet connection.",n;const r=yu(e,t);try{const{data:s,error:i}=await r.auth.getSession();n.authConnection=!i}catch(s){n.authConnection=!1,s instanceof Error&&(s.message.includes("CORS")||s.message.includes("cross-origin"))&&(n.corsIssue=!0,n.error="CORS issue detected. Your browser is blocking cross-origin requests to Supabase.")}try{const{error:s}=await r.from("prompts").select("id").limit(1).maybeSingle();n.dataConnection=!s||s.code==="42P01"||s.message&&s.message.includes("permission denied"),n.tableExists=await uo(r)}catch(s){n.dataConnection=!1,!n.error&&s instanceof Error&&(n.error=s.message)}return n}catch(a){return a instanceof Error?n.error=a.message:n.error="Unknown error occurred during diagnostics",n}},ah=async()=>{var a,r;const{supabaseUrl:e,supabaseKey:t}=Bo();if(console.log("Testing Supabase connection with URL:",e.substring(0,15)+"..."),!e.startsWith("https://")||!e.includes(".supabase.co"))return console.error("Invalid Supabase URL format. URL must be in the format https://your-project.supabase.co"),!1;if(!t||t.length<20)return console.error("Invalid Supabase key format. Key appears to be too short or empty."),!1;const n=yu(e,t);try{console.log("Testing Supabase connection...");const{data:s,error:i}=await n.auth.getSession();i?console.warn("Supabase auth check warning (continuing anyway):",i):console.log("Auth connection successful, user:",((r=(a=s==null?void 0:s.session)==null?void 0:a.user)==null?void 0:r.id)||"anonymous");const o=new Promise((f,h)=>setTimeout(()=>h(new Error("Connection timeout after 5 seconds")),5e3)),l=n.from("prompts").select("id").limit(1).maybeSingle(),{data:c,error:d}=await Promise.race([l,o.then(()=>{throw new Error("Connection timeout")})]);if(d)return d.code==="42P01"||d.message&&d.message.includes("permission denied")?(console.log("Connected to API but table doesn't exist or no permission"),!0):(console.error("Supabase data check failed:",d),!1);const u=await uo(n);return console.log("Supabase connection successful, table exists:",u),!0}catch(s){return console.error("Supabase connection test exception:",s),s instanceof Error&&(console.error("Error name:",s.name),console.error("Error message:",s.message),console.error("Error stack:",s.stack),s.name==="TypeError"&&s.message.includes("fetch")&&console.error("This appears to be a network error. Check your internet connection and Supabase URL."),(s.message.includes("CORS")||s.message.includes("cross-origin"))&&console.error("This appears to be a CORS error. Ensure your Supabase project allows requests from this origin.")),!1}};var wu="Collapsible",[O4,FL]=rn(wu),[k4,tp]=O4(wu),w1=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:a,defaultOpen:r,disabled:s,onOpenChange:i,...o}=e,[l,c]=Qs({prop:a,defaultProp:r??!1,onChange:i,caller:wu});return p.jsx(k4,{scope:n,disabled:s,contentId:Bi(),open:l,onOpenToggle:m.useCallback(()=>c(d=>!d),[c]),children:p.jsx(ce.div,{"data-state":ap(l),"data-disabled":s?"":void 0,...o,ref:t})})});w1.displayName=wu;var x1="CollapsibleTrigger",S1=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,...a}=e,r=tp(x1,n);return p.jsx(ce.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":ap(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...a,ref:t,onClick:ie(e.onClick,r.onOpenToggle)})});S1.displayName=x1;var np="CollapsibleContent",E1=m.forwardRef((e,t)=>{const{forceMount:n,...a}=e,r=tp(np,e.__scopeCollapsible);return p.jsx(ta,{present:n||r.open,children:({present:s})=>p.jsx(N4,{...a,ref:t,present:s})})});E1.displayName=np;var N4=m.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:a,children:r,...s}=e,i=tp(np,n),[o,l]=m.useState(a),c=m.useRef(null),d=Ae(t,c),u=m.useRef(0),f=u.current,h=m.useRef(0),x=h.current,y=i.open||o,w=m.useRef(y),g=m.useRef(void 0);return m.useEffect(()=>{const v=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(v)},[]),Sn(()=>{const v=c.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();u.current=b.height,h.current=b.width,w.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),l(a)}},[i.open,a]),p.jsx(ce.div,{"data-state":ap(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!y,...s,ref:d,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...e.style},children:y&&r})});function ap(e){return e?"open":"closed"}var D4=w1;const j4=D4,M4=S1,L4=E1;var U4=m.createContext(void 0);function _1(e){const t=m.useContext(U4);return e||t||"ltr"}var Dd="rovingFocusGroup.onEntryFocus",P4={bubbles:!1,cancelable:!0},$o="RovingFocusGroup",[rh,T1,z4]=vw($o),[B4,A1]=rn($o,[z4]),[$4,H4]=B4($o),C1=m.forwardRef((e,t)=>p.jsx(rh.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(rh.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(I4,{...e,ref:t})})}));C1.displayName=$o;var I4=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:r=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...u}=e,f=m.useRef(null),h=Ae(t,f),x=_1(s),[y,w]=Qs({prop:i,defaultProp:o??null,onChange:l,caller:$o}),[g,v]=m.useState(!1),b=en(c),S=T1(n),E=m.useRef(!1),[_,A]=m.useState(0);return m.useEffect(()=>{const T=f.current;if(T)return T.addEventListener(Dd,b),()=>T.removeEventListener(Dd,b)},[b]),p.jsx($4,{scope:n,orientation:a,dir:x,loop:r,currentTabStopId:y,onItemFocus:m.useCallback(T=>w(T),[w]),onItemShiftTab:m.useCallback(()=>v(!0),[]),onFocusableItemAdd:m.useCallback(()=>A(T=>T+1),[]),onFocusableItemRemove:m.useCallback(()=>A(T=>T-1),[]),children:p.jsx(ce.div,{tabIndex:g||_===0?-1:0,"data-orientation":a,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:ie(e.onMouseDown,()=>{E.current=!0}),onFocus:ie(e.onFocus,T=>{const k=!E.current;if(T.target===T.currentTarget&&k&&!g){const M=new CustomEvent(Dd,P4);if(T.currentTarget.dispatchEvent(M),!M.defaultPrevented){const H=S().filter(C=>C.focusable),F=H.find(C=>C.active),X=H.find(C=>C.id===y),I=[F,X,...H].filter(Boolean).map(C=>C.ref.current);k1(I,d)}}E.current=!1}),onBlur:ie(e.onBlur,()=>v(!1))})})}),R1="RovingFocusGroupItem",O1=m.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:r=!1,tabStopId:s,children:i,...o}=e,l=Bi(),c=s||l,d=H4(R1,n),u=d.currentTabStopId===c,f=T1(n),{onFocusableItemAdd:h,onFocusableItemRemove:x,currentTabStopId:y}=d;return m.useEffect(()=>{if(a)return h(),()=>x()},[a,h,x]),p.jsx(rh.ItemSlot,{scope:n,id:c,focusable:a,active:r,children:p.jsx(ce.span,{tabIndex:u?0:-1,"data-orientation":d.orientation,...o,ref:t,onMouseDown:ie(e.onMouseDown,w=>{a?d.onItemFocus(c):w.preventDefault()}),onFocus:ie(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:ie(e.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){d.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const g=F4(w,d.orientation,d.dir);if(g!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let b=f().filter(S=>S.focusable).map(S=>S.ref.current);if(g==="last")b.reverse();else if(g==="prev"||g==="next"){g==="prev"&&b.reverse();const S=b.indexOf(w.currentTarget);b=d.loop?Y4(b,S+1):b.slice(S+1)}setTimeout(()=>k1(b))}}),children:typeof i=="function"?i({isCurrentTabStop:u,hasTabStop:y!=null}):i})})});O1.displayName=R1;var q4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function G4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function F4(e,t,n){const a=G4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return q4[a]}function k1(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function Y4(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var V4=C1,K4=O1,rp="Radio",[X4,N1]=rn(rp),[Q4,Z4]=X4(rp),D1=m.forwardRef((e,t)=>{const{__scopeRadio:n,name:a,checked:r=!1,required:s,disabled:i,value:o="on",onCheck:l,form:c,...d}=e,[u,f]=m.useState(null),h=Ae(t,w=>f(w)),x=m.useRef(!1),y=u?c||!!u.closest("form"):!0;return p.jsxs(Q4,{scope:n,checked:r,disabled:i,children:[p.jsx(ce.button,{type:"button",role:"radio","aria-checked":r,"data-state":U1(r),"data-disabled":i?"":void 0,disabled:i,value:o,...d,ref:h,onClick:ie(e.onClick,w=>{r||l==null||l(),y&&(x.current=w.isPropagationStopped(),x.current||w.stopPropagation())})}),y&&p.jsx(L1,{control:u,bubbles:!x.current,name:a,value:o,checked:r,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});D1.displayName=rp;var j1="RadioIndicator",M1=m.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:a,...r}=e,s=Z4(j1,n);return p.jsx(ta,{present:a||s.checked,children:p.jsx(ce.span,{"data-state":U1(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:t})})});M1.displayName=j1;var J4="RadioBubbleInput",L1=m.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:a=!0,...r},s)=>{const i=m.useRef(null),o=Ae(i,s),l=IS(n),c=bm(t);return m.useEffect(()=>{const d=i.current;if(!d)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==n&&h){const x=new Event("click",{bubbles:a});h.call(d,n),d.dispatchEvent(x)}},[l,n,a]),p.jsx(ce.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:o,style:{...r.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});L1.displayName=J4;function U1(e){return e?"checked":"unchecked"}var W4=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],xu="RadioGroup",[e3,YL]=rn(xu,[A1,N1]),P1=A1(),z1=N1(),[t3,n3]=e3(xu),B1=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:a,defaultValue:r,value:s,required:i=!1,disabled:o=!1,orientation:l,dir:c,loop:d=!0,onValueChange:u,...f}=e,h=P1(n),x=_1(c),[y,w]=Qs({prop:s,defaultProp:r??null,onChange:u,caller:xu});return p.jsx(t3,{scope:n,name:a,required:i,disabled:o,value:y,onValueChange:w,children:p.jsx(V4,{asChild:!0,...h,orientation:l,dir:x,loop:d,children:p.jsx(ce.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":o?"":void 0,dir:x,...f,ref:t})})})});B1.displayName=xu;var $1="RadioGroupItem",H1=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:a,...r}=e,s=n3($1,n),i=s.disabled||a,o=P1(n),l=z1(n),c=m.useRef(null),d=Ae(t,c),u=s.value===r.value,f=m.useRef(!1);return m.useEffect(()=>{const h=y=>{W4.includes(y.key)&&(f.current=!0)},x=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",x)}},[]),p.jsx(K4,{asChild:!0,...o,focusable:!i,active:u,children:p.jsx(D1,{disabled:i,required:s.required,checked:u,...l,...r,name:s.name,ref:d,onCheck:()=>s.onValueChange(r.value),onKeyDown:ie(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:ie(r.onFocus,()=>{var h;f.current&&((h=c.current)==null||h.click())})})})});H1.displayName=$1;var a3="RadioGroupIndicator",I1=m.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...a}=e,r=z1(n);return p.jsx(M1,{...r,...a,ref:t})});I1.displayName=a3;var q1=B1,G1=H1,r3=I1;const sp=m.forwardRef(({className:e,...t},n)=>p.jsx(q1,{className:pe("grid gap-2",e),...t,ref:n}));sp.displayName=q1.displayName;const In=m.forwardRef(({className:e,...t},n)=>p.jsx(G1,{ref:n,className:pe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(r3,{className:"flex items-center justify-center",children:p.jsx(UC,{className:"h-2.5 w-2.5 fill-current text-current"})})}));In.displayName=G1.displayName;const ir=`You are a skilled AI prompt generator. Your job is to generate clear, specific, and high-quality prompts based on the user's input and the selected category: System, Task, Image, or Video.
|
|
247
|
+
|
|
248
|
+
System Prompts: Define the AI's identity, behavior, tone, constraints, and purpose. Do not assign specific tasks — instead, shape how the AI should act and think. Use detailed, well-structured instructions tailored to the intended use case.
|
|
249
|
+
|
|
250
|
+
Task Prompts: Instruct the AI to perform a specific action, answer a question, solve a problem, or generate content. Focus on clarity, necessary context, and scope. Avoid vague phrasing. Do not include labels like "TASK PROMPT" in the output.
|
|
251
|
+
|
|
252
|
+
Image Prompts: Describe visual scenes or concepts in detail. Include elements such as composition, subject matter, style, lighting, camera angle, color scheme, mood, and medium. Be creative, precise, and vivid.
|
|
253
|
+
|
|
254
|
+
Video Prompts: Describe visual sequences with structure. Include scene layout, character actions, transitions, cinematography (e.g., camera angle, motion), tone, timing, and style references. Ensure logical scene progression and clear direction.
|
|
255
|
+
|
|
256
|
+
Output should be only the prompt itself — clean and direct, without any titles, category tags, or commentary.
|
|
257
|
+
|
|
258
|
+
Always match the desired length and detail level if the user specifies. If not, default to a thorough and well-structured response that provides enough context for optimal results.`,s3=({onUsePrompt:e})=>{const[t,n]=m.useState(!1),[a,r]=m.useState(""),[s,i]=m.useState("task"),[o,l]=m.useState({text:"",loading:!1,error:null}),[c,d]=m.useState(ir),{toast:u}=No(),f=m.useRef(null),h=m.useRef(null);m.useEffect(()=>{d(i3())},[]);const x=async()=>{if(!a.trim()){u({title:"Error",description:"Please enter a prompt to generate content",variant:"destructive"});return}h.current&&(h.current.close(),h.current=null),l({text:"",loading:!0,error:null});try{let g="";s==="system"?g=`Generate a SYSTEM PROMPT for: ${a}. This should define an AI's role, personality, and constraints without asking it to perform specific tasks.`:s==="task"?g=`Generate a TASK PROMPT for: ${a}. This should provide specific instructions for an AI to complete a particular task.`:s==="image"?g=`Generate an IMAGE PROMPT for: ${a}. This should describe the desired visual elements, style, composition, colors, and subjects.`:g=`Generate a VIDEO PROMPT for: ${a}. This should outline the content, scenes, transitions, and style guidelines.`;const v=encodeURIComponent(g),b=encodeURIComponent(c),S=`https://text.pollinations.ai/${v}?model=openai-large&private=true&stream=true&system=${b}`,E=new EventSource(S);h.current=E;let _="",A=!1;E.onmessage=T=>{try{if(T.data.startsWith("{")){const k=JSON.parse(T.data);if(k.choices&&k.choices[0]&&k.choices[0].delta){const M=k.choices[0].delta.content;M&&(_+=M,A=!0,_=_.replace(/\[DONE\]/g,""),l({text:_,loading:!0,error:null}))}}else _+=T.data,_=_.replace(/\[DONE\]/g,""),A=!0,l({text:_,loading:!0,error:null})}catch{_+=T.data,_=_.replace(/\[DONE\]/g,""),A=!0,l({text:_,loading:!0,error:null})}},E.onerror=T=>{E.close(),h.current=null,!A||!_.trim()?(l({text:_||"",loading:!1,error:T instanceof Error?T.message:"Failed to generate content"}),u({title:"Error",description:"Failed to generate content. Please try again.",variant:"destructive"})):(_=_.replace(/\[DONE\]/g,""),l({text:_,loading:!1,error:null}))},E.addEventListener("done",()=>{E.close(),h.current=null,_=_.replace(/\[DONE\]/g,""),l({text:_,loading:!1,error:null})})}catch(g){l({text:"",loading:!1,error:g instanceof Error?g.message:"Failed to generate content"}),u({title:"Error",description:"Failed to generate content. Please try again.",variant:"destructive"})}},y=()=>{o.text&&(navigator.clipboard.writeText(o.text),u({title:"Copied",description:"Response copied to clipboard"}))},w=()=>{o.text&&(e(o.text,s),u({title:"Success",description:"AI response added as a new prompt"}),n(!1))};return p.jsx("div",{className:"fixed bottom-8 right-8 z-50 w-full max-w-md",children:p.jsxs(j4,{open:t,onOpenChange:n,className:"bg-secondary/90 backdrop-blur-sm rounded-lg shadow-lg border border-purple-500/20",children:[p.jsx(M4,{asChild:!0,children:p.jsxs(Ee,{className:"w-full flex items-center justify-between p-4 rounded-lg bg-purple-600 hover:bg-purple-700 transition-all duration-200",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(CC,{className:"h-5 w-5"}),p.jsx("span",{children:"AI Prompt Assistant"})]}),t?p.jsx(Gw,{className:"h-4 w-4"}):p.jsx(Fw,{className:"h-4 w-4"})]})}),p.jsxs(L4,{className:"p-4 space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{htmlFor:"promptType",className:"text-sm font-medium text-muted-foreground",children:"What type of prompt do you want to generate?"}),p.jsxs(sp,{value:s,onValueChange:g=>i(g),className:"flex space-x-4",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(In,{value:"system",id:"system"}),p.jsx(Ge,{htmlFor:"system",children:"System Prompt"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(In,{value:"task",id:"task"}),p.jsx(Ge,{htmlFor:"task",children:"Task Prompt"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(In,{value:"image",id:"image"}),p.jsx(Ge,{htmlFor:"image",children:"Image Prompt"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(In,{value:"video",id:"video"}),p.jsx(Ge,{htmlFor:"video",children:"Video Prompt"})]})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx("label",{htmlFor:"prompt",className:"text-sm font-medium text-muted-foreground",children:s==="system"?"Describe the AI assistant's role and personality":s==="task"?"What kind of task prompt would you like to create?":s==="image"?"Describe the desired visual elements, style, composition, colors, and subjects":"Outline the content, scenes, transitions, and style guidelines"}),p.jsx(cu,{id:"prompt",placeholder:s==="system"?"E.g., A friendly customer service assistant that helps with product inquiries":s==="task"?"E.g., Create a prompt for writing a persuasive email":s==="image"?"E.g., Describe a sunset in a surreal style":"E.g., Outline a 30-second video clip",value:a,onChange:g=>r(g.target.value),className:"min-h-[80px] bg-secondary/50 border-secondary"})]}),p.jsx(Ee,{onClick:x,disabled:o.loading||!a.trim(),className:"w-full bg-purple-500 hover:bg-purple-700",children:o.loading?"Generating...":"Generate Prompt"}),o.text&&p.jsxs("div",{className:"space-y-3",children:[p.jsx("div",{ref:f,className:"bg-secondary p-3 rounded-md max-h-[200px] overflow-y-auto whitespace-pre-wrap text-sm",children:o.text}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs(Ee,{variant:"outline",className:"flex-1",onClick:y,children:[p.jsx(Mf,{className:"mr-2 h-4 w-4"})," Copy"]}),p.jsx(Ee,{className:"flex-1 bg-purple-500 hover:bg-purple-700",onClick:w,children:"Use as Prompt"})]})]}),o.error&&!o.text&&p.jsx("div",{className:"p-3 bg-destructive/20 border border-destructive/40 rounded-md text-sm text-destructive",children:o.error})]})]})})},F1="ai-system-prompt",ip="ai-use-default-prompt",i3=()=>localStorage.getItem(ip)==="true"?ir:localStorage.getItem(F1)||ir,o3=e=>{localStorage.setItem(F1,e)},ny=e=>{localStorage.setItem(ip,e.toString())},l3=()=>localStorage.getItem(ip)==="true",c3=({isOpen:e,onClose:t})=>{const{supabaseUrl:n,supabaseKey:a}=Bo(),[r,s]=m.useState(()=>localStorage.getItem("custom-supabase-url")||n),[i,o]=m.useState(()=>localStorage.getItem("custom-supabase-key")||a),[l,c]=m.useState(()=>localStorage.getItem("custom-user-id")||""),[d,u]=m.useState(""),[f,h]=m.useState(!1),[x,y]=m.useState("untested"),[w,g]=m.useState("unknown"),[v,b]=m.useState(!1),[S,E]=m.useState(!1),[_,A]=m.useState(null),[T,k]=m.useState(!1),[M,H]=m.useState(()=>localStorage.getItem("ai-system-prompt")||ir),[F,X]=m.useState(()=>l3()),{toast:L}=No();m.useEffect(()=>{if(e){ty().then(u);const D=localStorage.getItem("ai-system-prompt");D&&D!==ir&&D.includes("You are a helpful AI prompt generator")&&D.includes("Always provide clear, actionable prompts")&&(H(ir),L({title:"AI Prompt Updated",description:"Your AI system prompt has been updated to the latest version. Click 'Save Changes' to apply."}))}},[e]);const I=D=>{c(D),_4(D),ty().then(u)},C=D=>{const G=D.match(/https?:\/\/([a-z0-9-]+)\.supabase\.co/);return G?G[1]:""},P=()=>{const D=C(r);return D?`https://app.supabase.com/project/${D}/sql/new`:"https://app.supabase.com/"},R=async()=>{if(!r||!i){L({title:"Missing Information",description:"Please enter both Supabase URL and API Key",variant:"destructive"});return}if(!r.startsWith("https://")||!r.includes(".supabase.co")){L({title:"Invalid URL Format",description:"Supabase URL should be in the format: https://your-project.supabase.co",variant:"destructive"});return}if(i.length<20){L({title:"Invalid Key Format",description:"The Supabase key appears to be too short. Please check your anon key.",variant:"destructive"});return}if(h(!0),y("untested"),g("unknown"),b(!1),!Nd(r,i)){L({title:"Storage Error",description:"Could not save credentials to browser storage. Please check your browser settings.",variant:"destructive"}),h(!1);return}try{const G=ah(),J=new Promise((ut,on)=>setTimeout(()=>on(new Error("Connection timeout after 10 seconds")),1e4));if(!await Promise.race([G,J.then(()=>(L({title:"Connection Timeout",description:"The connection to Supabase timed out. Please check your URL and internet connection.",variant:"destructive"}),!1))])){h(!1),y("failed"),L({title:"Connection Failed",description:"Could not connect to Supabase. Please check your credentials and try again.",variant:"destructive"});return}const Oe=nh();if(await uo(Oe)){g("exists"),y("success"),h(!1),L({title:"Connection Successful",description:"Successfully connected to your Supabase instance with table access."});return}g("missing"),y("failed"),b(!0),L({title:"Table Setup Required",description:"Connected to Supabase, but the prompts table doesn't exist. Please create it manually.",variant:"destructive"})}catch(G){console.error("Error during connection test:",G),y("failed"),L({title:"Connection Error",description:G instanceof Error?G.message:"An unexpected error occurred",variant:"destructive"})}finally{h(!1)}},z=async()=>{if(!r||!i){L({title:"Missing Information",description:"Please enter both Supabase URL and API Key",variant:"destructive"});return}k(!0),E(!0);try{Nd(r,i);const D=await R4();A(D),console.log("Supabase connection diagnostics:",D),L({title:"Diagnostics Complete",description:"Connection diagnostics have been collected."})}catch(D){console.error("Error running diagnostics:",D),L({title:"Diagnostics Failed",description:"Could not complete diagnostics. Please try again.",variant:"destructive"})}finally{k(!1)}},q=()=>{navigator.clipboard.writeText(ey.trim()),L({title:"SQL Copied",description:"Table creation SQL copied to clipboard."})},V=()=>{window.open(P(),"_blank")},Z=()=>{H(ir),L({title:"System Prompt Reset",description:"The system prompt has been reset to default."})},j=async()=>{if(r&&i){if(!r.startsWith("https://")||!r.includes(".supabase.co")){L({title:"Invalid URL Format",description:"Supabase URL should be in the format: https://your-project.supabase.co",variant:"destructive"});return}if(i.length<20){L({title:"Invalid Key Format",description:"The Supabase key appears to be too short. Please check your anon key.",variant:"destructive"});return}if(!Nd(r,i)){L({title:"Storage Error",description:"Could not save credentials to browser storage. Please check your browser settings.",variant:"destructive"});return}h(!0);const G=await ah();h(!1),G||L({title:"Supabase Connection Failed",description:"Could not connect to Supabase with the provided credentials. Your settings have been saved, but you may need to fix your connection details.",variant:"destructive"});const J=nh();await uo(J)||(L({title:"Supabase Table Required",description:"Your Supabase connection works, but the prompts table doesn't exist. Please create it for full functionality.",variant:"destructive"}),b(!0))}else{L({title:"Supabase Configuration Required",description:"Please enter your Supabase URL and API Key for cloud storage.",variant:"destructive"});return}F?ny(!0):(ny(!1),o3(M)),L({title:"Settings Saved",description:"Your Supabase settings have been updated."}),t()};return p.jsx(PS,{open:e,onOpenChange:D=>!D&&t(),children:p.jsxs(Bm,{className:"sm:max-w-6xl w-[95vw] max-h-[85vh] overflow-y-auto",children:[p.jsxs($m,{children:[p.jsxs(Im,{className:"flex items-center gap-2",children:[p.jsx(Yw,{className:"h-5 w-5"}),"Dashboard Settings"]}),p.jsx(BS,{children:"Configure how you want to store and access your prompts."})]}),p.jsx("div",{className:"py-4",children:p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[p.jsx("div",{className:"space-y-6",children:p.jsxs("div",{className:"space-y-4 border border-border p-4 rounded-md",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Qg,{className:"h-4 w-4 text-blue-500"}),p.jsx("h3",{className:"text-sm font-medium",children:"Supabase Configuration"})]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your Supabase project URL and anon key to connect to your own Supabase instance"}),p.jsx("div",{className:"p-3 bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800 rounded-md",children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("div",{className:"text-blue-500 mt-0.5",children:"ℹ️"}),p.jsxs("div",{children:[p.jsx("p",{className:"text-xs text-blue-700 dark:text-blue-300 font-medium mb-1",children:"Important: Browser Refresh Required"}),p.jsxs("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:["After connecting to Supabase, ",p.jsx("strong",{children:"refresh the page"})," to see your prompts appear. This is especially important when switching browsers or using a new device."]})]})]})}),p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"space-y-1",children:[p.jsx(Ge,{htmlFor:"supabase-url",children:"Supabase Project URL"}),p.jsx(gs,{id:"supabase-url",placeholder:"https://your-project.supabase.co",value:r,onChange:D=>s(D.target.value)})]}),p.jsxs("div",{className:"space-y-1",children:[p.jsx(Ge,{htmlFor:"supabase-key",children:"Supabase Anon Key"}),p.jsx(gs,{id:"supabase-key",type:"password",placeholder:"your-anon-key",value:i,onChange:D=>o(D.target.value)})]}),p.jsxs("div",{className:"space-y-1",children:[p.jsx(Ge,{htmlFor:"custom-user-id",children:"Custom User ID (Optional)"}),p.jsx(gs,{id:"custom-user-id",placeholder:"Enter a custom user ID to sync across browsers",value:l,onChange:D=>I(D.target.value)}),p.jsxs("p",{className:"text-xs text-muted-foreground",children:["Current User ID: ",p.jsx("span",{className:"font-mono text-blue-600",children:d||"Loading..."})]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"💡 Set a custom user ID to access your prompts from any browser. Leave empty for device-specific storage."})]})]}),p.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[p.jsx(Ee,{variant:"outline",size:"sm",onClick:R,disabled:f||!r||!i,className:"flex gap-2 items-center",children:f?p.jsxs(p.Fragment,{children:[p.jsx(ul,{className:"h-4 w-4 animate-spin"}),"Connecting..."]}):p.jsxs(p.Fragment,{children:[p.jsx(Qg,{className:"h-4 w-4"}),"Connect"]})}),p.jsxs(Ee,{type:"button",variant:"outline",size:"sm",onClick:()=>{w4(),s(""),o(""),y("untested"),g("unknown"),b(!1),E(!1),L({title:"Connection Reset",description:"Supabase credentials have been cleared. You can now enter new credentials."})},className:"flex gap-2 items-center",children:[p.jsx(ul,{className:"h-4 w-4"}),"Reset"]}),p.jsx(Ee,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:T||!r||!i,className:"flex gap-2 items-center",children:T?p.jsxs(p.Fragment,{children:[p.jsx(ul,{className:"h-4 w-4 animate-spin"}),"Diagnosing..."]}):p.jsxs(p.Fragment,{children:[p.jsx(ud,{className:"h-4 w-4"}),"Diagnose"]})}),x==="success"&&p.jsxs("div",{className:"flex items-center text-sm text-green-600 gap-1 ml-auto",children:[p.jsx(MC,{className:"h-4 w-4"}),p.jsx("span",{children:"Connected"})]}),x==="failed"&&p.jsxs("div",{className:"flex items-center text-sm text-red-600 gap-1 ml-auto",children:[p.jsx(ud,{className:"h-4 w-4"}),p.jsx("span",{children:"Failed"})]})]}),S&&_&&p.jsxs("div",{className:"mt-4 p-3 bg-slate-50 dark:bg-slate-950 border border-slate-200 dark:border-slate-800 rounded-md",children:[p.jsx("div",{className:"flex items-start gap-2 mb-2",children:p.jsxs("div",{className:"flex-1",children:[p.jsx("h4",{className:"text-sm font-medium mb-2",children:"Connection Diagnostics"}),p.jsxs("div",{className:"text-xs space-y-1",children:[p.jsxs("div",{className:"grid grid-cols-2 gap-1",children:[p.jsx("span",{className:"text-muted-foreground",children:"Network Connectivity:"}),p.jsx("span",{className:_.networkConnectivity?"text-green-600":"text-red-600",children:_.networkConnectivity?"OK":"Failed"}),p.jsx("span",{className:"text-muted-foreground",children:"CORS Issues:"}),p.jsx("span",{className:_.corsIssue?"text-red-600":"text-green-600",children:_.corsIssue?"Detected":"None"}),p.jsx("span",{className:"text-muted-foreground",children:"Auth Connection:"}),p.jsx("span",{className:_.authConnection?"text-green-600":"text-red-600",children:_.authConnection?"OK":"Failed"}),p.jsx("span",{className:"text-muted-foreground",children:"Data Connection:"}),p.jsx("span",{className:_.dataConnection?"text-green-600":"text-red-600",children:_.dataConnection?"OK":"Failed"}),p.jsx("span",{className:"text-muted-foreground",children:"Table Exists:"}),p.jsx("span",{className:_.tableExists?"text-green-600":"text-amber-600",children:_.tableExists?"Yes":"No"})]}),_.error&&p.jsxs("div",{className:"mt-2 text-red-600",children:[p.jsx("span",{className:"font-medium",children:"Error:"})," ",_.error]}),p.jsxs("div",{className:"mt-2",children:[p.jsx("span",{className:"font-medium",children:"Recommendation:"})," ",_.corsIssue?p.jsx("span",{children:"Check your browser's CORS settings or try a different browser."}):_.networkConnectivity?_.authConnection?_.dataConnection?_.tableExists?p.jsx("span",{children:"Your connection appears to be working correctly."}):p.jsx("span",{children:"Create the prompts table using the SQL below."}):p.jsx("span",{children:"Verify your database permissions."}):p.jsx("span",{children:"Verify your Supabase URL and API key."}):p.jsx("span",{children:"Check your internet connection."})]})]})]})}),p.jsx(Ee,{variant:"outline",size:"sm",className:"w-full mt-2 text-xs",onClick:()=>E(!1),children:"Hide Diagnostics"})]}),v&&p.jsxs("div",{className:"mt-4 p-3 bg-amber-50 dark:bg-amber-950 border border-amber-200 dark:border-amber-800 rounded-md",children:[p.jsxs("div",{className:"flex items-start gap-2 mb-2",children:[p.jsx(ud,{className:"h-4 w-4 text-amber-600 mt-0.5"}),p.jsxs("div",{children:[p.jsx("h4",{className:"text-sm font-medium text-amber-800 dark:text-amber-300",children:"Table Setup Required"}),p.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-400 mt-1",children:"Your Supabase connection works, but you need to create the 'prompts' table manually in your Supabase SQL editor:"})]})]}),p.jsxs("div",{className:"relative mt-2",children:[p.jsx("pre",{className:"text-xs p-2 bg-gray-800 text-gray-100 rounded-md overflow-x-auto",children:ey.trim()}),p.jsx(Ee,{variant:"ghost",size:"sm",className:"absolute top-1 right-1 h-6 w-6 p-0",onClick:q,children:p.jsx(Mf,{className:"h-3 w-3"})})]}),p.jsxs("div",{className:"mt-3 flex flex-col gap-2",children:[p.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-400 font-medium",children:"📋 Quick Setup Steps:"}),p.jsxs("ol",{className:"text-xs text-amber-700 dark:text-amber-400 list-decimal pl-4 space-y-1",children:[p.jsx("li",{children:'Click the "Open SQL Editor" button below'}),p.jsx("li",{children:"Create a new query in the SQL Editor"}),p.jsx("li",{children:"Copy the SQL code above (click the copy button)"}),p.jsx("li",{children:"Paste it into the SQL Editor"}),p.jsx("li",{children:'Click "Run" to execute the SQL'}),p.jsx("li",{children:'Return here and click "Connect" to verify'})]}),p.jsxs("div",{className:"flex gap-2 mt-2",children:[p.jsxs(Ee,{variant:"outline",size:"sm",className:"flex-1 h-8 text-xs flex items-center gap-1 border-amber-300 dark:border-amber-700 text-amber-800 dark:text-amber-300 bg-amber-100 dark:bg-amber-900 hover:bg-amber-200 dark:hover:bg-amber-800",onClick:V,children:[p.jsx($C,{className:"h-3 w-3"}),"Open SQL Editor"]}),p.jsxs(Ee,{variant:"outline",size:"sm",className:"h-8 text-xs flex items-center gap-1 border-amber-300 dark:border-amber-700 text-amber-800 dark:text-amber-300 bg-amber-100 dark:bg-amber-900 hover:bg-amber-200 dark:hover:bg-amber-800",onClick:q,children:[p.jsx(Mf,{className:"h-3 w-3"}),"Copy SQL"]})]}),p.jsxs("div",{className:"mt-2 p-2 bg-blue-50 dark:bg-blue-950 border border-blue-200 dark:border-blue-800 rounded text-xs",children:[p.jsx("p",{className:"text-blue-700 dark:text-blue-300 font-medium mb-1",children:"💡 Why manual setup?"}),p.jsx("p",{className:"text-blue-600 dark:text-blue-400",children:"Supabase doesn't allow automatic table creation through the API for security reasons. This one-time manual setup ensures your database is properly configured."})]})]})]}),p.jsxs("div",{className:"text-xs text-muted-foreground",children:[p.jsx("p",{className:"mb-2",children:"To find your Supabase details:"}),p.jsxs("ol",{className:"list-decimal pl-4 space-y-1",children:[p.jsx("li",{children:"Go to your Supabase project dashboard"}),p.jsx("li",{children:"Navigate to Project Settings → API"}),p.jsx("li",{children:'Copy the "Project URL" and "anon" public API key'})]})]})]})}),p.jsx("div",{className:"space-y-6",children:p.jsxs("div",{className:"space-y-4 border border-border p-4 rounded-md",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(VC,{className:"h-4 w-4 text-purple-500"}),p.jsx("h3",{className:"text-sm font-medium",children:"AI Assistant Configuration"})]}),p.jsx("p",{className:"text-xs text-muted-foreground",children:"Customize the system prompt used by the AI Assistant to generate prompts"}),p.jsxs("div",{className:"flex items-center space-x-2 mb-2",children:[p.jsx(Fm,{id:"use-default-prompt",checked:F,onCheckedChange:D=>{X(D)}}),p.jsx(Ge,{htmlFor:"use-default-prompt",className:"text-sm",children:"Use default system prompt"})]}),p.jsxs("div",{className:F?"opacity-50":"",children:[p.jsxs("div",{className:"flex justify-between mb-2",children:[p.jsx(Ge,{htmlFor:"system-prompt",className:"text-sm",children:"System Prompt"}),p.jsxs(Ee,{variant:"ghost",size:"sm",onClick:Z,className:"h-6 text-xs flex items-center gap-1 text-muted-foreground",children:[p.jsx(ul,{className:"h-3 w-3"}),"Reset to default"]})]}),p.jsx(cu,{id:"system-prompt",value:M,onChange:D=>H(D.target.value),className:"min-h-[200px] resize-y",placeholder:"Enter a system prompt for the AI Assistant",disabled:F}),p.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"This prompt defines how the AI Assistant generates prompts based on your requests."})]})]})})]})}),p.jsxs(Hm,{children:[p.jsx(Ee,{variant:"outline",onClick:t,children:"Cancel"}),p.jsx(Ee,{onClick:j,className:"bg-purple-500 hover:bg-purple-700",children:"Save Changes"})]})]})})},u3=({onAddPrompt:e})=>{const[t,n]=m.useState(!1);return p.jsxs("header",{className:"flex justify-between items-center mb-8",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("img",{src:"/favicon.png",alt:"Logo",className:"w-12 h-12"}),p.jsx("h1",{className:"text-3xl font-bold",children:"Promptzy"})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs(Ee,{variant:"outline",size:"sm",onClick:()=>n(!0),className:"flex items-center gap-1",children:[p.jsx(Yw,{className:"h-4 w-4"}),"Settings"]}),p.jsxs(Ee,{onClick:e,className:"bg-purple-600 hover:bg-purple-700 flex items-center gap-1",children:[p.jsx(cm,{className:"h-4 w-4"}),"Add Prompt"]})]}),p.jsx(c3,{isOpen:t,onClose:()=>n(!1)})]})},d3=({searchTerm:e,onSearchChange:t})=>p.jsxs("div",{className:"relative",children:[p.jsx(GC,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-muted-foreground w-4 h-4"}),p.jsx(gs,{type:"text",placeholder:"Search prompts...",value:e,onChange:n=>t(n.target.value),className:"pl-10 bg-secondary/50 border-secondary focus-visible:ring-purple-300 transition-all duration-200"})]}),f3=({allTags:e,selectedTags:t,onToggleTag:n})=>e.length===0?null:p.jsxs("div",{className:"mb-6",children:[p.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Filter by tags:"}),p.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(a=>p.jsx("button",{onClick:()=>n(a.id),className:`tag ${t.includes(a.id)?"tag-active":""}`,children:a.name},a.id))})]}),Tl=43200,ay=1440,ry=Symbol.for("constructDateFrom");function op(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&ry in e?e[ry](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ga(e,t){return op(e,e)}let h3={};function m3(){return h3}function sy(e){const t=Ga(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function lp(e,...t){const n=op.bind(null,e||t.find(a=>typeof a=="object"));return t.map(n)}function Yl(e,t){const n=+Ga(e)-+Ga(t);return n<0?-1:n>0?1:n}function p3(e){return op(e,Date.now())}function g3(e,t,n){const[a,r]=lp(n==null?void 0:n.in,e,t),s=a.getFullYear()-r.getFullYear(),i=a.getMonth()-r.getMonth();return s*12+i}function v3(e){return t=>{const a=(e?Math[e]:Math.trunc)(t);return a===0?0:a}}function y3(e,t){return+Ga(e)-+Ga(t)}function b3(e,t){const n=Ga(e);return n.setHours(23,59,59,999),n}function w3(e,t){const n=Ga(e),a=n.getMonth();return n.setFullYear(n.getFullYear(),a+1,0),n.setHours(23,59,59,999),n}function x3(e,t){const n=Ga(e);return+b3(n)==+w3(n)}function S3(e,t,n){const[a,r,s]=lp(n==null?void 0:n.in,e,e,t),i=Yl(r,s),o=Math.abs(g3(r,s));if(o<1)return 0;r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*o);let l=Yl(r,s)===-i;x3(a)&&o===1&&Yl(a,s)===1&&(l=!1);const c=i*(o-+l);return c===0?0:c}function E3(e,t,n){const a=y3(e,t)/1e3;return v3(n==null?void 0:n.roundingMethod)(a)}const _3={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"}},T3=(e,t,n)=>{let a;const r=_3[e];return typeof r=="string"?a=r:t===1?a=r.one:a=r.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function jd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const A3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},C3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},R3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},O3={date:jd({formats:A3,defaultWidth:"full"}),time:jd({formats:C3,defaultWidth:"full"}),dateTime:jd({formats:R3,defaultWidth:"full"})},k3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},N3=(e,t,n,a)=>k3[e];function gi(e){return(t,n)=>{const a=n!=null&&n.context?String(n.context):"standalone";let r;if(a==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):i;r=e.formattingValues[o]||e.formattingValues[i]}else{const i=e.defaultWidth,o=n!=null&&n.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return r[s]}}const D3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},j3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},M3={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"]},L3={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},U3={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"}},P3={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"}},z3=(e,t)=>{const n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},B3={ordinalNumber:z3,era:gi({values:D3,defaultWidth:"wide"}),quarter:gi({values:j3,defaultWidth:"wide",argumentCallback:e=>e-1}),month:gi({values:M3,defaultWidth:"wide"}),day:gi({values:L3,defaultWidth:"wide"}),dayPeriod:gi({values:U3,defaultWidth:"wide",formattingValues:P3,defaultFormattingWidth:"wide"})};function vi(e){return(t,n={})=>{const a=n.width,r=a&&e.matchPatterns[a]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;const i=s[0],o=a&&e.parsePatterns[a]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?H3(o,u=>u.test(i)):$3(o,u=>u.test(i));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const d=t.slice(i.length);return{value:c,rest:d}}}function $3(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function H3(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function I3(e){return(t,n={})=>{const a=t.match(e.matchPattern);if(!a)return null;const r=a[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const o=t.slice(r.length);return{value:i,rest:o}}}const q3=/^(\d+)(th|st|nd|rd)?/i,G3=/\d+/i,F3={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},Y3={any:[/^b/i,/^(a|c)/i]},V3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},K3={any:[/1/i,/2/i,/3/i,/4/i]},X3={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},Q3={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]},Z3={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},J3={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]},W3={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},eL={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}},tL={ordinalNumber:I3({matchPattern:q3,parsePattern:G3,valueCallback:e=>parseInt(e,10)}),era:vi({matchPatterns:F3,defaultMatchWidth:"wide",parsePatterns:Y3,defaultParseWidth:"any"}),quarter:vi({matchPatterns:V3,defaultMatchWidth:"wide",parsePatterns:K3,defaultParseWidth:"any",valueCallback:e=>e+1}),month:vi({matchPatterns:X3,defaultMatchWidth:"wide",parsePatterns:Q3,defaultParseWidth:"any"}),day:vi({matchPatterns:Z3,defaultMatchWidth:"wide",parsePatterns:J3,defaultParseWidth:"any"}),dayPeriod:vi({matchPatterns:W3,defaultMatchWidth:"any",parsePatterns:eL,defaultParseWidth:"any"})},nL={code:"en-US",formatDistance:T3,formatLong:O3,formatRelative:N3,localize:B3,match:tL,options:{weekStartsOn:0,firstWeekContainsDate:1}};function aL(e,t,n){const a=m3(),r=(n==null?void 0:n.locale)??a.locale??nL,s=2520,i=Yl(e,t);if(isNaN(i))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:i}),[l,c]=lp(n==null?void 0:n.in,...i>0?[t,e]:[e,t]),d=E3(c,l),u=(sy(c)-sy(l))/1e3,f=Math.round((d-u)/60);let h;if(f<2)return n!=null&&n.includeSeconds?d<5?r.formatDistance("lessThanXSeconds",5,o):d<10?r.formatDistance("lessThanXSeconds",10,o):d<20?r.formatDistance("lessThanXSeconds",20,o):d<40?r.formatDistance("halfAMinute",0,o):d<60?r.formatDistance("lessThanXMinutes",1,o):r.formatDistance("xMinutes",1,o):f===0?r.formatDistance("lessThanXMinutes",1,o):r.formatDistance("xMinutes",f,o);if(f<45)return r.formatDistance("xMinutes",f,o);if(f<90)return r.formatDistance("aboutXHours",1,o);if(f<ay){const x=Math.round(f/60);return r.formatDistance("aboutXHours",x,o)}else{if(f<s)return r.formatDistance("xDays",1,o);if(f<Tl){const x=Math.round(f/ay);return r.formatDistance("xDays",x,o)}else if(f<Tl*2)return h=Math.round(f/Tl),r.formatDistance("aboutXMonths",h,o)}if(h=S3(c,l),h<12){const x=Math.round(f/Tl);return r.formatDistance("xMonths",x,o)}else{const x=h%12,y=Math.trunc(h/12);return x<3?r.formatDistance("aboutXYears",y,o):x<9?r.formatDistance("overXYears",y,o):r.formatDistance("almostXYears",y+1,o)}}function rL(e,t){return aL(e,p3(e),t)}function sL({prompt:e,onEdit:t,onDelete:n}){const[a,r]=m.useState(!1),s=e.type||"task",i=()=>{r(!a)},o=f=>{f.stopPropagation(),t(e)},l=f=>{f.stopPropagation(),n(e.id)},c=e.text.split(`
|
|
259
|
+
`)[0],d=c.length>80?c.substring(0,80)+"...":c,u=s==="system"?"bg-blue-600/20 text-blue-400 border-blue-800/50":s==="task"?"bg-amber-600/20 text-amber-400 border-amber-800/50":s==="image"?"bg-green-600/20 text-green-400 border-green-800/50":"bg-purple-600/20 text-purple-400 border-purple-800/50";return p.jsxs("div",{className:"prompt-card rounded-xl overflow-hidden shadow-md animate-fade-in",children:[p.jsxs("div",{className:"p-4 flex flex-col gap-2 btn-hover-effect",children:[p.jsx("div",{className:"flex items-center gap-2",children:p.jsx("div",{className:`px-2 py-0.5 text-xs font-medium rounded border ${u}`,children:s==="system"?"SYSTEM":s==="task"?"TASK":s==="image"?"IMAGE":"VIDEO"})}),p.jsxs("div",{className:"flex justify-between items-start",children:[p.jsxs("div",{className:"flex-1 overflow-hidden text-sm cursor-pointer",onClick:i,children:[p.jsx("div",{className:"text-muted-foreground text-xs",children:rL(new Date(e.createdAt),{addSuffix:!0})}),p.jsx("div",{className:"font-medium mt-1 line-clamp-1",children:d})]}),p.jsxs("div",{className:"flex items-center gap-2 ml-2",children:[p.jsx(Ee,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-white hover:bg-secondary",onClick:o,children:p.jsx(XC,{className:"h-4 w-4"})}),p.jsx(Ee,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-white hover:bg-destructive/20",onClick:l,children:p.jsx(ZC,{className:"h-4 w-4"})}),p.jsx(Ee,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-white hover:bg-secondary",onClick:f=>{f.stopPropagation(),i()},children:a?p.jsx(Fw,{className:"h-4 w-4"}):p.jsx(Gw,{className:"h-4 w-4"})})]})]}),e.tags.length>0&&p.jsx("div",{className:"flex flex-wrap gap-2 mt-1",children:e.tags.map(f=>p.jsx("span",{className:"tag",children:f.name},f.id))})]}),a&&p.jsx("div",{className:"p-4 pt-0 border-t border-border/30 mt-2 animate-accordion-down",children:p.jsx("div",{className:"bg-black/20 p-3 rounded-lg whitespace-pre-wrap text-sm",children:e.text})})]})}const iL=({onAddPrompt:e,isFiltered:t})=>p.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4 border border-dashed border-secondary rounded-xl text-center animate-fade-in",children:[p.jsx("div",{className:"bg-secondary/50 p-4 rounded-full mb-4",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-purple-300",children:p.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}),p.jsx("h3",{className:"text-xl font-semibold mb-2",children:t?"No matching prompts found":"No prompts yet"}),p.jsx("p",{className:"text-muted-foreground mb-6 max-w-sm",children:t?"Try changing your search term or removing some tag filters.":"Start by adding your first AI prompt to organize them all in one place."}),!t&&p.jsxs(Ee,{onClick:e,className:"bg-purple-600 hover:bg-purple-700",children:[p.jsx(cm,{className:"mr-2 h-4 w-4"}),"Add your first prompt"]})]}),oL=({tags:e,onAddTag:t,onRemoveTag:n})=>{const[a,r]=m.useState(""),s=()=>{if(a.trim()){const o={id:Date.now().toString(),name:a.trim()};t(o),r("")}},i=o=>{o.key==="Enter"&&(o.preventDefault(),s())};return p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex gap-2",children:[p.jsx(gs,{type:"text",placeholder:"Add tags...",value:a,onChange:o=>r(o.target.value),onKeyDown:i,className:"bg-secondary/50 border-secondary"}),p.jsx(Ee,{type:"button",onClick:s,className:"px-2 bg-purple-700 hover:bg-purple-900",children:p.jsx(cm,{className:"w-4 h-4"})})]}),e.length>0&&p.jsx("div",{className:"flex flex-wrap gap-2",children:e.map(o=>p.jsxs("div",{className:"tag flex items-center gap-1",children:[p.jsx("span",{children:o.name}),p.jsx("button",{type:"button",onClick:()=>n(o.id),className:"text-purple-300 hover:text-white transition-colors",children:p.jsx(um,{className:"w-3 h-3"})})]},o.id))})]})},lL=({isOpen:e,onClose:t,onSave:n,editingPrompt:a})=>{const[r,s]=m.useState(""),[i,o]=m.useState([]),[l,c]=m.useState("task"),{toast:d}=No();m.useEffect(()=>{a?(s(a.text),o(a.tags?[...a.tags]:[]),c(a.type||"task")):(s(""),o([]),c("task"))},[a,e]);const u=x=>{i.some(y=>y.name.toLowerCase()===x.name.toLowerCase())||o([...i,x])},f=x=>{o(i.filter(y=>y.id!==x))},h=()=>{if(!r.trim()){d({title:"Error",description:"Prompt text cannot be empty",variant:"destructive"});return}const x={id:a!=null&&a.id&&a.id!==""?a.id:crypto.randomUUID(),text:r.trim(),tags:i||[],type:l,createdAt:a!=null&&a.createdAt&&a.id!==""?a.createdAt:new Date().toISOString()};console.log("Saving prompt:",x),n(x),d({title:a!=null&&a.id?"Prompt updated":"Prompt added",description:a!=null&&a.id?"Your prompt has been successfully updated":"Your prompt has been successfully added"}),t()};return p.jsx(PS,{open:e,onOpenChange:t,children:p.jsxs(Bm,{className:"sm:max-w-lg",children:[p.jsx($m,{children:p.jsx(Im,{children:a!=null&&a.id?"Edit Prompt":"Add New Prompt"})}),p.jsxs("div",{className:"space-y-6 py-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ge,{children:"Prompt Type"}),p.jsxs(sp,{value:l,onValueChange:x=>c(x),className:"flex space-x-4",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(In,{value:"system",id:"prompt-system"}),p.jsx(Ge,{htmlFor:"prompt-system",children:"System Prompt"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(In,{value:"task",id:"prompt-task"}),p.jsx(Ge,{htmlFor:"prompt-task",children:"Task Prompt"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(In,{value:"image",id:"prompt-image"}),p.jsx(Ge,{htmlFor:"prompt-image",children:"Image Prompt"})]}),p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(In,{value:"video",id:"prompt-video"}),p.jsx(Ge,{htmlFor:"prompt-video",children:"Video Prompt"})]})]})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ge,{htmlFor:"prompt",children:"Prompt Text"}),p.jsx(cu,{id:"prompt",value:r,onChange:x=>s(x.target.value),placeholder:"Enter your prompt text here...",className:"min-h-[150px] bg-secondary/50 border-secondary"})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(Ge,{children:"Tags"}),p.jsx(oL,{tags:i,onAddTag:u,onRemoveTag:f})]})]}),p.jsxs(Hm,{children:[p.jsx(Ee,{variant:"outline",onClick:t,children:"Cancel"}),p.jsx(Ee,{onClick:h,className:"bg-purple-500 hover:bg-purple-700",children:a!=null&&a.id?"Update Prompt":"Save Prompt"})]})]})})};var Y1="AlertDialog",[cL,VL]=rn(Y1,[bS]),aa=bS(),V1=e=>{const{__scopeAlertDialog:t,...n}=e,a=aa(t);return p.jsx(LS,{...a,...n,modal:!0})};V1.displayName=Y1;var uL="AlertDialogTrigger",dL=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=aa(n);return p.jsx(JD,{...r,...a,ref:t})});dL.displayName=uL;var fL="AlertDialogPortal",K1=e=>{const{__scopeAlertDialog:t,...n}=e,a=aa(t);return p.jsx(US,{...a,...n})};K1.displayName=fL;var hL="AlertDialogOverlay",X1=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=aa(n);return p.jsx(Mm,{...r,...a,ref:t})});X1.displayName=hL;var ys="AlertDialogContent",[mL,pL]=cL(ys),gL=gw("AlertDialogContent"),Q1=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:a,...r}=e,s=aa(n),i=m.useRef(null),o=Ae(t,i),l=m.useRef(null);return p.jsx(KD,{contentName:ys,titleName:Z1,docsSlug:"alert-dialog",children:p.jsx(mL,{scope:n,cancelRef:l,children:p.jsxs(Lm,{role:"alertdialog",...s,...r,ref:o,onOpenAutoFocus:ie(r.onOpenAutoFocus,c=>{var d;c.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[p.jsx(gL,{children:a}),p.jsx(yL,{contentRef:i})]})})})});Q1.displayName=ys;var Z1="AlertDialogTitle",J1=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=aa(n);return p.jsx(Um,{...r,...a,ref:t})});J1.displayName=Z1;var W1="AlertDialogDescription",eE=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=aa(n);return p.jsx(Pm,{...r,...a,ref:t})});eE.displayName=W1;var vL="AlertDialogAction",tE=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=aa(n);return p.jsx(zm,{...r,...a,ref:t})});tE.displayName=vL;var nE="AlertDialogCancel",aE=m.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,{cancelRef:r}=pL(nE,n),s=aa(n),i=Ae(t,r);return p.jsx(zm,{...s,...a,ref:i})});aE.displayName=nE;var yL=({contentRef:e})=>{const t=`\`${ys}\` requires a description for the component to be accessible for screen reader users.
|
|
260
|
+
|
|
261
|
+
You can add a description to the \`${ys}\` by passing a \`${W1}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
262
|
+
|
|
263
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${ys}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
264
|
+
|
|
265
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return m.useEffect(()=>{var a;document.getElementById((a=e.current)==null?void 0:a.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},bL=V1,wL=K1,rE=X1,sE=Q1,iE=tE,oE=aE,lE=J1,cE=eE;const xL=bL,SL=wL,uE=m.forwardRef(({className:e,...t},n)=>p.jsx(rE,{className:pe("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));uE.displayName=rE.displayName;const dE=m.forwardRef(({className:e,...t},n)=>p.jsxs(SL,{children:[p.jsx(uE,{}),p.jsx(sE,{ref:n,className:pe("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));dE.displayName=sE.displayName;const fE=({className:e,...t})=>p.jsx("div",{className:pe("flex flex-col space-y-2 text-center sm:text-left",e),...t});fE.displayName="AlertDialogHeader";const hE=({className:e,...t})=>p.jsx("div",{className:pe("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});hE.displayName="AlertDialogFooter";const mE=m.forwardRef(({className:e,...t},n)=>p.jsx(lE,{ref:n,className:pe("text-lg font-semibold",e),...t}));mE.displayName=lE.displayName;const pE=m.forwardRef(({className:e,...t},n)=>p.jsx(cE,{ref:n,className:pe("text-sm text-muted-foreground",e),...t}));pE.displayName=cE.displayName;const gE=m.forwardRef(({className:e,...t},n)=>p.jsx(iE,{ref:n,className:pe(km(),e),...t}));gE.displayName=iE.displayName;const vE=m.forwardRef(({className:e,...t},n)=>p.jsx(oE,{ref:n,className:pe(km({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));vE.displayName=oE.displayName;const iy=nh(),EL=()=>{const[e,t]=m.useState([]),[n,a]=m.useState([]),[r,s]=m.useState(""),[i,o]=m.useState([]),[l,c]=m.useState(!1),[d,u]=m.useState(null),[f,h]=m.useState(!1),[x,y]=m.useState(!1),{toast:w}=No(),[g,v]=m.useState(!1),[b,S]=m.useState(null),[E,_]=m.useState(!1),[A,T]=m.useState(()=>typeof window>"u"?1:window.matchMedia("(min-width: 1024px)").matches?3:window.matchMedia("(min-width: 768px)").matches?2:1);m.useEffect(()=>{const j=()=>{window.matchMedia("(min-width: 1024px)").matches?T(3):window.matchMedia("(min-width: 768px)").matches?T(2):T(1)};return window.addEventListener("resize",j),()=>window.removeEventListener("resize",j)},[]);const k=m.useCallback(async()=>{try{const j=await ah();return y(j),j}catch(j){return console.error("Error checking Supabase connection:",j),y(!1),!1}},[]);m.useEffect(()=>{(async()=>{const{data:G}=await iy.auth.getSession();h(!!G.session),k()})();const{data:{subscription:D}}=iy.auth.onAuthStateChange((G,J)=>{h(!!J),k()});return()=>{D.unsubscribe()}},[k]),m.useEffect(()=>{(async()=>{if(console.log("Loading prompts from Supabase, connected:",x),!x){console.log("Supabase not connected, skipping prompt load");return}try{const D=await T4();console.log(`Retrieved ${D.length} prompts from Supabase`),t(D);const G=D.flatMap(K=>K.tags),J=Array.from(new Map(G.map(K=>[K.id,K])).values());a(J)}catch(D){console.error("Error loading prompts from Supabase:",D),w({title:"Error loading prompts",description:"Could not load prompts from Supabase. Please check your connection.",variant:"destructive"})}})()},[x,w,k]);const M=()=>{u(null),c(!0)},H=j=>{u(j),c(!0)},F=async j=>{const D={id:j.id||crypto.randomUUID(),text:j.text,tags:j.tags||[],type:j.type||"task",createdAt:j.createdAt||new Date().toISOString()};if(!x){w({title:"Supabase not connected",description:"Please check your Supabase connection in settings",variant:"destructive"});return}try{await A4(D);const G=d!=null&&d.id?e.map(Oe=>Oe.id===D.id?D:Oe):[D,...e];t(G);const J=G.flatMap(Oe=>Oe.tags),K=Array.from(new Map(J.map(Oe=>[Oe.id,Oe])).values());a(K),w({title:"Prompt saved",description:"Your prompt has been saved to Supabase"})}catch(G){console.error("Error saving to Supabase:",G),w({title:"Error saving prompt",description:"Could not save prompt to Supabase. Please try again.",variant:"destructive"})}},X=async j=>{if(!x){w({title:"Supabase not connected",description:"Please check your Supabase connection in settings",variant:"destructive"});return}try{await C4(j);const D=e.filter(K=>K.id!==j);t(D);const G=D.flatMap(K=>K.tags),J=Array.from(new Map(G.map(K=>[K.id,K])).values());a(J),w({title:"Prompt deleted",description:"Your prompt has been successfully deleted"})}catch(D){console.error("Error deleting from Supabase:",D),w({title:"Error deleting prompt",description:"Could not delete prompt from Supabase. Please try again.",variant:"destructive"})}},L=j=>{E?X(j):(S(j),v(!0))},I=()=>{b&&X(b),S(null),v(!1)},C=()=>{S(null),v(!1)},P=j=>{_(j)},R=j=>{o(D=>D.includes(j)?D.filter(G=>G!==j):[...D,j])},z=(j,D)=>{const G={id:"",text:j,tags:[],type:D,createdAt:""};u(G),c(!0),console.log("Using AI prompt:",G)},q=e.filter(j=>{const D=r?j.text.toLowerCase().includes(r.toLowerCase()):!0,G=i.length>0?i.every(J=>j.tags.some(K=>K.id===J)):!0;return D&&G}),V=r!==""||i.length>0,Z=m.useMemo(()=>{const j=Array.from({length:A},()=>[]);return q.forEach((D,G)=>{j[G%A].push(D)}),j},[q,A]);return p.jsxs("div",{className:"container mx-auto py-8 px-4 min-h-screen max-w-5xl",children:[p.jsx(u3,{onAddPrompt:M}),p.jsxs("div",{className:"mb-8 space-y-6",children:[p.jsx(d3,{searchTerm:r,onSearchChange:s}),p.jsx(f3,{allTags:n,selectedTags:i,onToggleTag:R})]}),q.length>0?p.jsx("div",{className:"flex gap-4 items-start",children:Z.map((j,D)=>p.jsx("div",{className:"flex-1 flex flex-col gap-4",children:j.map(G=>p.jsx(sL,{prompt:G,onEdit:H,onDelete:L},G.id))},D))}):p.jsx(iL,{onAddPrompt:M,isFiltered:V}),p.jsx(lL,{isOpen:l,onClose:()=>c(!1),onSave:F,editingPrompt:d}),p.jsx(s3,{onUsePrompt:z}),p.jsx(xL,{open:g,onOpenChange:v,children:p.jsxs(dE,{children:[p.jsx(fE,{children:p.jsx(mE,{children:"Confirm Delete"})}),p.jsx(pE,{children:"Are you sure you want to delete this prompt?"}),p.jsxs("div",{className:"flex items-center space-x-2 mt-4",children:[p.jsx(Fm,{id:"suppress-delete-confirm",checked:E,onCheckedChange:j=>P(!!j)}),p.jsx(Ge,{htmlFor:"suppress-delete-confirm",children:"Don't show this again"})]}),p.jsxs(hE,{children:[p.jsx(vE,{onClick:C,children:"Cancel"}),p.jsx(gE,{onClick:I,children:"Delete"})]})]})})]})},_L=()=>{const e=Va();return m.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),p.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:p.jsxs("div",{className:"text-center",children:[p.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),p.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),p.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},TL=new dk,AL=()=>p.jsx(hk,{client:TL,children:p.jsxs(HO,{children:[p.jsx(UR,{}),p.jsx(m2,{}),p.jsx(zN,{children:p.jsxs(mN,{children:[p.jsx(Ff,{path:"/",element:p.jsx(EL,{})}),p.jsx(Ff,{path:"*",element:p.jsx(_L,{})})]})})]})});_A.createRoot(document.getElementById("root")).render(p.jsx(AL,{}));export{py as g};
|