summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <30861839+Baitinq@users.noreply.github.com>2024-06-28 18:31:36 +0000
committerBaitinq <30861839+Baitinq@users.noreply.github.com>2024-06-28 18:31:36 +0000
commit903d3a5ddeb455601211f2a5e5234d1ac3e028f8 (patch)
tree4dff2f6c4fcae02436f8cb8595f6e20ab7f31904
parentUpdates (diff)
downloadfs-tracer-frontend-903d3a5ddeb455601211f2a5e5234d1ac3e028f8.tar.gz
fs-tracer-frontend-903d3a5ddeb455601211f2a5e5234d1ac3e028f8.tar.bz2
fs-tracer-frontend-903d3a5ddeb455601211f2a5e5234d1ac3e028f8.zip
Deploying to gh-pages from @ Baitinq/fs-tracer-frontend@1b93f3a5317a433b466125eedfa8fdb177ac69f6 🚀
-rw-r--r--404.html40
-rw-r--r--assets/browser-DaXFb0Yh.js (renamed from assets/browser-BepKyIzM.js)2
-rw-r--r--assets/index-BWDOwrgR.js67
-rw-r--r--assets/index-CCYnKuN0.js84
-rw-r--r--assets/index-DvPzh0o3.css (renamed from assets/index-C1q9-kv2.css)2
-rw-r--r--index.html8
6 files changed, 91 insertions, 112 deletions
diff --git a/404.html b/404.html
deleted file mode 100644
index 47c4a1d..0000000
--- a/404.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="utf-8">
-    <title>Single Page Apps for GitHub Pages</title>
-    <script type="text/javascript">
-      // Single Page Apps for GitHub Pages
-      // MIT License
-      // https://github.com/rafgraph/spa-github-pages
-      // This script takes the current url and converts the path and query
-      // string into just a query string, and then redirects the browser
-      // to the new url with only a query string and hash fragment,
-      // e.g. https://www.foo.tld/one/two?a=b&c=d#qwe, becomes
-      // https://www.foo.tld/?/one/two&a=b~and~c=d#qwe
-      // Note: this 404.html file must be at least 512 bytes for it to work
-      // with Internet Explorer (it is currently > 512 bytes)
-
-      // If you're creating a Project Pages site and NOT using a custom domain,
-      // then set pathSegmentsToKeep to 1 (enterprise users may need to set it to > 1).
-      // This way the code will only replace the route part of the path, and not
-      // the real directory in which the app resides, for example:
-      // https://username.github.io/repo-name/one/two?a=b&c=d#qwe becomes
-      // https://username.github.io/repo-name/?/one/two&a=b~and~c=d#qwe
-      // Otherwise, leave pathSegmentsToKeep as 0.
-      var pathSegmentsToKeep = 1;
-
-      var l = window.location;
-      l.replace(
-        l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
-        l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' +
-        l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
-        (l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') +
-        l.hash
-      );
-
-    </script>
-  </head>
-  <body>
-  </body>
-</html>
diff --git a/assets/browser-BepKyIzM.js b/assets/browser-DaXFb0Yh.js
index 2f679f8..f06ba59 100644
--- a/assets/browser-BepKyIzM.js
+++ b/assets/browser-DaXFb0Yh.js
@@ -1 +1 @@
-import{g as a}from"./index-BWDOwrgR.js";function f(t,s){for(var o=0;o<s.length;o++){const e=s[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var c=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};const i=a(c),u=f({__proto__:null,default:i},[c]);export{u as b};
+import{g as a}from"./index-CCYnKuN0.js";function f(t,s){for(var o=0;o<s.length;o++){const e=s[o];if(typeof e!="string"&&!Array.isArray(e)){for(const r in e)if(r!=="default"&&!(r in t)){const n=Object.getOwnPropertyDescriptor(e,r);n&&Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var c=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")};const i=a(c),u=f({__proto__:null,default:i},[c]);export{u as b};
diff --git a/assets/index-BWDOwrgR.js b/assets/index-BWDOwrgR.js
deleted file mode 100644
index 25c6021..0000000
--- a/assets/index-BWDOwrgR.js
+++ /dev/null
@@ -1,67 +0,0 @@
-function vf(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function mf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lu={exports:{}},Ki={},Iu={exports:{}},$={};/**
- * @license React
- * react.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */var Nr=Symbol.for("react.element"),gf=Symbol.for("react.portal"),yf=Symbol.for("react.fragment"),wf=Symbol.for("react.strict_mode"),_f=Symbol.for("react.profiler"),Sf=Symbol.for("react.provider"),kf=Symbol.for("react.context"),Ef=Symbol.for("react.forward_ref"),Cf=Symbol.for("react.suspense"),xf=Symbol.for("react.memo"),Pf=Symbol.for("react.lazy"),Yl=Symbol.iterator;function Tf(e){return e===null||typeof e!="object"?null:(e=Yl&&e[Yl]||e["@@iterator"],typeof e=="function"?e:null)}var $u={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Nu=Object.assign,Au={};function Un(e,t,n){this.props=e,this.context=t,this.refs=Au,this.updater=n||$u}Un.prototype.isReactComponent={};Un.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Un.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Uu(){}Uu.prototype=Un.prototype;function qo(e,t,n){this.props=e,this.context=t,this.refs=Au,this.updater=n||$u}var Yo=qo.prototype=new Uu;Yo.constructor=qo;Nu(Yo,Un.prototype);Yo.isPureReactComponent=!0;var Xl=Array.isArray,Du=Object.prototype.hasOwnProperty,Xo={current:null},zu={key:!0,ref:!0,__self:!0,__source:!0};function Fu(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Du.call(t,r)&&!zu.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:Nr,type:e,key:s,ref:o,props:i,_owner:Xo.current}}function Of(e,t){return{$$typeof:Nr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Zo(e){return typeof e=="object"&&e!==null&&e.$$typeof===Nr}function Rf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Zl=/\/+/g;function vs(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Rf(""+e.key):t.toString(36)}function ai(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Nr:case gf:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+vs(o,0):r,Xl(i)?(n="",e!=null&&(n=e.replace(Zl,"$&/")+"/"),ai(i,t,n,"",function(u){return u})):i!=null&&(Zo(i)&&(i=Of(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Zl,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",Xl(e))for(var l=0;l<e.length;l++){s=e[l];var a=r+vs(s,l);o+=ai(s,t,n,a,i)}else if(a=Tf(e),typeof a=="function")for(e=a.call(e),l=0;!(s=e.next()).done;)s=s.value,a=r+vs(s,l++),o+=ai(s,t,n,a,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Br(e,t,n){if(e==null)return e;var r=[],i=0;return ai(e,r,"","",function(s){return t.call(n,s,i++)}),r}function jf(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 pe={current:null},ui={transition:null},Lf={ReactCurrentDispatcher:pe,ReactCurrentBatchConfig:ui,ReactCurrentOwner:Xo};function Mu(){throw Error("act(...) is not supported in production builds of React.")}$.Children={map:Br,forEach:function(e,t,n){Br(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Br(e,function(){t++}),t},toArray:function(e){return Br(e,function(t){return t})||[]},only:function(e){if(!Zo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};$.Component=Un;$.Fragment=yf;$.Profiler=_f;$.PureComponent=qo;$.StrictMode=wf;$.Suspense=Cf;$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Lf;$.act=Mu;$.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Nu({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Xo.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Du.call(t,a)&&!zu.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Nr,type:e.type,key:i,ref:s,props:r,_owner:o}};$.createContext=function(e){return e={$$typeof:kf,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Sf,_context:e},e.Consumer=e};$.createElement=Fu;$.createFactory=function(e){var t=Fu.bind(null,e);return t.type=e,t};$.createRef=function(){return{current:null}};$.forwardRef=function(e){return{$$typeof:Ef,render:e}};$.isValidElement=Zo;$.lazy=function(e){return{$$typeof:Pf,_payload:{_status:-1,_result:e},_init:jf}};$.memo=function(e,t){return{$$typeof:xf,type:e,compare:t===void 0?null:t}};$.startTransition=function(e){var t=ui.transition;ui.transition={};try{e()}finally{ui.transition=t}};$.unstable_act=Mu;$.useCallback=function(e,t){return pe.current.useCallback(e,t)};$.useContext=function(e){return pe.current.useContext(e)};$.useDebugValue=function(){};$.useDeferredValue=function(e){return pe.current.useDeferredValue(e)};$.useEffect=function(e,t){return pe.current.useEffect(e,t)};$.useId=function(){return pe.current.useId()};$.useImperativeHandle=function(e,t,n){return pe.current.useImperativeHandle(e,t,n)};$.useInsertionEffect=function(e,t){return pe.current.useInsertionEffect(e,t)};$.useLayoutEffect=function(e,t){return pe.current.useLayoutEffect(e,t)};$.useMemo=function(e,t){return pe.current.useMemo(e,t)};$.useReducer=function(e,t,n){return pe.current.useReducer(e,t,n)};$.useRef=function(e){return pe.current.useRef(e)};$.useState=function(e){return pe.current.useState(e)};$.useSyncExternalStore=function(e,t,n){return pe.current.useSyncExternalStore(e,t,n)};$.useTransition=function(){return pe.current.useTransition()};$.version="18.3.1";Iu.exports=$;var E=Iu.exports;const Gi=mf(E),If=vf({__proto__:null,default:Gi},[E]);/**
- * @license React
- * react-jsx-runtime.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */var $f=E,Nf=Symbol.for("react.element"),Af=Symbol.for("react.fragment"),Uf=Object.prototype.hasOwnProperty,Df=$f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zf={key:!0,ref:!0,__self:!0,__source:!0};function bu(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Uf.call(t,r)&&!zf.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Nf,type:e,key:s,ref:o,props:i,_owner:Df.current}}Ki.Fragment=Af;Ki.jsx=bu;Ki.jsxs=bu;Lu.exports=Ki;var z=Lu.exports,Qs={},Bu={exports:{}},Pe={},Vu={exports:{}},Hu={};/**
- * @license React
- * scheduler.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */(function(e){function t(x,R){var L=x.length;x.push(R);e:for(;0<L;){var Q=L-1>>>1,ee=x[Q];if(0<i(ee,R))x[Q]=R,x[L]=ee,L=Q;else break e}}function n(x){return x.length===0?null:x[0]}function r(x){if(x.length===0)return null;var R=x[0],L=x.pop();if(L!==R){x[0]=L;e:for(var Q=0,ee=x.length,Mr=ee>>>1;Q<Mr;){var Nt=2*(Q+1)-1,ps=x[Nt],At=Nt+1,br=x[At];if(0>i(ps,L))At<ee&&0>i(br,ps)?(x[Q]=br,x[At]=L,Q=At):(x[Q]=ps,x[Nt]=L,Q=Nt);else if(At<ee&&0>i(br,L))x[Q]=br,x[At]=L,Q=At;else break e}}return R}function i(x,R){var L=x.sortIndex-R.sortIndex;return L!==0?L:x.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var a=[],u=[],c=1,d=null,h=3,m=!1,g=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(x){for(var R=n(u);R!==null;){if(R.callback===null)r(u);else if(R.startTime<=x)r(u),R.sortIndex=R.expirationTime,t(a,R);else break;R=n(u)}}function w(x){if(y=!1,v(x),!g)if(n(a)!==null)g=!0,Ze(k);else{var R=n(u);R!==null&&Bn(w,R.startTime-x)}}function k(x,R){g=!1,y&&(y=!1,p(O),O=-1),m=!0;var L=h;try{for(v(R),d=n(a);d!==null&&(!(d.expirationTime>R)||x&&!de());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,h=d.priorityLevel;var ee=Q(d.expirationTime<=R);R=e.unstable_now(),typeof ee=="function"?d.callback=ee:d===n(a)&&r(a),v(R)}else r(a);d=n(a)}if(d!==null)var Mr=!0;else{var Nt=n(u);Nt!==null&&Bn(w,Nt.startTime-R),Mr=!1}return Mr}finally{d=null,h=L,m=!1}}var P=!1,T=null,O=-1,M=5,j=-1;function de(){return!(e.unstable_now()-j<M)}function qe(){if(T!==null){var x=e.unstable_now();j=x;var R=!0;try{R=T(!0,x)}finally{R?Ye():(P=!1,T=null)}}else P=!1}var Ye;if(typeof f=="function")Ye=function(){f(qe)};else if(typeof MessageChannel<"u"){var Oe=new MessageChannel,Xe=Oe.port2;Oe.port1.onmessage=qe,Ye=function(){Xe.postMessage(null)}}else Ye=function(){_(qe,0)};function Ze(x){T=x,P||(P=!0,Ye())}function Bn(x,R){O=_(function(){x(e.unstable_now())},R)}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(x){x.callback=null},e.unstable_continueExecution=function(){g||m||(g=!0,Ze(k))},e.unstable_forceFrameRate=function(x){0>x||125<x?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<x?Math.floor(1e3/x):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(x){switch(h){case 1:case 2:case 3:var R=3;break;default:R=h}var L=h;h=R;try{return x()}finally{h=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(x,R){switch(x){case 1:case 2:case 3:case 4:case 5:break;default:x=3}var L=h;h=x;try{return R()}finally{h=L}},e.unstable_scheduleCallback=function(x,R,L){var Q=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?Q+L:Q):L=Q,x){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=L+ee,x={id:c++,callback:R,priorityLevel:x,startTime:L,expirationTime:ee,sortIndex:-1},L>Q?(x.sortIndex=L,t(u,x),n(a)===null&&x===n(u)&&(y?(p(O),O=-1):y=!0,Bn(w,L-Q))):(x.sortIndex=ee,t(a,x),g||m||(g=!0,Ze(k))),x},e.unstable_shouldYield=de,e.unstable_wrapCallback=function(x){var R=h;return function(){var L=h;h=R;try{return x.apply(this,arguments)}finally{h=L}}}})(Hu);Vu.exports=Hu;var Ff=Vu.exports;/**
- * @license React
- * react-dom.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */var Mf=E,xe=Ff;function S(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var Wu=new Set,pr={};function Zt(e,t){Tn(e,t),Tn(e+"Capture",t)}function Tn(e,t){for(pr[e]=t,e=0;e<t.length;e++)Wu.add(t[e])}var st=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Js=Object.prototype.hasOwnProperty,bf=/^[: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]*$/,ea={},ta={};function Bf(e){return Js.call(ta,e)?!0:Js.call(ea,e)?!1:bf.test(e)?ta[e]=!0:(ea[e]=!0,!1)}function Vf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Hf(e,t,n,r){if(t===null||typeof t>"u"||Vf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ve(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var se={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){se[e]=new ve(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];se[t]=new ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){se[e]=new ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){se[e]=new ve(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){se[e]=new ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){se[e]=new ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){se[e]=new ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){se[e]=new ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){se[e]=new ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var el=/[\-:]([a-z])/g;function tl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(el,tl);se[t]=new ve(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(el,tl);se[t]=new ve(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(el,tl);se[t]=new ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){se[e]=new ve(e,1,!1,e.toLowerCase(),null,!1,!1)});se.xlinkHref=new ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){se[e]=new ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function nl(e,t,n,r){var i=se.hasOwnProperty(t)?se[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Hf(t,n,i,r)&&(n=null),r||i===null?Bf(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var ut=Mf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vr=Symbol.for("react.element"),an=Symbol.for("react.portal"),un=Symbol.for("react.fragment"),rl=Symbol.for("react.strict_mode"),qs=Symbol.for("react.profiler"),Ku=Symbol.for("react.provider"),Gu=Symbol.for("react.context"),il=Symbol.for("react.forward_ref"),Ys=Symbol.for("react.suspense"),Xs=Symbol.for("react.suspense_list"),sl=Symbol.for("react.memo"),ft=Symbol.for("react.lazy"),Qu=Symbol.for("react.offscreen"),na=Symbol.iterator;function Vn(e){return e===null||typeof e!="object"?null:(e=na&&e[na]||e["@@iterator"],typeof e=="function"?e:null)}var K=Object.assign,ms;function Xn(e){if(ms===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ms=t&&t[1]||""}return`
-`+ms+e}var gs=!1;function ys(e,t){if(!e||gs)return"";gs=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
-`),s=r.stack.split(`
-`),o=i.length-1,l=s.length-1;1<=o&&0<=l&&i[o]!==s[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==s[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==s[l]){var a=`
-`+i[o].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=o&&0<=l);break}}}finally{gs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Xn(e):""}function Wf(e){switch(e.tag){case 5:return Xn(e.type);case 16:return Xn("Lazy");case 13:return Xn("Suspense");case 19:return Xn("SuspenseList");case 0:case 2:case 15:return e=ys(e.type,!1),e;case 11:return e=ys(e.type.render,!1),e;case 1:return e=ys(e.type,!0),e;default:return""}}function Zs(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case un:return"Fragment";case an:return"Portal";case qs:return"Profiler";case rl:return"StrictMode";case Ys:return"Suspense";case Xs:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gu:return(e.displayName||"Context")+".Consumer";case Ku:return(e._context.displayName||"Context")+".Provider";case il:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case sl:return t=e.displayName||null,t!==null?t:Zs(e.type)||"Memo";case ft:t=e._payload,e=e._init;try{return Zs(e(t))}catch{}}return null}function Kf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Zs(t);case 8:return t===rl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Rt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ju(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Gf(e){var t=Ju(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Hr(e){e._valueTracker||(e._valueTracker=Gf(e))}function qu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ju(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Si(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function eo(e,t){var n=t.checked;return K({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ra(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Rt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Yu(e,t){t=t.checked,t!=null&&nl(e,"checked",t,!1)}function to(e,t){Yu(e,t);var n=Rt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?no(e,t.type,n):t.hasOwnProperty("defaultValue")&&no(e,t.type,Rt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ia(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function no(e,t,n){(t!=="number"||Si(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Zn=Array.isArray;function _n(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Rt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ro(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(S(91));return K({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function sa(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(S(92));if(Zn(n)){if(1<n.length)throw Error(S(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Rt(n)}}function Xu(e,t){var n=Rt(t.value),r=Rt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function oa(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Zu(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function io(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Zu(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Wr,ec=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Wr=Wr||document.createElement("div"),Wr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Wr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function vr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qf=["Webkit","ms","Moz","O"];Object.keys(rr).forEach(function(e){Qf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rr[t]=rr[e]})});function tc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rr.hasOwnProperty(e)&&rr[e]?(""+t).trim():t+"px"}function nc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=tc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Jf=K({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function so(e,t){if(t){if(Jf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(S(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(S(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(S(61))}if(t.style!=null&&typeof t.style!="object")throw Error(S(62))}}function oo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lo=null;function ol(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ao=null,Sn=null,kn=null;function la(e){if(e=Dr(e)){if(typeof ao!="function")throw Error(S(280));var t=e.stateNode;t&&(t=Xi(t),ao(e.stateNode,e.type,t))}}function rc(e){Sn?kn?kn.push(e):kn=[e]:Sn=e}function ic(){if(Sn){var e=Sn,t=kn;if(kn=Sn=null,la(e),t)for(e=0;e<t.length;e++)la(t[e])}}function sc(e,t){return e(t)}function oc(){}var ws=!1;function lc(e,t,n){if(ws)return e(t,n);ws=!0;try{return sc(e,t,n)}finally{ws=!1,(Sn!==null||kn!==null)&&(oc(),ic())}}function mr(e,t){var n=e.stateNode;if(n===null)return null;var r=Xi(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(S(231,t,typeof n));return n}var uo=!1;if(st)try{var Hn={};Object.defineProperty(Hn,"passive",{get:function(){uo=!0}}),window.addEventListener("test",Hn,Hn),window.removeEventListener("test",Hn,Hn)}catch{uo=!1}function qf(e,t,n,r,i,s,o,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ir=!1,ki=null,Ei=!1,co=null,Yf={onError:function(e){ir=!0,ki=e}};function Xf(e,t,n,r,i,s,o,l,a){ir=!1,ki=null,qf.apply(Yf,arguments)}function Zf(e,t,n,r,i,s,o,l,a){if(Xf.apply(this,arguments),ir){if(ir){var u=ki;ir=!1,ki=null}else throw Error(S(198));Ei||(Ei=!0,co=u)}}function en(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 ac(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 aa(e){if(en(e)!==e)throw Error(S(188))}function eh(e){var t=e.alternate;if(!t){if(t=en(e),t===null)throw Error(S(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return aa(i),e;if(s===r)return aa(i),t;s=s.sibling}throw Error(S(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o)throw Error(S(189))}}if(n.alternate!==r)throw Error(S(190))}if(n.tag!==3)throw Error(S(188));return n.stateNode.current===n?e:t}function uc(e){return e=eh(e),e!==null?cc(e):null}function cc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=cc(e);if(t!==null)return t;e=e.sibling}return null}var dc=xe.unstable_scheduleCallback,ua=xe.unstable_cancelCallback,th=xe.unstable_shouldYield,nh=xe.unstable_requestPaint,J=xe.unstable_now,rh=xe.unstable_getCurrentPriorityLevel,ll=xe.unstable_ImmediatePriority,fc=xe.unstable_UserBlockingPriority,Ci=xe.unstable_NormalPriority,ih=xe.unstable_LowPriority,hc=xe.unstable_IdlePriority,Qi=null,Qe=null;function sh(e){if(Qe&&typeof Qe.onCommitFiberRoot=="function")try{Qe.onCommitFiberRoot(Qi,e,void 0,(e.current.flags&128)===128)}catch{}}var Be=Math.clz32?Math.clz32:ah,oh=Math.log,lh=Math.LN2;function ah(e){return e>>>=0,e===0?32:31-(oh(e)/lh|0)|0}var Kr=64,Gr=4194304;function er(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function xi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=er(l):(s&=o,s!==0&&(r=er(s)))}else o=n&~i,o!==0?r=er(o):s!==0&&(r=er(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Be(t),i=1<<n,r|=e[n],t&=~i;return r}function uh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ch(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-Be(s),l=1<<o,a=i[o];a===-1?(!(l&n)||l&r)&&(i[o]=uh(l,t)):a<=t&&(e.expiredLanes|=l),s&=~l}}function fo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function pc(){var e=Kr;return Kr<<=1,!(Kr&4194240)&&(Kr=64),e}function _s(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ar(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Be(t),e[t]=n}function dh(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Be(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function al(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Be(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var U=0;function vc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var mc,ul,gc,yc,wc,ho=!1,Qr=[],St=null,kt=null,Et=null,gr=new Map,yr=new Map,vt=[],fh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ca(e,t){switch(e){case"focusin":case"focusout":St=null;break;case"dragenter":case"dragleave":kt=null;break;case"mouseover":case"mouseout":Et=null;break;case"pointerover":case"pointerout":gr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yr.delete(t.pointerId)}}function Wn(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Dr(t),t!==null&&ul(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function hh(e,t,n,r,i){switch(t){case"focusin":return St=Wn(St,e,t,n,r,i),!0;case"dragenter":return kt=Wn(kt,e,t,n,r,i),!0;case"mouseover":return Et=Wn(Et,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return gr.set(s,Wn(gr.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,yr.set(s,Wn(yr.get(s)||null,e,t,n,r,i)),!0}return!1}function _c(e){var t=Bt(e.target);if(t!==null){var n=en(t);if(n!==null){if(t=n.tag,t===13){if(t=ac(n),t!==null){e.blockedOn=t,wc(e.priority,function(){gc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ci(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=po(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);lo=r,n.target.dispatchEvent(r),lo=null}else return t=Dr(n),t!==null&&ul(t),e.blockedOn=n,!1;t.shift()}return!0}function da(e,t,n){ci(e)&&n.delete(t)}function ph(){ho=!1,St!==null&&ci(St)&&(St=null),kt!==null&&ci(kt)&&(kt=null),Et!==null&&ci(Et)&&(Et=null),gr.forEach(da),yr.forEach(da)}function Kn(e,t){e.blockedOn===t&&(e.blockedOn=null,ho||(ho=!0,xe.unstable_scheduleCallback(xe.unstable_NormalPriority,ph)))}function wr(e){function t(i){return Kn(i,e)}if(0<Qr.length){Kn(Qr[0],e);for(var n=1;n<Qr.length;n++){var r=Qr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(St!==null&&Kn(St,e),kt!==null&&Kn(kt,e),Et!==null&&Kn(Et,e),gr.forEach(t),yr.forEach(t),n=0;n<vt.length;n++)r=vt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<vt.length&&(n=vt[0],n.blockedOn===null);)_c(n),n.blockedOn===null&&vt.shift()}var En=ut.ReactCurrentBatchConfig,Pi=!0;function vh(e,t,n,r){var i=U,s=En.transition;En.transition=null;try{U=1,cl(e,t,n,r)}finally{U=i,En.transition=s}}function mh(e,t,n,r){var i=U,s=En.transition;En.transition=null;try{U=4,cl(e,t,n,r)}finally{U=i,En.transition=s}}function cl(e,t,n,r){if(Pi){var i=po(e,t,n,r);if(i===null)js(e,t,r,Ti,n),ca(e,r);else if(hh(i,e,t,n,r))r.stopPropagation();else if(ca(e,r),t&4&&-1<fh.indexOf(e)){for(;i!==null;){var s=Dr(i);if(s!==null&&mc(s),s=po(e,t,n,r),s===null&&js(e,t,r,Ti,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else js(e,t,r,null,n)}}var Ti=null;function po(e,t,n,r){if(Ti=null,e=ol(r),e=Bt(e),e!==null)if(t=en(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ac(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 Ti=e,null}function Sc(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(rh()){case ll:return 1;case fc:return 4;case Ci:case ih:return 16;case hc:return 536870912;default:return 16}default:return 16}}var yt=null,dl=null,di=null;function kc(){if(di)return di;var e,t=dl,n=t.length,r,i="value"in yt?yt.value:yt.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return di=i.slice(e,1<r?1-r:void 0)}function fi(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 Jr(){return!0}function fa(){return!1}function Te(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(s):s[l]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Jr:fa,this.isPropagationStopped=fa,this}return K(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=Jr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Jr)},persist:function(){},isPersistent:Jr}),t}var Dn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fl=Te(Dn),Ur=K({},Dn,{view:0,detail:0}),gh=Te(Ur),Ss,ks,Gn,Ji=K({},Ur,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hl,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!==Gn&&(Gn&&e.type==="mousemove"?(Ss=e.screenX-Gn.screenX,ks=e.screenY-Gn.screenY):ks=Ss=0,Gn=e),Ss)},movementY:function(e){return"movementY"in e?e.movementY:ks}}),ha=Te(Ji),yh=K({},Ji,{dataTransfer:0}),wh=Te(yh),_h=K({},Ur,{relatedTarget:0}),Es=Te(_h),Sh=K({},Dn,{animationName:0,elapsedTime:0,pseudoElement:0}),kh=Te(Sh),Eh=K({},Dn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ch=Te(Eh),xh=K({},Dn,{data:0}),pa=Te(xh),Ph={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Th={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"},Oh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Oh[e])?!!t[e]:!1}function hl(){return Rh}var jh=K({},Ur,{key:function(e){if(e.key){var t=Ph[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Th[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hl,charCode:function(e){return e.type==="keypress"?fi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lh=Te(jh),Ih=K({},Ji,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),va=Te(Ih),$h=K({},Ur,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hl}),Nh=Te($h),Ah=K({},Dn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Uh=Te(Ah),Dh=K({},Ji,{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}),zh=Te(Dh),Fh=[9,13,27,32],pl=st&&"CompositionEvent"in window,sr=null;st&&"documentMode"in document&&(sr=document.documentMode);var Mh=st&&"TextEvent"in window&&!sr,Ec=st&&(!pl||sr&&8<sr&&11>=sr),ma=" ",ga=!1;function Cc(e,t){switch(e){case"keyup":return Fh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var cn=!1;function bh(e,t){switch(e){case"compositionend":return xc(t);case"keypress":return t.which!==32?null:(ga=!0,ma);case"textInput":return e=t.data,e===ma&&ga?null:e;default:return null}}function Bh(e,t){if(cn)return e==="compositionend"||!pl&&Cc(e,t)?(e=kc(),di=dl=yt=null,cn=!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 Ec&&t.locale!=="ko"?null:t.data;default:return null}}var Vh={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 ya(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Vh[e.type]:t==="textarea"}function Pc(e,t,n,r){rc(r),t=Oi(t,"onChange"),0<t.length&&(n=new fl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var or=null,_r=null;function Hh(e){Dc(e,0)}function qi(e){var t=hn(e);if(qu(t))return e}function Wh(e,t){if(e==="change")return t}var Tc=!1;if(st){var Cs;if(st){var xs="oninput"in document;if(!xs){var wa=document.createElement("div");wa.setAttribute("oninput","return;"),xs=typeof wa.oninput=="function"}Cs=xs}else Cs=!1;Tc=Cs&&(!document.documentMode||9<document.documentMode)}function _a(){or&&(or.detachEvent("onpropertychange",Oc),_r=or=null)}function Oc(e){if(e.propertyName==="value"&&qi(_r)){var t=[];Pc(t,_r,e,ol(e)),lc(Hh,t)}}function Kh(e,t,n){e==="focusin"?(_a(),or=t,_r=n,or.attachEvent("onpropertychange",Oc)):e==="focusout"&&_a()}function Gh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qi(_r)}function Qh(e,t){if(e==="click")return qi(t)}function Jh(e,t){if(e==="input"||e==="change")return qi(t)}function qh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var He=typeof Object.is=="function"?Object.is:qh;function Sr(e,t){if(He(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Js.call(t,i)||!He(e[i],t[i]))return!1}return!0}function Sa(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ka(e,t){var n=Sa(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Sa(n)}}function Rc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jc(){for(var e=window,t=Si();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Si(e.document)}return t}function vl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yh(e){var t=jc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Rc(n.ownerDocument.documentElement,n)){if(r!==null&&vl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=ka(n,s);var o=ka(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Xh=st&&"documentMode"in document&&11>=document.documentMode,dn=null,vo=null,lr=null,mo=!1;function Ea(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mo||dn==null||dn!==Si(r)||(r=dn,"selectionStart"in r&&vl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),lr&&Sr(lr,r)||(lr=r,r=Oi(vo,"onSelect"),0<r.length&&(t=new fl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=dn)))}function qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fn={animationend:qr("Animation","AnimationEnd"),animationiteration:qr("Animation","AnimationIteration"),animationstart:qr("Animation","AnimationStart"),transitionend:qr("Transition","TransitionEnd")},Ps={},Lc={};st&&(Lc=document.createElement("div").style,"AnimationEvent"in window||(delete fn.animationend.animation,delete fn.animationiteration.animation,delete fn.animationstart.animation),"TransitionEvent"in window||delete fn.transitionend.transition);function Yi(e){if(Ps[e])return Ps[e];if(!fn[e])return e;var t=fn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lc)return Ps[e]=t[n];return e}var Ic=Yi("animationend"),$c=Yi("animationiteration"),Nc=Yi("animationstart"),Ac=Yi("transitionend"),Uc=new Map,Ca="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Lt(e,t){Uc.set(e,t),Zt(t,[e])}for(var Ts=0;Ts<Ca.length;Ts++){var Os=Ca[Ts],Zh=Os.toLowerCase(),ep=Os[0].toUpperCase()+Os.slice(1);Lt(Zh,"on"+ep)}Lt(Ic,"onAnimationEnd");Lt($c,"onAnimationIteration");Lt(Nc,"onAnimationStart");Lt("dblclick","onDoubleClick");Lt("focusin","onFocus");Lt("focusout","onBlur");Lt(Ac,"onTransitionEnd");Tn("onMouseEnter",["mouseout","mouseover"]);Tn("onMouseLeave",["mouseout","mouseover"]);Tn("onPointerEnter",["pointerout","pointerover"]);Tn("onPointerLeave",["pointerout","pointerover"]);Zt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Zt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Zt("onBeforeInput",["compositionend","keypress","textInput","paste"]);Zt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Zt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Zt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tr="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(" "),tp=new Set("cancel close invalid load scroll toggle".split(" ").concat(tr));function xa(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Zf(r,t,void 0,e),e.currentTarget=null}function Dc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==s&&i.isPropagationStopped())break e;xa(i,l,u),s=a}else for(o=0;o<r.length;o++){if(l=r[o],a=l.instance,u=l.currentTarget,l=l.listener,a!==s&&i.isPropagationStopped())break e;xa(i,l,u),s=a}}}if(Ei)throw e=co,Ei=!1,co=null,e}function b(e,t){var n=t[So];n===void 0&&(n=t[So]=new Set);var r=e+"__bubble";n.has(r)||(zc(t,e,2,!1),n.add(r))}function Rs(e,t,n){var r=0;t&&(r|=4),zc(n,e,r,t)}var Yr="_reactListening"+Math.random().toString(36).slice(2);function kr(e){if(!e[Yr]){e[Yr]=!0,Wu.forEach(function(n){n!=="selectionchange"&&(tp.has(n)||Rs(n,!1,e),Rs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Yr]||(t[Yr]=!0,Rs("selectionchange",!1,t))}}function zc(e,t,n,r){switch(Sc(t)){case 1:var i=vh;break;case 4:i=mh;break;default:i=cl}n=i.bind(null,t,n,e),i=void 0,!uo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function js(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var a=o.tag;if((a===3||a===4)&&(a=o.stateNode.containerInfo,a===i||a.nodeType===8&&a.parentNode===i))return;o=o.return}for(;l!==null;){if(o=Bt(l),o===null)return;if(a=o.tag,a===5||a===6){r=s=o;continue e}l=l.parentNode}}r=r.return}lc(function(){var u=s,c=ol(n),d=[];e:{var h=Uc.get(e);if(h!==void 0){var m=fl,g=e;switch(e){case"keypress":if(fi(n)===0)break e;case"keydown":case"keyup":m=Lh;break;case"focusin":g="focus",m=Es;break;case"focusout":g="blur",m=Es;break;case"beforeblur":case"afterblur":m=Es;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":m=ha;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=wh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=Nh;break;case Ic:case $c:case Nc:m=kh;break;case Ac:m=Uh;break;case"scroll":m=gh;break;case"wheel":m=zh;break;case"copy":case"cut":case"paste":m=Ch;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=va}var y=(t&4)!==0,_=!y&&e==="scroll",p=y?h!==null?h+"Capture":null:h;y=[];for(var f=u,v;f!==null;){v=f;var w=v.stateNode;if(v.tag===5&&w!==null&&(v=w,p!==null&&(w=mr(f,p),w!=null&&y.push(Er(f,w,v)))),_)break;f=f.return}0<y.length&&(h=new m(h,g,null,n,c),d.push({event:h,listeners:y}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",h&&n!==lo&&(g=n.relatedTarget||n.fromElement)&&(Bt(g)||g[ot]))break e;if((m||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,m?(g=n.relatedTarget||n.toElement,m=u,g=g?Bt(g):null,g!==null&&(_=en(g),g!==_||g.tag!==5&&g.tag!==6)&&(g=null)):(m=null,g=u),m!==g)){if(y=ha,w="onMouseLeave",p="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(y=va,w="onPointerLeave",p="onPointerEnter",f="pointer"),_=m==null?h:hn(m),v=g==null?h:hn(g),h=new y(w,f+"leave",m,n,c),h.target=_,h.relatedTarget=v,w=null,Bt(c)===u&&(y=new y(p,f+"enter",g,n,c),y.target=v,y.relatedTarget=_,w=y),_=w,m&&g)t:{for(y=m,p=g,f=0,v=y;v;v=nn(v))f++;for(v=0,w=p;w;w=nn(w))v++;for(;0<f-v;)y=nn(y),f--;for(;0<v-f;)p=nn(p),v--;for(;f--;){if(y===p||p!==null&&y===p.alternate)break t;y=nn(y),p=nn(p)}y=null}else y=null;m!==null&&Pa(d,h,m,y,!1),g!==null&&_!==null&&Pa(d,_,g,y,!0)}}e:{if(h=u?hn(u):window,m=h.nodeName&&h.nodeName.toLowerCase(),m==="select"||m==="input"&&h.type==="file")var k=Wh;else if(ya(h))if(Tc)k=Jh;else{k=Gh;var P=Kh}else(m=h.nodeName)&&m.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=Qh);if(k&&(k=k(e,u))){Pc(d,k,n,c);break e}P&&P(e,h,u),e==="focusout"&&(P=h._wrapperState)&&P.controlled&&h.type==="number"&&no(h,"number",h.value)}switch(P=u?hn(u):window,e){case"focusin":(ya(P)||P.contentEditable==="true")&&(dn=P,vo=u,lr=null);break;case"focusout":lr=vo=dn=null;break;case"mousedown":mo=!0;break;case"contextmenu":case"mouseup":case"dragend":mo=!1,Ea(d,n,c);break;case"selectionchange":if(Xh)break;case"keydown":case"keyup":Ea(d,n,c)}var T;if(pl)e:{switch(e){case"compositionstart":var O="onCompositionStart";break e;case"compositionend":O="onCompositionEnd";break e;case"compositionupdate":O="onCompositionUpdate";break e}O=void 0}else cn?Cc(e,n)&&(O="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(O="onCompositionStart");O&&(Ec&&n.locale!=="ko"&&(cn||O!=="onCompositionStart"?O==="onCompositionEnd"&&cn&&(T=kc()):(yt=c,dl="value"in yt?yt.value:yt.textContent,cn=!0)),P=Oi(u,O),0<P.length&&(O=new pa(O,e,null,n,c),d.push({event:O,listeners:P}),T?O.data=T:(T=xc(n),T!==null&&(O.data=T)))),(T=Mh?bh(e,n):Bh(e,n))&&(u=Oi(u,"onBeforeInput"),0<u.length&&(c=new pa("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=T))}Dc(d,t)})}function Er(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Oi(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=mr(e,n),s!=null&&r.unshift(Er(e,s,i)),s=mr(e,t),s!=null&&r.push(Er(e,s,i))),e=e.return}return r}function nn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Pa(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,i?(a=mr(n,s),a!=null&&o.unshift(Er(n,a,l))):i||(a=mr(n,s),a!=null&&o.push(Er(n,a,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var np=/\r\n?/g,rp=/\u0000|\uFFFD/g;function Ta(e){return(typeof e=="string"?e:""+e).replace(np,`
-`).replace(rp,"")}function Xr(e,t,n){if(t=Ta(t),Ta(e)!==t&&n)throw Error(S(425))}function Ri(){}var go=null,yo=null;function wo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _o=typeof setTimeout=="function"?setTimeout:void 0,ip=typeof clearTimeout=="function"?clearTimeout:void 0,Oa=typeof Promise=="function"?Promise:void 0,sp=typeof queueMicrotask=="function"?queueMicrotask:typeof Oa<"u"?function(e){return Oa.resolve(null).then(e).catch(op)}:_o;function op(e){setTimeout(function(){throw e})}function Ls(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),wr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);wr(t)}function Ct(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Ra(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}var zn=Math.random().toString(36).slice(2),Ge="__reactFiber$"+zn,Cr="__reactProps$"+zn,ot="__reactContainer$"+zn,So="__reactEvents$"+zn,lp="__reactListeners$"+zn,ap="__reactHandles$"+zn;function Bt(e){var t=e[Ge];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[Ge]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ra(e);e!==null;){if(n=e[Ge])return n;e=Ra(e)}return t}e=n,n=e.parentNode}return null}function Dr(e){return e=e[Ge]||e[ot],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function hn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(S(33))}function Xi(e){return e[Cr]||null}var ko=[],pn=-1;function It(e){return{current:e}}function B(e){0>pn||(e.current=ko[pn],ko[pn]=null,pn--)}function F(e,t){pn++,ko[pn]=e.current,e.current=t}var jt={},ce=It(jt),ye=It(!1),Qt=jt;function On(e,t){var n=e.type.contextTypes;if(!n)return jt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function we(e){return e=e.childContextTypes,e!=null}function ji(){B(ye),B(ce)}function ja(e,t,n){if(ce.current!==jt)throw Error(S(168));F(ce,t),F(ye,n)}function Fc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(S(108,Kf(e)||"Unknown",i));return K({},n,r)}function Li(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jt,Qt=ce.current,F(ce,e),F(ye,ye.current),!0}function La(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=Fc(e,t,Qt),r.__reactInternalMemoizedMergedChildContext=e,B(ye),B(ce),F(ce,e)):B(ye),F(ye,n)}var tt=null,Zi=!1,Is=!1;function Mc(e){tt===null?tt=[e]:tt.push(e)}function up(e){Zi=!0,Mc(e)}function $t(){if(!Is&&tt!==null){Is=!0;var e=0,t=U;try{var n=tt;for(U=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}tt=null,Zi=!1}catch(i){throw tt!==null&&(tt=tt.slice(e+1)),dc(ll,$t),i}finally{U=t,Is=!1}}return null}var vn=[],mn=0,Ii=null,$i=0,je=[],Le=0,Jt=null,nt=1,rt="";function zt(e,t){vn[mn++]=$i,vn[mn++]=Ii,Ii=e,$i=t}function bc(e,t,n){je[Le++]=nt,je[Le++]=rt,je[Le++]=Jt,Jt=e;var r=nt;e=rt;var i=32-Be(r)-1;r&=~(1<<i),n+=1;var s=32-Be(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,nt=1<<32-Be(t)+i|n<<i|r,rt=s+e}else nt=1<<s|n<<i|r,rt=e}function ml(e){e.return!==null&&(zt(e,1),bc(e,1,0))}function gl(e){for(;e===Ii;)Ii=vn[--mn],vn[mn]=null,$i=vn[--mn],vn[mn]=null;for(;e===Jt;)Jt=je[--Le],je[Le]=null,rt=je[--Le],je[Le]=null,nt=je[--Le],je[Le]=null}var Ce=null,Ee=null,V=!1,be=null;function Bc(e,t){var n=Ie(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ia(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ce=e,Ee=Ct(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ce=e,Ee=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Jt!==null?{id:nt,overflow:rt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ie(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ce=e,Ee=null,!0):!1;default:return!1}}function Eo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Co(e){if(V){var t=Ee;if(t){var n=t;if(!Ia(e,t)){if(Eo(e))throw Error(S(418));t=Ct(n.nextSibling);var r=Ce;t&&Ia(e,t)?Bc(r,n):(e.flags=e.flags&-4097|2,V=!1,Ce=e)}}else{if(Eo(e))throw Error(S(418));e.flags=e.flags&-4097|2,V=!1,Ce=e}}}function $a(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ce=e}function Zr(e){if(e!==Ce)return!1;if(!V)return $a(e),V=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!wo(e.type,e.memoizedProps)),t&&(t=Ee)){if(Eo(e))throw Vc(),Error(S(418));for(;t;)Bc(e,t),t=Ct(t.nextSibling)}if($a(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(S(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ee=Ct(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ee=null}}else Ee=Ce?Ct(e.stateNode.nextSibling):null;return!0}function Vc(){for(var e=Ee;e;)e=Ct(e.nextSibling)}function Rn(){Ee=Ce=null,V=!1}function yl(e){be===null?be=[e]:be.push(e)}var cp=ut.ReactCurrentBatchConfig;function Qn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(S(309));var r=n.stateNode}if(!r)throw Error(S(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var l=i.refs;o===null?delete l[s]:l[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(S(284));if(!n._owner)throw Error(S(290,e))}return e}function ei(e,t){throw e=Object.prototype.toString.call(t),Error(S(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Na(e){var t=e._init;return t(e._payload)}function Hc(e){function t(p,f){if(e){var v=p.deletions;v===null?(p.deletions=[f],p.flags|=16):v.push(f)}}function n(p,f){if(!e)return null;for(;f!==null;)t(p,f),f=f.sibling;return null}function r(p,f){for(p=new Map;f!==null;)f.key!==null?p.set(f.key,f):p.set(f.index,f),f=f.sibling;return p}function i(p,f){return p=Ot(p,f),p.index=0,p.sibling=null,p}function s(p,f,v){return p.index=v,e?(v=p.alternate,v!==null?(v=v.index,v<f?(p.flags|=2,f):v):(p.flags|=2,f)):(p.flags|=1048576,f)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function l(p,f,v,w){return f===null||f.tag!==6?(f=Fs(v,p.mode,w),f.return=p,f):(f=i(f,v),f.return=p,f)}function a(p,f,v,w){var k=v.type;return k===un?c(p,f,v.props.children,w,v.key):f!==null&&(f.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ft&&Na(k)===f.type)?(w=i(f,v.props),w.ref=Qn(p,f,v),w.return=p,w):(w=wi(v.type,v.key,v.props,null,p.mode,w),w.ref=Qn(p,f,v),w.return=p,w)}function u(p,f,v,w){return f===null||f.tag!==4||f.stateNode.containerInfo!==v.containerInfo||f.stateNode.implementation!==v.implementation?(f=Ms(v,p.mode,w),f.return=p,f):(f=i(f,v.children||[]),f.return=p,f)}function c(p,f,v,w,k){return f===null||f.tag!==7?(f=Kt(v,p.mode,w,k),f.return=p,f):(f=i(f,v),f.return=p,f)}function d(p,f,v){if(typeof f=="string"&&f!==""||typeof f=="number")return f=Fs(""+f,p.mode,v),f.return=p,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Vr:return v=wi(f.type,f.key,f.props,null,p.mode,v),v.ref=Qn(p,null,f),v.return=p,v;case an:return f=Ms(f,p.mode,v),f.return=p,f;case ft:var w=f._init;return d(p,w(f._payload),v)}if(Zn(f)||Vn(f))return f=Kt(f,p.mode,v,null),f.return=p,f;ei(p,f)}return null}function h(p,f,v,w){var k=f!==null?f.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return k!==null?null:l(p,f,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Vr:return v.key===k?a(p,f,v,w):null;case an:return v.key===k?u(p,f,v,w):null;case ft:return k=v._init,h(p,f,k(v._payload),w)}if(Zn(v)||Vn(v))return k!==null?null:c(p,f,v,w,null);ei(p,v)}return null}function m(p,f,v,w,k){if(typeof w=="string"&&w!==""||typeof w=="number")return p=p.get(v)||null,l(f,p,""+w,k);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Vr:return p=p.get(w.key===null?v:w.key)||null,a(f,p,w,k);case an:return p=p.get(w.key===null?v:w.key)||null,u(f,p,w,k);case ft:var P=w._init;return m(p,f,v,P(w._payload),k)}if(Zn(w)||Vn(w))return p=p.get(v)||null,c(f,p,w,k,null);ei(f,w)}return null}function g(p,f,v,w){for(var k=null,P=null,T=f,O=f=0,M=null;T!==null&&O<v.length;O++){T.index>O?(M=T,T=null):M=T.sibling;var j=h(p,T,v[O],w);if(j===null){T===null&&(T=M);break}e&&T&&j.alternate===null&&t(p,T),f=s(j,f,O),P===null?k=j:P.sibling=j,P=j,T=M}if(O===v.length)return n(p,T),V&&zt(p,O),k;if(T===null){for(;O<v.length;O++)T=d(p,v[O],w),T!==null&&(f=s(T,f,O),P===null?k=T:P.sibling=T,P=T);return V&&zt(p,O),k}for(T=r(p,T);O<v.length;O++)M=m(T,p,O,v[O],w),M!==null&&(e&&M.alternate!==null&&T.delete(M.key===null?O:M.key),f=s(M,f,O),P===null?k=M:P.sibling=M,P=M);return e&&T.forEach(function(de){return t(p,de)}),V&&zt(p,O),k}function y(p,f,v,w){var k=Vn(v);if(typeof k!="function")throw Error(S(150));if(v=k.call(v),v==null)throw Error(S(151));for(var P=k=null,T=f,O=f=0,M=null,j=v.next();T!==null&&!j.done;O++,j=v.next()){T.index>O?(M=T,T=null):M=T.sibling;var de=h(p,T,j.value,w);if(de===null){T===null&&(T=M);break}e&&T&&de.alternate===null&&t(p,T),f=s(de,f,O),P===null?k=de:P.sibling=de,P=de,T=M}if(j.done)return n(p,T),V&&zt(p,O),k;if(T===null){for(;!j.done;O++,j=v.next())j=d(p,j.value,w),j!==null&&(f=s(j,f,O),P===null?k=j:P.sibling=j,P=j);return V&&zt(p,O),k}for(T=r(p,T);!j.done;O++,j=v.next())j=m(T,p,O,j.value,w),j!==null&&(e&&j.alternate!==null&&T.delete(j.key===null?O:j.key),f=s(j,f,O),P===null?k=j:P.sibling=j,P=j);return e&&T.forEach(function(qe){return t(p,qe)}),V&&zt(p,O),k}function _(p,f,v,w){if(typeof v=="object"&&v!==null&&v.type===un&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Vr:e:{for(var k=v.key,P=f;P!==null;){if(P.key===k){if(k=v.type,k===un){if(P.tag===7){n(p,P.sibling),f=i(P,v.props.children),f.return=p,p=f;break e}}else if(P.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===ft&&Na(k)===P.type){n(p,P.sibling),f=i(P,v.props),f.ref=Qn(p,P,v),f.return=p,p=f;break e}n(p,P);break}else t(p,P);P=P.sibling}v.type===un?(f=Kt(v.props.children,p.mode,w,v.key),f.return=p,p=f):(w=wi(v.type,v.key,v.props,null,p.mode,w),w.ref=Qn(p,f,v),w.return=p,p=w)}return o(p);case an:e:{for(P=v.key;f!==null;){if(f.key===P)if(f.tag===4&&f.stateNode.containerInfo===v.containerInfo&&f.stateNode.implementation===v.implementation){n(p,f.sibling),f=i(f,v.children||[]),f.return=p,p=f;break e}else{n(p,f);break}else t(p,f);f=f.sibling}f=Ms(v,p.mode,w),f.return=p,p=f}return o(p);case ft:return P=v._init,_(p,f,P(v._payload),w)}if(Zn(v))return g(p,f,v,w);if(Vn(v))return y(p,f,v,w);ei(p,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,f!==null&&f.tag===6?(n(p,f.sibling),f=i(f,v),f.return=p,p=f):(n(p,f),f=Fs(v,p.mode,w),f.return=p,p=f),o(p)):n(p,f)}return _}var jn=Hc(!0),Wc=Hc(!1),Ni=It(null),Ai=null,gn=null,wl=null;function _l(){wl=gn=Ai=null}function Sl(e){var t=Ni.current;B(Ni),e._currentValue=t}function xo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Cn(e,t){Ai=e,wl=gn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ge=!0),e.firstContext=null)}function Ne(e){var t=e._currentValue;if(wl!==e)if(e={context:e,memoizedValue:t,next:null},gn===null){if(Ai===null)throw Error(S(308));gn=e,Ai.dependencies={lanes:0,firstContext:e}}else gn=gn.next=e;return t}var Vt=null;function kl(e){Vt===null?Vt=[e]:Vt.push(e)}function Kc(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,kl(t)):(n.next=i.next,i.next=n),t.interleaved=n,lt(e,r)}function lt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ht=!1;function El(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function it(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function xt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,A&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,lt(e,n)}return i=r.interleaved,i===null?(t.next=t,kl(r)):(t.next=i.next,i.next=t),r.interleaved=t,lt(e,n)}function hi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,al(e,n)}}function Aa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ui(e,t,n,r){var i=e.updateQueue;ht=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var a=l,u=a.next;a.next=null,o===null?s=u:o.next=u,o=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==o&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(s!==null){var d=i.baseState;o=0,c=u=a=null,l=s;do{var h=l.lane,m=l.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var g=e,y=l;switch(h=t,m=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){d=g.call(m,d,h);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,h=typeof g=="function"?g.call(m,d,h):g,h==null)break e;d=K({},d,h);break e;case 2:ht=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[l]:h.push(l))}else m={eventTime:m,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=m,a=d):c=c.next=m,o|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;h=l,l=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(a=d),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);Yt|=o,e.lanes=o,e.memoizedState=d}}function Ua(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(S(191,i));i.call(r)}}}var zr={},Je=It(zr),xr=It(zr),Pr=It(zr);function Ht(e){if(e===zr)throw Error(S(174));return e}function Cl(e,t){switch(F(Pr,t),F(xr,e),F(Je,zr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:io(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=io(t,e)}B(Je),F(Je,t)}function Ln(){B(Je),B(xr),B(Pr)}function Qc(e){Ht(Pr.current);var t=Ht(Je.current),n=io(t,e.type);t!==n&&(F(xr,e),F(Je,n))}function xl(e){xr.current===e&&(B(Je),B(xr))}var H=It(0);function Di(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==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $s=[];function Pl(){for(var e=0;e<$s.length;e++)$s[e]._workInProgressVersionPrimary=null;$s.length=0}var pi=ut.ReactCurrentDispatcher,Ns=ut.ReactCurrentBatchConfig,qt=0,W=null,Y=null,te=null,zi=!1,ar=!1,Tr=0,dp=0;function oe(){throw Error(S(321))}function Tl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!He(e[n],t[n]))return!1;return!0}function Ol(e,t,n,r,i,s){if(qt=s,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,pi.current=e===null||e.memoizedState===null?vp:mp,e=n(r,i),ar){s=0;do{if(ar=!1,Tr=0,25<=s)throw Error(S(301));s+=1,te=Y=null,t.updateQueue=null,pi.current=gp,e=n(r,i)}while(ar)}if(pi.current=Fi,t=Y!==null&&Y.next!==null,qt=0,te=Y=W=null,zi=!1,t)throw Error(S(300));return e}function Rl(){var e=Tr!==0;return Tr=0,e}function Ke(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return te===null?W.memoizedState=te=e:te=te.next=e,te}function Ae(){if(Y===null){var e=W.alternate;e=e!==null?e.memoizedState:null}else e=Y.next;var t=te===null?W.memoizedState:te.next;if(t!==null)te=t,Y=e;else{if(e===null)throw Error(S(310));Y=e,e={memoizedState:Y.memoizedState,baseState:Y.baseState,baseQueue:Y.baseQueue,queue:Y.queue,next:null},te===null?W.memoizedState=te=e:te=te.next=e}return te}function Or(e,t){return typeof t=="function"?t(e):t}function As(e){var t=Ae(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=Y,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var l=o=null,a=null,u=s;do{var c=u.lane;if((qt&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=d,o=r):a=a.next=d,W.lanes|=c,Yt|=c}u=u.next}while(u!==null&&u!==s);a===null?o=r:a.next=l,He(r,t.memoizedState)||(ge=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,W.lanes|=s,Yt|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Us(e){var t=Ae(),n=t.queue;if(n===null)throw Error(S(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);He(s,t.memoizedState)||(ge=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Jc(){}function qc(e,t){var n=W,r=Ae(),i=t(),s=!He(r.memoizedState,i);if(s&&(r.memoizedState=i,ge=!0),r=r.queue,jl(Zc.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||te!==null&&te.memoizedState.tag&1){if(n.flags|=2048,Rr(9,Xc.bind(null,n,r,i,t),void 0,null),ne===null)throw Error(S(349));qt&30||Yc(n,t,i)}return i}function Yc(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t={lastEffect:null,stores:null},W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Xc(e,t,n,r){t.value=n,t.getSnapshot=r,ed(t)&&td(e)}function Zc(e,t,n){return n(function(){ed(t)&&td(e)})}function ed(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!He(e,n)}catch{return!0}}function td(e){var t=lt(e,1);t!==null&&Ve(t,e,1,-1)}function Da(e){var t=Ke();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:e},t.queue=e,e=e.dispatch=pp.bind(null,W,e),[t.memoizedState,e]}function Rr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=W.updateQueue,t===null?(t={lastEffect:null,stores:null},W.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function nd(){return Ae().memoizedState}function vi(e,t,n,r){var i=Ke();W.flags|=e,i.memoizedState=Rr(1|t,n,void 0,r===void 0?null:r)}function es(e,t,n,r){var i=Ae();r=r===void 0?null:r;var s=void 0;if(Y!==null){var o=Y.memoizedState;if(s=o.destroy,r!==null&&Tl(r,o.deps)){i.memoizedState=Rr(t,n,s,r);return}}W.flags|=e,i.memoizedState=Rr(1|t,n,s,r)}function za(e,t){return vi(8390656,8,e,t)}function jl(e,t){return es(2048,8,e,t)}function rd(e,t){return es(4,2,e,t)}function id(e,t){return es(4,4,e,t)}function sd(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function od(e,t,n){return n=n!=null?n.concat([e]):null,es(4,4,sd.bind(null,t,e),n)}function Ll(){}function ld(e,t){var n=Ae();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ad(e,t){var n=Ae();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Tl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ud(e,t,n){return qt&21?(He(n,t)||(n=pc(),W.lanes|=n,Yt|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ge=!0),e.memoizedState=n)}function fp(e,t){var n=U;U=n!==0&&4>n?n:4,e(!0);var r=Ns.transition;Ns.transition={};try{e(!1),t()}finally{U=n,Ns.transition=r}}function cd(){return Ae().memoizedState}function hp(e,t,n){var r=Tt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},dd(e))fd(t,n);else if(n=Kc(e,t,n,r),n!==null){var i=he();Ve(n,e,r,i),hd(n,t,r)}}function pp(e,t,n){var r=Tt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(dd(e))fd(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,l=s(o,n);if(i.hasEagerState=!0,i.eagerState=l,He(l,o)){var a=t.interleaved;a===null?(i.next=i,kl(t)):(i.next=a.next,a.next=i),t.interleaved=i;return}}catch{}finally{}n=Kc(e,t,i,r),n!==null&&(i=he(),Ve(n,e,r,i),hd(n,t,r))}}function dd(e){var t=e.alternate;return e===W||t!==null&&t===W}function fd(e,t){ar=zi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,al(e,n)}}var Fi={readContext:Ne,useCallback:oe,useContext:oe,useEffect:oe,useImperativeHandle:oe,useInsertionEffect:oe,useLayoutEffect:oe,useMemo:oe,useReducer:oe,useRef:oe,useState:oe,useDebugValue:oe,useDeferredValue:oe,useTransition:oe,useMutableSource:oe,useSyncExternalStore:oe,useId:oe,unstable_isNewReconciler:!1},vp={readContext:Ne,useCallback:function(e,t){return Ke().memoizedState=[e,t===void 0?null:t],e},useContext:Ne,useEffect:za,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,vi(4194308,4,sd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return vi(4194308,4,e,t)},useInsertionEffect:function(e,t){return vi(4,2,e,t)},useMemo:function(e,t){var n=Ke();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ke();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=hp.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Ke();return e={current:e},t.memoizedState=e},useState:Da,useDebugValue:Ll,useDeferredValue:function(e){return Ke().memoizedState=e},useTransition:function(){var e=Da(!1),t=e[0];return e=fp.bind(null,e[1]),Ke().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=W,i=Ke();if(V){if(n===void 0)throw Error(S(407));n=n()}else{if(n=t(),ne===null)throw Error(S(349));qt&30||Yc(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,za(Zc.bind(null,r,s,e),[e]),r.flags|=2048,Rr(9,Xc.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Ke(),t=ne.identifierPrefix;if(V){var n=rt,r=nt;n=(r&~(1<<32-Be(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Tr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=dp++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mp={readContext:Ne,useCallback:ld,useContext:Ne,useEffect:jl,useImperativeHandle:od,useInsertionEffect:rd,useLayoutEffect:id,useMemo:ad,useReducer:As,useRef:nd,useState:function(){return As(Or)},useDebugValue:Ll,useDeferredValue:function(e){var t=Ae();return ud(t,Y.memoizedState,e)},useTransition:function(){var e=As(Or)[0],t=Ae().memoizedState;return[e,t]},useMutableSource:Jc,useSyncExternalStore:qc,useId:cd,unstable_isNewReconciler:!1},gp={readContext:Ne,useCallback:ld,useContext:Ne,useEffect:jl,useImperativeHandle:od,useInsertionEffect:rd,useLayoutEffect:id,useMemo:ad,useReducer:Us,useRef:nd,useState:function(){return Us(Or)},useDebugValue:Ll,useDeferredValue:function(e){var t=Ae();return Y===null?t.memoizedState=e:ud(t,Y.memoizedState,e)},useTransition:function(){var e=Us(Or)[0],t=Ae().memoizedState;return[e,t]},useMutableSource:Jc,useSyncExternalStore:qc,useId:cd,unstable_isNewReconciler:!1};function ze(e,t){if(e&&e.defaultProps){t=K({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Po(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:K({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ts={isMounted:function(e){return(e=e._reactInternals)?en(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=he(),i=Tt(e),s=it(r,i);s.payload=t,n!=null&&(s.callback=n),t=xt(e,s,i),t!==null&&(Ve(t,e,i,r),hi(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=he(),i=Tt(e),s=it(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=xt(e,s,i),t!==null&&(Ve(t,e,i,r),hi(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=he(),r=Tt(e),i=it(n,r);i.tag=2,t!=null&&(i.callback=t),t=xt(e,i,r),t!==null&&(Ve(t,e,r,n),hi(t,e,r))}};function Fa(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!Sr(n,r)||!Sr(i,s):!0}function pd(e,t,n){var r=!1,i=jt,s=t.contextType;return typeof s=="object"&&s!==null?s=Ne(s):(i=we(t)?Qt:ce.current,r=t.contextTypes,s=(r=r!=null)?On(e,i):jt),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ts,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Ma(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ts.enqueueReplaceState(t,t.state,null)}function To(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},El(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Ne(s):(s=we(t)?Qt:ce.current,i.context=On(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Po(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ts.enqueueReplaceState(i,i.state,null),Ui(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function In(e,t){try{var n="",r=t;do n+=Wf(r),r=r.return;while(r);var i=n}catch(s){i=`
-Error generating stack: `+s.message+`
-`+s.stack}return{value:e,source:t,stack:i,digest:null}}function Ds(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Oo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var yp=typeof WeakMap=="function"?WeakMap:Map;function vd(e,t,n){n=it(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){bi||(bi=!0,zo=r),Oo(e,t)},n}function md(e,t,n){n=it(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Oo(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Oo(e,t),typeof r!="function"&&(Pt===null?Pt=new Set([this]):Pt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function ba(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new yp;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ip.bind(null,e,t,n),t.then(e,e))}function Ba(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Va(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=it(-1,1),t.tag=2,xt(n,t,1))),n.lanes|=1),e)}var wp=ut.ReactCurrentOwner,ge=!1;function fe(e,t,n,r){t.child=e===null?Wc(t,null,n,r):jn(t,e.child,n,r)}function Ha(e,t,n,r,i){n=n.render;var s=t.ref;return Cn(t,i),r=Ol(e,t,n,r,s,i),n=Rl(),e!==null&&!ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,at(e,t,i)):(V&&n&&ml(t),t.flags|=1,fe(e,t,r,i),t.child)}function Wa(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Fl(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,gd(e,t,s,r,i)):(e=wi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:Sr,n(o,r)&&e.ref===t.ref)return at(e,t,i)}return t.flags|=1,e=Ot(s,r),e.ref=t.ref,e.return=t,t.child=e}function gd(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Sr(s,r)&&e.ref===t.ref)if(ge=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(ge=!0);else return t.lanes=e.lanes,at(e,t,i)}return Ro(e,t,n,r,i)}function yd(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},F(wn,ke),ke|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,F(wn,ke),ke|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,F(wn,ke),ke|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,F(wn,ke),ke|=r;return fe(e,t,i,n),t.child}function wd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ro(e,t,n,r,i){var s=we(n)?Qt:ce.current;return s=On(t,s),Cn(t,i),n=Ol(e,t,n,r,s,i),r=Rl(),e!==null&&!ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,at(e,t,i)):(V&&r&&ml(t),t.flags|=1,fe(e,t,n,i),t.child)}function Ka(e,t,n,r,i){if(we(n)){var s=!0;Li(t)}else s=!1;if(Cn(t,i),t.stateNode===null)mi(e,t),pd(t,n,r),To(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var a=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ne(u):(u=we(n)?Qt:ce.current,u=On(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Ma(t,o,r,u),ht=!1;var h=t.memoizedState;o.state=h,Ui(t,r,o,i),a=t.memoizedState,l!==r||h!==a||ye.current||ht?(typeof c=="function"&&(Po(t,n,c,r),a=t.memoizedState),(l=ht||Fa(t,n,l,r,h,a,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),o.props=r,o.state=a,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Gc(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ze(t.type,l),o.props=u,d=t.pendingProps,h=o.context,a=n.contextType,typeof a=="object"&&a!==null?a=Ne(a):(a=we(n)?Qt:ce.current,a=On(t,a));var m=n.getDerivedStateFromProps;(c=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||h!==a)&&Ma(t,o,r,a),ht=!1,h=t.memoizedState,o.state=h,Ui(t,r,o,i);var g=t.memoizedState;l!==d||h!==g||ye.current||ht?(typeof m=="function"&&(Po(t,n,m,r),g=t.memoizedState),(u=ht||Fa(t,n,u,r,h,g,a)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,a),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,a)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),o.props=r,o.state=g,o.context=a,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return jo(e,t,n,r,s,i)}function jo(e,t,n,r,i,s){wd(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&La(t,n,!1),at(e,t,s);r=t.stateNode,wp.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=jn(t,e.child,null,s),t.child=jn(t,null,l,s)):fe(e,t,l,s),t.memoizedState=r.state,i&&La(t,n,!0),t.child}function _d(e){var t=e.stateNode;t.pendingContext?ja(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ja(e,t.context,!1),Cl(e,t.containerInfo)}function Ga(e,t,n,r,i){return Rn(),yl(i),t.flags|=256,fe(e,t,n,r),t.child}var Lo={dehydrated:null,treeContext:null,retryLane:0};function Io(e){return{baseLanes:e,cachePool:null,transitions:null}}function Sd(e,t,n){var r=t.pendingProps,i=H.current,s=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),F(H,i&1),e===null)return Co(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=is(o,r,0,null),e=Kt(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Io(n),t.memoizedState=Lo,e):Il(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return _p(e,t,o,r,l,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,l=i.sibling;var a={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Ot(i,a),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?s=Ot(l,s):(s=Kt(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?Io(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=Lo,r}return s=e.child,e=s.sibling,r=Ot(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Il(e,t){return t=is({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ti(e,t,n,r){return r!==null&&yl(r),jn(t,e.child,null,n),e=Il(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _p(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Ds(Error(S(422))),ti(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=is({mode:"visible",children:r.children},i,0,null),s=Kt(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&jn(t,e.child,null,o),t.child.memoizedState=Io(o),t.memoizedState=Lo,s);if(!(t.mode&1))return ti(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,s=Error(S(419)),r=Ds(s,r,void 0),ti(e,t,o,r)}if(l=(o&e.childLanes)!==0,ge||l){if(r=ne,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,lt(e,i),Ve(r,e,i,-1))}return zl(),r=Ds(Error(S(421))),ti(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=$p.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ee=Ct(i.nextSibling),Ce=t,V=!0,be=null,e!==null&&(je[Le++]=nt,je[Le++]=rt,je[Le++]=Jt,nt=e.id,rt=e.overflow,Jt=t),t=Il(t,r.children),t.flags|=4096,t)}function Qa(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),xo(e.return,t,n)}function zs(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function kd(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(fe(e,t,r.children,n),r=H.current,r&2)r=r&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&&Qa(e,n,t);else if(e.tag===19)Qa(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}r&=1}if(F(H,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Di(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),zs(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Di(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}zs(t,!0,n,null,s);break;case"together":zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function mi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function at(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yt|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(S(153));if(t.child!==null){for(e=t.child,n=Ot(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ot(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Sp(e,t,n){switch(t.tag){case 3:_d(t),Rn();break;case 5:Qc(t);break;case 1:we(t.type)&&Li(t);break;case 4:Cl(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;F(Ni,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(F(H,H.current&1),t.flags|=128,null):n&t.child.childLanes?Sd(e,t,n):(F(H,H.current&1),e=at(e,t,n),e!==null?e.sibling:null);F(H,H.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return kd(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),F(H,H.current),r)break;return null;case 22:case 23:return t.lanes=0,yd(e,t,n)}return at(e,t,n)}var Ed,$o,Cd,xd;Ed=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$o=function(){};Cd=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ht(Je.current);var s=null;switch(n){case"input":i=eo(e,i),r=eo(e,r),s=[];break;case"select":i=K({},i,{value:void 0}),r=K({},r,{value:void 0}),s=[];break;case"textarea":i=ro(e,i),r=ro(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Ri)}so(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(pr.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||a&&a.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in a)a.hasOwnProperty(o)&&l[o]!==a[o]&&(n||(n={}),n[o]=a[o])}else n||(s||(s=[]),s.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(s=s||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(s=s||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(pr.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&b("scroll",e),s||l===a||(s=[])):(s=s||[]).push(u,a))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};xd=function(e,t,n,r){n!==r&&(t.flags|=4)};function Jn(e,t){if(!V)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 r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function le(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function kp(e,t,n){var r=t.pendingProps;switch(gl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return le(t),null;case 1:return we(t.type)&&ji(),le(t),null;case 3:return r=t.stateNode,Ln(),B(ye),B(ce),Pl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Zr(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,be!==null&&(bo(be),be=null))),$o(e,t),le(t),null;case 5:xl(t);var i=Ht(Pr.current);if(n=t.type,e!==null&&t.stateNode!=null)Cd(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(S(166));return le(t),null}if(e=Ht(Je.current),Zr(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[Ge]=t,r[Cr]=s,e=(t.mode&1)!==0,n){case"dialog":b("cancel",r),b("close",r);break;case"iframe":case"object":case"embed":b("load",r);break;case"video":case"audio":for(i=0;i<tr.length;i++)b(tr[i],r);break;case"source":b("error",r);break;case"img":case"image":case"link":b("error",r),b("load",r);break;case"details":b("toggle",r);break;case"input":ra(r,s),b("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},b("invalid",r);break;case"textarea":sa(r,s),b("invalid",r)}so(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="children"?typeof l=="string"?r.textContent!==l&&(s.suppressHydrationWarning!==!0&&Xr(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(s.suppressHydrationWarning!==!0&&Xr(r.textContent,l,e),i=["children",""+l]):pr.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&b("scroll",r)}switch(n){case"input":Hr(r),ia(r,s,!0);break;case"textarea":Hr(r),oa(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Ri)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Zu(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ge]=t,e[Cr]=r,Ed(e,t,!1,!1),t.stateNode=e;e:{switch(o=oo(n,r),n){case"dialog":b("cancel",e),b("close",e),i=r;break;case"iframe":case"object":case"embed":b("load",e),i=r;break;case"video":case"audio":for(i=0;i<tr.length;i++)b(tr[i],e);i=r;break;case"source":b("error",e),i=r;break;case"img":case"image":case"link":b("error",e),b("load",e),i=r;break;case"details":b("toggle",e),i=r;break;case"input":ra(e,r),i=eo(e,r),b("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=K({},r,{value:void 0}),b("invalid",e);break;case"textarea":sa(e,r),i=ro(e,r),b("invalid",e);break;default:i=r}so(n,i),l=i;for(s in l)if(l.hasOwnProperty(s)){var a=l[s];s==="style"?nc(e,a):s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&ec(e,a)):s==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&vr(e,a):typeof a=="number"&&vr(e,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(pr.hasOwnProperty(s)?a!=null&&s==="onScroll"&&b("scroll",e):a!=null&&nl(e,s,a,o))}switch(n){case"input":Hr(e),ia(e,r,!1);break;case"textarea":Hr(e),oa(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Rt(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?_n(e,!!r.multiple,s,!1):r.defaultValue!=null&&_n(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Ri)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return le(t),null;case 6:if(e&&t.stateNode!=null)xd(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(S(166));if(n=Ht(Pr.current),Ht(Je.current),Zr(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ge]=t,(s=r.nodeValue!==n)&&(e=Ce,e!==null))switch(e.tag){case 3:Xr(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Xr(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ge]=t,t.stateNode=r}return le(t),null;case 13:if(B(H),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(V&&Ee!==null&&t.mode&1&&!(t.flags&128))Vc(),Rn(),t.flags|=98560,s=!1;else if(s=Zr(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(S(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(S(317));s[Ge]=t}else Rn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;le(t),s=!1}else be!==null&&(bo(be),be=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||H.current&1?X===0&&(X=3):zl())),t.updateQueue!==null&&(t.flags|=4),le(t),null);case 4:return Ln(),$o(e,t),e===null&&kr(t.stateNode.containerInfo),le(t),null;case 10:return Sl(t.type._context),le(t),null;case 17:return we(t.type)&&ji(),le(t),null;case 19:if(B(H),s=t.memoizedState,s===null)return le(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)Jn(s,!1);else{if(X!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Di(e),o!==null){for(t.flags|=128,Jn(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return F(H,H.current&1|2),t.child}e=e.sibling}s.tail!==null&&J()>$n&&(t.flags|=128,r=!0,Jn(s,!1),t.lanes=4194304)}else{if(!r)if(e=Di(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Jn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!V)return le(t),null}else 2*J()-s.renderingStartTime>$n&&n!==1073741824&&(t.flags|=128,r=!0,Jn(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=J(),t.sibling=null,n=H.current,F(H,r?n&1|2:n&1),t):(le(t),null);case 22:case 23:return Dl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ke&1073741824&&(le(t),t.subtreeFlags&6&&(t.flags|=8192)):le(t),null;case 24:return null;case 25:return null}throw Error(S(156,t.tag))}function Ep(e,t){switch(gl(t),t.tag){case 1:return we(t.type)&&ji(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ln(),B(ye),B(ce),Pl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xl(t),null;case 13:if(B(H),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(S(340));Rn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(H),null;case 4:return Ln(),null;case 10:return Sl(t.type._context),null;case 22:case 23:return Dl(),null;case 24:return null;default:return null}}var ni=!1,ue=!1,Cp=typeof WeakSet=="function"?WeakSet:Set,C=null;function yn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){G(e,t,r)}else n.current=null}function No(e,t,n){try{n()}catch(r){G(e,t,r)}}var Ja=!1;function xp(e,t){if(go=Pi,e=jc(),vl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,l=-1,a=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var m;d!==n||i!==0&&d.nodeType!==3||(l=o+i),d!==s||r!==0&&d.nodeType!==3||(a=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(m=d.firstChild)!==null;)h=d,d=m;for(;;){if(d===e)break t;if(h===n&&++u===i&&(l=o),h===s&&++c===r&&(a=o),(m=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=m}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(yo={focusedElem:e,selectionRange:n},Pi=!1,C=t;C!==null;)if(t=C,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,C=e;else for(;C!==null;){t=C;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,_=g.memoizedState,p=t.stateNode,f=p.getSnapshotBeforeUpdate(t.elementType===t.type?y:ze(t.type,y),_);p.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(S(163))}}catch(w){G(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,C=e;break}C=t.return}return g=Ja,Ja=!1,g}function ur(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&No(t,n,s)}i=i.next}while(i!==r)}}function ns(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ao(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Pd(e){var t=e.alternate;t!==null&&(e.alternate=null,Pd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ge],delete t[Cr],delete t[So],delete t[lp],delete t[ap])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Td(e){return e.tag===5||e.tag===3||e.tag===4}function qa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Td(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ri));else if(r!==4&&(e=e.child,e!==null))for(Uo(e,t,n),e=e.sibling;e!==null;)Uo(e,t,n),e=e.sibling}function Do(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Do(e,t,n),e=e.sibling;e!==null;)Do(e,t,n),e=e.sibling}var re=null,Fe=!1;function ct(e,t,n){for(n=n.child;n!==null;)Od(e,t,n),n=n.sibling}function Od(e,t,n){if(Qe&&typeof Qe.onCommitFiberUnmount=="function")try{Qe.onCommitFiberUnmount(Qi,n)}catch{}switch(n.tag){case 5:ue||yn(n,t);case 6:var r=re,i=Fe;re=null,ct(e,t,n),re=r,Fe=i,re!==null&&(Fe?(e=re,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):re.removeChild(n.stateNode));break;case 18:re!==null&&(Fe?(e=re,n=n.stateNode,e.nodeType===8?Ls(e.parentNode,n):e.nodeType===1&&Ls(e,n),wr(e)):Ls(re,n.stateNode));break;case 4:r=re,i=Fe,re=n.stateNode.containerInfo,Fe=!0,ct(e,t,n),re=r,Fe=i;break;case 0:case 11:case 14:case 15:if(!ue&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&No(n,t,o),i=i.next}while(i!==r)}ct(e,t,n);break;case 1:if(!ue&&(yn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){G(n,t,l)}ct(e,t,n);break;case 21:ct(e,t,n);break;case 22:n.mode&1?(ue=(r=ue)||n.memoizedState!==null,ct(e,t,n),ue=r):ct(e,t,n);break;default:ct(e,t,n)}}function Ya(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Cp),t.forEach(function(r){var i=Np.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ue(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:re=l.stateNode,Fe=!1;break e;case 3:re=l.stateNode.containerInfo,Fe=!0;break e;case 4:re=l.stateNode.containerInfo,Fe=!0;break e}l=l.return}if(re===null)throw Error(S(160));Od(s,o,i),re=null,Fe=!1;var a=i.alternate;a!==null&&(a.return=null),i.return=null}catch(u){G(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Rd(t,e),t=t.sibling}function Rd(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ue(t,e),We(e),r&4){try{ur(3,e,e.return),ns(3,e)}catch(y){G(e,e.return,y)}try{ur(5,e,e.return)}catch(y){G(e,e.return,y)}}break;case 1:Ue(t,e),We(e),r&512&&n!==null&&yn(n,n.return);break;case 5:if(Ue(t,e),We(e),r&512&&n!==null&&yn(n,n.return),e.flags&32){var i=e.stateNode;try{vr(i,"")}catch(y){G(e,e.return,y)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&s.type==="radio"&&s.name!=null&&Yu(i,s),oo(l,o);var u=oo(l,s);for(o=0;o<a.length;o+=2){var c=a[o],d=a[o+1];c==="style"?nc(i,d):c==="dangerouslySetInnerHTML"?ec(i,d):c==="children"?vr(i,d):nl(i,c,d,u)}switch(l){case"input":to(i,s);break;case"textarea":Xu(i,s);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?_n(i,!!s.multiple,m,!1):h!==!!s.multiple&&(s.defaultValue!=null?_n(i,!!s.multiple,s.defaultValue,!0):_n(i,!!s.multiple,s.multiple?[]:"",!1))}i[Cr]=s}catch(y){G(e,e.return,y)}}break;case 6:if(Ue(t,e),We(e),r&4){if(e.stateNode===null)throw Error(S(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(y){G(e,e.return,y)}}break;case 3:if(Ue(t,e),We(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{wr(t.containerInfo)}catch(y){G(e,e.return,y)}break;case 4:Ue(t,e),We(e);break;case 13:Ue(t,e),We(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(Al=J())),r&4&&Ya(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(ue=(u=ue)||c,Ue(t,e),ue=u):Ue(t,e),We(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(C=e,c=e.child;c!==null;){for(d=C=c;C!==null;){switch(h=C,m=h.child,h.tag){case 0:case 11:case 14:case 15:ur(4,h,h.return);break;case 1:yn(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(y){G(r,n,y)}}break;case 5:yn(h,h.return);break;case 22:if(h.memoizedState!==null){Za(d);continue}}m!==null?(m.return=h,C=m):Za(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(l=d.stateNode,a=d.memoizedProps.style,o=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=tc("display",o))}catch(y){G(e,e.return,y)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(y){G(e,e.return,y)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Ue(t,e),We(e),r&4&&Ya(e);break;case 21:break;default:Ue(t,e),We(e)}}function We(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Td(n)){var r=n;break e}n=n.return}throw Error(S(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(vr(i,""),r.flags&=-33);var s=qa(e);Do(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=qa(e);Uo(e,l,o);break;default:throw Error(S(161))}}catch(a){G(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Pp(e,t,n){C=e,jd(e)}function jd(e,t,n){for(var r=(e.mode&1)!==0;C!==null;){var i=C,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||ni;if(!o){var l=i.alternate,a=l!==null&&l.memoizedState!==null||ue;l=ni;var u=ue;if(ni=o,(ue=a)&&!u)for(C=i;C!==null;)o=C,a=o.child,o.tag===22&&o.memoizedState!==null?eu(i):a!==null?(a.return=o,C=a):eu(i);for(;s!==null;)C=s,jd(s),s=s.sibling;C=i,ni=l,ue=u}Xa(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,C=s):Xa(e)}}function Xa(e){for(;C!==null;){var t=C;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ue||ns(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!ue)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ze(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&Ua(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Ua(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&wr(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(S(163))}ue||t.flags&512&&Ao(t)}catch(h){G(t,t.return,h)}}if(t===e){C=null;break}if(n=t.sibling,n!==null){n.return=t.return,C=n;break}C=t.return}}function Za(e){for(;C!==null;){var t=C;if(t===e){C=null;break}var n=t.sibling;if(n!==null){n.return=t.return,C=n;break}C=t.return}}function eu(e){for(;C!==null;){var t=C;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ns(4,t)}catch(a){G(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(a){G(t,i,a)}}var s=t.return;try{Ao(t)}catch(a){G(t,s,a)}break;case 5:var o=t.return;try{Ao(t)}catch(a){G(t,o,a)}}}catch(a){G(t,t.return,a)}if(t===e){C=null;break}var l=t.sibling;if(l!==null){l.return=t.return,C=l;break}C=t.return}}var Tp=Math.ceil,Mi=ut.ReactCurrentDispatcher,$l=ut.ReactCurrentOwner,$e=ut.ReactCurrentBatchConfig,A=0,ne=null,q=null,ie=0,ke=0,wn=It(0),X=0,jr=null,Yt=0,rs=0,Nl=0,cr=null,me=null,Al=0,$n=1/0,et=null,bi=!1,zo=null,Pt=null,ri=!1,wt=null,Bi=0,dr=0,Fo=null,gi=-1,yi=0;function he(){return A&6?J():gi!==-1?gi:gi=J()}function Tt(e){return e.mode&1?A&2&&ie!==0?ie&-ie:cp.transition!==null?(yi===0&&(yi=pc()),yi):(e=U,e!==0||(e=window.event,e=e===void 0?16:Sc(e.type)),e):1}function Ve(e,t,n,r){if(50<dr)throw dr=0,Fo=null,Error(S(185));Ar(e,n,r),(!(A&2)||e!==ne)&&(e===ne&&(!(A&2)&&(rs|=n),X===4&&mt(e,ie)),_e(e,r),n===1&&A===0&&!(t.mode&1)&&($n=J()+500,Zi&&$t()))}function _e(e,t){var n=e.callbackNode;ch(e,t);var r=xi(e,e===ne?ie:0);if(r===0)n!==null&&ua(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&ua(n),t===1)e.tag===0?up(tu.bind(null,e)):Mc(tu.bind(null,e)),sp(function(){!(A&6)&&$t()}),n=null;else{switch(vc(r)){case 1:n=ll;break;case 4:n=fc;break;case 16:n=Ci;break;case 536870912:n=hc;break;default:n=Ci}n=zd(n,Ld.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ld(e,t){if(gi=-1,yi=0,A&6)throw Error(S(327));var n=e.callbackNode;if(xn()&&e.callbackNode!==n)return null;var r=xi(e,e===ne?ie:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Vi(e,r);else{t=r;var i=A;A|=2;var s=$d();(ne!==e||ie!==t)&&(et=null,$n=J()+500,Wt(e,t));do try{jp();break}catch(l){Id(e,l)}while(!0);_l(),Mi.current=s,A=i,q!==null?t=0:(ne=null,ie=0,t=X)}if(t!==0){if(t===2&&(i=fo(e),i!==0&&(r=i,t=Mo(e,i))),t===1)throw n=jr,Wt(e,0),mt(e,r),_e(e,J()),n;if(t===6)mt(e,r);else{if(i=e.current.alternate,!(r&30)&&!Op(i)&&(t=Vi(e,r),t===2&&(s=fo(e),s!==0&&(r=s,t=Mo(e,s))),t===1))throw n=jr,Wt(e,0),mt(e,r),_e(e,J()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(S(345));case 2:Ft(e,me,et);break;case 3:if(mt(e,r),(r&130023424)===r&&(t=Al+500-J(),10<t)){if(xi(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){he(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=_o(Ft.bind(null,e,me,et),t);break}Ft(e,me,et);break;case 4:if(mt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Be(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=J()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Tp(r/1960))-r,10<r){e.timeoutHandle=_o(Ft.bind(null,e,me,et),r);break}Ft(e,me,et);break;case 5:Ft(e,me,et);break;default:throw Error(S(329))}}}return _e(e,J()),e.callbackNode===n?Ld.bind(null,e):null}function Mo(e,t){var n=cr;return e.current.memoizedState.isDehydrated&&(Wt(e,t).flags|=256),e=Vi(e,t),e!==2&&(t=me,me=n,t!==null&&bo(t)),e}function bo(e){me===null?me=e:me.push.apply(me,e)}function Op(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!He(s(),i))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 mt(e,t){for(t&=~Nl,t&=~rs,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Be(t),r=1<<n;e[n]=-1,t&=~r}}function tu(e){if(A&6)throw Error(S(327));xn();var t=xi(e,0);if(!(t&1))return _e(e,J()),null;var n=Vi(e,t);if(e.tag!==0&&n===2){var r=fo(e);r!==0&&(t=r,n=Mo(e,r))}if(n===1)throw n=jr,Wt(e,0),mt(e,t),_e(e,J()),n;if(n===6)throw Error(S(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ft(e,me,et),_e(e,J()),null}function Ul(e,t){var n=A;A|=1;try{return e(t)}finally{A=n,A===0&&($n=J()+500,Zi&&$t())}}function Xt(e){wt!==null&&wt.tag===0&&!(A&6)&&xn();var t=A;A|=1;var n=$e.transition,r=U;try{if($e.transition=null,U=1,e)return e()}finally{U=r,$e.transition=n,A=t,!(A&6)&&$t()}}function Dl(){ke=wn.current,B(wn)}function Wt(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,ip(n)),q!==null)for(n=q.return;n!==null;){var r=n;switch(gl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&ji();break;case 3:Ln(),B(ye),B(ce),Pl();break;case 5:xl(r);break;case 4:Ln();break;case 13:B(H);break;case 19:B(H);break;case 10:Sl(r.type._context);break;case 22:case 23:Dl()}n=n.return}if(ne=e,q=e=Ot(e.current,null),ie=ke=t,X=0,jr=null,Nl=rs=Yt=0,me=cr=null,Vt!==null){for(t=0;t<Vt.length;t++)if(n=Vt[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}Vt=null}return e}function Id(e,t){do{var n=q;try{if(_l(),pi.current=Fi,zi){for(var r=W.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}zi=!1}if(qt=0,te=Y=W=null,ar=!1,Tr=0,$l.current=null,n===null||n.return===null){X=1,jr=t,q=null;break}e:{var s=e,o=n.return,l=n,a=t;if(t=ie,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var m=Ba(o);if(m!==null){m.flags&=-257,Va(m,o,l,s,t),m.mode&1&&ba(s,u,t),t=m,a=u;var g=t.updateQueue;if(g===null){var y=new Set;y.add(a),t.updateQueue=y}else g.add(a);break e}else{if(!(t&1)){ba(s,u,t),zl();break e}a=Error(S(426))}}else if(V&&l.mode&1){var _=Ba(o);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Va(_,o,l,s,t),yl(In(a,l));break e}}s=a=In(a,l),X!==4&&(X=2),cr===null?cr=[s]:cr.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=vd(s,a,t);Aa(s,p);break e;case 1:l=a;var f=s.type,v=s.stateNode;if(!(s.flags&128)&&(typeof f.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Pt===null||!Pt.has(v)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=md(s,l,t);Aa(s,w);break e}}s=s.return}while(s!==null)}Ad(n)}catch(k){t=k,q===n&&n!==null&&(q=n=n.return);continue}break}while(!0)}function $d(){var e=Mi.current;return Mi.current=Fi,e===null?Fi:e}function zl(){(X===0||X===3||X===2)&&(X=4),ne===null||!(Yt&268435455)&&!(rs&268435455)||mt(ne,ie)}function Vi(e,t){var n=A;A|=2;var r=$d();(ne!==e||ie!==t)&&(et=null,Wt(e,t));do try{Rp();break}catch(i){Id(e,i)}while(!0);if(_l(),A=n,Mi.current=r,q!==null)throw Error(S(261));return ne=null,ie=0,X}function Rp(){for(;q!==null;)Nd(q)}function jp(){for(;q!==null&&!th();)Nd(q)}function Nd(e){var t=Dd(e.alternate,e,ke);e.memoizedProps=e.pendingProps,t===null?Ad(e):q=t,$l.current=null}function Ad(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ep(n,t),n!==null){n.flags&=32767,q=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{X=6,q=null;return}}else if(n=kp(n,t,ke),n!==null){q=n;return}if(t=t.sibling,t!==null){q=t;return}q=t=e}while(t!==null);X===0&&(X=5)}function Ft(e,t,n){var r=U,i=$e.transition;try{$e.transition=null,U=1,Lp(e,t,n,r)}finally{$e.transition=i,U=r}return null}function Lp(e,t,n,r){do xn();while(wt!==null);if(A&6)throw Error(S(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(S(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(dh(e,s),e===ne&&(q=ne=null,ie=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ri||(ri=!0,zd(Ci,function(){return xn(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=$e.transition,$e.transition=null;var o=U;U=1;var l=A;A|=4,$l.current=null,xp(e,n),Rd(n,e),Yh(yo),Pi=!!go,yo=go=null,e.current=n,Pp(n),nh(),A=l,U=o,$e.transition=s}else e.current=n;if(ri&&(ri=!1,wt=e,Bi=i),s=e.pendingLanes,s===0&&(Pt=null),sh(n.stateNode),_e(e,J()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(bi)throw bi=!1,e=zo,zo=null,e;return Bi&1&&e.tag!==0&&xn(),s=e.pendingLanes,s&1?e===Fo?dr++:(dr=0,Fo=e):dr=0,$t(),null}function xn(){if(wt!==null){var e=vc(Bi),t=$e.transition,n=U;try{if($e.transition=null,U=16>e?16:e,wt===null)var r=!1;else{if(e=wt,wt=null,Bi=0,A&6)throw Error(S(331));var i=A;for(A|=4,C=e.current;C!==null;){var s=C,o=s.child;if(C.flags&16){var l=s.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(C=u;C!==null;){var c=C;switch(c.tag){case 0:case 11:case 15:ur(8,c,s)}var d=c.child;if(d!==null)d.return=c,C=d;else for(;C!==null;){c=C;var h=c.sibling,m=c.return;if(Pd(c),c===u){C=null;break}if(h!==null){h.return=m,C=h;break}C=m}}}var g=s.alternate;if(g!==null){var y=g.child;if(y!==null){g.child=null;do{var _=y.sibling;y.sibling=null,y=_}while(y!==null)}}C=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,C=o;else e:for(;C!==null;){if(s=C,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ur(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,C=p;break e}C=s.return}}var f=e.current;for(C=f;C!==null;){o=C;var v=o.child;if(o.subtreeFlags&2064&&v!==null)v.return=o,C=v;else e:for(o=f;C!==null;){if(l=C,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:ns(9,l)}}catch(k){G(l,l.return,k)}if(l===o){C=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,C=w;break e}C=l.return}}if(A=i,$t(),Qe&&typeof Qe.onPostCommitFiberRoot=="function")try{Qe.onPostCommitFiberRoot(Qi,e)}catch{}r=!0}return r}finally{U=n,$e.transition=t}}return!1}function nu(e,t,n){t=In(n,t),t=vd(e,t,1),e=xt(e,t,1),t=he(),e!==null&&(Ar(e,1,t),_e(e,t))}function G(e,t,n){if(e.tag===3)nu(e,e,n);else for(;t!==null;){if(t.tag===3){nu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Pt===null||!Pt.has(r))){e=In(n,e),e=md(t,e,1),t=xt(t,e,1),e=he(),t!==null&&(Ar(t,1,e),_e(t,e));break}}t=t.return}}function Ip(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=he(),e.pingedLanes|=e.suspendedLanes&n,ne===e&&(ie&n)===n&&(X===4||X===3&&(ie&130023424)===ie&&500>J()-Al?Wt(e,0):Nl|=n),_e(e,t)}function Ud(e,t){t===0&&(e.mode&1?(t=Gr,Gr<<=1,!(Gr&130023424)&&(Gr=4194304)):t=1);var n=he();e=lt(e,t),e!==null&&(Ar(e,t,n),_e(e,n))}function $p(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ud(e,n)}function Np(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(S(314))}r!==null&&r.delete(t),Ud(e,n)}var Dd;Dd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ye.current)ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ge=!1,Sp(e,t,n);ge=!!(e.flags&131072)}else ge=!1,V&&t.flags&1048576&&bc(t,$i,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;mi(e,t),e=t.pendingProps;var i=On(t,ce.current);Cn(t,n),i=Ol(null,t,r,e,i,n);var s=Rl();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,we(r)?(s=!0,Li(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,El(t),i.updater=ts,t.stateNode=i,i._reactInternals=t,To(t,r,e,n),t=jo(null,t,r,!0,s,n)):(t.tag=0,V&&s&&ml(t),fe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(mi(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Up(r),e=ze(r,e),i){case 0:t=Ro(null,t,r,e,n);break e;case 1:t=Ka(null,t,r,e,n);break e;case 11:t=Ha(null,t,r,e,n);break e;case 14:t=Wa(null,t,r,ze(r.type,e),n);break e}throw Error(S(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ze(r,i),Ro(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ze(r,i),Ka(e,t,r,i,n);case 3:e:{if(_d(t),e===null)throw Error(S(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Gc(e,t),Ui(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=In(Error(S(423)),t),t=Ga(e,t,r,n,i);break e}else if(r!==i){i=In(Error(S(424)),t),t=Ga(e,t,r,n,i);break e}else for(Ee=Ct(t.stateNode.containerInfo.firstChild),Ce=t,V=!0,be=null,n=Wc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rn(),r===i){t=at(e,t,n);break e}fe(e,t,r,n)}t=t.child}return t;case 5:return Qc(t),e===null&&Co(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,wo(r,i)?o=null:s!==null&&wo(r,s)&&(t.flags|=32),wd(e,t),fe(e,t,o,n),t.child;case 6:return e===null&&Co(t),null;case 13:return Sd(e,t,n);case 4:return Cl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=jn(t,null,r,n):fe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ze(r,i),Ha(e,t,r,i,n);case 7:return fe(e,t,t.pendingProps,n),t.child;case 8:return fe(e,t,t.pendingProps.children,n),t.child;case 12:return fe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,F(Ni,r._currentValue),r._currentValue=o,s!==null)if(He(s.value,o)){if(s.children===i.children&&!ye.current){t=at(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var l=s.dependencies;if(l!==null){o=s.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=it(-1,n&-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),xo(s.return,n,t),l.lanes|=n;break}a=a.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(S(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),xo(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}fe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Cn(t,n),i=Ne(i),r=r(i),t.flags|=1,fe(e,t,r,n),t.child;case 14:return r=t.type,i=ze(r,t.pendingProps),i=ze(r.type,i),Wa(e,t,r,i,n);case 15:return gd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ze(r,i),mi(e,t),t.tag=1,we(r)?(e=!0,Li(t)):e=!1,Cn(t,n),pd(t,r,i),To(t,r,i,n),jo(null,t,r,!0,e,n);case 19:return kd(e,t,n);case 22:return yd(e,t,n)}throw Error(S(156,t.tag))};function zd(e,t){return dc(e,t)}function Ap(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ie(e,t,n,r){return new Ap(e,t,n,r)}function Fl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Up(e){if(typeof e=="function")return Fl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===il)return 11;if(e===sl)return 14}return 2}function Ot(e,t){var n=e.alternate;return n===null?(n=Ie(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&14680064,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}function wi(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")Fl(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case un:return Kt(n.children,i,s,t);case rl:o=8,i|=8;break;case qs:return e=Ie(12,n,t,i|2),e.elementType=qs,e.lanes=s,e;case Ys:return e=Ie(13,n,t,i),e.elementType=Ys,e.lanes=s,e;case Xs:return e=Ie(19,n,t,i),e.elementType=Xs,e.lanes=s,e;case Qu:return is(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ku:o=10;break e;case Gu:o=9;break e;case il:o=11;break e;case sl:o=14;break e;case ft:o=16,r=null;break e}throw Error(S(130,e==null?e:typeof e,""))}return t=Ie(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Kt(e,t,n,r){return e=Ie(7,e,r,t),e.lanes=n,e}function is(e,t,n,r){return e=Ie(22,e,r,t),e.elementType=Qu,e.lanes=n,e.stateNode={isHidden:!1},e}function Fs(e,t,n){return e=Ie(6,e,null,t),e.lanes=n,e}function Ms(e,t,n){return t=Ie(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Dp(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_s(0),this.expirationTimes=_s(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_s(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Ml(e,t,n,r,i,s,o,l,a){return e=new Dp(e,t,n,l,a),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ie(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},El(s),e}function zp(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:an,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Fd(e){if(!e)return jt;e=e._reactInternals;e:{if(en(e)!==e||e.tag!==1)throw Error(S(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(we(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(S(171))}if(e.tag===1){var n=e.type;if(we(n))return Fc(e,n,t)}return t}function Md(e,t,n,r,i,s,o,l,a){return e=Ml(n,r,!0,e,i,s,o,l,a),e.context=Fd(null),n=e.current,r=he(),i=Tt(n),s=it(r,i),s.callback=t??null,xt(n,s,i),e.current.lanes=i,Ar(e,i,r),_e(e,r),e}function ss(e,t,n,r){var i=t.current,s=he(),o=Tt(i);return n=Fd(n),t.context===null?t.context=n:t.pendingContext=n,t=it(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=xt(i,t,o),e!==null&&(Ve(e,i,o,s),hi(e,i,o)),o}function Hi(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function ru(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function bl(e,t){ru(e,t),(e=e.alternate)&&ru(e,t)}function Fp(){return null}var bd=typeof reportError=="function"?reportError:function(e){console.error(e)};function Bl(e){this._internalRoot=e}os.prototype.render=Bl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(S(409));ss(e,t,null,null)};os.prototype.unmount=Bl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Xt(function(){ss(null,e,null,null)}),t[ot]=null}};function os(e){this._internalRoot=e}os.prototype.unstable_scheduleHydration=function(e){if(e){var t=yc();e={blockedOn:null,target:e,priority:t};for(var n=0;n<vt.length&&t!==0&&t<vt[n].priority;n++);vt.splice(n,0,e),n===0&&_c(e)}};function Vl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ls(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function iu(){}function Mp(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Hi(o);s.call(u)}}var o=Md(t,r,e,0,null,!1,!1,"",iu);return e._reactRootContainer=o,e[ot]=o.current,kr(e.nodeType===8?e.parentNode:e),Xt(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=Hi(a);l.call(u)}}var a=Ml(e,0,!1,null,null,!1,!1,"",iu);return e._reactRootContainer=a,e[ot]=a.current,kr(e.nodeType===8?e.parentNode:e),Xt(function(){ss(t,a,n,r)}),a}function as(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var l=i;i=function(){var a=Hi(o);l.call(a)}}ss(t,o,e,i)}else o=Mp(n,t,e,i,r);return Hi(o)}mc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=er(t.pendingLanes);n!==0&&(al(t,n|1),_e(t,J()),!(A&6)&&($n=J()+500,$t()))}break;case 13:Xt(function(){var r=lt(e,1);if(r!==null){var i=he();Ve(r,e,1,i)}}),bl(e,1)}};ul=function(e){if(e.tag===13){var t=lt(e,134217728);if(t!==null){var n=he();Ve(t,e,134217728,n)}bl(e,134217728)}};gc=function(e){if(e.tag===13){var t=Tt(e),n=lt(e,t);if(n!==null){var r=he();Ve(n,e,t,r)}bl(e,t)}};yc=function(){return U};wc=function(e,t){var n=U;try{return U=e,t()}finally{U=n}};ao=function(e,t,n){switch(t){case"input":if(to(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Xi(r);if(!i)throw Error(S(90));qu(r),to(r,i)}}}break;case"textarea":Xu(e,n);break;case"select":t=n.value,t!=null&&_n(e,!!n.multiple,t,!1)}};sc=Ul;oc=Xt;var bp={usingClientEntryPoint:!1,Events:[Dr,hn,Xi,rc,ic,Ul]},qn={findFiberByHostInstance:Bt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Bp={bundleType:qn.bundleType,version:qn.version,rendererPackageName:qn.rendererPackageName,rendererConfig:qn.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ut.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=uc(e),e===null?null:e.stateNode},findFiberByHostInstance:qn.findFiberByHostInstance||Fp,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ii=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ii.isDisabled&&ii.supportsFiber)try{Qi=ii.inject(Bp),Qe=ii}catch{}}Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bp;Pe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Vl(t))throw Error(S(200));return zp(e,t,null,n)};Pe.createRoot=function(e,t){if(!Vl(e))throw Error(S(299));var n=!1,r="",i=bd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Ml(e,1,!1,null,null,n,!1,r,i),e[ot]=t.current,kr(e.nodeType===8?e.parentNode:e),new Bl(t)};Pe.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(S(188)):(e=Object.keys(e).join(","),Error(S(268,e)));return e=uc(t),e=e===null?null:e.stateNode,e};Pe.flushSync=function(e){return Xt(e)};Pe.hydrate=function(e,t,n){if(!ls(t))throw Error(S(200));return as(null,e,t,!0,n)};Pe.hydrateRoot=function(e,t,n){if(!Vl(e))throw Error(S(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=bd;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Md(t,null,e,1,n??null,i,!1,s,o),e[ot]=t.current,kr(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new os(t)};Pe.render=function(e,t,n){if(!ls(t))throw Error(S(200));return as(null,e,t,!1,n)};Pe.unmountComponentAtNode=function(e){if(!ls(e))throw Error(S(40));return e._reactRootContainer?(Xt(function(){as(null,null,e,!1,function(){e._reactRootContainer=null,e[ot]=null})}),!0):!1};Pe.unstable_batchedUpdates=Ul;Pe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ls(n))throw Error(S(200));if(e==null||e._reactInternals===void 0)throw Error(S(38));return as(e,t,n,!1,r)};Pe.version="18.3.1-next-f1338f8080-20240426";function Bd(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bd)}catch(e){console.error(e)}}Bd(),Bu.exports=Pe;var Vp=Bu.exports,su=Vp;Qs.createRoot=su.createRoot,Qs.hydrateRoot=su.hydrateRoot;/**
- * @remix-run/router v1.16.1
- *
- * Copyright (c) Remix Software Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.md file in the root directory of this source tree.
- *
- * @license MIT
- */function Lr(){return Lr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lr.apply(this,arguments)}var _t;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(_t||(_t={}));const ou="popstate";function Hp(e){e===void 0&&(e={});function t(r,i){let{pathname:s,search:o,hash:l}=r.location;return Bo("",{pathname:s,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Hd(i)}return Kp(t,n,null,e)}function Z(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Vd(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Wp(){return Math.random().toString(36).substr(2,8)}function lu(e,t){return{usr:e.state,key:e.key,idx:t}}function Bo(e,t,n,r){return n===void 0&&(n=null),Lr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fn(t):t,{state:n,key:t&&t.key||r||Wp()})}function Hd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Fn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Kp(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l=_t.Pop,a=null,u=c();u==null&&(u=0,o.replaceState(Lr({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function d(){l=_t.Pop;let _=c(),p=_==null?null:_-u;u=_,a&&a({action:l,location:y.location,delta:p})}function h(_,p){l=_t.Push;let f=Bo(y.location,_,p);u=c()+1;let v=lu(f,u),w=y.createHref(f);try{o.pushState(v,"",w)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;i.location.assign(w)}s&&a&&a({action:l,location:y.location,delta:1})}function m(_,p){l=_t.Replace;let f=Bo(y.location,_,p);u=c();let v=lu(f,u),w=y.createHref(f);o.replaceState(v,"",w),s&&a&&a({action:l,location:y.location,delta:0})}function g(_){let p=i.location.origin!=="null"?i.location.origin:i.location.href,f=typeof _=="string"?_:Hd(_);return f=f.replace(/ $/,"%20"),Z(p,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,p)}let y={get action(){return l},get location(){return e(i,o)},listen(_){if(a)throw new Error("A history only accepts one active listener");return i.addEventListener(ou,d),a=_,()=>{i.removeEventListener(ou,d),a=null}},createHref(_){return t(i,_)},createURL:g,encodeLocation(_){let p=g(_);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:h,replace:m,go(_){return o.go(_)}};return y}var au;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(au||(au={}));function Gp(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Fn(t):t,i=Gd(r.pathname||"/",n);if(i==null)return null;let s=Wd(e);Qp(s);let o=null;for(let l=0;o==null&&l<s.length;++l){let a=ov(i);o=rv(s[l],a)}return o}function Wd(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,o,l)=>{let a={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};a.relativePath.startsWith("/")&&(Z(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=Gt([r,a.relativePath]),c=n.concat(a);s.children&&s.children.length>0&&(Z(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Wd(s.children,t,c,u)),!(s.path==null&&!s.index)&&t.push({path:u,score:tv(u,s.index),routesMeta:c})};return e.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let a of Kd(s.path))i(s,o,a)}),t}function Kd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=Kd(r.join("/")),l=[];return l.push(...o.map(a=>a===""?s:[s,a].join("/"))),i&&l.push(...o),l.map(a=>e.startsWith("/")&&a===""?"/":a)}function Qp(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:nv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Jp=/^:[\w-]+$/,qp=3,Yp=2,Xp=1,Zp=10,ev=-2,uu=e=>e==="*";function tv(e,t){let n=e.split("/"),r=n.length;return n.some(uu)&&(r+=ev),t&&(r+=Yp),n.filter(i=>!uu(i)).reduce((i,s)=>i+(Jp.test(s)?qp:s===""?Xp:Zp),r)}function nv(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function rv(e,t){let{routesMeta:n}=e,r={},i="/",s=[];for(let o=0;o<n.length;++o){let l=n[o],a=o===n.length-1,u=i==="/"?t:t.slice(i.length)||"/",c=iv({path:l.relativePath,caseSensitive:l.caseSensitive,end:a},u);if(!c)return null;Object.assign(r,c.params);let d=l.route;s.push({params:r,pathname:Gt([i,c.pathname]),pathnameBase:fv(Gt([i,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(i=Gt([i,c.pathnameBase]))}return s}function iv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=sv(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:h,isOptional:m}=c;if(h==="*"){let y=l[d]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const g=l[d];return m&&!g?u[h]=void 0:u[h]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:e}}function sv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Vd(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 r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,a)=>(r.push({paramName:l,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function ov(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Vd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Gd(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function lv(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Fn(e):e;return{pathname:n?n.startsWith("/")?n:av(n,t):t,search:hv(r),hash:pv(i)}}function av(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function bs(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  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 uv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function cv(e,t){let n=uv(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function dv(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Fn(e):(i=Lr({},e),Z(!i.pathname||!i.pathname.includes("?"),bs("?","pathname","search",i)),Z(!i.pathname||!i.pathname.includes("#"),bs("#","pathname","hash",i)),Z(!i.search||!i.search.includes("#"),bs("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;i.pathname=h.join("/")}l=d>=0?t[d]:"/"}let a=lv(i,l),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const Gt=e=>e.join("/").replace(/\/\/+/g,"/"),fv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function vv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Qd=["post","put","patch","delete"];new Set(Qd);const mv=["get",...Qd];new Set(mv);/**
- * React Router v6.23.1
- *
- * Copyright (c) Remix Software Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.md file in the root directory of this source tree.
- *
- * @license MIT
- */function Ir(){return Ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ir.apply(this,arguments)}const Hl=E.createContext(null),gv=E.createContext(null),us=E.createContext(null),cs=E.createContext(null),Mn=E.createContext({outlet:null,matches:[],isDataRoute:!1}),Jd=E.createContext(null);function ds(){return E.useContext(cs)!=null}function qd(){return ds()||Z(!1),E.useContext(cs).location}function Yd(e){E.useContext(us).static||E.useLayoutEffect(e)}function Xd(){let{isDataRoute:e}=E.useContext(Mn);return e?jv():yv()}function yv(){ds()||Z(!1);let e=E.useContext(Hl),{basename:t,future:n,navigator:r}=E.useContext(us),{matches:i}=E.useContext(Mn),{pathname:s}=qd(),o=JSON.stringify(cv(i,n.v7_relativeSplatPath)),l=E.useRef(!1);return Yd(()=>{l.current=!0}),E.useCallback(function(u,c){if(c===void 0&&(c={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let d=dv(u,JSON.parse(o),s,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Gt([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,o,s,e])}function wv(e,t){return _v(e,t)}function _v(e,t,n,r){ds()||Z(!1);let{navigator:i}=E.useContext(us),{matches:s}=E.useContext(Mn),o=s[s.length-1],l=o?o.params:{};o&&o.pathname;let a=o?o.pathnameBase:"/";o&&o.route;let u=qd(),c;if(t){var d;let _=typeof t=="string"?Fn(t):t;a==="/"||(d=_.pathname)!=null&&d.startsWith(a)||Z(!1),c=_}else c=u;let h=c.pathname||"/",m=h;if(a!=="/"){let _=a.replace(/^\//,"").split("/");m="/"+h.replace(/^\//,"").split("/").slice(_.length).join("/")}let g=Gp(e,{pathname:m}),y=xv(g&&g.map(_=>Object.assign({},_,{params:Object.assign({},l,_.params),pathname:Gt([a,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?a:Gt([a,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,n,r);return t&&y?E.createElement(cs.Provider,{value:{location:Ir({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:_t.Pop}},y):y}function Sv(){let e=Rv(),t=vv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:i},n):null,null)}const kv=E.createElement(Sv,null);class Ev extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?E.createElement(Mn.Provider,{value:this.props.routeContext},E.createElement(Jd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Cv(e){let{routeContext:t,match:n,children:r}=e,i=E.useContext(Hl);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(Mn.Provider,{value:t},r)}function xv(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let o=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let c=o.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);c>=0||Z(!1),o=o.slice(0,Math.min(o.length,c+1))}let a=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<o.length;c++){let d=o[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:h,errors:m}=n,g=d.route.loader&&h[d.route.id]===void 0&&(!m||m[d.route.id]===void 0);if(d.route.lazy||g){a=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,d,h)=>{let m,g=!1,y=null,_=null;n&&(m=l&&d.route.id?l[d.route.id]:void 0,y=d.route.errorElement||kv,a&&(u<0&&h===0?(g=!0,_=null):u===h&&(g=!0,_=d.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,h+1)),f=()=>{let v;return m?v=y:g?v=_:d.route.Component?v=E.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=c,E.createElement(Cv,{match:d,routeContext:{outlet:c,matches:p,isDataRoute:n!=null},children:v})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?E.createElement(Ev,{location:n.location,revalidation:n.revalidation,component:y,error:m,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):f()},null)}var Zd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Zd||{}),Wi=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Wi||{});function Pv(e){let t=E.useContext(Hl);return t||Z(!1),t}function Tv(e){let t=E.useContext(gv);return t||Z(!1),t}function Ov(e){let t=E.useContext(Mn);return t||Z(!1),t}function ef(e){let t=Ov(),n=t.matches[t.matches.length-1];return n.route.id||Z(!1),n.route.id}function Rv(){var e;let t=E.useContext(Jd),n=Tv(Wi.UseRouteError),r=ef(Wi.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function jv(){let{router:e}=Pv(Zd.UseNavigateStable),t=ef(Wi.UseNavigateStable),n=E.useRef(!1);return Yd(()=>{n.current=!0}),E.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ir({fromRouteId:t},s)))},[e,t])}function _i(e){Z(!1)}function Lv(e){let{basename:t="/",children:n=null,location:r,navigationType:i=_t.Pop,navigator:s,static:o=!1,future:l}=e;ds()&&Z(!1);let a=t.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:a,navigator:s,static:o,future:Ir({v7_relativeSplatPath:!1},l)}),[a,l,s,o]);typeof r=="string"&&(r=Fn(r));let{pathname:c="/",search:d="",hash:h="",state:m=null,key:g="default"}=r,y=E.useMemo(()=>{let _=Gd(c,a);return _==null?null:{location:{pathname:_,search:d,hash:h,state:m,key:g},navigationType:i}},[a,c,d,h,m,g,i]);return y==null?null:E.createElement(us.Provider,{value:u},E.createElement(cs.Provider,{children:n,value:y}))}function Iv(e){let{children:t,location:n}=e;return wv(Vo(t),n)}new Promise(()=>{});function Vo(e,t){t===void 0&&(t=[]);let n=[];return E.Children.forEach(e,(r,i)=>{if(!E.isValidElement(r))return;let s=[...t,i];if(r.type===E.Fragment){n.push.apply(n,Vo(r.props.children,s));return}r.type!==_i&&Z(!1),!r.props.index||!r.props.children||Z(!1);let o={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Vo(r.props.children,s)),n.push(o)}),n}/**
- * React Router DOM v6.23.1
- *
- * Copyright (c) Remix Software Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE.md file in the root directory of this source tree.
- *
- * @license MIT
- */const $v="6";try{window.__reactRouterVersion=$v}catch{}const Nv="startTransition",cu=If[Nv];function Av(e){let{basename:t,children:n,future:r,window:i}=e,s=E.useRef();s.current==null&&(s.current=Hp({window:i,v5Compat:!0}));let o=s.current,[l,a]=E.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=E.useCallback(d=>{u&&cu?cu(()=>a(d)):a(d)},[a,u]);return E.useLayoutEffect(()=>o.listen(c),[o,c]),E.createElement(Lv,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}var du;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(du||(du={}));var fu;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(fu||(fu={}));const Uv="modulepreload",Dv=function(e,t){return new URL(e,t).href},hu={},Nn=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.all(n.map(a=>{if(a=Dv(a,r),a in hu)return;hu[a]=!0;const u=a.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!r)for(let m=s.length-1;m>=0;m--){const g=s[m];if(g.href===a&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${c}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":Uv,u||(h.as="script",h.crossOrigin=""),h.href=a,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((m,g)=>{h.addEventListener("load",m),h.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},zv=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Nn(()=>Promise.resolve().then(()=>Fr),void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};class Wl extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class Fv extends Wl{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class Mv extends Wl{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class bv extends Wl{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var Ho;(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"})(Ho||(Ho={}));var Bv=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(c){try{u(r.next(c))}catch(d){o(d)}}function a(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(l,a)}u((r=r.apply(e,t||[])).next())})};class Vv{constructor(t,{headers:n={},customFetch:r,region:i=Ho.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=zv(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return Bv(this,void 0,void 0,function*(){try{const{headers:i,method:s,body:o}=n;let l={},{region:a}=n;a||(a=this.region),a&&a!=="any"&&(l["x-region"]=a);let u;o&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(l["Content-Type"]="application/octet-stream",u=o):typeof o=="string"?(l["Content-Type"]="text/plain",u=o):typeof FormData<"u"&&o instanceof FormData?u=o:(l["Content-Type"]="application/json",u=JSON.stringify(o)));const c=yield this.fetch(`${this.url}/${t}`,{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},l),this.headers),i),body:u}).catch(g=>{throw new Fv(g)}),d=c.headers.get("x-relay-error");if(d&&d==="true")throw new Mv(c);if(!c.ok)throw new bv(c);let h=((r=c.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),m;return h==="application/json"?m=yield c.json():h==="application/octet-stream"?m=yield c.blob():h==="text/event-stream"?m=c:h==="multipart/form-data"?m=yield c.formData():m=yield c.text(),{data:m,error:null}}catch(i){return{data:null,error:i}}})}}var Hv=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")},An=Hv();const Wv=An.fetch,Kl=An.fetch.bind(An),tf=An.Headers,Kv=An.Request,Gv=An.Response,Fr=Object.freeze(Object.defineProperty({__proto__:null,Headers:tf,Request:Kv,Response:Gv,default:Kl,fetch:Wv},Symbol.toStringTag,{value:"Module"}));class Qv extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}}class Jv{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=Kl:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,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 r=this.fetch;let i=r(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async s=>{var o,l,a;let u=null,c=null,d=null,h=s.status,m=s.statusText;if(s.ok){if(this.method!=="HEAD"){const p=await s.text();p===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=p:c=JSON.parse(p))}const y=(o=this.headers.Prefer)===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),_=(l=s.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");y&&_&&_.length>1&&(d=parseInt(_[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(u={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,d=null,h=406,m="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const y=await s.text();try{u=JSON.parse(y),Array.isArray(u)&&s.status===404&&(c=[],u=null,h=200,m="OK")}catch{s.status===404&&y===""?(h=204,m="No Content"):u={message:y}}if(u&&this.isMaybeSingle&&(!((a=u==null?void 0:u.details)===null||a===void 0)&&a.includes("0 rows"))&&(u=null,h=200,m="OK"),u&&this.shouldThrowOnError)throw new Qv(u)}return{error:u,data:c,count:d,status:h,statusText:m}});return this.shouldThrowOnError||(i=i.catch(s=>{var o,l,a;return{error:{message:`${(o=s==null?void 0:s.name)!==null&&o!==void 0?o:"FetchError"}: ${s==null?void 0:s.message}`,details:`${(l=s==null?void 0:s.stack)!==null&&l!==void 0?l:""}`,hint:"",code:`${(a=s==null?void 0:s.code)!==null&&a!==void 0?a:""}`},data:null,count:null,status:0,statusText:""}})),i.then(t,n)}}class qv extends Jv{select(t){let n=!1;const r=(t??"*").split("").map(i=>/\s/.test(i)&&!n?"":(i==='"'&&(n=!n),i)).join("");return this.url.searchParams.set("select",r),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(t,{ascending:n=!0,nullsFirst:r,foreignTable:i,referencedTable:s=i}={}){const o=s?`${s}.order`:"order",l=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${l?`${l},`:""}${t}.${n?"asc":"desc"}${r===void 0?"":r?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,n,{foreignTable:r,referencedTable:i=r}={}){const s=typeof i>"u"?"offset":`${i}.offset`,o=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(s,`${t}`),this.url.searchParams.set(o,`${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:r=!1,buffers:i=!1,wal:s=!1,format:o="text"}={}){var l;const a=[t?"analyze":null,n?"verbose":null,r?"settings":null,i?"buffers":null,s?"wal":null].filter(Boolean).join("|"),u=(l=this.headers.Accept)!==null&&l!==void 0?l:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${u}"; options=${a};`,o==="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}}class ln extends qv{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 r=Array.from(new Set(n)).map(i=>typeof i=="string"&&new RegExp("[,()]").test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${r})`),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:r,type:i}={}){let s="";i==="plain"?s="pl":i==="phrase"?s="ph":i==="websearch"&&(s="w");const o=r===void 0?"":`(${r})`;return this.url.searchParams.append(t,`${s}fts${o}.${n}`),this}match(t){return Object.entries(t).forEach(([n,r])=>{this.url.searchParams.append(n,`eq.${r}`)}),this}not(t,n,r){return this.url.searchParams.append(t,`not.${n}.${r}`),this}or(t,{foreignTable:n,referencedTable:r=n}={}){const i=r?`${r}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,n,r){return this.url.searchParams.append(t,`${n}.${r}`),this}}class Yv{constructor(t,{headers:n={},schema:r,fetch:i}){this.url=t,this.headers=n,this.schema=r,this.fetch=i}select(t,{head:n=!1,count:r}={}){const i=n?"HEAD":"GET";let s=!1;const o=(t??"*").split("").map(l=>/\s/.test(l)&&!s?"":(l==='"'&&(s=!s),l)).join("");return this.url.searchParams.set("select",o),r&&(this.headers.Prefer=`count=${r}`),new ln({method:i,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(t,{count:n,defaultToNull:r=!0}={}){const i="POST",s=[];if(this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),r||s.push("missing=default"),this.headers.Prefer=s.join(","),Array.isArray(t)){const o=t.reduce((l,a)=>l.concat(Object.keys(a)),[]);if(o.length>0){const l=[...new Set(o)].map(a=>`"${a}"`);this.url.searchParams.set("columns",l.join(","))}}return new ln({method:i,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}upsert(t,{onConflict:n,ignoreDuplicates:r=!1,count:i,defaultToNull:s=!0}={}){const o="POST",l=[`resolution=${r?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&l.push(this.headers.Prefer),i&&l.push(`count=${i}`),s||l.push("missing=default"),this.headers.Prefer=l.join(","),Array.isArray(t)){const a=t.reduce((u,c)=>u.concat(Object.keys(c)),[]);if(a.length>0){const u=[...new Set(a)].map(c=>`"${c}"`);this.url.searchParams.set("columns",u.join(","))}}return new ln({method:o,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}update(t,{count:n}={}){const r="PATCH",i=[];return this.headers.Prefer&&i.push(this.headers.Prefer),n&&i.push(`count=${n}`),this.headers.Prefer=i.join(","),new ln({method:r,url:this.url,headers:this.headers,schema:this.schema,body:t,fetch:this.fetch,allowEmpty:!1})}delete({count:t}={}){const n="DELETE",r=[];return t&&r.push(`count=${t}`),this.headers.Prefer&&r.unshift(this.headers.Prefer),this.headers.Prefer=r.join(","),new ln({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}const Xv="1.15.2",Zv={"X-Client-Info":`postgrest-js/${Xv}`};class Gl{constructor(t,{headers:n={},schema:r,fetch:i}={}){this.url=t,this.headers=Object.assign(Object.assign({},Zv),n),this.schemaName=r,this.fetch=i}from(t){const n=new URL(`${this.url}/${t}`);return new Yv(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(t){return new Gl(this.url,{headers:this.headers,schema:t,fetch:this.fetch})}rpc(t,n={},{head:r=!1,get:i=!1,count:s}={}){let o;const l=new URL(`${this.url}/rpc/${t}`);let a;r||i?(o=r?"HEAD":"GET",Object.entries(n).filter(([c,d])=>d!==void 0).map(([c,d])=>[c,Array.isArray(d)?`{${d.join(",")}}`:`${d}`]).forEach(([c,d])=>{l.searchParams.append(c,d)})):(o="POST",a=n);const u=Object.assign({},this.headers);return s&&(u.Prefer=`count=${s}`),new ln({method:o,url:l,headers:u,schema:this.schemaName,body:a,fetch:this.fetch,allowEmpty:!1})}}const em="2.9.5",tm={"X-Client-Info":`realtime-js/${em}`},nm="1.0.0",nf=1e4,rm=1e3;var Pn;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Pn||(Pn={}));var Se;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(Se||(Se={}));var Me;(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"})(Me||(Me={}));var Wo;(function(e){e.websocket="websocket"})(Wo||(Wo={}));var bt;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(bt||(bt={}));class rf{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))}}class im{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),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const i=n.getUint8(1),s=n.getUint8(2);let o=this.HEADER_LENGTH+2;const l=r.decode(t.slice(o,o+i));o=o+i;const a=r.decode(t.slice(o,o+s));o=o+s;const u=JSON.parse(r.decode(t.slice(o,t.byteLength)));return{ref:null,topic:l,event:a,payload:u}}}class Bs{constructor(t,n,r={},i=nf){this.channel=t,this.event=n,this.payload=r,this.timeout=i,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 r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.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(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var pu;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(pu||(pu={}));class fr{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:s,onLeave:o,onSync:l}=this.caller;this.joinRef=this.channel._joinRef(),this.state=fr.syncState(this.state,i,s,o),this.pendingDiffs.forEach(a=>{this.state=fr.syncDiff(this.state,a,s,o)}),this.pendingDiffs=[],l()}),this.channel._on(r.diff,{},i=>{const{onJoin:s,onLeave:o,onSync:l}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=fr.syncDiff(this.state,i,s,o),l())}),this.onJoin((i,s,o)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:s,newPresences:o})}),this.onLeave((i,s,o)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:s,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const s=this.cloneDeep(t),o=this.transformState(n),l={},a={};return this.map(s,(u,c)=>{o[u]||(a[u]=c)}),this.map(o,(u,c)=>{const d=s[u];if(d){const h=c.map(_=>_.presence_ref),m=d.map(_=>_.presence_ref),g=c.filter(_=>m.indexOf(_.presence_ref)<0),y=d.filter(_=>h.indexOf(_.presence_ref)<0);g.length>0&&(l[u]=g),y.length>0&&(a[u]=y)}else l[u]=c}),this.syncDiff(s,{joins:l,leaves:a},r,i)}static syncDiff(t,n,r,i){const{joins:s,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(s,(l,a)=>{var u;const c=(u=t[l])!==null&&u!==void 0?u:[];if(t[l]=this.cloneDeep(a),c.length>0){const d=t[l].map(m=>m.presence_ref),h=c.filter(m=>d.indexOf(m.presence_ref)<0);t[l].unshift(...h)}r(l,c,a)}),this.map(o,(l,a)=>{let u=t[l];if(!u)return;const c=a.map(d=>d.presence_ref);u=u.filter(d=>c.indexOf(d.presence_ref)<0),t[l]=u,i(l,u,a),u.length===0&&delete t[l]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return"metas"in i?n[r]=i.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):n[r]=i,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 D;(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"})(D||(D={}));const vu=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((s,o)=>(s[o]=sm(o,e,t,i),s),{})},sm=(e,t,n,r)=>{const i=t.find(l=>l.name===e),s=i==null?void 0:i.type,o=n[e];return s&&!r.includes(s)?sf(s,o):Ko(o)},sf=(e,t)=>{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return um(t,n)}switch(e){case D.bool:return om(t);case D.float4:case D.float8:case D.int2:case D.int4:case D.int8:case D.numeric:case D.oid:return lm(t);case D.json:case D.jsonb:return am(t);case D.timestamp:return cm(t);case D.abstime:case D.date:case D.daterange:case D.int4range:case D.int8range:case D.money:case D.reltime:case D.text:case D.time:case D.timestamptz:case D.timetz:case D.tsrange:case D.tstzrange:return Ko(t);default:return Ko(t)}},Ko=e=>e,om=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},lm=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},am=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},um=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let s;const o=e.slice(1,n);try{s=JSON.parse("["+o+"]")}catch{s=o?o.split(","):[]}return s.map(l=>sf(t,l))}return e},cm=e=>typeof e=="string"?e.replace(" ","T"):e;var mu;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(mu||(mu={}));var gu;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes"})(gu||(gu={}));var yu;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(yu||(yu={}));class Ql{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=Se.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},n.config),this.timeout=this.socket.timeout,this.joinPush=new Bs(this,Me.join,this.params,this.timeout),this.rejoinTimer=new rf(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Se.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=Se.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Se.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Me.reply,{},(i,s)=>{this._trigger(this._replyEventName(s),i)}),this.presence=new fr(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(t,n=this.timeout){var r,i;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:o}}=this.params;this._onError(u=>t&&t("CHANNEL_ERROR",u)),this._onClose(()=>t&&t("CLOSED"));const l={},a={broadcast:s,presence:o,postgres_changes:(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(u=>u.filter))!==null&&i!==void 0?i:[]};this.socket.accessToken&&(l.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:a},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",({postgres_changes:u})=>{var c;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),u===void 0){t&&t("SUBSCRIBED");return}else{const d=this.bindings.postgres_changes,h=(c=d==null?void 0:d.length)!==null&&c!==void 0?c:0,m=[];for(let g=0;g<h;g++){const y=d[g],{filter:{event:_,schema:p,table:f,filter:v}}=y,w=u&&u[g];if(w&&w.event===_&&w.schema===p&&w.table===f&&w.filter===v)m.push(Object.assign(Object.assign({},y),{id:w.id}));else{this.unsubscribe(),t&&t("CHANNEL_ERROR",new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=m,t&&t("SUBSCRIBED");return}}).receive("error",u=>{t&&t("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(u).join(", ")||"error")))}).receive("timeout",()=>{t&&t("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,r){return this._on(t,n,r)}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){const{event:s,payload:o}=t,l={method:"POST",headers:{apikey:(r=this.socket.apiKey)!==null&&r!==void 0?r:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:o}]})};try{return(await this._fetchWithTimeout(this.broadcastEndpointURL,l,(i=n.timeout)!==null&&i!==void 0?i:this.timeout)).ok?"ok":"error"}catch(a){return a.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var o,l,a;const u=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((a=(l=(o=this.params)===null||o===void 0?void 0:o.config)===null||l===void 0?void 0:l.broadcast)===null||a===void 0)&&a.ack)&&s("ok"),u.receive("ok",()=>s("ok")),u.receive("error",()=>s("error")),u.receive("timeout",()=>s("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=Se.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Me.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const i=new Bs(this,Me.leave,{},t);i.receive("ok",()=>{n(),r("ok")}).receive("timeout",()=>{n(),r("timed out")}).receive("error",()=>{r("error")}),i.send(),this._canPush()||i.trigger("ok",{})})}_broadcastEndpointURL(){let t=this.socket.endPoint;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")+"/api/broadcast"}async _fetchWithTimeout(t,n,r){const i=new AbortController,s=setTimeout(()=>i.abort(),r),o=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(s),o}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new Bs(this,t,n,r);return this._canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,s;const o=t.toLocaleLowerCase(),{close:l,error:a,leave:u,join:c}=Me;if(r&&[l,a,u,c].indexOf(o)>=0&&r!==this._joinRef())return;let h=this._onMessage(o,n,r);if(n&&!h)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(m=>{var g,y,_;return((g=m.filter)===null||g===void 0?void 0:g.event)==="*"||((_=(y=m.filter)===null||y===void 0?void 0:y.event)===null||_===void 0?void 0:_.toLocaleLowerCase())===o}).map(m=>m.callback(h,r)):(s=this.bindings[o])===null||s===void 0||s.filter(m=>{var g,y,_,p,f,v;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in m){const w=m.id,k=(g=m.filter)===null||g===void 0?void 0:g.event;return w&&((y=n.ids)===null||y===void 0?void 0:y.includes(w))&&(k==="*"||(k==null?void 0:k.toLocaleLowerCase())===((_=n.data)===null||_===void 0?void 0:_.type.toLocaleLowerCase()))}else{const w=(f=(p=m==null?void 0:m.filter)===null||p===void 0?void 0:p.event)===null||f===void 0?void 0:f.toLocaleLowerCase();return w==="*"||w===((v=n==null?void 0:n.event)===null||v===void 0?void 0:v.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===o}).map(m=>{if(typeof h=="object"&&"ids"in h){const g=h.data,{schema:y,table:_,commit_timestamp:p,type:f,errors:v}=g;h=Object.assign(Object.assign({},{schema:y,table:_,commit_timestamp:p,eventType:f,new:{},old:{},errors:v}),this._getPayloadRecords(g))}m.callback(h,r)})}_isClosed(){return this.state===Se.closed}_isJoined(){return this.state===Se.joined}_isJoining(){return this.state===Se.joining}_isLeaving(){return this.state===Se.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),s={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(s):this.bindings[i]=[s],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(i=>{var s;return!(((s=i.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===r&&Ql.isEqual(i.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Me.close,{},t)}_onError(t){this._on(Me.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Se.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=vu(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=vu(t.columns,t.old_record)),n}}const dm=()=>{},fm=typeof WebSocket<"u";class hm{constructor(t,n){var r;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.headers=tm,this.params={},this.timeout=nf,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=dm,this.conn=null,this.sendBuffer=[],this.serializer=new im,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=s=>{let o;return s?o=s:typeof fetch>"u"?o=(...l)=>Nn(()=>Promise.resolve().then(()=>Fr),void 0,import.meta.url).then(({default:a})=>a(...l)):o=fetch,(...l)=>o(...l)},this.endPoint=`${t}/${Wo.websocket}`,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 i=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;i&&(this.accessToken=i,this.apiKey=i),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,o)=>o(JSON.stringify(s)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new rf(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(fm){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new pm(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),Nn(()=>import("./browser-BepKyIzM.js").then(t=>t.b),[],import.meta.url).then(({default:t})=>{this.conn=new t(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}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,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Pn.connecting:return bt.Connecting;case Pn.open:return bt.Open;case Pn.closing:return bt.Closing;default:return bt.Closed}}isConnected(){return this.connectionState()===bt.Open}channel(t,n={config:{}}){const r=new Ql(`realtime:${t}`,n,this);return this.channels.push(r),r}push(t){const{topic:n,event:r,payload:i,ref:s}=t,o=()=>{this.encode(t,l=>{var a;(a=this.conn)===null||a===void 0||a.send(l)})};this.log("push",`${n} ${r} (${s})`,i),this.isConnected()?o():this.sendBuffer.push(o)}setAuth(t){this.accessToken=t,this.channels.forEach(n=>{t&&n.updateJoinPayload({access_token:t}),n.joinedOnce&&n._isJoined()&&n._push(Me.access_token,{access_token:t})})}_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(r=>r.topic===t&&(r._isJoined()||r._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))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:nm}))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:r,event:i,payload:s,ref:o}=n;(o&&o===this.pendingHeartbeatRef||i===(s==null?void 0:s.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${s.status||""} ${r} ${i} ${o&&"("+o+")"||""}`,s),this.channels.filter(l=>l._isMember(r)).forEach(l=>l._trigger(i,s,o)),this.stateChangeCallbacks.message.forEach(l=>l(n))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),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(Me.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_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(rm,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class pm{constructor(t,n,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=Pn.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=r.close}}class Jl extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function ae(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class vm extends Jl{constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class wu extends Jl{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var mm=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(c){try{u(r.next(c))}catch(d){o(d)}}function a(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(l,a)}u((r=r.apply(e,t||[])).next())})};const of=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Nn(()=>Promise.resolve().then(()=>Fr),void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},gm=()=>mm(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Nn(()=>Promise.resolve().then(()=>Fr),void 0,import.meta.url)).Response:Response});var bn=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(c){try{u(r.next(c))}catch(d){o(d)}}function a(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(l,a)}u((r=r.apply(e,t||[])).next())})};const Vs=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),ym=(e,t)=>bn(void 0,void 0,void 0,function*(){const n=yield gm();e instanceof n?e.json().then(r=>{t(new vm(Vs(r),e.status||500))}).catch(r=>{t(new wu(Vs(r),r))}):t(new wu(Vs(e),e))}),wm=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};function fs(e,t,n,r,i,s){return bn(this,void 0,void 0,function*(){return new Promise((o,l)=>{e(n,wm(t,r,i,s)).then(a=>{if(!a.ok)throw a;return r!=null&&r.noResolveJson?a:a.json()}).then(a=>o(a)).catch(a=>ym(a,l))})})}function Go(e,t,n,r){return bn(this,void 0,void 0,function*(){return fs(e,"GET",t,n,r)})}function pt(e,t,n,r,i){return bn(this,void 0,void 0,function*(){return fs(e,"POST",t,r,i,n)})}function _m(e,t,n,r,i){return bn(this,void 0,void 0,function*(){return fs(e,"PUT",t,r,i,n)})}function lf(e,t,n,r,i){return bn(this,void 0,void 0,function*(){return fs(e,"DELETE",t,r,i,n)})}var Re=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(c){try{u(r.next(c))}catch(d){o(d)}}function a(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(l,a)}u((r=r.apply(e,t||[])).next())})};const Sm={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},_u={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class km{constructor(t,n={},r,i){this.url=t,this.headers=n,this.bucketId=r,this.fetch=of(i)}uploadOrUpdate(t,n,r,i){return Re(this,void 0,void 0,function*(){try{let s;const o=Object.assign(Object.assign({},_u),i),l=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(o.upsert)});typeof Blob<"u"&&r instanceof Blob?(s=new FormData,s.append("cacheControl",o.cacheControl),s.append("",r)):typeof FormData<"u"&&r instanceof FormData?(s=r,s.append("cacheControl",o.cacheControl)):(s=r,l["cache-control"]=`max-age=${o.cacheControl}`,l["content-type"]=o.contentType);const a=this._removeEmptyFolders(n),u=this._getFinalPath(a),c=yield this.fetch(`${this.url}/object/${u}`,Object.assign({method:t,body:s,headers:l},o!=null&&o.duplex?{duplex:o.duplex}:{})),d=yield c.json();return c.ok?{data:{path:a,id:d.Id,fullPath:d.Key},error:null}:{data:null,error:d}}catch(s){if(ae(s))return{data:null,error:s};throw s}})}upload(t,n,r){return Re(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,i){return Re(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(t),o=this._getFinalPath(s),l=new URL(this.url+`/object/upload/sign/${o}`);l.searchParams.set("token",n);try{let a;const u=Object.assign({upsert:_u.upsert},i),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&r instanceof Blob?(a=new FormData,a.append("cacheControl",u.cacheControl),a.append("",r)):typeof FormData<"u"&&r instanceof FormData?(a=r,a.append("cacheControl",u.cacheControl)):(a=r,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const d=yield this.fetch(l.toString(),{method:"PUT",body:a,headers:c}),h=yield d.json();return d.ok?{data:{path:s,fullPath:h.Key},error:null}:{data:null,error:h}}catch(a){if(ae(a))return{data:null,error:a};throw a}})}createSignedUploadUrl(t){return Re(this,void 0,void 0,function*(){try{let n=this._getFinalPath(t);const r=yield pt(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:this.headers}),i=new URL(this.url+r.url),s=i.searchParams.get("token");if(!s)throw new Jl("No token returned by API");return{data:{signedUrl:i.toString(),path:t,token:s},error:null}}catch(n){if(ae(n))return{data:null,error:n};throw n}})}update(t,n,r){return Re(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n){return Re(this,void 0,void 0,function*(){try{return{data:yield pt(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n},{headers:this.headers}),error:null}}catch(r){if(ae(r))return{data:null,error:r};throw r}})}copy(t,n){return Re(this,void 0,void 0,function*(){try{return{data:{path:(yield pt(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n},{headers:this.headers})).Key},error:null}}catch(r){if(ae(r))return{data:null,error:r};throw r}})}createSignedUrl(t,n,r){return Re(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),s=yield pt(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${o}`)},{data:s,error:null}}catch(i){if(ae(i))return{data:null,error:i};throw i}})}createSignedUrls(t,n,r){return Re(this,void 0,void 0,function*(){try{const i=yield pt(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:i.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${s}`):null})),error:null}}catch(i){if(ae(i))return{data:null,error:i};throw i}})}download(t,n){return Re(this,void 0,void 0,function*(){const i=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",s=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),o=s?`?${s}`:"";try{const l=this._getFinalPath(t);return{data:yield(yield Go(this.fetch,`${this.url}/${i}/${l}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(l){if(ae(l))return{data:null,error:l};throw l}})}getPublicUrl(t,n){const r=this._getFinalPath(t),i=[],s=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";s!==""&&i.push(s);const l=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",a=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});a!==""&&i.push(a);let u=i.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${l}/public/${r}${u}`)}}}remove(t){return Re(this,void 0,void 0,function*(){try{return{data:yield lf(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(ae(n))return{data:null,error:n};throw n}})}list(t,n,r){return Re(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},Sm),n),{prefix:t||""});return{data:yield pt(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},r),error:null}}catch(i){if(ae(i))return{data:null,error:i};throw i}})}_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 Em="2.5.5",Cm={"X-Client-Info":`storage-js/${Em}`};var rn=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(c){try{u(r.next(c))}catch(d){o(d)}}function a(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(l,a)}u((r=r.apply(e,t||[])).next())})};class xm{constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},Cm),n),this.fetch=of(r)}listBuckets(){return rn(this,void 0,void 0,function*(){try{return{data:yield Go(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(ae(t))return{data:null,error:t};throw t}})}getBucket(t){return rn(this,void 0,void 0,function*(){try{return{data:yield Go(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(ae(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return rn(this,void 0,void 0,function*(){try{return{data:yield pt(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(r){if(ae(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return rn(this,void 0,void 0,function*(){try{return{data:yield _m(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(r){if(ae(r))return{data:null,error:r};throw r}})}emptyBucket(t){return rn(this,void 0,void 0,function*(){try{return{data:yield pt(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(ae(n))return{data:null,error:n};throw n}})}deleteBucket(t){return rn(this,void 0,void 0,function*(){try{return{data:yield lf(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(ae(n))return{data:null,error:n};throw n}})}}class Pm extends xm{constructor(t,n={},r){super(t,n,r)}from(t){return new km(this.url,this.headers,t,this.fetch)}}const Tm="2.43.4";let nr="";typeof Deno<"u"?nr="deno":typeof document<"u"?nr="web":typeof navigator<"u"&&navigator.product==="ReactNative"?nr="react-native":nr="node";const Om={"X-Client-Info":`supabase-js-${nr}/${Tm}`},Rm={headers:Om},jm={schema:"public"},Lm={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},Im={};var $m=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(c){try{u(r.next(c))}catch(d){o(d)}}function a(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(l,a)}u((r=r.apply(e,t||[])).next())})};const Nm=e=>{let t;return e?t=e:typeof fetch>"u"?t=Kl:t=fetch,(...n)=>t(...n)},Am=()=>typeof Headers>"u"?tf:Headers,Um=(e,t,n)=>{const r=Nm(n),i=Am();return(s,o)=>$m(void 0,void 0,void 0,function*(){var l;const a=(l=yield t())!==null&&l!==void 0?l:e;let u=new i(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",e),u.has("Authorization")||u.set("Authorization",`Bearer ${a}`),r(s,Object.assign(Object.assign({},o),{headers:u}))})};function Dm(e){return e.replace(/\/$/,"")}function zm(e,t){const{db:n,auth:r,realtime:i,global:s}=e,{db:o,auth:l,realtime:a,global:u}=t;return{db:Object.assign(Object.assign({},o),n),auth:Object.assign(Object.assign({},l),r),realtime:Object.assign(Object.assign({},a),i),global:Object.assign(Object.assign({},u),s)}}const af="2.64.2",Fm="http://localhost:9999",Mm="supabase.auth.token",bm={"X-Client-Info":`gotrue-js/${af}`},Su=10,Qo="X-Supabase-Api-Version",uf={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function Bm(e){return Math.round(Date.now()/1e3)+e}function Vm(){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 De=()=>typeof document<"u",Ut={tested:!1,writable:!1},hr=()=>{if(!De())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Ut.tested)return Ut.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),Ut.tested=!0,Ut.writable=!0}catch{Ut.tested=!0,Ut.writable=!1}return Ut.writable};function Hs(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,s)=>{t[s]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const cf=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>Nn(()=>Promise.resolve().then(()=>Fr),void 0,import.meta.url).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},Hm=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",df=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},si=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Ws=async(e,t)=>{await e.removeItem(t)};function Wm(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",r,i,s,o,l,a,u,c=0;for(e=e.replace("-","+").replace("_","/");c<e.length;)o=t.indexOf(e.charAt(c++)),l=t.indexOf(e.charAt(c++)),a=t.indexOf(e.charAt(c++)),u=t.indexOf(e.charAt(c++)),r=o<<2|l>>4,i=(l&15)<<4|a>>2,s=(a&3)<<6|u,n=n+String.fromCharCode(r),a!=64&&i!=0&&(n=n+String.fromCharCode(i)),u!=64&&s!=0&&(n=n+String.fromCharCode(s));return n}class hs{constructor(){this.promise=new hs.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}hs.promiseConstructor=Promise;function ku(e){const t=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=e.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!t.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=n[1];return JSON.parse(Wm(r))}async function Km(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function Gm(e,t){return new Promise((r,i)=>{(async()=>{for(let s=0;s<1/0;s++)try{const o=await e(s);if(!t(s,null,o)){r(o);return}}catch(o){if(!t(s,o)){i(o);return}}})()})}function Qm(e){return("0"+e.toString(16)).substr(-2)}function Jm(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let s=0;s<56;s++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,Qm).join("")}async function qm(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>String.fromCharCode(s)).join("")}function Ym(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Xm(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 qm(e);return Ym(n)}async function sn(e,t,n=!1){const r=Jm();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await df(e,`${t}-code-verifier`,i);const s=await Xm(r);return[s,r===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 eg(e){const t=e.headers.get(Qo);if(!t||!t.match(Zm))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}class ql extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function I(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class tg extends ql{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function ng(e){return I(e)&&e.name==="AuthApiError"}class ff extends ql{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class tn extends ql{constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class Dt extends tn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class Ks extends tn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class oi extends tn{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class li extends tn{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}}}class Eu extends tn{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 Jo extends tn{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function Gs(e){return I(e)&&e.name==="AuthRetryableFetchError"}class Cu extends tn{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}var rg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const Mt=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),ig=[502,503,504];async function xu(e){var t;if(!Hm(e))throw new Jo(Mt(e),0);if(ig.includes(e.status))throw new Jo(Mt(e),e.status);let n;try{n=await e.json()}catch(s){throw new ff(Mt(s),s)}let r;const i=eg(e);if(i&&i.getTime()>=uf["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new Cu(Mt(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[])}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,o)=>s&&typeof o=="string",!0))throw new Cu(Mt(n),e.status,n.weak_password.reasons);throw new tg(Mt(n),e.status||500,r)}const sg=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function N(e,t,n,r){var i;const s=Object.assign({},r==null?void 0:r.headers);s[Qo]||(s[Qo]=uf["2024-01-01"].name),r!=null&&r.jwt&&(s.Authorization=`Bearer ${r.jwt}`);const o=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(o.redirect_to=r.redirectTo);const l=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",a=await og(e,t,n+l,{headers:s,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(a):{data:Object.assign({},a),error:null}}async function og(e,t,n,r,i,s){const o=sg(t,r,i,s);let l;try{l=await e(n,Object.assign({},o))}catch(a){throw console.error(a),new Jo(Mt(a),0)}if(l.ok||await xu(l),r!=null&&r.noResolveJson)return l;try{return await l.json()}catch(a){await xu(a)}}function dt(e){var t;let n=null;cg(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=Bm(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function Pu(e){const t=dt(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,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function gt(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function lg(e){return{data:e,error:null}}function ag(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s}=e,o=rg(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),l={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s},a=Object.assign({},o);return{data:{properties:l,user:a},error:null}}function ug(e){return e}function cg(e){return e.access_token&&e.refresh_token&&e.expires_in}var dg=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};class fg{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=cf(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n="global"){try{return await N(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(I(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await N(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:gt})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=dg(t,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await N(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:ag,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(I(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await N(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:gt})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,i,s,o,l,a;try{const u={nextPage:null,lastPage:0,total:0},c=await N(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(s=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:ug});if(c.error)throw c.error;const d=await c.json(),h=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,m=(a=(l=c.headers.get("link"))===null||l===void 0?void 0:l.split(","))!==null&&a!==void 0?a:[];return m.length>0&&(m.forEach(g=>{const y=parseInt(g.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(g.split(";")[1].split("=")[1]);u[`${_}Page`]=y}),u.total=parseInt(h)),{data:Object.assign(Object.assign({},d),u),error:null}}catch(u){if(I(u))return{data:{users:[]},error:u};throw u}}async getUserById(t){try{return await N(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:gt})}catch(n){if(I(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){try{return await N(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:gt})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async deleteUser(t,n=!1){try{return await N(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:gt})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){try{const{data:n,error:r}=await N(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(I(n))return{data:null,error:n};throw n}}async _deleteFactor(t){try{return{data:await N(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(I(n))return{data:null,error:n};throw n}}}const hg={getItem:e=>hr()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{hr()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{hr()&&globalThis.localStorage.removeItem(e)}};function Tu(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function pg(){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 on={debug:!!(globalThis&&hr()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class hf extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class vg extends hf{}async function mg(e,t,n){on.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),on.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){on.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{on.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw on.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new vg(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(on.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()}})}pg();const gg={url:Fm,storageKey:Mm,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:bm,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Yn=30*1e3,Ou=3;async function Ru(e,t,n){return await n()}class $r{constructor(t){var n,r;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=$r.nextInstanceID,$r.nextInstanceID+=1,this.instanceID>0&&De()&&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 i=Object.assign(Object.assign({},gg),t);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new fg({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=cf(i.fetch),this.lock=i.lock||Ru,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:De()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=mg:this.lock=Ru,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?i.storage?this.storage=i.storage:hr()?this.storage=hg:(this.memoryStorage={},this.storage=Tu(this.memoryStorage)):(this.memoryStorage={},this.storage=Tu(this.memoryStorage)),De()&&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)}(r=this.broadcastChannel)===null||r===void 0||r.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} (${af}) ${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(){try{const t=De()?await this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",t),t||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:n,error:r}=await this._getSessionFromURL(t);if(r)return this._debug("#_initialize()","error detecting session from URL",r),(r==null?void 0:r.message)==="Identity is already linked"||(r==null?void 0:r.message)==="Identity is already linked to another user"?{error:r}:(await this._removeSession(),{error:r});const{session:i,redirectType:s}=n;return this._debug("#_initialize()","detected session in URL",i,"redirect type",s),await this._saveSession(i),setTimeout(async()=>{s==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",i):await this._notifyAllSubscribers("SIGNED_IN",i)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(t){return I(t)?{error:t}:{error:new ff("Unexpected error during initialization",t)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{await this._removeSession();const s=await N(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:dt}),{data:o,error:l}=s;if(l||!o)return{data:{user:null,session:null},error:l};const a=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:u,session:a},error:null}}catch(s){if(I(s))return{data:{user:null,session:null},error:s};throw s}}async signUp(t){var n,r,i;try{await this._removeSession();let s;if("email"in t){const{email:c,password:d,options:h}=t;let m=null,g=null;this.flowType==="pkce"&&([m,g]=await sn(this.storage,this.storageKey)),s=await N(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:h==null?void 0:h.emailRedirectTo,body:{email:c,password:d,data:(n=h==null?void 0:h.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken},code_challenge:m,code_challenge_method:g},xform:dt})}else if("phone"in t){const{phone:c,password:d,options:h}=t;s=await N(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:d,data:(r=h==null?void 0:h.data)!==null&&r!==void 0?r:{},channel:(i=h==null?void 0:h.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:h==null?void 0:h.captchaToken}},xform:dt})}else throw new oi("You must provide either an email or phone number and a password");const{data:o,error:l}=s;if(l||!o)return{data:{user:null,session:null},error:l};const a=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",a)),{data:{user:u,session:a},error:null}}catch(s){if(I(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithPassword(t){try{await this._removeSession();let n;if("email"in t){const{email:s,password:o,options:l}=t;n=await N(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Pu})}else if("phone"in t){const{phone:s,password:o,options:l}=t;n=await N(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:o,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken}},xform:Pu})}else throw new oi("You must provide either an email or phone number and a password");const{data:r,error:i}=n;return i?{data:{user:null,session:null},error:i}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new Ks}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(I(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,i,s;return await this._removeSession(),await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.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 si(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/"),{data:s,error:o}=await N(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:dt});return await Ws(this.storage,`${this.storageKey}-code-verifier`),o?{data:{user:null,session:null,redirectType:null},error:o}:!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new Ks}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:i??null}),error:o})}async signInWithIdToken(t){await this._removeSession();try{const{options:n,provider:r,token:i,access_token:s,nonce:o}=t,l=await N(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:s,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:dt}),{data:a,error:u}=l;return u?{data:{user:null,session:null},error:u}:!a||!a.session||!a.user?{data:{user:null,session:null},error:new Ks}:(a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",a.session)),{data:a,error:u})}catch(n){if(I(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,i,s,o;try{if(await this._removeSession(),"email"in t){const{email:l,options:a}=t;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await sn(this.storage,this.storageKey));const{error:d}=await N(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:l,data:(n=a==null?void 0:a.data)!==null&&n!==void 0?n:{},create_user:(r=a==null?void 0:a.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:a==null?void 0:a.emailRedirectTo});return{data:{user:null,session:null},error:d}}if("phone"in t){const{phone:l,options:a}=t,{data:u,error:c}=await N(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:l,data:(i=a==null?void 0:a.data)!==null&&i!==void 0?i:{},create_user:(s=a==null?void 0:a.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken},channel:(o=a==null?void 0:a.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c}}throw new oi("You must provide either an email or phone number.")}catch(l){if(I(l))return{data:{user:null,session:null},error:l};throw l}}async verifyOtp(t){var n,r;try{t.type!=="email_change"&&t.type!=="phone_change"&&await this._removeSession();let i,s;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,s=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:o,error:l}=await N(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:s}}),redirectTo:i,xform:dt});if(l)throw l;if(!o)throw new Error("An error occurred on token verification.");const a=o.session,u=o.user;return a!=null&&a.access_token&&(await this._saveSession(a),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",a)),{data:{user:u,session:a},error:null}}catch(i){if(I(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(t){var n,r,i;try{await this._removeSession();let s=null,o=null;return this.flowType==="pkce"&&([s,o]=await sn(this.storage,this.storageKey)),await N(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:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:o}),headers:this.headers,xform:lg})}catch(s){if(I(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:r}=t;if(r)throw r;if(!n)throw new Dt;const{error:i}=await N(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:i}})}catch(t){if(I(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{t.type!="email_change"&&t.type!="phone_change"&&await this._removeSession();const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:s}=t,{error:o}=await N(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,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:o}}else if("phone"in t){const{phone:r,type:i,options:s}=t,{data:o,error:l}=await N(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:l}}throw new oi("You must provide either an email or phone number and a type")}catch(n){if(I(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 r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}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 si(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 r=t.expires_at?t.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.storage.isServer){const o=this.suppressGetSessionWarning;t=new Proxy(t,{get(a,u,c){return!o&&u==="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 many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),Reflect.get(a,u,c)}})}return{data:{session:t},error:null}}const{session:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{session:null},error:s}:{data:{session:i},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 N(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:gt}):await this._useSession(async n=>{var r,i,s;const{data:o,error:l}=n;if(l)throw l;return!(!((r=o.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new Dt}:await N(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(i=o.session)===null||i===void 0?void 0:i.access_token)!==null&&s!==void 0?s:void 0,xform:gt})})}catch(n){if(I(n))return{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 r=>{const{data:i,error:s}=r;if(s)throw s;if(!i.session)throw new Dt;const o=i.session;let l=null,a=null;this.flowType==="pkce"&&t.email!=null&&([l,a]=await sn(this.storage,this.storageKey));const{data:u,error:c}=await N(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:l,code_challenge_method:a}),jwt:o.access_token,xform:gt});if(c)throw c;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(r){if(I(r))return{data:{user:null},error:r};throw r}}_decodeJWT(t){return ku(t)}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 Dt;const n=Date.now()/1e3;let r=n,i=!0,s=null;const o=ku(t.access_token);if(o.exp&&(r=o.exp,i=r<=n),i){const{session:l,error:a}=await this._callRefreshToken(t.refresh_token);if(a)return{data:{user:null,session:null},error:a};if(!l)return{data:{user:null,session:null},error:null};s=l}else{const{data:l,error:a}=await this._getUser(t.access_token);if(a)throw a;s={access_token:t.access_token,refresh_token:t.refresh_token,user:l.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(n){if(I(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 r;if(!t){const{data:o,error:l}=n;if(l)throw l;t=(r=o.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new Dt;const{session:i,error:s}=await this._callRefreshToken(t.refresh_token);return s?{data:{user:null,session:null},error:s}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(I(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t){try{if(!De())throw new li("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new li("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!t)throw new Eu("Not a valid PKCE flow url.");const n=Hs(window.location.href);if(t){if(!n.code)throw new Eu("No code detected.");const{data:f,error:v}=await this._exchangeCodeForSession(n.code);if(v)throw v;const w=new URL(window.location.href);return w.searchParams.delete("code"),window.history.replaceState(window.history.state,"",w.toString()),{data:{session:f.session,redirectType:null},error:null}}if(n.error||n.error_description||n.error_code)throw new li(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});const{provider_token:r,provider_refresh_token:i,access_token:s,refresh_token:o,expires_in:l,expires_at:a,token_type:u}=n;if(!s||!l||!o||!u)throw new li("No session defined in URL");const c=Math.round(Date.now()/1e3),d=parseInt(l);let h=c+d;a&&(h=parseInt(a));const m=h-c;m*1e3<=Yn&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${d}s`);const g=h-d;c-g>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",g,h,c):c-g<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",g,h,c);const{data:y,error:_}=await this._getUser(s);if(_)throw _;const p={provider_token:r,provider_refresh_token:i,access_token:s,expires_in:d,expires_at:h,refresh_token:o,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:p,redirectType:n.type},error:null}}catch(n){if(I(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantFlow(){const t=Hs(window.location.href);return!!(De()&&(t.access_token||t.error_description))}async _isPKCEFlow(){const t=Hs(window.location.href),n=await si(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 r;const{data:i,error:s}=n;if(s)return{error:s};const o=(r=i.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:l}=await this.admin.signOut(o,t);if(l&&!(ng(l)&&(l.status===404||l.status===401||l.status===403)))return{error:l}}return t!=="others"&&(await this._removeSession(),await Ws(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(t){const n=Vm(),r={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,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:s},error:o}=n;if(o)throw o;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",t,"session",s)}catch(s){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",s),console.error(s)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await sn(this.storage,this.storageKey,!0));try{return await N(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(I(s))return{data:null,error:s};throw s}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(I(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:i}=await this._useSession(async s=>{var o,l,a,u,c;const{data:d,error:h}=s;if(h)throw h;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(o=t.options)===null||o===void 0?void 0:o.redirectTo,scopes:(l=t.options)===null||l===void 0?void 0:l.scopes,queryParams:(a=t.options)===null||a===void 0?void 0:a.queryParams,skipBrowserRedirect:!0});return await N(this.fetch,"GET",m,{headers:this.headers,jwt:(c=(u=d.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(i)throw i;return De()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(I(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:o}=n;if(o)throw o;return await N(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await Gm(async i=>(i>0&&await Km(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await N(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:dt})),(i,s)=>{const o=200*Math.pow(2,i);return s&&Gs(s)&&Date.now()+o-r<Yn})}catch(r){if(this._debug(n,"error",r),I(r))return{data:{session:null,user:null},error:r};throw r}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 r=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",r),De()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const r=await si(this.storage,this.storageKey);if(this._debug(n,"session from storage",r),!this._isValidSession(r)){this._debug(n,"session is not valid"),r!==null&&await this._removeSession();return}const i=Math.round(Date.now()/1e3),s=((t=r.expires_at)!==null&&t!==void 0?t:1/0)<i+Su;if(this._debug(n,`session has${s?"":" not"} expired with margin of ${Su}s`),s){if(this.autoRefreshToken&&r.refresh_token){const{error:o}=await this._callRefreshToken(r.refresh_token);o&&(console.error(o),Gs(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",r)}catch(r){this._debug(n,"error",r),console.error(r);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new Dt;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new hs;const{data:s,error:o}=await this._refreshAccessToken(t);if(o)throw o;if(!s.session)throw new Dt;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const l={session:s.session,error:null};return this.refreshingDeferred.resolve(l),l}catch(s){if(this._debug(i,"error",s),I(s)){const o={session:null,error:s};return Gs(s)||(await this._removeSession(),await this._notifyAllSubscribers("SIGNED_OUT",null)),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(s),s}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,r=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const s=[],o=Array.from(this.stateChangeEmitters.values()).map(async l=>{try{await l.callback(t,n)}catch(a){s.push(a)}});if(await Promise.all(o),s.length>0){for(let l=0;l<s.length;l+=1)console.error(s[l]);throw s[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await df(this.storage,this.storageKey,t)}async _removeSession(){this._debug("#_removeSession()"),await Ws(this.storage,this.storageKey)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&De()&&(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(),Yn);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:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/Yn);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Yn}ms, refresh threshold is ${Ou} ticks`),i<=Ou&&await this._callRefreshToken(r.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 hf)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!De()||!(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,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[s,o]=await sn(this.storage,this.storageKey),l=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(o)}`});i.push(l.toString())}if(r!=null&&r.queryParams){const s=new URLSearchParams(r.queryParams);i.push(s.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?{data:null,error:s}:await N(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:s,error:o}=n;if(o)return{data:null,error:o};const{data:l,error:a}=await N(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:t.friendlyName,factor_type:t.factorType,issuer:t.issuer},headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(I(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;if(s)return{data:null,error:s};const{data:o,error:l}=await N(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return l?{data:null,error:l}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:l})})}catch(n){if(I(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?{data:null,error:s}:await N(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(I(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}: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 r=(t==null?void 0:t.factors)||[],i=r.filter(s=>s.factor_type==="totp"&&s.status==="verified");return{data:{all:r,totp:i},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:i},error:s}=t;if(s)return{data:null,error:s};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const o=this._decodeJWT(i.access_token);let l=null;o.aal&&(l=o.aal);let a=l;((r=(n=i.user.factors)===null||n===void 0?void 0:n.filter(d=>d.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(a="aal2");const c=o.amr||[];return{data:{currentLevel:l,nextLevel:a,currentAuthenticationMethods:c},error:null}}))}}$r.nextInstanceID=0;const yg=$r;class wg extends yg{constructor(t){super(t)}}var _g=function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function l(c){try{u(r.next(c))}catch(d){o(d)}}function a(c){try{u(r.throw(c))}catch(d){o(d)}}function u(c){c.done?s(c.value):i(c.value).then(l,a)}u((r=r.apply(e,t||[])).next())})};class Sg{constructor(t,n,r){var i,s,o;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const l=Dm(t);this.realtimeUrl=`${l}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${l}/auth/v1`,this.storageUrl=`${l}/storage/v1`,this.functionsUrl=`${l}/functions/v1`;const a=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,u={db:jm,realtime:Im,auth:Object.assign(Object.assign({},Lm),{storageKey:a}),global:Rm},c=zm(r??{},u);this.storageKey=(i=c.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},this.auth=this._initSupabaseAuthClient((o=c.auth)!==null&&o!==void 0?o:{},this.headers,c.global.fetch),this.fetch=Um(n,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},c.realtime)),this.rest=new Gl(`${l}/rest/v1`,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new Vv(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new Pm(this.storageUrl,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}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 _g(this,void 0,void 0,function*(){const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,storageKey:s,flowType:o,debug:l},a,u){var c;const d={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new wg({url:this.authUrl,headers:Object.assign(Object.assign({},d),a),storageKey:s,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,flowType:o,debug:l,fetch:u,hasCustomAuthorizationHeader:(c="Authorization"in this.headers)!==null&&c!==void 0?c:!1})}_initRealtimeClient(t){return new hm(this.realtimeUrl,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?(this.realtime.setAuth(r??null),this.changedAccessToken=r):t==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const kg=(e,t,n)=>new Sg(e,t,n);function Eg(e){const t=Xd(),[n,r]=E.useState([]);E.useEffect(()=>{e.session||t("/login")},[e.session]);const i=E.useCallback(async()=>{const{data:s,error:o}=await e.supabase.from("file").select();if(o){console.error(o);return}console.log("data",s),r(s.map(l=>l))},[e.supabase]);return E.useEffect(()=>{i()},[]),z.jsx(z.Fragment,{children:z.jsxs("div",{children:[z.jsx("h1",{className:"font-bold",children:"Home"}),z.jsx("p",{children:"Logged in!"}),n.map(s=>z.jsx("div",{children:z.jsxs("p",{className:"underline",children:["file: ",s.absolute_path]})},s.id))]})})}function Cg(e={}){const{nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}=e,[i,s]=E.useState(!1),o=E.useRef(n);o.current=n;const l=E.useRef(r);return l.current=r,E.useEffect(()=>{const a=document.createElement("script");return a.src="https://accounts.google.com/gsi/client",a.async=!0,a.defer=!0,a.nonce=t,a.onload=()=>{var u;s(!0),(u=o.current)===null||u===void 0||u.call(o)},a.onerror=()=>{var u;s(!1),(u=l.current)===null||u===void 0||u.call(l)},document.body.appendChild(a),()=>{document.body.removeChild(a)}},[t]),i}const pf=E.createContext(null);function xg({clientId:e,nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r,children:i}){const s=Cg({nonce:t,onScriptLoadSuccess:n,onScriptLoadError:r}),o=E.useMemo(()=>({clientId:e,scriptLoadedSuccessfully:s}),[e,s]);return Gi.createElement(pf.Provider,{value:o},i)}function Pg(){const e=E.useContext(pf);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function Tg(e){var t;return(t=e==null?void 0:e.clientId)!==null&&t!==void 0?t:e==null?void 0:e.client_id}const Og={large:40,medium:32,small:20};function Rg({onSuccess:e,onError:t,useOneTap:n,promptMomentNotification:r,type:i="standard",theme:s="outline",size:o="large",text:l,shape:a,logo_alignment:u,width:c,locale:d,click_listener:h,containerProps:m,...g}){const y=E.useRef(null),{clientId:_,scriptLoadedSuccessfully:p}=Pg(),f=E.useRef(e);f.current=e;const v=E.useRef(t);v.current=t;const w=E.useRef(r);return w.current=r,E.useEffect(()=>{var k,P,T,O,M,j,de,qe,Ye;if(p)return(T=(P=(k=window==null?void 0:window.google)===null||k===void 0?void 0:k.accounts)===null||P===void 0?void 0:P.id)===null||T===void 0||T.initialize({client_id:_,callback:Oe=>{var Xe;if(!(Oe!=null&&Oe.credential))return(Xe=v.current)===null||Xe===void 0?void 0:Xe.call(v);const{credential:Ze,select_by:Bn}=Oe;f.current({credential:Ze,clientId:Tg(Oe),select_by:Bn})},...g}),(j=(M=(O=window==null?void 0:window.google)===null||O===void 0?void 0:O.accounts)===null||M===void 0?void 0:M.id)===null||j===void 0||j.renderButton(y.current,{type:i,theme:s,size:o,text:l,shape:a,logo_alignment:u,width:c,locale:d,click_listener:h}),n&&((Ye=(qe=(de=window==null?void 0:window.google)===null||de===void 0?void 0:de.accounts)===null||qe===void 0?void 0:qe.id)===null||Ye===void 0||Ye.prompt(w.current)),()=>{var Oe,Xe,Ze;n&&((Ze=(Xe=(Oe=window==null?void 0:window.google)===null||Oe===void 0?void 0:Oe.accounts)===null||Xe===void 0?void 0:Xe.id)===null||Ze===void 0||Ze.cancel())}},[_,p,n,i,s,o,l,a,u,c,d]),Gi.createElement("div",{...m,ref:y,style:{height:Og[o],...m==null?void 0:m.style}})}function jg(e){const t=Xd();return E.useEffect(()=>{e.supabase.auth.getSession().then(({data:{session:r}})=>{e.setSession(r),console.log("LOGIN SESSION",r)});const{data:{subscription:n}}=e.supabase.auth.onAuthStateChange((r,i)=>{e.setSession(i),console.log("SESSION CHANGE",i)});return()=>n.unsubscribe()},[e.supabase]),E.useEffect(()=>{e.session&&t("/")},[e.session]),z.jsxs(z.Fragment,{children:[z.jsxs("div",{children:[z.jsx("h1",{children:"Login"}),z.jsxs("p",{children:["Log in to access your account! ",JSON.stringify(e.session)]})]}),z.jsx(xg,{clientId:"952965459060-nrnrsdoq22mf646vfa72hk410pvdda5q.apps.googleusercontent.com",children:z.jsx(Rg,{onSuccess:async n=>{await e.supabase.auth.signInWithIdToken({provider:"google",token:n.credential})},onError:()=>{console.log("Login Failed")}})})]})}const ju=kg("https://slpoocycjgqsuoedhkbn.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNscG9vY3ljamdxc3VvZWRoa2JuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTUyMDU0MjUsImV4cCI6MjAzMDc4MTQyNX0.xZYRTRN65rlms1Hb96IBAQvw3EGtMzUxlGPP5TVey34");function Lg(){const[e,t]=E.useState(null);return z.jsx(z.Fragment,{children:z.jsx(Av,{basename:"/fs-tracer-frontend",children:z.jsxs(Iv,{children:[z.jsx(_i,{index:!0,element:z.jsx(Eg,{supabase:ju,session:e})}),z.jsx(_i,{path:"login",element:z.jsx(jg,{supabase:ju,session:e,setSession:t})}),z.jsx(_i,{path:"*",element:z.jsx("p",{children:"notfound"})})]})})})}Qs.createRoot(document.getElementById("root")).render(z.jsx(Gi.StrictMode,{children:z.jsx(Lg,{})}));export{mf as g};
diff --git a/assets/index-CCYnKuN0.js b/assets/index-CCYnKuN0.js
new file mode 100644
index 0000000..5b64f05
--- /dev/null
+++ b/assets/index-CCYnKuN0.js
@@ -0,0 +1,84 @@
+var qm=Object.defineProperty;var Qm=(t,e,n)=>e in t?qm(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var I=(t,e,n)=>(Qm(t,typeof e!="symbol"?e+"":e,n),n);function Xm(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).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 i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function Jm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Tf={exports:{}},Wo={},Of={exports:{}},N={};/**
+ * @license React
+ * react.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var is=Symbol.for("react.element"),Zm=Symbol.for("react.portal"),e0=Symbol.for("react.fragment"),t0=Symbol.for("react.strict_mode"),n0=Symbol.for("react.profiler"),i0=Symbol.for("react.provider"),r0=Symbol.for("react.context"),s0=Symbol.for("react.forward_ref"),o0=Symbol.for("react.suspense"),a0=Symbol.for("react.memo"),l0=Symbol.for("react.lazy"),Ac=Symbol.iterator;function u0(t){return t===null||typeof t!="object"?null:(t=Ac&&t[Ac]||t["@@iterator"],typeof t=="function"?t:null)}var Mf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lf=Object.assign,Rf={};function ji(t,e,n){this.props=t,this.context=e,this.refs=Rf,this.updater=n||Mf}ji.prototype.isReactComponent={};ji.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};ji.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function If(){}If.prototype=ji.prototype;function vu(t,e,n){this.props=t,this.context=e,this.refs=Rf,this.updater=n||Mf}var _u=vu.prototype=new If;_u.constructor=vu;Lf(_u,ji.prototype);_u.isPureReactComponent=!0;var Dc=Array.isArray,Af=Object.prototype.hasOwnProperty,wu={current:null},Df={key:!0,ref:!0,__self:!0,__source:!0};function jf(t,e,n){var i,r={},s=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)Af.call(e,i)&&!Df.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}if(t&&t.defaultProps)for(i in a=t.defaultProps,a)r[i]===void 0&&(r[i]=a[i]);return{$$typeof:is,type:t,key:s,ref:o,props:r,_owner:wu.current}}function c0(t,e){return{$$typeof:is,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function xu(t){return typeof t=="object"&&t!==null&&t.$$typeof===is}function h0(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var jc=/\/+/g;function ma(t,e){return typeof t=="object"&&t!==null&&t.key!=null?h0(""+t.key):e.toString(36)}function Ys(t,e,n,i,r){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var o=!1;if(t===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case is:case Zm:o=!0}}if(o)return o=t,r=r(o),t=i===""?"."+ma(o,0):i,Dc(r)?(n="",t!=null&&(n=t.replace(jc,"$&/")+"/"),Ys(r,e,n,"",function(u){return u})):r!=null&&(xu(r)&&(r=c0(r,n+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(jc,"$&/")+"/")+t)),e.push(r)),1;if(o=0,i=i===""?".":i+":",Dc(t))for(var a=0;a<t.length;a++){s=t[a];var l=i+ma(s,a);o+=Ys(s,e,n,l,r)}else if(l=u0(t),typeof l=="function")for(t=l.call(t),a=0;!(s=t.next()).done;)s=s.value,l=i+ma(s,a++),o+=Ys(s,e,n,l,r);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return o}function ds(t,e,n){if(t==null)return t;var i=[],r=0;return Ys(t,i,"","",function(s){return e.call(n,s,r++)}),i}function d0(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Ie={current:null},Gs={transition:null},f0={ReactCurrentDispatcher:Ie,ReactCurrentBatchConfig:Gs,ReactCurrentOwner:wu};function Nf(){throw Error("act(...) is not supported in production builds of React.")}N.Children={map:ds,forEach:function(t,e,n){ds(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return ds(t,function(){e++}),e},toArray:function(t){return ds(t,function(e){return e})||[]},only:function(t){if(!xu(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};N.Component=ji;N.Fragment=e0;N.Profiler=n0;N.PureComponent=vu;N.StrictMode=t0;N.Suspense=o0;N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=f0;N.act=Nf;N.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var i=Lf({},t.props),r=t.key,s=t.ref,o=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,o=wu.current),e.key!==void 0&&(r=""+e.key),t.type&&t.type.defaultProps)var a=t.type.defaultProps;for(l in e)Af.call(e,l)&&!Df.hasOwnProperty(l)&&(i[l]=e[l]===void 0&&a!==void 0?a[l]:e[l])}var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];i.children=a}return{$$typeof:is,type:t.type,key:r,ref:s,props:i,_owner:o}};N.createContext=function(t){return t={$$typeof:r0,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:i0,_context:t},t.Consumer=t};N.createElement=jf;N.createFactory=function(t){var e=jf.bind(null,t);return e.type=t,e};N.createRef=function(){return{current:null}};N.forwardRef=function(t){return{$$typeof:s0,render:t}};N.isValidElement=xu;N.lazy=function(t){return{$$typeof:l0,_payload:{_status:-1,_result:t},_init:d0}};N.memo=function(t,e){return{$$typeof:a0,type:t,compare:e===void 0?null:e}};N.startTransition=function(t){var e=Gs.transition;Gs.transition={};try{t()}finally{Gs.transition=e}};N.unstable_act=Nf;N.useCallback=function(t,e){return Ie.current.useCallback(t,e)};N.useContext=function(t){return Ie.current.useContext(t)};N.useDebugValue=function(){};N.useDeferredValue=function(t){return Ie.current.useDeferredValue(t)};N.useEffect=function(t,e){return Ie.current.useEffect(t,e)};N.useId=function(){return Ie.current.useId()};N.useImperativeHandle=function(t,e,n){return Ie.current.useImperativeHandle(t,e,n)};N.useInsertionEffect=function(t,e){return Ie.current.useInsertionEffect(t,e)};N.useLayoutEffect=function(t,e){return Ie.current.useLayoutEffect(t,e)};N.useMemo=function(t,e){return Ie.current.useMemo(t,e)};N.useReducer=function(t,e,n){return Ie.current.useReducer(t,e,n)};N.useRef=function(t){return Ie.current.useRef(t)};N.useState=function(t){return Ie.current.useState(t)};N.useSyncExternalStore=function(t,e,n){return Ie.current.useSyncExternalStore(t,e,n)};N.useTransition=function(){return Ie.current.useTransition()};N.version="18.3.1";Of.exports=N;var E=Of.exports;const Ni=Jm(E),p0=Xm({__proto__:null,default:Ni},[E]);/**
+ * @license React
+ * react-jsx-runtime.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var g0=E,m0=Symbol.for("react.element"),y0=Symbol.for("react.fragment"),v0=Object.prototype.hasOwnProperty,_0=g0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,w0={key:!0,ref:!0,__self:!0,__source:!0};function zf(t,e,n){var i,r={},s=null,o=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(o=e.ref);for(i in e)v0.call(e,i)&&!w0.hasOwnProperty(i)&&(r[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps,e)r[i]===void 0&&(r[i]=e[i]);return{$$typeof:m0,type:t,key:s,ref:o,props:r,_owner:_0.current}}Wo.Fragment=y0;Wo.jsx=zf;Wo.jsxs=zf;Tf.exports=Wo;var L=Tf.exports,sl={},Ff={exports:{}},Qe={},$f={exports:{}},Uf={};/**
+ * @license React
+ * scheduler.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */(function(t){function e(P,R){var A=P.length;P.push(R);e:for(;0<A;){var Y=A-1>>>1,Q=P[Y];if(0<r(Q,R))P[Y]=R,P[A]=Q,A=Y;else break e}}function n(P){return P.length===0?null:P[0]}function i(P){if(P.length===0)return null;var R=P[0],A=P.pop();if(A!==R){P[0]=A;e:for(var Y=0,Q=P.length,vt=Q>>>1;Y<vt;){var Te=2*(Y+1)-1,Et=P[Te],Oe=Te+1,hs=P[Oe];if(0>r(Et,A))Oe<Q&&0>r(hs,Et)?(P[Y]=hs,P[Oe]=A,Y=Oe):(P[Y]=Et,P[Te]=A,Y=Te);else if(Oe<Q&&0>r(hs,A))P[Y]=hs,P[Oe]=A,Y=Oe;else break e}}return R}function r(P,R){var A=P.sortIndex-R.sortIndex;return A!==0?A:P.id-R.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();t.unstable_now=function(){return o.now()-a}}var l=[],u=[],c=1,h=null,d=3,f=!1,m=!1,y=!1,v=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(P){for(var R=n(u);R!==null;){if(R.callback===null)i(u);else if(R.startTime<=P)i(u),R.sortIndex=R.expirationTime,e(l,R);else break;R=n(u)}}function w(P){if(y=!1,_(P),!m)if(n(l)!==null)m=!0,K(x);else{var R=n(u);R!==null&&me(w,R.startTime-P)}}function x(P,R){m=!1,y&&(y=!1,p(S),S=-1),f=!0;var A=d;try{for(_(R),h=n(l);h!==null&&(!(h.expirationTime>R)||P&&!D());){var Y=h.callback;if(typeof Y=="function"){h.callback=null,d=h.priorityLevel;var Q=Y(h.expirationTime<=R);R=t.unstable_now(),typeof Q=="function"?h.callback=Q:h===n(l)&&i(l),_(R)}else i(l);h=n(l)}if(h!==null)var vt=!0;else{var Te=n(u);Te!==null&&me(w,Te.startTime-R),vt=!1}return vt}finally{h=null,d=A,f=!1}}var b=!1,k=null,S=-1,M=5,O=-1;function D(){return!(t.unstable_now()-O<M)}function B(){if(k!==null){var P=t.unstable_now();O=P;var R=!0;try{R=k(!0,P)}finally{R?ce():(b=!1,k=null)}}else b=!1}var ce;if(typeof g=="function")ce=function(){g(B)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,$=ae.port2;ae.port1.onmessage=B,ce=function(){$.postMessage(null)}}else ce=function(){v(B,0)};function K(P){k=P,b||(b=!0,ce())}function me(P,R){S=v(function(){P(t.unstable_now())},R)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(P){P.callback=null},t.unstable_continueExecution=function(){m||f||(m=!0,K(x))},t.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<P?Math.floor(1e3/P):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(P){switch(d){case 1:case 2:case 3:var R=3;break;default:R=d}var A=d;d=R;try{return P()}finally{d=A}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(P,R){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var A=d;d=P;try{return R()}finally{d=A}},t.unstable_scheduleCallback=function(P,R,A){var Y=t.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?Y+A:Y):A=Y,P){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=A+Q,P={id:c++,callback:R,priorityLevel:P,startTime:A,expirationTime:Q,sortIndex:-1},A>Y?(P.sortIndex=A,e(u,P),n(l)===null&&P===n(u)&&(y?(p(S),S=-1):y=!0,me(w,A-Y))):(P.sortIndex=Q,e(l,P),m||f||(m=!0,K(x))),P},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(P){var R=d;return function(){var A=d;d=R;try{return P.apply(this,arguments)}finally{d=A}}}})(Uf);$f.exports=Uf;var x0=$f.exports;/**
+ * @license React
+ * react-dom.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var k0=E,Ge=x0;function C(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Bf=new Set,Lr={};function Gn(t,e){Si(t,e),Si(t+"Capture",e)}function Si(t,e){for(Lr[t]=e,t=0;t<e.length;t++)Bf.add(e[t])}var Nt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ol=Object.prototype.hasOwnProperty,b0=/^[: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]*$/,Nc={},zc={};function S0(t){return ol.call(zc,t)?!0:ol.call(Nc,t)?!1:b0.test(t)?zc[t]=!0:(Nc[t]=!0,!1)}function C0(t,e,n,i){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function E0(t,e,n,i){if(e===null||typeof e>"u"||C0(t,e,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function Ae(t,e,n,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var ke={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ke[t]=new Ae(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ke[e]=new Ae(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ke[t]=new Ae(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ke[t]=new Ae(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){ke[t]=new Ae(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ke[t]=new Ae(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ke[t]=new Ae(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ke[t]=new Ae(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ke[t]=new Ae(t,5,!1,t.toLowerCase(),null,!1,!1)});var ku=/[\-:]([a-z])/g;function bu(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(ku,bu);ke[e]=new Ae(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(ku,bu);ke[e]=new Ae(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(ku,bu);ke[e]=new Ae(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ke[t]=new Ae(t,1,!1,t.toLowerCase(),null,!1,!1)});ke.xlinkHref=new Ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ke[t]=new Ae(t,1,!1,t.toLowerCase(),null,!0,!0)});function Su(t,e,n,i){var r=ke.hasOwnProperty(e)?ke[e]:null;(r!==null?r.type!==0:i||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(E0(e,n,r,i)&&(n=null),i||r===null?S0(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):r.mustUseProperty?t[r.propertyName]=n===null?r.type===3?!1:"":n:(e=r.attributeName,i=r.attributeNamespace,n===null?t.removeAttribute(e):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,i?t.setAttributeNS(i,e,n):t.setAttribute(e,n))))}var Ut=k0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fs=Symbol.for("react.element"),si=Symbol.for("react.portal"),oi=Symbol.for("react.fragment"),Cu=Symbol.for("react.strict_mode"),al=Symbol.for("react.profiler"),Vf=Symbol.for("react.provider"),Hf=Symbol.for("react.context"),Eu=Symbol.for("react.forward_ref"),ll=Symbol.for("react.suspense"),ul=Symbol.for("react.suspense_list"),Pu=Symbol.for("react.memo"),Wt=Symbol.for("react.lazy"),Wf=Symbol.for("react.offscreen"),Fc=Symbol.iterator;function Vi(t){return t===null||typeof t!="object"?null:(t=Fc&&t[Fc]||t["@@iterator"],typeof t=="function"?t:null)}var ie=Object.assign,ya;function ir(t){if(ya===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ya=e&&e[1]||""}return`
+`+ya+t}var va=!1;function _a(t,e){if(!t||va)return"";va=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(u){var i=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){i=u}t.call(e.prototype)}else{try{throw Error()}catch(u){i=u}t()}}catch(u){if(u&&i&&typeof u.stack=="string"){for(var r=u.stack.split(`
+`),s=i.stack.split(`
+`),o=r.length-1,a=s.length-1;1<=o&&0<=a&&r[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(r[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||r[o]!==s[a]){var l=`
+`+r[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=a);break}}}finally{va=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ir(t):""}function P0(t){switch(t.tag){case 5:return ir(t.type);case 16:return ir("Lazy");case 13:return ir("Suspense");case 19:return ir("SuspenseList");case 0:case 2:case 15:return t=_a(t.type,!1),t;case 11:return t=_a(t.type.render,!1),t;case 1:return t=_a(t.type,!0),t;default:return""}}function cl(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case oi:return"Fragment";case si:return"Portal";case al:return"Profiler";case Cu:return"StrictMode";case ll:return"Suspense";case ul:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Hf:return(t.displayName||"Context")+".Consumer";case Vf:return(t._context.displayName||"Context")+".Provider";case Eu:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Pu:return e=t.displayName||null,e!==null?e:cl(t.type)||"Memo";case Wt:e=t._payload,t=t._init;try{return cl(t(e))}catch{}}return null}function T0(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return cl(e);case 8:return e===Cu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function pn(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Kf(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function O0(t){var e=Kf(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),i=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ps(t){t._valueTracker||(t._valueTracker=O0(t))}function Yf(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),i="";return t&&(i=Kf(t)?t.checked?"true":"false":t.value),t=i,t!==n?(e.setValue(t),!0):!1}function uo(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function hl(t,e){var n=e.checked;return ie({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function $c(t,e){var n=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;n=pn(e.value!=null?e.value:n),t._wrapperState={initialChecked:i,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Gf(t,e){e=e.checked,e!=null&&Su(t,"checked",e,!1)}function dl(t,e){Gf(t,e);var n=pn(e.value),i=e.type;if(n!=null)i==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(i==="submit"||i==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?fl(t,e.type,n):e.hasOwnProperty("defaultValue")&&fl(t,e.type,pn(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function Uc(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function fl(t,e,n){(e!=="number"||uo(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var rr=Array.isArray;function yi(t,e,n,i){if(t=t.options,e){e={};for(var r=0;r<n.length;r++)e["$"+n[r]]=!0;for(n=0;n<t.length;n++)r=e.hasOwnProperty("$"+t[n].value),t[n].selected!==r&&(t[n].selected=r),r&&i&&(t[n].defaultSelected=!0)}else{for(n=""+pn(n),e=null,r=0;r<t.length;r++){if(t[r].value===n){t[r].selected=!0,i&&(t[r].defaultSelected=!0);return}e!==null||t[r].disabled||(e=t[r])}e!==null&&(e.selected=!0)}}function pl(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(C(91));return ie({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function Bc(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(C(92));if(rr(n)){if(1<n.length)throw Error(C(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:pn(n)}}function qf(t,e){var n=pn(e.value),i=pn(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),i!=null&&(t.defaultValue=""+i)}function Vc(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function Qf(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function gl(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?Qf(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var gs,Xf=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,i,r){MSApp.execUnsafeLocalFunction(function(){return t(e,n,i,r)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(gs=gs||document.createElement("div"),gs.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=gs.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Rr(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var fr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},M0=["Webkit","ms","Moz","O"];Object.keys(fr).forEach(function(t){M0.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),fr[e]=fr[t]})});function Jf(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||fr.hasOwnProperty(t)&&fr[t]?(""+e).trim():e+"px"}function Zf(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var i=n.indexOf("--")===0,r=Jf(n,e[n],i);n==="float"&&(n="cssFloat"),i?t.setProperty(n,r):t[n]=r}}var L0=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ml(t,e){if(e){if(L0[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(C(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(C(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(C(61))}if(e.style!=null&&typeof e.style!="object")throw Error(C(62))}}function yl(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var vl=null;function Tu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var _l=null,vi=null,_i=null;function Hc(t){if(t=os(t)){if(typeof _l!="function")throw Error(C(280));var e=t.stateNode;e&&(e=Qo(e),_l(t.stateNode,t.type,e))}}function ep(t){vi?_i?_i.push(t):_i=[t]:vi=t}function tp(){if(vi){var t=vi,e=_i;if(_i=vi=null,Hc(t),e)for(t=0;t<e.length;t++)Hc(e[t])}}function np(t,e){return t(e)}function ip(){}var wa=!1;function rp(t,e,n){if(wa)return t(e,n);wa=!0;try{return np(t,e,n)}finally{wa=!1,(vi!==null||_i!==null)&&(ip(),tp())}}function Ir(t,e){var n=t.stateNode;if(n===null)return null;var i=Qo(n);if(i===null)return null;n=i[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(t=t.type,i=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!i;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(C(231,e,typeof n));return n}var wl=!1;if(Nt)try{var Hi={};Object.defineProperty(Hi,"passive",{get:function(){wl=!0}}),window.addEventListener("test",Hi,Hi),window.removeEventListener("test",Hi,Hi)}catch{wl=!1}function R0(t,e,n,i,r,s,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var pr=!1,co=null,ho=!1,xl=null,I0={onError:function(t){pr=!0,co=t}};function A0(t,e,n,i,r,s,o,a,l){pr=!1,co=null,R0.apply(I0,arguments)}function D0(t,e,n,i,r,s,o,a,l){if(A0.apply(this,arguments),pr){if(pr){var u=co;pr=!1,co=null}else throw Error(C(198));ho||(ho=!0,xl=u)}}function qn(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function sp(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Wc(t){if(qn(t)!==t)throw Error(C(188))}function j0(t){var e=t.alternate;if(!e){if(e=qn(t),e===null)throw Error(C(188));return e!==t?null:t}for(var n=t,i=e;;){var r=n.return;if(r===null)break;var s=r.alternate;if(s===null){if(i=r.return,i!==null){n=i;continue}break}if(r.child===s.child){for(s=r.child;s;){if(s===n)return Wc(r),t;if(s===i)return Wc(r),e;s=s.sibling}throw Error(C(188))}if(n.return!==i.return)n=r,i=s;else{for(var o=!1,a=r.child;a;){if(a===n){o=!0,n=r,i=s;break}if(a===i){o=!0,i=r,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,i=r;break}if(a===i){o=!0,i=s,n=r;break}a=a.sibling}if(!o)throw Error(C(189))}}if(n.alternate!==i)throw Error(C(190))}if(n.tag!==3)throw Error(C(188));return n.stateNode.current===n?t:e}function op(t){return t=j0(t),t!==null?ap(t):null}function ap(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=ap(t);if(e!==null)return e;t=t.sibling}return null}var lp=Ge.unstable_scheduleCallback,Kc=Ge.unstable_cancelCallback,N0=Ge.unstable_shouldYield,z0=Ge.unstable_requestPaint,le=Ge.unstable_now,F0=Ge.unstable_getCurrentPriorityLevel,Ou=Ge.unstable_ImmediatePriority,up=Ge.unstable_UserBlockingPriority,fo=Ge.unstable_NormalPriority,$0=Ge.unstable_LowPriority,cp=Ge.unstable_IdlePriority,Ko=null,St=null;function U0(t){if(St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(Ko,t,void 0,(t.current.flags&128)===128)}catch{}}var pt=Math.clz32?Math.clz32:H0,B0=Math.log,V0=Math.LN2;function H0(t){return t>>>=0,t===0?32:31-(B0(t)/V0|0)|0}var ms=64,ys=4194304;function sr(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function po(t,e){var n=t.pendingLanes;if(n===0)return 0;var i=0,r=t.suspendedLanes,s=t.pingedLanes,o=n&268435455;if(o!==0){var a=o&~r;a!==0?i=sr(a):(s&=o,s!==0&&(i=sr(s)))}else o=n&~r,o!==0?i=sr(o):s!==0&&(i=sr(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=i;0<e;)n=31-pt(e),r=1<<n,i|=t[n],e&=~r;return i}function W0(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function K0(t,e){for(var n=t.suspendedLanes,i=t.pingedLanes,r=t.expirationTimes,s=t.pendingLanes;0<s;){var o=31-pt(s),a=1<<o,l=r[o];l===-1?(!(a&n)||a&i)&&(r[o]=W0(a,e)):l<=e&&(t.expiredLanes|=a),s&=~a}}function kl(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function hp(){var t=ms;return ms<<=1,!(ms&4194240)&&(ms=64),t}function xa(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function rs(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-pt(e),t[e]=n}function Y0(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var i=t.eventTimes;for(t=t.expirationTimes;0<n;){var r=31-pt(n),s=1<<r;e[r]=0,i[r]=-1,t[r]=-1,n&=~s}}function Mu(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var i=31-pt(n),r=1<<i;r&e|t[i]&e&&(t[i]|=e),n&=~r}}var H=0;function dp(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var fp,Lu,pp,gp,mp,bl=!1,vs=[],sn=null,on=null,an=null,Ar=new Map,Dr=new Map,Gt=[],G0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Yc(t,e){switch(t){case"focusin":case"focusout":sn=null;break;case"dragenter":case"dragleave":on=null;break;case"mouseover":case"mouseout":an=null;break;case"pointerover":case"pointerout":Ar.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Dr.delete(e.pointerId)}}function Wi(t,e,n,i,r,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:i,nativeEvent:s,targetContainers:[r]},e!==null&&(e=os(e),e!==null&&Lu(e)),t):(t.eventSystemFlags|=i,e=t.targetContainers,r!==null&&e.indexOf(r)===-1&&e.push(r),t)}function q0(t,e,n,i,r){switch(e){case"focusin":return sn=Wi(sn,t,e,n,i,r),!0;case"dragenter":return on=Wi(on,t,e,n,i,r),!0;case"mouseover":return an=Wi(an,t,e,n,i,r),!0;case"pointerover":var s=r.pointerId;return Ar.set(s,Wi(Ar.get(s)||null,t,e,n,i,r)),!0;case"gotpointercapture":return s=r.pointerId,Dr.set(s,Wi(Dr.get(s)||null,t,e,n,i,r)),!0}return!1}function yp(t){var e=An(t.target);if(e!==null){var n=qn(e);if(n!==null){if(e=n.tag,e===13){if(e=sp(n),e!==null){t.blockedOn=e,mp(t.priority,function(){pp(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function qs(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Sl(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var i=new n.constructor(n.type,n);vl=i,n.target.dispatchEvent(i),vl=null}else return e=os(n),e!==null&&Lu(e),t.blockedOn=n,!1;e.shift()}return!0}function Gc(t,e,n){qs(t)&&n.delete(e)}function Q0(){bl=!1,sn!==null&&qs(sn)&&(sn=null),on!==null&&qs(on)&&(on=null),an!==null&&qs(an)&&(an=null),Ar.forEach(Gc),Dr.forEach(Gc)}function Ki(t,e){t.blockedOn===e&&(t.blockedOn=null,bl||(bl=!0,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,Q0)))}function jr(t){function e(r){return Ki(r,t)}if(0<vs.length){Ki(vs[0],t);for(var n=1;n<vs.length;n++){var i=vs[n];i.blockedOn===t&&(i.blockedOn=null)}}for(sn!==null&&Ki(sn,t),on!==null&&Ki(on,t),an!==null&&Ki(an,t),Ar.forEach(e),Dr.forEach(e),n=0;n<Gt.length;n++)i=Gt[n],i.blockedOn===t&&(i.blockedOn=null);for(;0<Gt.length&&(n=Gt[0],n.blockedOn===null);)yp(n),n.blockedOn===null&&Gt.shift()}var wi=Ut.ReactCurrentBatchConfig,go=!0;function X0(t,e,n,i){var r=H,s=wi.transition;wi.transition=null;try{H=1,Ru(t,e,n,i)}finally{H=r,wi.transition=s}}function J0(t,e,n,i){var r=H,s=wi.transition;wi.transition=null;try{H=4,Ru(t,e,n,i)}finally{H=r,wi.transition=s}}function Ru(t,e,n,i){if(go){var r=Sl(t,e,n,i);if(r===null)La(t,e,i,mo,n),Yc(t,i);else if(q0(r,t,e,n,i))i.stopPropagation();else if(Yc(t,i),e&4&&-1<G0.indexOf(t)){for(;r!==null;){var s=os(r);if(s!==null&&fp(s),s=Sl(t,e,n,i),s===null&&La(t,e,i,mo,n),s===r)break;r=s}r!==null&&i.stopPropagation()}else La(t,e,i,null,n)}}var mo=null;function Sl(t,e,n,i){if(mo=null,t=Tu(i),t=An(t),t!==null)if(e=qn(t),e===null)t=null;else if(n=e.tag,n===13){if(t=sp(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return mo=t,null}function vp(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(F0()){case Ou:return 1;case up:return 4;case fo:case $0:return 16;case cp:return 536870912;default:return 16}default:return 16}}var Xt=null,Iu=null,Qs=null;function _p(){if(Qs)return Qs;var t,e=Iu,n=e.length,i,r="value"in Xt?Xt.value:Xt.textContent,s=r.length;for(t=0;t<n&&e[t]===r[t];t++);var o=n-t;for(i=1;i<=o&&e[n-i]===r[s-i];i++);return Qs=r.slice(t,1<i?1-i:void 0)}function Xs(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function _s(){return!0}function qc(){return!1}function Xe(t){function e(n,i,r,s,o){this._reactName=n,this._targetInst=r,this.type=i,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in t)t.hasOwnProperty(a)&&(n=t[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?_s:qc,this.isPropagationStopped=qc,this}return ie(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=_s)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=_s)},persist:function(){},isPersistent:_s}),e}var zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Au=Xe(zi),ss=ie({},zi,{view:0,detail:0}),Z0=Xe(ss),ka,ba,Yi,Yo=ie({},ss,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Du,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Yi&&(Yi&&t.type==="mousemove"?(ka=t.screenX-Yi.screenX,ba=t.screenY-Yi.screenY):ba=ka=0,Yi=t),ka)},movementY:function(t){return"movementY"in t?t.movementY:ba}}),Qc=Xe(Yo),ey=ie({},Yo,{dataTransfer:0}),ty=Xe(ey),ny=ie({},ss,{relatedTarget:0}),Sa=Xe(ny),iy=ie({},zi,{animationName:0,elapsedTime:0,pseudoElement:0}),ry=Xe(iy),sy=ie({},zi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),oy=Xe(sy),ay=ie({},zi,{data:0}),Xc=Xe(ay),ly={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},uy={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"},cy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hy(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=cy[t])?!!e[t]:!1}function Du(){return hy}var dy=ie({},ss,{key:function(t){if(t.key){var e=ly[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Xs(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?uy[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Du,charCode:function(t){return t.type==="keypress"?Xs(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Xs(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),fy=Xe(dy),py=ie({},Yo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jc=Xe(py),gy=ie({},ss,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Du}),my=Xe(gy),yy=ie({},zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),vy=Xe(yy),_y=ie({},Yo,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),wy=Xe(_y),xy=[9,13,27,32],ju=Nt&&"CompositionEvent"in window,gr=null;Nt&&"documentMode"in document&&(gr=document.documentMode);var ky=Nt&&"TextEvent"in window&&!gr,wp=Nt&&(!ju||gr&&8<gr&&11>=gr),Zc=" ",eh=!1;function xp(t,e){switch(t){case"keyup":return xy.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ai=!1;function by(t,e){switch(t){case"compositionend":return kp(e);case"keypress":return e.which!==32?null:(eh=!0,Zc);case"textInput":return t=e.data,t===Zc&&eh?null:t;default:return null}}function Sy(t,e){if(ai)return t==="compositionend"||!ju&&xp(t,e)?(t=_p(),Qs=Iu=Xt=null,ai=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return wp&&e.locale!=="ko"?null:e.data;default:return null}}var Cy={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 th(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Cy[t.type]:e==="textarea"}function bp(t,e,n,i){ep(i),e=yo(e,"onChange"),0<e.length&&(n=new Au("onChange","change",null,n,i),t.push({event:n,listeners:e}))}var mr=null,Nr=null;function Ey(t){Ap(t,0)}function Go(t){var e=ci(t);if(Yf(e))return t}function Py(t,e){if(t==="change")return e}var Sp=!1;if(Nt){var Ca;if(Nt){var Ea="oninput"in document;if(!Ea){var nh=document.createElement("div");nh.setAttribute("oninput","return;"),Ea=typeof nh.oninput=="function"}Ca=Ea}else Ca=!1;Sp=Ca&&(!document.documentMode||9<document.documentMode)}function ih(){mr&&(mr.detachEvent("onpropertychange",Cp),Nr=mr=null)}function Cp(t){if(t.propertyName==="value"&&Go(Nr)){var e=[];bp(e,Nr,t,Tu(t)),rp(Ey,e)}}function Ty(t,e,n){t==="focusin"?(ih(),mr=e,Nr=n,mr.attachEvent("onpropertychange",Cp)):t==="focusout"&&ih()}function Oy(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Go(Nr)}function My(t,e){if(t==="click")return Go(e)}function Ly(t,e){if(t==="input"||t==="change")return Go(e)}function Ry(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var yt=typeof Object.is=="function"?Object.is:Ry;function zr(t,e){if(yt(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var r=n[i];if(!ol.call(e,r)||!yt(t[r],e[r]))return!1}return!0}function rh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function sh(t,e){var n=rh(t);t=0;for(var i;n;){if(n.nodeType===3){if(i=t+n.textContent.length,t<=e&&i>=e)return{node:n,offset:e-t};t=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=rh(n)}}function Ep(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Ep(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Pp(){for(var t=window,e=uo();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=uo(t.document)}return e}function Nu(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function Iy(t){var e=Pp(),n=t.focusedElem,i=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&Ep(n.ownerDocument.documentElement,n)){if(i!==null&&Nu(n)){if(e=i.start,t=i.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var r=n.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!t.extend&&s>i&&(r=i,i=s,s=r),r=sh(n,s);var o=sh(n,i);r&&o&&(t.rangeCount!==1||t.anchorNode!==r.node||t.anchorOffset!==r.offset||t.focusNode!==o.node||t.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),t.removeAllRanges(),s>i?(t.addRange(e),t.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Ay=Nt&&"documentMode"in document&&11>=document.documentMode,li=null,Cl=null,yr=null,El=!1;function oh(t,e,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;El||li==null||li!==uo(i)||(i=li,"selectionStart"in i&&Nu(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),yr&&zr(yr,i)||(yr=i,i=yo(Cl,"onSelect"),0<i.length&&(e=new Au("onSelect","select",null,e,n),t.push({event:e,listeners:i}),e.target=li)))}function ws(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var ui={animationend:ws("Animation","AnimationEnd"),animationiteration:ws("Animation","AnimationIteration"),animationstart:ws("Animation","AnimationStart"),transitionend:ws("Transition","TransitionEnd")},Pa={},Tp={};Nt&&(Tp=document.createElement("div").style,"AnimationEvent"in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),"TransitionEvent"in window||delete ui.transitionend.transition);function qo(t){if(Pa[t])return Pa[t];if(!ui[t])return t;var e=ui[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Tp)return Pa[t]=e[n];return t}var Op=qo("animationend"),Mp=qo("animationiteration"),Lp=qo("animationstart"),Rp=qo("transitionend"),Ip=new Map,ah="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function vn(t,e){Ip.set(t,e),Gn(e,[t])}for(var Ta=0;Ta<ah.length;Ta++){var Oa=ah[Ta],Dy=Oa.toLowerCase(),jy=Oa[0].toUpperCase()+Oa.slice(1);vn(Dy,"on"+jy)}vn(Op,"onAnimationEnd");vn(Mp,"onAnimationIteration");vn(Lp,"onAnimationStart");vn("dblclick","onDoubleClick");vn("focusin","onFocus");vn("focusout","onBlur");vn(Rp,"onTransitionEnd");Si("onMouseEnter",["mouseout","mouseover"]);Si("onMouseLeave",["mouseout","mouseover"]);Si("onPointerEnter",["pointerout","pointerover"]);Si("onPointerLeave",["pointerout","pointerover"]);Gn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var or="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(" "),Ny=new Set("cancel close invalid load scroll toggle".split(" ").concat(or));function lh(t,e,n){var i=t.type||"unknown-event";t.currentTarget=n,D0(i,e,void 0,t),t.currentTarget=null}function Ap(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var i=t[n],r=i.event;i=i.listeners;e:{var s=void 0;if(e)for(var o=i.length-1;0<=o;o--){var a=i[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==s&&r.isPropagationStopped())break e;lh(r,a,u),s=l}else for(o=0;o<i.length;o++){if(a=i[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==s&&r.isPropagationStopped())break e;lh(r,a,u),s=l}}}if(ho)throw t=xl,ho=!1,xl=null,t}function X(t,e){var n=e[Ll];n===void 0&&(n=e[Ll]=new Set);var i=t+"__bubble";n.has(i)||(Dp(e,t,2,!1),n.add(i))}function Ma(t,e,n){var i=0;e&&(i|=4),Dp(n,t,i,e)}var xs="_reactListening"+Math.random().toString(36).slice(2);function Fr(t){if(!t[xs]){t[xs]=!0,Bf.forEach(function(n){n!=="selectionchange"&&(Ny.has(n)||Ma(n,!1,t),Ma(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[xs]||(e[xs]=!0,Ma("selectionchange",!1,e))}}function Dp(t,e,n,i){switch(vp(e)){case 1:var r=X0;break;case 4:r=J0;break;default:r=Ru}n=r.bind(null,e,n,t),r=void 0,!wl||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(r=!0),i?r!==void 0?t.addEventListener(e,n,{capture:!0,passive:r}):t.addEventListener(e,n,!0):r!==void 0?t.addEventListener(e,n,{passive:r}):t.addEventListener(e,n,!1)}function La(t,e,n,i,r){var s=i;if(!(e&1)&&!(e&2)&&i!==null)e:for(;;){if(i===null)return;var o=i.tag;if(o===3||o===4){var a=i.stateNode.containerInfo;if(a===r||a.nodeType===8&&a.parentNode===r)break;if(o===4)for(o=i.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===r||l.nodeType===8&&l.parentNode===r))return;o=o.return}for(;a!==null;){if(o=An(a),o===null)return;if(l=o.tag,l===5||l===6){i=s=o;continue e}a=a.parentNode}}i=i.return}rp(function(){var u=s,c=Tu(n),h=[];e:{var d=Ip.get(t);if(d!==void 0){var f=Au,m=t;switch(t){case"keypress":if(Xs(n)===0)break e;case"keydown":case"keyup":f=fy;break;case"focusin":m="focus",f=Sa;break;case"focusout":m="blur",f=Sa;break;case"beforeblur":case"afterblur":f=Sa;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":f=Qc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=ty;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=my;break;case Op:case Mp:case Lp:f=ry;break;case Rp:f=vy;break;case"scroll":f=Z0;break;case"wheel":f=wy;break;case"copy":case"cut":case"paste":f=oy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=Jc}var y=(e&4)!==0,v=!y&&t==="scroll",p=y?d!==null?d+"Capture":null:d;y=[];for(var g=u,_;g!==null;){_=g;var w=_.stateNode;if(_.tag===5&&w!==null&&(_=w,p!==null&&(w=Ir(g,p),w!=null&&y.push($r(g,w,_)))),v)break;g=g.return}0<y.length&&(d=new f(d,m,null,n,c),h.push({event:d,listeners:y}))}}if(!(e&7)){e:{if(d=t==="mouseover"||t==="pointerover",f=t==="mouseout"||t==="pointerout",d&&n!==vl&&(m=n.relatedTarget||n.fromElement)&&(An(m)||m[zt]))break e;if((f||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,f?(m=n.relatedTarget||n.toElement,f=u,m=m?An(m):null,m!==null&&(v=qn(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(f=null,m=u),f!==m)){if(y=Qc,w="onMouseLeave",p="onMouseEnter",g="mouse",(t==="pointerout"||t==="pointerover")&&(y=Jc,w="onPointerLeave",p="onPointerEnter",g="pointer"),v=f==null?d:ci(f),_=m==null?d:ci(m),d=new y(w,g+"leave",f,n,c),d.target=v,d.relatedTarget=_,w=null,An(c)===u&&(y=new y(p,g+"enter",m,n,c),y.target=_,y.relatedTarget=v,w=y),v=w,f&&m)t:{for(y=f,p=m,g=0,_=y;_;_=Jn(_))g++;for(_=0,w=p;w;w=Jn(w))_++;for(;0<g-_;)y=Jn(y),g--;for(;0<_-g;)p=Jn(p),_--;for(;g--;){if(y===p||p!==null&&y===p.alternate)break t;y=Jn(y),p=Jn(p)}y=null}else y=null;f!==null&&uh(h,d,f,y,!1),m!==null&&v!==null&&uh(h,v,m,y,!0)}}e:{if(d=u?ci(u):window,f=d.nodeName&&d.nodeName.toLowerCase(),f==="select"||f==="input"&&d.type==="file")var x=Py;else if(th(d))if(Sp)x=Ly;else{x=Oy;var b=Ty}else(f=d.nodeName)&&f.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(x=My);if(x&&(x=x(t,u))){bp(h,x,n,c);break e}b&&b(t,d,u),t==="focusout"&&(b=d._wrapperState)&&b.controlled&&d.type==="number"&&fl(d,"number",d.value)}switch(b=u?ci(u):window,t){case"focusin":(th(b)||b.contentEditable==="true")&&(li=b,Cl=u,yr=null);break;case"focusout":yr=Cl=li=null;break;case"mousedown":El=!0;break;case"contextmenu":case"mouseup":case"dragend":El=!1,oh(h,n,c);break;case"selectionchange":if(Ay)break;case"keydown":case"keyup":oh(h,n,c)}var k;if(ju)e:{switch(t){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else ai?xp(t,n)&&(S="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(wp&&n.locale!=="ko"&&(ai||S!=="onCompositionStart"?S==="onCompositionEnd"&&ai&&(k=_p()):(Xt=c,Iu="value"in Xt?Xt.value:Xt.textContent,ai=!0)),b=yo(u,S),0<b.length&&(S=new Xc(S,t,null,n,c),h.push({event:S,listeners:b}),k?S.data=k:(k=kp(n),k!==null&&(S.data=k)))),(k=ky?by(t,n):Sy(t,n))&&(u=yo(u,"onBeforeInput"),0<u.length&&(c=new Xc("onBeforeInput","beforeinput",null,n,c),h.push({event:c,listeners:u}),c.data=k))}Ap(h,e)})}function $r(t,e,n){return{instance:t,listener:e,currentTarget:n}}function yo(t,e){for(var n=e+"Capture",i=[];t!==null;){var r=t,s=r.stateNode;r.tag===5&&s!==null&&(r=s,s=Ir(t,n),s!=null&&i.unshift($r(t,s,r)),s=Ir(t,e),s!=null&&i.push($r(t,s,r))),t=t.return}return i}function Jn(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function uh(t,e,n,i,r){for(var s=e._reactName,o=[];n!==null&&n!==i;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===i)break;a.tag===5&&u!==null&&(a=u,r?(l=Ir(n,s),l!=null&&o.unshift($r(n,l,a))):r||(l=Ir(n,s),l!=null&&o.push($r(n,l,a)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}var zy=/\r\n?/g,Fy=/\u0000|\uFFFD/g;function ch(t){return(typeof t=="string"?t:""+t).replace(zy,`
+`).replace(Fy,"")}function ks(t,e,n){if(e=ch(e),ch(t)!==e&&n)throw Error(C(425))}function vo(){}var Pl=null,Tl=null;function Ol(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ml=typeof setTimeout=="function"?setTimeout:void 0,$y=typeof clearTimeout=="function"?clearTimeout:void 0,hh=typeof Promise=="function"?Promise:void 0,Uy=typeof queueMicrotask=="function"?queueMicrotask:typeof hh<"u"?function(t){return hh.resolve(null).then(t).catch(By)}:Ml;function By(t){setTimeout(function(){throw t})}function Ra(t,e){var n=e,i=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(i===0){t.removeChild(r),jr(e);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=r}while(n);jr(e)}function ln(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function dh(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Fi=Math.random().toString(36).slice(2),bt="__reactFiber$"+Fi,Ur="__reactProps$"+Fi,zt="__reactContainer$"+Fi,Ll="__reactEvents$"+Fi,Vy="__reactListeners$"+Fi,Hy="__reactHandles$"+Fi;function An(t){var e=t[bt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[zt]||n[bt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=dh(t);t!==null;){if(n=t[bt])return n;t=dh(t)}return e}t=n,n=t.parentNode}return null}function os(t){return t=t[bt]||t[zt],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function ci(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(C(33))}function Qo(t){return t[Ur]||null}var Rl=[],hi=-1;function _n(t){return{current:t}}function Z(t){0>hi||(t.current=Rl[hi],Rl[hi]=null,hi--)}function q(t,e){hi++,Rl[hi]=t.current,t.current=e}var gn={},Pe=_n(gn),Fe=_n(!1),Bn=gn;function Ci(t,e){var n=t.type.contextTypes;if(!n)return gn;var i=t.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in n)r[s]=e[s];return i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=r),r}function $e(t){return t=t.childContextTypes,t!=null}function _o(){Z(Fe),Z(Pe)}function fh(t,e,n){if(Pe.current!==gn)throw Error(C(168));q(Pe,e),q(Fe,n)}function jp(t,e,n){var i=t.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(C(108,T0(t)||"Unknown",r));return ie({},n,i)}function wo(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||gn,Bn=Pe.current,q(Pe,t),q(Fe,Fe.current),!0}function ph(t,e,n){var i=t.stateNode;if(!i)throw Error(C(169));n?(t=jp(t,e,Bn),i.__reactInternalMemoizedMergedChildContext=t,Z(Fe),Z(Pe),q(Pe,t)):Z(Fe),q(Fe,n)}var Lt=null,Xo=!1,Ia=!1;function Np(t){Lt===null?Lt=[t]:Lt.push(t)}function Wy(t){Xo=!0,Np(t)}function wn(){if(!Ia&&Lt!==null){Ia=!0;var t=0,e=H;try{var n=Lt;for(H=1;t<n.length;t++){var i=n[t];do i=i(!0);while(i!==null)}Lt=null,Xo=!1}catch(r){throw Lt!==null&&(Lt=Lt.slice(t+1)),lp(Ou,wn),r}finally{H=e,Ia=!1}}return null}var di=[],fi=0,xo=null,ko=0,et=[],tt=0,Vn=null,It=1,At="";function Tn(t,e){di[fi++]=ko,di[fi++]=xo,xo=t,ko=e}function zp(t,e,n){et[tt++]=It,et[tt++]=At,et[tt++]=Vn,Vn=t;var i=It;t=At;var r=32-pt(i)-1;i&=~(1<<r),n+=1;var s=32-pt(e)+r;if(30<s){var o=r-r%5;s=(i&(1<<o)-1).toString(32),i>>=o,r-=o,It=1<<32-pt(e)+r|n<<r|i,At=s+t}else It=1<<s|n<<r|i,At=t}function zu(t){t.return!==null&&(Tn(t,1),zp(t,1,0))}function Fu(t){for(;t===xo;)xo=di[--fi],di[fi]=null,ko=di[--fi],di[fi]=null;for(;t===Vn;)Vn=et[--tt],et[tt]=null,At=et[--tt],et[tt]=null,It=et[--tt],et[tt]=null}var Ye=null,We=null,ee=!1,ft=null;function Fp(t,e){var n=nt(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function gh(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Ye=t,We=ln(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Ye=t,We=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Vn!==null?{id:It,overflow:At}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=nt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Ye=t,We=null,!0):!1;default:return!1}}function Il(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Al(t){if(ee){var e=We;if(e){var n=e;if(!gh(t,e)){if(Il(t))throw Error(C(418));e=ln(n.nextSibling);var i=Ye;e&&gh(t,e)?Fp(i,n):(t.flags=t.flags&-4097|2,ee=!1,Ye=t)}}else{if(Il(t))throw Error(C(418));t.flags=t.flags&-4097|2,ee=!1,Ye=t}}}function mh(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ye=t}function bs(t){if(t!==Ye)return!1;if(!ee)return mh(t),ee=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!Ol(t.type,t.memoizedProps)),e&&(e=We)){if(Il(t))throw $p(),Error(C(418));for(;e;)Fp(t,e),e=ln(e.nextSibling)}if(mh(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(C(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){We=ln(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}We=null}}else We=Ye?ln(t.stateNode.nextSibling):null;return!0}function $p(){for(var t=We;t;)t=ln(t.nextSibling)}function Ei(){We=Ye=null,ee=!1}function $u(t){ft===null?ft=[t]:ft.push(t)}var Ky=Ut.ReactCurrentBatchConfig;function Gi(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(C(309));var i=n.stateNode}if(!i)throw Error(C(147,t));var r=i,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(o){var a=r.refs;o===null?delete a[s]:a[s]=o},e._stringRef=s,e)}if(typeof t!="string")throw Error(C(284));if(!n._owner)throw Error(C(290,t))}return t}function Ss(t,e){throw t=Object.prototype.toString.call(e),Error(C(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function yh(t){var e=t._init;return e(t._payload)}function Up(t){function e(p,g){if(t){var _=p.deletions;_===null?(p.deletions=[g],p.flags|=16):_.push(g)}}function n(p,g){if(!t)return null;for(;g!==null;)e(p,g),g=g.sibling;return null}function i(p,g){for(p=new Map;g!==null;)g.key!==null?p.set(g.key,g):p.set(g.index,g),g=g.sibling;return p}function r(p,g){return p=dn(p,g),p.index=0,p.sibling=null,p}function s(p,g,_){return p.index=_,t?(_=p.alternate,_!==null?(_=_.index,_<g?(p.flags|=2,g):_):(p.flags|=2,g)):(p.flags|=1048576,g)}function o(p){return t&&p.alternate===null&&(p.flags|=2),p}function a(p,g,_,w){return g===null||g.tag!==6?(g=$a(_,p.mode,w),g.return=p,g):(g=r(g,_),g.return=p,g)}function l(p,g,_,w){var x=_.type;return x===oi?c(p,g,_.props.children,w,_.key):g!==null&&(g.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Wt&&yh(x)===g.type)?(w=r(g,_.props),w.ref=Gi(p,g,_),w.return=p,w):(w=ro(_.type,_.key,_.props,null,p.mode,w),w.ref=Gi(p,g,_),w.return=p,w)}function u(p,g,_,w){return g===null||g.tag!==4||g.stateNode.containerInfo!==_.containerInfo||g.stateNode.implementation!==_.implementation?(g=Ua(_,p.mode,w),g.return=p,g):(g=r(g,_.children||[]),g.return=p,g)}function c(p,g,_,w,x){return g===null||g.tag!==7?(g=Fn(_,p.mode,w,x),g.return=p,g):(g=r(g,_),g.return=p,g)}function h(p,g,_){if(typeof g=="string"&&g!==""||typeof g=="number")return g=$a(""+g,p.mode,_),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case fs:return _=ro(g.type,g.key,g.props,null,p.mode,_),_.ref=Gi(p,null,g),_.return=p,_;case si:return g=Ua(g,p.mode,_),g.return=p,g;case Wt:var w=g._init;return h(p,w(g._payload),_)}if(rr(g)||Vi(g))return g=Fn(g,p.mode,_,null),g.return=p,g;Ss(p,g)}return null}function d(p,g,_,w){var x=g!==null?g.key:null;if(typeof _=="string"&&_!==""||typeof _=="number")return x!==null?null:a(p,g,""+_,w);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case fs:return _.key===x?l(p,g,_,w):null;case si:return _.key===x?u(p,g,_,w):null;case Wt:return x=_._init,d(p,g,x(_._payload),w)}if(rr(_)||Vi(_))return x!==null?null:c(p,g,_,w,null);Ss(p,_)}return null}function f(p,g,_,w,x){if(typeof w=="string"&&w!==""||typeof w=="number")return p=p.get(_)||null,a(g,p,""+w,x);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case fs:return p=p.get(w.key===null?_:w.key)||null,l(g,p,w,x);case si:return p=p.get(w.key===null?_:w.key)||null,u(g,p,w,x);case Wt:var b=w._init;return f(p,g,_,b(w._payload),x)}if(rr(w)||Vi(w))return p=p.get(_)||null,c(g,p,w,x,null);Ss(g,w)}return null}function m(p,g,_,w){for(var x=null,b=null,k=g,S=g=0,M=null;k!==null&&S<_.length;S++){k.index>S?(M=k,k=null):M=k.sibling;var O=d(p,k,_[S],w);if(O===null){k===null&&(k=M);break}t&&k&&O.alternate===null&&e(p,k),g=s(O,g,S),b===null?x=O:b.sibling=O,b=O,k=M}if(S===_.length)return n(p,k),ee&&Tn(p,S),x;if(k===null){for(;S<_.length;S++)k=h(p,_[S],w),k!==null&&(g=s(k,g,S),b===null?x=k:b.sibling=k,b=k);return ee&&Tn(p,S),x}for(k=i(p,k);S<_.length;S++)M=f(k,p,S,_[S],w),M!==null&&(t&&M.alternate!==null&&k.delete(M.key===null?S:M.key),g=s(M,g,S),b===null?x=M:b.sibling=M,b=M);return t&&k.forEach(function(D){return e(p,D)}),ee&&Tn(p,S),x}function y(p,g,_,w){var x=Vi(_);if(typeof x!="function")throw Error(C(150));if(_=x.call(_),_==null)throw Error(C(151));for(var b=x=null,k=g,S=g=0,M=null,O=_.next();k!==null&&!O.done;S++,O=_.next()){k.index>S?(M=k,k=null):M=k.sibling;var D=d(p,k,O.value,w);if(D===null){k===null&&(k=M);break}t&&k&&D.alternate===null&&e(p,k),g=s(D,g,S),b===null?x=D:b.sibling=D,b=D,k=M}if(O.done)return n(p,k),ee&&Tn(p,S),x;if(k===null){for(;!O.done;S++,O=_.next())O=h(p,O.value,w),O!==null&&(g=s(O,g,S),b===null?x=O:b.sibling=O,b=O);return ee&&Tn(p,S),x}for(k=i(p,k);!O.done;S++,O=_.next())O=f(k,p,S,O.value,w),O!==null&&(t&&O.alternate!==null&&k.delete(O.key===null?S:O.key),g=s(O,g,S),b===null?x=O:b.sibling=O,b=O);return t&&k.forEach(function(B){return e(p,B)}),ee&&Tn(p,S),x}function v(p,g,_,w){if(typeof _=="object"&&_!==null&&_.type===oi&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case fs:e:{for(var x=_.key,b=g;b!==null;){if(b.key===x){if(x=_.type,x===oi){if(b.tag===7){n(p,b.sibling),g=r(b,_.props.children),g.return=p,p=g;break e}}else if(b.elementType===x||typeof x=="object"&&x!==null&&x.$$typeof===Wt&&yh(x)===b.type){n(p,b.sibling),g=r(b,_.props),g.ref=Gi(p,b,_),g.return=p,p=g;break e}n(p,b);break}else e(p,b);b=b.sibling}_.type===oi?(g=Fn(_.props.children,p.mode,w,_.key),g.return=p,p=g):(w=ro(_.type,_.key,_.props,null,p.mode,w),w.ref=Gi(p,g,_),w.return=p,p=w)}return o(p);case si:e:{for(b=_.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===_.containerInfo&&g.stateNode.implementation===_.implementation){n(p,g.sibling),g=r(g,_.children||[]),g.return=p,p=g;break e}else{n(p,g);break}else e(p,g);g=g.sibling}g=Ua(_,p.mode,w),g.return=p,p=g}return o(p);case Wt:return b=_._init,v(p,g,b(_._payload),w)}if(rr(_))return m(p,g,_,w);if(Vi(_))return y(p,g,_,w);Ss(p,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,g!==null&&g.tag===6?(n(p,g.sibling),g=r(g,_),g.return=p,p=g):(n(p,g),g=$a(_,p.mode,w),g.return=p,p=g),o(p)):n(p,g)}return v}var Pi=Up(!0),Bp=Up(!1),bo=_n(null),So=null,pi=null,Uu=null;function Bu(){Uu=pi=So=null}function Vu(t){var e=bo.current;Z(bo),t._currentValue=e}function Dl(t,e,n){for(;t!==null;){var i=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),t===n)break;t=t.return}}function xi(t,e){So=t,Uu=pi=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(ze=!0),t.firstContext=null)}function st(t){var e=t._currentValue;if(Uu!==t)if(t={context:t,memoizedValue:e,next:null},pi===null){if(So===null)throw Error(C(308));pi=t,So.dependencies={lanes:0,firstContext:t}}else pi=pi.next=t;return e}var Dn=null;function Hu(t){Dn===null?Dn=[t]:Dn.push(t)}function Vp(t,e,n,i){var r=e.interleaved;return r===null?(n.next=n,Hu(e)):(n.next=r.next,r.next=n),e.interleaved=n,Ft(t,i)}function Ft(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Kt=!1;function Wu(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Hp(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function jt(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function un(t,e,n){var i=t.updateQueue;if(i===null)return null;if(i=i.shared,F&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,Ft(t,n)}return r=i.interleaved,r===null?(e.next=e,Hu(i)):(e.next=r.next,r.next=e),i.interleaved=e,Ft(t,n)}function Js(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Mu(t,n)}}function vh(t,e){var n=t.updateQueue,i=t.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var r=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?r=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?r=s=e:s=s.next=e}else r=s=e;n={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Co(t,e,n,i){var r=t.updateQueue;Kt=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?s=u:o.next=u,o=l;var c=t.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(s!==null){var h=r.baseState;o=0,c=u=l=null,a=s;do{var d=a.lane,f=a.eventTime;if((i&d)===d){c!==null&&(c=c.next={eventTime:f,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var m=t,y=a;switch(d=e,f=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){h=m.call(f,h,d);break e}h=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,d=typeof m=="function"?m.call(f,h,d):m,d==null)break e;h=ie({},h,d);break e;case 2:Kt=!0}}a.callback!==null&&a.lane!==0&&(t.flags|=64,d=r.effects,d===null?r.effects=[a]:d.push(a))}else f={eventTime:f,lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=f,l=h):c=c.next=f,o|=d;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;d=a,a=d.next,d.next=null,r.lastBaseUpdate=d,r.shared.pending=null}}while(!0);if(c===null&&(l=h),r.baseState=l,r.firstBaseUpdate=u,r.lastBaseUpdate=c,e=r.shared.interleaved,e!==null){r=e;do o|=r.lane,r=r.next;while(r!==e)}else s===null&&(r.shared.lanes=0);Wn|=o,t.lanes=o,t.memoizedState=h}}function _h(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var i=t[e],r=i.callback;if(r!==null){if(i.callback=null,i=n,typeof r!="function")throw Error(C(191,r));r.call(i)}}}var as={},Ct=_n(as),Br=_n(as),Vr=_n(as);function jn(t){if(t===as)throw Error(C(174));return t}function Ku(t,e){switch(q(Vr,e),q(Br,t),q(Ct,as),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:gl(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=gl(e,t)}Z(Ct),q(Ct,e)}function Ti(){Z(Ct),Z(Br),Z(Vr)}function Wp(t){jn(Vr.current);var e=jn(Ct.current),n=gl(e,t.type);e!==n&&(q(Br,t),q(Ct,n))}function Yu(t){Br.current===t&&(Z(Ct),Z(Br))}var te=_n(0);function Eo(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Aa=[];function Gu(){for(var t=0;t<Aa.length;t++)Aa[t]._workInProgressVersionPrimary=null;Aa.length=0}var Zs=Ut.ReactCurrentDispatcher,Da=Ut.ReactCurrentBatchConfig,Hn=0,ne=null,fe=null,ye=null,Po=!1,vr=!1,Hr=0,Yy=0;function be(){throw Error(C(321))}function qu(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!yt(t[n],e[n]))return!1;return!0}function Qu(t,e,n,i,r,s){if(Hn=s,ne=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Zs.current=t===null||t.memoizedState===null?Xy:Jy,t=n(i,r),vr){s=0;do{if(vr=!1,Hr=0,25<=s)throw Error(C(301));s+=1,ye=fe=null,e.updateQueue=null,Zs.current=Zy,t=n(i,r)}while(vr)}if(Zs.current=To,e=fe!==null&&fe.next!==null,Hn=0,ye=fe=ne=null,Po=!1,e)throw Error(C(300));return t}function Xu(){var t=Hr!==0;return Hr=0,t}function xt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ye===null?ne.memoizedState=ye=t:ye=ye.next=t,ye}function ot(){if(fe===null){var t=ne.alternate;t=t!==null?t.memoizedState:null}else t=fe.next;var e=ye===null?ne.memoizedState:ye.next;if(e!==null)ye=e,fe=t;else{if(t===null)throw Error(C(310));fe=t,t={memoizedState:fe.memoizedState,baseState:fe.baseState,baseQueue:fe.baseQueue,queue:fe.queue,next:null},ye===null?ne.memoizedState=ye=t:ye=ye.next=t}return ye}function Wr(t,e){return typeof e=="function"?e(t):e}function ja(t){var e=ot(),n=e.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=t;var i=fe,r=i.baseQueue,s=n.pending;if(s!==null){if(r!==null){var o=r.next;r.next=s.next,s.next=o}i.baseQueue=r=s,n.pending=null}if(r!==null){s=r.next,i=i.baseState;var a=o=null,l=null,u=s;do{var c=u.lane;if((Hn&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:t(i,u.action);else{var h={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=h,o=i):l=l.next=h,ne.lanes|=c,Wn|=c}u=u.next}while(u!==null&&u!==s);l===null?o=i:l.next=a,yt(i,e.memoizedState)||(ze=!0),e.memoizedState=i,e.baseState=o,e.baseQueue=l,n.lastRenderedState=i}if(t=n.interleaved,t!==null){r=t;do s=r.lane,ne.lanes|=s,Wn|=s,r=r.next;while(r!==t)}else r===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Na(t){var e=ot(),n=e.queue;if(n===null)throw Error(C(311));n.lastRenderedReducer=t;var i=n.dispatch,r=n.pending,s=e.memoizedState;if(r!==null){n.pending=null;var o=r=r.next;do s=t(s,o.action),o=o.next;while(o!==r);yt(s,e.memoizedState)||(ze=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,i]}function Kp(){}function Yp(t,e){var n=ne,i=ot(),r=e(),s=!yt(i.memoizedState,r);if(s&&(i.memoizedState=r,ze=!0),i=i.queue,Ju(Qp.bind(null,n,i,t),[t]),i.getSnapshot!==e||s||ye!==null&&ye.memoizedState.tag&1){if(n.flags|=2048,Kr(9,qp.bind(null,n,i,r,e),void 0,null),_e===null)throw Error(C(349));Hn&30||Gp(n,e,r)}return r}function Gp(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=ne.updateQueue,e===null?(e={lastEffect:null,stores:null},ne.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function qp(t,e,n,i){e.value=n,e.getSnapshot=i,Xp(e)&&Jp(t)}function Qp(t,e,n){return n(function(){Xp(e)&&Jp(t)})}function Xp(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!yt(t,n)}catch{return!0}}function Jp(t){var e=Ft(t,1);e!==null&&gt(e,t,1,-1)}function wh(t){var e=xt();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:t},e.queue=t,t=t.dispatch=Qy.bind(null,ne,t),[e.memoizedState,t]}function Kr(t,e,n,i){return t={tag:t,create:e,destroy:n,deps:i,next:null},e=ne.updateQueue,e===null?(e={lastEffect:null,stores:null},ne.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(i=n.next,n.next=t,t.next=i,e.lastEffect=t)),t}function Zp(){return ot().memoizedState}function eo(t,e,n,i){var r=xt();ne.flags|=t,r.memoizedState=Kr(1|e,n,void 0,i===void 0?null:i)}function Jo(t,e,n,i){var r=ot();i=i===void 0?null:i;var s=void 0;if(fe!==null){var o=fe.memoizedState;if(s=o.destroy,i!==null&&qu(i,o.deps)){r.memoizedState=Kr(e,n,s,i);return}}ne.flags|=t,r.memoizedState=Kr(1|e,n,s,i)}function xh(t,e){return eo(8390656,8,t,e)}function Ju(t,e){return Jo(2048,8,t,e)}function eg(t,e){return Jo(4,2,t,e)}function tg(t,e){return Jo(4,4,t,e)}function ng(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function ig(t,e,n){return n=n!=null?n.concat([t]):null,Jo(4,4,ng.bind(null,e,t),n)}function Zu(){}function rg(t,e){var n=ot();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&qu(e,i[1])?i[0]:(n.memoizedState=[t,e],t)}function sg(t,e){var n=ot();e=e===void 0?null:e;var i=n.memoizedState;return i!==null&&e!==null&&qu(e,i[1])?i[0]:(t=t(),n.memoizedState=[t,e],t)}function og(t,e,n){return Hn&21?(yt(n,e)||(n=hp(),ne.lanes|=n,Wn|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,ze=!0),t.memoizedState=n)}function Gy(t,e){var n=H;H=n!==0&&4>n?n:4,t(!0);var i=Da.transition;Da.transition={};try{t(!1),e()}finally{H=n,Da.transition=i}}function ag(){return ot().memoizedState}function qy(t,e,n){var i=hn(t);if(n={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null},lg(t))ug(e,n);else if(n=Vp(t,e,n,i),n!==null){var r=Re();gt(n,t,i,r),cg(n,e,i)}}function Qy(t,e,n){var i=hn(t),r={lane:i,action:n,hasEagerState:!1,eagerState:null,next:null};if(lg(t))ug(e,r);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,n);if(r.hasEagerState=!0,r.eagerState=a,yt(a,o)){var l=e.interleaved;l===null?(r.next=r,Hu(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}n=Vp(t,e,r,i),n!==null&&(r=Re(),gt(n,t,i,r),cg(n,e,i))}}function lg(t){var e=t.alternate;return t===ne||e!==null&&e===ne}function ug(t,e){vr=Po=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function cg(t,e,n){if(n&4194240){var i=e.lanes;i&=t.pendingLanes,n|=i,e.lanes=n,Mu(t,n)}}var To={readContext:st,useCallback:be,useContext:be,useEffect:be,useImperativeHandle:be,useInsertionEffect:be,useLayoutEffect:be,useMemo:be,useReducer:be,useRef:be,useState:be,useDebugValue:be,useDeferredValue:be,useTransition:be,useMutableSource:be,useSyncExternalStore:be,useId:be,unstable_isNewReconciler:!1},Xy={readContext:st,useCallback:function(t,e){return xt().memoizedState=[t,e===void 0?null:e],t},useContext:st,useEffect:xh,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,eo(4194308,4,ng.bind(null,e,t),n)},useLayoutEffect:function(t,e){return eo(4194308,4,t,e)},useInsertionEffect:function(t,e){return eo(4,2,t,e)},useMemo:function(t,e){var n=xt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var i=xt();return e=n!==void 0?n(e):e,i.memoizedState=i.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},i.queue=t,t=t.dispatch=qy.bind(null,ne,t),[i.memoizedState,t]},useRef:function(t){var e=xt();return t={current:t},e.memoizedState=t},useState:wh,useDebugValue:Zu,useDeferredValue:function(t){return xt().memoizedState=t},useTransition:function(){var t=wh(!1),e=t[0];return t=Gy.bind(null,t[1]),xt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var i=ne,r=xt();if(ee){if(n===void 0)throw Error(C(407));n=n()}else{if(n=e(),_e===null)throw Error(C(349));Hn&30||Gp(i,e,n)}r.memoizedState=n;var s={value:n,getSnapshot:e};return r.queue=s,xh(Qp.bind(null,i,s,t),[t]),i.flags|=2048,Kr(9,qp.bind(null,i,s,n,e),void 0,null),n},useId:function(){var t=xt(),e=_e.identifierPrefix;if(ee){var n=At,i=It;n=(i&~(1<<32-pt(i)-1)).toString(32)+n,e=":"+e+"R"+n,n=Hr++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=Yy++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},Jy={readContext:st,useCallback:rg,useContext:st,useEffect:Ju,useImperativeHandle:ig,useInsertionEffect:eg,useLayoutEffect:tg,useMemo:sg,useReducer:ja,useRef:Zp,useState:function(){return ja(Wr)},useDebugValue:Zu,useDeferredValue:function(t){var e=ot();return og(e,fe.memoizedState,t)},useTransition:function(){var t=ja(Wr)[0],e=ot().memoizedState;return[t,e]},useMutableSource:Kp,useSyncExternalStore:Yp,useId:ag,unstable_isNewReconciler:!1},Zy={readContext:st,useCallback:rg,useContext:st,useEffect:Ju,useImperativeHandle:ig,useInsertionEffect:eg,useLayoutEffect:tg,useMemo:sg,useReducer:Na,useRef:Zp,useState:function(){return Na(Wr)},useDebugValue:Zu,useDeferredValue:function(t){var e=ot();return fe===null?e.memoizedState=t:og(e,fe.memoizedState,t)},useTransition:function(){var t=Na(Wr)[0],e=ot().memoizedState;return[t,e]},useMutableSource:Kp,useSyncExternalStore:Yp,useId:ag,unstable_isNewReconciler:!1};function ut(t,e){if(t&&t.defaultProps){e=ie({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function jl(t,e,n,i){e=t.memoizedState,n=n(i,e),n=n==null?e:ie({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var Zo={isMounted:function(t){return(t=t._reactInternals)?qn(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var i=Re(),r=hn(t),s=jt(i,r);s.payload=e,n!=null&&(s.callback=n),e=un(t,s,r),e!==null&&(gt(e,t,r,i),Js(e,t,r))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var i=Re(),r=hn(t),s=jt(i,r);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=un(t,s,r),e!==null&&(gt(e,t,r,i),Js(e,t,r))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Re(),i=hn(t),r=jt(n,i);r.tag=2,e!=null&&(r.callback=e),e=un(t,r,i),e!==null&&(gt(e,t,i,n),Js(e,t,i))}};function kh(t,e,n,i,r,s,o){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(i,s,o):e.prototype&&e.prototype.isPureReactComponent?!zr(n,i)||!zr(r,s):!0}function hg(t,e,n){var i=!1,r=gn,s=e.contextType;return typeof s=="object"&&s!==null?s=st(s):(r=$e(e)?Bn:Pe.current,i=e.contextTypes,s=(i=i!=null)?Ci(t,r):gn),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=Zo,t.stateNode=e,e._reactInternals=t,i&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=s),e}function bh(t,e,n,i){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,i),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,i),e.state!==t&&Zo.enqueueReplaceState(e,e.state,null)}function Nl(t,e,n,i){var r=t.stateNode;r.props=n,r.state=t.memoizedState,r.refs={},Wu(t);var s=e.contextType;typeof s=="object"&&s!==null?r.context=st(s):(s=$e(e)?Bn:Pe.current,r.context=Ci(t,s)),r.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(jl(t,e,s,n),r.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(e=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),e!==r.state&&Zo.enqueueReplaceState(r,r.state,null),Co(t,n,r,i),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308)}function Oi(t,e){try{var n="",i=e;do n+=P0(i),i=i.return;while(i);var r=n}catch(s){r=`
+Error generating stack: `+s.message+`
+`+s.stack}return{value:t,source:e,stack:r,digest:null}}function za(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function zl(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var ev=typeof WeakMap=="function"?WeakMap:Map;function dg(t,e,n){n=jt(-1,n),n.tag=3,n.payload={element:null};var i=e.value;return n.callback=function(){Mo||(Mo=!0,Gl=i),zl(t,e)},n}function fg(t,e,n){n=jt(-1,n),n.tag=3;var i=t.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;n.payload=function(){return i(r)},n.callback=function(){zl(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){zl(t,e),typeof i!="function"&&(cn===null?cn=new Set([this]):cn.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),n}function Sh(t,e,n){var i=t.pingCache;if(i===null){i=t.pingCache=new ev;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(n)||(r.add(n),t=pv.bind(null,t,e,n),e.then(t,t))}function Ch(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function Eh(t,e,n,i,r){return t.mode&1?(t.flags|=65536,t.lanes=r,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=jt(-1,1),e.tag=2,un(n,e,1))),n.lanes|=1),t)}var tv=Ut.ReactCurrentOwner,ze=!1;function Me(t,e,n,i){e.child=t===null?Bp(e,null,n,i):Pi(e,t.child,n,i)}function Ph(t,e,n,i,r){n=n.render;var s=e.ref;return xi(e,r),i=Qu(t,e,n,i,s,r),n=Xu(),t!==null&&!ze?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,$t(t,e,r)):(ee&&n&&zu(e),e.flags|=1,Me(t,e,i,r),e.child)}function Th(t,e,n,i,r){if(t===null){var s=n.type;return typeof s=="function"&&!ac(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,pg(t,e,s,i,r)):(t=ro(n.type,null,i,e,e.mode,r),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&r)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:zr,n(o,i)&&t.ref===e.ref)return $t(t,e,r)}return e.flags|=1,t=dn(s,i),t.ref=e.ref,t.return=e,e.child=t}function pg(t,e,n,i,r){if(t!==null){var s=t.memoizedProps;if(zr(s,i)&&t.ref===e.ref)if(ze=!1,e.pendingProps=i=s,(t.lanes&r)!==0)t.flags&131072&&(ze=!0);else return e.lanes=t.lanes,$t(t,e,r)}return Fl(t,e,n,i,r)}function gg(t,e,n){var i=e.pendingProps,r=i.children,s=t!==null?t.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},q(mi,He),He|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,q(mi,He),He|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:n,q(mi,He),He|=i}else s!==null?(i=s.baseLanes|n,e.memoizedState=null):i=n,q(mi,He),He|=i;return Me(t,e,r,n),e.child}function mg(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Fl(t,e,n,i,r){var s=$e(n)?Bn:Pe.current;return s=Ci(e,s),xi(e,r),n=Qu(t,e,n,i,s,r),i=Xu(),t!==null&&!ze?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~r,$t(t,e,r)):(ee&&i&&zu(e),e.flags|=1,Me(t,e,n,r),e.child)}function Oh(t,e,n,i,r){if($e(n)){var s=!0;wo(e)}else s=!1;if(xi(e,r),e.stateNode===null)to(t,e),hg(e,n,i),Nl(e,n,i,r),i=!0;else if(t===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=st(u):(u=$e(n)?Bn:Pe.current,u=Ci(e,u));var c=n.getDerivedStateFromProps,h=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||l!==u)&&bh(e,o,i,u),Kt=!1;var d=e.memoizedState;o.state=d,Co(e,i,o,r),l=e.memoizedState,a!==i||d!==l||Fe.current||Kt?(typeof c=="function"&&(jl(e,n,c,i),l=e.memoizedState),(a=Kt||kh(e,n,a,i,d,l,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),o.props=i,o.state=l,o.context=u,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,Hp(t,e),a=e.memoizedProps,u=e.type===e.elementType?a:ut(e.type,a),o.props=u,h=e.pendingProps,d=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=st(l):(l=$e(n)?Bn:Pe.current,l=Ci(e,l));var f=n.getDerivedStateFromProps;(c=typeof f=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==h||d!==l)&&bh(e,o,i,l),Kt=!1,d=e.memoizedState,o.state=d,Co(e,i,o,r);var m=e.memoizedState;a!==h||d!==m||Fe.current||Kt?(typeof f=="function"&&(jl(e,n,f,i),m=e.memoizedState),(u=Kt||kh(e,n,u,i,d,m,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,m,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,m,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=m),o.props=i,o.state=m,o.context=l,i=u):(typeof o.componentDidUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),i=!1)}return $l(t,e,n,i,s,r)}function $l(t,e,n,i,r,s){mg(t,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&ph(e,n,!1),$t(t,e,s);i=e.stateNode,tv.current=e;var a=o&&typeof n.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,t!==null&&o?(e.child=Pi(e,t.child,null,s),e.child=Pi(e,null,a,s)):Me(t,e,a,s),e.memoizedState=i.state,r&&ph(e,n,!0),e.child}function yg(t){var e=t.stateNode;e.pendingContext?fh(t,e.pendingContext,e.pendingContext!==e.context):e.context&&fh(t,e.context,!1),Ku(t,e.containerInfo)}function Mh(t,e,n,i,r){return Ei(),$u(r),e.flags|=256,Me(t,e,n,i),e.child}var Ul={dehydrated:null,treeContext:null,retryLane:0};function Bl(t){return{baseLanes:t,cachePool:null,transitions:null}}function vg(t,e,n){var i=e.pendingProps,r=te.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=t!==null&&t.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(r|=1),q(te,r&1),t===null)return Al(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=i.children,t=i.fallback,s?(i=e.mode,s=e.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=na(o,i,0,null),t=Fn(t,i,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=Bl(n),e.memoizedState=Ul,t):ec(e,o));if(r=t.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return nv(t,e,o,i,a,r,n);if(s){s=i.fallback,o=e.mode,r=t.child,a=r.sibling;var l={mode:"hidden",children:i.children};return!(o&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=l,e.deletions=null):(i=dn(r,l),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=dn(a,s):(s=Fn(s,o,n,null),s.flags|=2),s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,o=t.child.memoizedState,o=o===null?Bl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=t.childLanes&~n,e.memoizedState=Ul,i}return s=t.child,t=s.sibling,i=dn(s,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=n),i.return=e,i.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function ec(t,e){return e=na({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Cs(t,e,n,i){return i!==null&&$u(i),Pi(e,t.child,null,n),t=ec(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function nv(t,e,n,i,r,s,o){if(n)return e.flags&256?(e.flags&=-257,i=za(Error(C(422))),Cs(t,e,o,i)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=na({mode:"visible",children:i.children},r,0,null),s=Fn(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&Pi(e,t.child,null,o),e.child.memoizedState=Bl(o),e.memoizedState=Ul,s);if(!(e.mode&1))return Cs(t,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(C(419)),i=za(s,i,void 0),Cs(t,e,o,i)}if(a=(o&t.childLanes)!==0,ze||a){if(i=_e,i!==null){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,Ft(t,r),gt(i,t,r,-1))}return oc(),i=za(Error(C(421))),Cs(t,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=t.child,e=gv.bind(null,t),r._reactRetry=e,null):(t=s.treeContext,We=ln(r.nextSibling),Ye=e,ee=!0,ft=null,t!==null&&(et[tt++]=It,et[tt++]=At,et[tt++]=Vn,It=t.id,At=t.overflow,Vn=e),e=ec(e,i.children),e.flags|=4096,e)}function Lh(t,e,n){t.lanes|=e;var i=t.alternate;i!==null&&(i.lanes|=e),Dl(t.return,e,n)}function Fa(t,e,n,i,r){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=n,s.tailMode=r)}function _g(t,e,n){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(Me(t,e,i.children,n),i=te.current,i&2)i=i&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Lh(t,n,e);else if(t.tag===19)Lh(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}i&=1}if(q(te,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(n=e.child,r=null;n!==null;)t=n.alternate,t!==null&&Eo(t)===null&&(r=n),n=n.sibling;n=r,n===null?(r=e.child,e.child=null):(r=n.sibling,n.sibling=null),Fa(e,!1,r,n,s);break;case"backwards":for(n=null,r=e.child,e.child=null;r!==null;){if(t=r.alternate,t!==null&&Eo(t)===null){e.child=r;break}t=r.sibling,r.sibling=n,n=r,r=t}Fa(e,!0,n,null,s);break;case"together":Fa(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function to(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function $t(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Wn|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(C(153));if(e.child!==null){for(t=e.child,n=dn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=dn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function iv(t,e,n){switch(e.tag){case 3:yg(e),Ei();break;case 5:Wp(e);break;case 1:$e(e.type)&&wo(e);break;case 4:Ku(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;q(bo,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(q(te,te.current&1),e.flags|=128,null):n&e.child.childLanes?vg(t,e,n):(q(te,te.current&1),t=$t(t,e,n),t!==null?t.sibling:null);q(te,te.current&1);break;case 19:if(i=(n&e.childLanes)!==0,t.flags&128){if(i)return _g(t,e,n);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),q(te,te.current),i)break;return null;case 22:case 23:return e.lanes=0,gg(t,e,n)}return $t(t,e,n)}var wg,Vl,xg,kg;wg=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Vl=function(){};xg=function(t,e,n,i){var r=t.memoizedProps;if(r!==i){t=e.stateNode,jn(Ct.current);var s=null;switch(n){case"input":r=hl(t,r),i=hl(t,i),s=[];break;case"select":r=ie({},r,{value:void 0}),i=ie({},i,{value:void 0}),s=[];break;case"textarea":r=pl(t,r),i=pl(t,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(t.onclick=vo)}ml(n,i);var o;n=null;for(u in r)if(!i.hasOwnProperty(u)&&r.hasOwnProperty(u)&&r[u]!=null)if(u==="style"){var a=r[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Lr.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in i){var l=i[u];if(a=r!=null?r[u]:void 0,i.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(s||(s=[]),s.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Lr.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&X("scroll",t),s||a===l||(s=[])):(s=s||[]).push(u,l))}n&&(s=s||[]).push("style",n);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};kg=function(t,e,n,i){n!==i&&(e.flags|=4)};function qi(t,e){if(!ee)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:i.sibling=null}}function Se(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,i=0;if(e)for(var r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=t,r=r.sibling;else for(r=t.child;r!==null;)n|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=t,r=r.sibling;return t.subtreeFlags|=i,t.childLanes=n,e}function rv(t,e,n){var i=e.pendingProps;switch(Fu(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Se(e),null;case 1:return $e(e.type)&&_o(),Se(e),null;case 3:return i=e.stateNode,Ti(),Z(Fe),Z(Pe),Gu(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(t===null||t.child===null)&&(bs(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,ft!==null&&(Xl(ft),ft=null))),Vl(t,e),Se(e),null;case 5:Yu(e);var r=jn(Vr.current);if(n=e.type,t!==null&&e.stateNode!=null)xg(t,e,n,i,r),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(C(166));return Se(e),null}if(t=jn(Ct.current),bs(e)){i=e.stateNode,n=e.type;var s=e.memoizedProps;switch(i[bt]=e,i[Ur]=s,t=(e.mode&1)!==0,n){case"dialog":X("cancel",i),X("close",i);break;case"iframe":case"object":case"embed":X("load",i);break;case"video":case"audio":for(r=0;r<or.length;r++)X(or[r],i);break;case"source":X("error",i);break;case"img":case"image":case"link":X("error",i),X("load",i);break;case"details":X("toggle",i);break;case"input":$c(i,s),X("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!s.multiple},X("invalid",i);break;case"textarea":Bc(i,s),X("invalid",i)}ml(n,s),r=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?i.textContent!==a&&(s.suppressHydrationWarning!==!0&&ks(i.textContent,a,t),r=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&ks(i.textContent,a,t),r=["children",""+a]):Lr.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&X("scroll",i)}switch(n){case"input":ps(i),Uc(i,s,!0);break;case"textarea":ps(i),Vc(i);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(i.onclick=vo)}i=r,e.updateQueue=i,i!==null&&(e.flags|=4)}else{o=r.nodeType===9?r:r.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Qf(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=o.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof i.is=="string"?t=o.createElement(n,{is:i.is}):(t=o.createElement(n),n==="select"&&(o=t,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):t=o.createElementNS(t,n),t[bt]=e,t[Ur]=i,wg(t,e,!1,!1),e.stateNode=t;e:{switch(o=yl(n,i),n){case"dialog":X("cancel",t),X("close",t),r=i;break;case"iframe":case"object":case"embed":X("load",t),r=i;break;case"video":case"audio":for(r=0;r<or.length;r++)X(or[r],t);r=i;break;case"source":X("error",t),r=i;break;case"img":case"image":case"link":X("error",t),X("load",t),r=i;break;case"details":X("toggle",t),r=i;break;case"input":$c(t,i),r=hl(t,i),X("invalid",t);break;case"option":r=i;break;case"select":t._wrapperState={wasMultiple:!!i.multiple},r=ie({},i,{value:void 0}),X("invalid",t);break;case"textarea":Bc(t,i),r=pl(t,i),X("invalid",t);break;default:r=i}ml(n,r),a=r;for(s in a)if(a.hasOwnProperty(s)){var l=a[s];s==="style"?Zf(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Xf(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Rr(t,l):typeof l=="number"&&Rr(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Lr.hasOwnProperty(s)?l!=null&&s==="onScroll"&&X("scroll",t):l!=null&&Su(t,s,l,o))}switch(n){case"input":ps(t),Uc(t,i,!1);break;case"textarea":ps(t),Vc(t);break;case"option":i.value!=null&&t.setAttribute("value",""+pn(i.value));break;case"select":t.multiple=!!i.multiple,s=i.value,s!=null?yi(t,!!i.multiple,s,!1):i.defaultValue!=null&&yi(t,!!i.multiple,i.defaultValue,!0);break;default:typeof r.onClick=="function"&&(t.onclick=vo)}switch(n){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Se(e),null;case 6:if(t&&e.stateNode!=null)kg(t,e,t.memoizedProps,i);else{if(typeof i!="string"&&e.stateNode===null)throw Error(C(166));if(n=jn(Vr.current),jn(Ct.current),bs(e)){if(i=e.stateNode,n=e.memoizedProps,i[bt]=e,(s=i.nodeValue!==n)&&(t=Ye,t!==null))switch(t.tag){case 3:ks(i.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ks(i.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[bt]=e,e.stateNode=i}return Se(e),null;case 13:if(Z(te),i=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(ee&&We!==null&&e.mode&1&&!(e.flags&128))$p(),Ei(),e.flags|=98560,s=!1;else if(s=bs(e),i!==null&&i.dehydrated!==null){if(t===null){if(!s)throw Error(C(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(C(317));s[bt]=e}else Ei(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Se(e),s=!1}else ft!==null&&(Xl(ft),ft=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(i=i!==null,i!==(t!==null&&t.memoizedState!==null)&&i&&(e.child.flags|=8192,e.mode&1&&(t===null||te.current&1?pe===0&&(pe=3):oc())),e.updateQueue!==null&&(e.flags|=4),Se(e),null);case 4:return Ti(),Vl(t,e),t===null&&Fr(e.stateNode.containerInfo),Se(e),null;case 10:return Vu(e.type._context),Se(e),null;case 17:return $e(e.type)&&_o(),Se(e),null;case 19:if(Z(te),s=e.memoizedState,s===null)return Se(e),null;if(i=(e.flags&128)!==0,o=s.rendering,o===null)if(i)qi(s,!1);else{if(pe!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(o=Eo(t),o!==null){for(e.flags|=128,qi(s,!1),i=o.updateQueue,i!==null&&(e.updateQueue=i,e.flags|=4),e.subtreeFlags=0,i=n,n=e.child;n!==null;)s=n,t=i,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,t=o.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return q(te,te.current&1|2),e.child}t=t.sibling}s.tail!==null&&le()>Mi&&(e.flags|=128,i=!0,qi(s,!1),e.lanes=4194304)}else{if(!i)if(t=Eo(o),t!==null){if(e.flags|=128,i=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),qi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ee)return Se(e),null}else 2*le()-s.renderingStartTime>Mi&&n!==1073741824&&(e.flags|=128,i=!0,qi(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(n=s.last,n!==null?n.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=le(),e.sibling=null,n=te.current,q(te,i?n&1|2:n&1),e):(Se(e),null);case 22:case 23:return sc(),i=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?He&1073741824&&(Se(e),e.subtreeFlags&6&&(e.flags|=8192)):Se(e),null;case 24:return null;case 25:return null}throw Error(C(156,e.tag))}function sv(t,e){switch(Fu(e),e.tag){case 1:return $e(e.type)&&_o(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ti(),Z(Fe),Z(Pe),Gu(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return Yu(e),null;case 13:if(Z(te),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(C(340));Ei()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Z(te),null;case 4:return Ti(),null;case 10:return Vu(e.type._context),null;case 22:case 23:return sc(),null;case 24:return null;default:return null}}var Es=!1,Ee=!1,ov=typeof WeakSet=="function"?WeakSet:Set,T=null;function gi(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(i){se(t,e,i)}else n.current=null}function Hl(t,e,n){try{n()}catch(i){se(t,e,i)}}var Rh=!1;function av(t,e){if(Pl=go,t=Pp(),Nu(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,h=t,d=null;t:for(;;){for(var f;h!==n||r!==0&&h.nodeType!==3||(a=o+r),h!==s||i!==0&&h.nodeType!==3||(l=o+i),h.nodeType===3&&(o+=h.nodeValue.length),(f=h.firstChild)!==null;)d=h,h=f;for(;;){if(h===t)break t;if(d===n&&++u===r&&(a=o),d===s&&++c===i&&(l=o),(f=h.nextSibling)!==null)break;h=d,d=h.parentNode}h=f}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Tl={focusedElem:t,selectionRange:n},go=!1,T=e;T!==null;)if(e=T,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,T=t;else for(;T!==null;){e=T;try{var m=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,v=m.memoizedState,p=e.stateNode,g=p.getSnapshotBeforeUpdate(e.elementType===e.type?y:ut(e.type,y),v);p.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var _=e.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(C(163))}}catch(w){se(e,e.return,w)}if(t=e.sibling,t!==null){t.return=e.return,T=t;break}T=e.return}return m=Rh,Rh=!1,m}function _r(t,e,n){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&t)===t){var s=r.destroy;r.destroy=void 0,s!==void 0&&Hl(e,n,s)}r=r.next}while(r!==i)}}function ea(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var i=n.create;n.destroy=i()}n=n.next}while(n!==e)}}function Wl(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function bg(t){var e=t.alternate;e!==null&&(t.alternate=null,bg(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[bt],delete e[Ur],delete e[Ll],delete e[Vy],delete e[Hy])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Sg(t){return t.tag===5||t.tag===3||t.tag===4}function Ih(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Sg(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Kl(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=vo));else if(i!==4&&(t=t.child,t!==null))for(Kl(t,e,n),t=t.sibling;t!==null;)Kl(t,e,n),t=t.sibling}function Yl(t,e,n){var i=t.tag;if(i===5||i===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(i!==4&&(t=t.child,t!==null))for(Yl(t,e,n),t=t.sibling;t!==null;)Yl(t,e,n),t=t.sibling}var we=null,ct=!1;function Bt(t,e,n){for(n=n.child;n!==null;)Cg(t,e,n),n=n.sibling}function Cg(t,e,n){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(Ko,n)}catch{}switch(n.tag){case 5:Ee||gi(n,e);case 6:var i=we,r=ct;we=null,Bt(t,e,n),we=i,ct=r,we!==null&&(ct?(t=we,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):we.removeChild(n.stateNode));break;case 18:we!==null&&(ct?(t=we,n=n.stateNode,t.nodeType===8?Ra(t.parentNode,n):t.nodeType===1&&Ra(t,n),jr(t)):Ra(we,n.stateNode));break;case 4:i=we,r=ct,we=n.stateNode.containerInfo,ct=!0,Bt(t,e,n),we=i,ct=r;break;case 0:case 11:case 14:case 15:if(!Ee&&(i=n.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Hl(n,e,o),r=r.next}while(r!==i)}Bt(t,e,n);break;case 1:if(!Ee&&(gi(n,e),i=n.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=n.memoizedProps,i.state=n.memoizedState,i.componentWillUnmount()}catch(a){se(n,e,a)}Bt(t,e,n);break;case 21:Bt(t,e,n);break;case 22:n.mode&1?(Ee=(i=Ee)||n.memoizedState!==null,Bt(t,e,n),Ee=i):Bt(t,e,n);break;default:Bt(t,e,n)}}function Ah(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new ov),e.forEach(function(i){var r=mv.bind(null,t,i);n.has(i)||(n.add(i),i.then(r,r))})}}function at(t,e){var n=e.deletions;if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];try{var s=t,o=e,a=o;e:for(;a!==null;){switch(a.tag){case 5:we=a.stateNode,ct=!1;break e;case 3:we=a.stateNode.containerInfo,ct=!0;break e;case 4:we=a.stateNode.containerInfo,ct=!0;break e}a=a.return}if(we===null)throw Error(C(160));Cg(s,o,r),we=null,ct=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(u){se(r,e,u)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)Eg(e,t),e=e.sibling}function Eg(t,e){var n=t.alternate,i=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(at(e,t),_t(t),i&4){try{_r(3,t,t.return),ea(3,t)}catch(y){se(t,t.return,y)}try{_r(5,t,t.return)}catch(y){se(t,t.return,y)}}break;case 1:at(e,t),_t(t),i&512&&n!==null&&gi(n,n.return);break;case 5:if(at(e,t),_t(t),i&512&&n!==null&&gi(n,n.return),t.flags&32){var r=t.stateNode;try{Rr(r,"")}catch(y){se(t,t.return,y)}}if(i&4&&(r=t.stateNode,r!=null)){var s=t.memoizedProps,o=n!==null?n.memoizedProps:s,a=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&Gf(r,s),yl(a,o);var u=yl(a,s);for(o=0;o<l.length;o+=2){var c=l[o],h=l[o+1];c==="style"?Zf(r,h):c==="dangerouslySetInnerHTML"?Xf(r,h):c==="children"?Rr(r,h):Su(r,c,h,u)}switch(a){case"input":dl(r,s);break;case"textarea":qf(r,s);break;case"select":var d=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!s.multiple;var f=s.value;f!=null?yi(r,!!s.multiple,f,!1):d!==!!s.multiple&&(s.defaultValue!=null?yi(r,!!s.multiple,s.defaultValue,!0):yi(r,!!s.multiple,s.multiple?[]:"",!1))}r[Ur]=s}catch(y){se(t,t.return,y)}}break;case 6:if(at(e,t),_t(t),i&4){if(t.stateNode===null)throw Error(C(162));r=t.stateNode,s=t.memoizedProps;try{r.nodeValue=s}catch(y){se(t,t.return,y)}}break;case 3:if(at(e,t),_t(t),i&4&&n!==null&&n.memoizedState.isDehydrated)try{jr(e.containerInfo)}catch(y){se(t,t.return,y)}break;case 4:at(e,t),_t(t);break;case 13:at(e,t),_t(t),r=t.child,r.flags&8192&&(s=r.memoizedState!==null,r.stateNode.isHidden=s,!s||r.alternate!==null&&r.alternate.memoizedState!==null||(ic=le())),i&4&&Ah(t);break;case 22:if(c=n!==null&&n.memoizedState!==null,t.mode&1?(Ee=(u=Ee)||c,at(e,t),Ee=u):at(e,t),_t(t),i&8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&&!c&&t.mode&1)for(T=t,c=t.child;c!==null;){for(h=T=c;T!==null;){switch(d=T,f=d.child,d.tag){case 0:case 11:case 14:case 15:_r(4,d,d.return);break;case 1:gi(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){i=d,n=d.return;try{e=i,m.props=e.memoizedProps,m.state=e.memoizedState,m.componentWillUnmount()}catch(y){se(i,n,y)}}break;case 5:gi(d,d.return);break;case 22:if(d.memoizedState!==null){jh(h);continue}}f!==null?(f.return=d,T=f):jh(h)}c=c.sibling}e:for(c=null,h=t;;){if(h.tag===5){if(c===null){c=h;try{r=h.stateNode,u?(s=r.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=h.stateNode,l=h.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=Jf("display",o))}catch(y){se(t,t.return,y)}}}else if(h.tag===6){if(c===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(y){se(t,t.return,y)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===t)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;c===h&&(c=null),h=h.return}c===h&&(c=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:at(e,t),_t(t),i&4&&Ah(t);break;case 21:break;default:at(e,t),_t(t)}}function _t(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(Sg(n)){var i=n;break e}n=n.return}throw Error(C(160))}switch(i.tag){case 5:var r=i.stateNode;i.flags&32&&(Rr(r,""),i.flags&=-33);var s=Ih(t);Yl(t,s,r);break;case 3:case 4:var o=i.stateNode.containerInfo,a=Ih(t);Kl(t,a,o);break;default:throw Error(C(161))}}catch(l){se(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function lv(t,e,n){T=t,Pg(t)}function Pg(t,e,n){for(var i=(t.mode&1)!==0;T!==null;){var r=T,s=r.child;if(r.tag===22&&i){var o=r.memoizedState!==null||Es;if(!o){var a=r.alternate,l=a!==null&&a.memoizedState!==null||Ee;a=Es;var u=Ee;if(Es=o,(Ee=l)&&!u)for(T=r;T!==null;)o=T,l=o.child,o.tag===22&&o.memoizedState!==null?Nh(r):l!==null?(l.return=o,T=l):Nh(r);for(;s!==null;)T=s,Pg(s),s=s.sibling;T=r,Es=a,Ee=u}Dh(t)}else r.subtreeFlags&8772&&s!==null?(s.return=r,T=s):Dh(t)}}function Dh(t){for(;T!==null;){var e=T;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Ee||ea(5,e);break;case 1:var i=e.stateNode;if(e.flags&4&&!Ee)if(n===null)i.componentDidMount();else{var r=e.elementType===e.type?n.memoizedProps:ut(e.type,n.memoizedProps);i.componentDidUpdate(r,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&_h(e,s,i);break;case 3:var o=e.updateQueue;if(o!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}_h(e,o,n)}break;case 5:var a=e.stateNode;if(n===null&&e.flags&4){n=a;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var h=c.dehydrated;h!==null&&jr(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(C(163))}Ee||e.flags&512&&Wl(e)}catch(d){se(e,e.return,d)}}if(e===t){T=null;break}if(n=e.sibling,n!==null){n.return=e.return,T=n;break}T=e.return}}function jh(t){for(;T!==null;){var e=T;if(e===t){T=null;break}var n=e.sibling;if(n!==null){n.return=e.return,T=n;break}T=e.return}}function Nh(t){for(;T!==null;){var e=T;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{ea(4,e)}catch(l){se(e,n,l)}break;case 1:var i=e.stateNode;if(typeof i.componentDidMount=="function"){var r=e.return;try{i.componentDidMount()}catch(l){se(e,r,l)}}var s=e.return;try{Wl(e)}catch(l){se(e,s,l)}break;case 5:var o=e.return;try{Wl(e)}catch(l){se(e,o,l)}}}catch(l){se(e,e.return,l)}if(e===t){T=null;break}var a=e.sibling;if(a!==null){a.return=e.return,T=a;break}T=e.return}}var uv=Math.ceil,Oo=Ut.ReactCurrentDispatcher,tc=Ut.ReactCurrentOwner,rt=Ut.ReactCurrentBatchConfig,F=0,_e=null,he=null,xe=0,He=0,mi=_n(0),pe=0,Yr=null,Wn=0,ta=0,nc=0,wr=null,je=null,ic=0,Mi=1/0,Mt=null,Mo=!1,Gl=null,cn=null,Ps=!1,Jt=null,Lo=0,xr=0,ql=null,no=-1,io=0;function Re(){return F&6?le():no!==-1?no:no=le()}function hn(t){return t.mode&1?F&2&&xe!==0?xe&-xe:Ky.transition!==null?(io===0&&(io=hp()),io):(t=H,t!==0||(t=window.event,t=t===void 0?16:vp(t.type)),t):1}function gt(t,e,n,i){if(50<xr)throw xr=0,ql=null,Error(C(185));rs(t,n,i),(!(F&2)||t!==_e)&&(t===_e&&(!(F&2)&&(ta|=n),pe===4&&qt(t,xe)),Ue(t,i),n===1&&F===0&&!(e.mode&1)&&(Mi=le()+500,Xo&&wn()))}function Ue(t,e){var n=t.callbackNode;K0(t,e);var i=po(t,t===_e?xe:0);if(i===0)n!==null&&Kc(n),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(n!=null&&Kc(n),e===1)t.tag===0?Wy(zh.bind(null,t)):Np(zh.bind(null,t)),Uy(function(){!(F&6)&&wn()}),n=null;else{switch(dp(i)){case 1:n=Ou;break;case 4:n=up;break;case 16:n=fo;break;case 536870912:n=cp;break;default:n=fo}n=Dg(n,Tg.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Tg(t,e){if(no=-1,io=0,F&6)throw Error(C(327));var n=t.callbackNode;if(ki()&&t.callbackNode!==n)return null;var i=po(t,t===_e?xe:0);if(i===0)return null;if(i&30||i&t.expiredLanes||e)e=Ro(t,i);else{e=i;var r=F;F|=2;var s=Mg();(_e!==t||xe!==e)&&(Mt=null,Mi=le()+500,zn(t,e));do try{dv();break}catch(a){Og(t,a)}while(!0);Bu(),Oo.current=s,F=r,he!==null?e=0:(_e=null,xe=0,e=pe)}if(e!==0){if(e===2&&(r=kl(t),r!==0&&(i=r,e=Ql(t,r))),e===1)throw n=Yr,zn(t,0),qt(t,i),Ue(t,le()),n;if(e===6)qt(t,i);else{if(r=t.current.alternate,!(i&30)&&!cv(r)&&(e=Ro(t,i),e===2&&(s=kl(t),s!==0&&(i=s,e=Ql(t,s))),e===1))throw n=Yr,zn(t,0),qt(t,i),Ue(t,le()),n;switch(t.finishedWork=r,t.finishedLanes=i,e){case 0:case 1:throw Error(C(345));case 2:On(t,je,Mt);break;case 3:if(qt(t,i),(i&130023424)===i&&(e=ic+500-le(),10<e)){if(po(t,0)!==0)break;if(r=t.suspendedLanes,(r&i)!==i){Re(),t.pingedLanes|=t.suspendedLanes&r;break}t.timeoutHandle=Ml(On.bind(null,t,je,Mt),e);break}On(t,je,Mt);break;case 4:if(qt(t,i),(i&4194240)===i)break;for(e=t.eventTimes,r=-1;0<i;){var o=31-pt(i);s=1<<o,o=e[o],o>r&&(r=o),i&=~s}if(i=r,i=le()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*uv(i/1960))-i,10<i){t.timeoutHandle=Ml(On.bind(null,t,je,Mt),i);break}On(t,je,Mt);break;case 5:On(t,je,Mt);break;default:throw Error(C(329))}}}return Ue(t,le()),t.callbackNode===n?Tg.bind(null,t):null}function Ql(t,e){var n=wr;return t.current.memoizedState.isDehydrated&&(zn(t,e).flags|=256),t=Ro(t,e),t!==2&&(e=je,je=n,e!==null&&Xl(e)),t}function Xl(t){je===null?je=t:je.push.apply(je,t)}function cv(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var i=0;i<n.length;i++){var r=n[i],s=r.getSnapshot;r=r.value;try{if(!yt(s(),r))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function qt(t,e){for(e&=~nc,e&=~ta,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-pt(e),i=1<<n;t[n]=-1,e&=~i}}function zh(t){if(F&6)throw Error(C(327));ki();var e=po(t,0);if(!(e&1))return Ue(t,le()),null;var n=Ro(t,e);if(t.tag!==0&&n===2){var i=kl(t);i!==0&&(e=i,n=Ql(t,i))}if(n===1)throw n=Yr,zn(t,0),qt(t,e),Ue(t,le()),n;if(n===6)throw Error(C(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,On(t,je,Mt),Ue(t,le()),null}function rc(t,e){var n=F;F|=1;try{return t(e)}finally{F=n,F===0&&(Mi=le()+500,Xo&&wn())}}function Kn(t){Jt!==null&&Jt.tag===0&&!(F&6)&&ki();var e=F;F|=1;var n=rt.transition,i=H;try{if(rt.transition=null,H=1,t)return t()}finally{H=i,rt.transition=n,F=e,!(F&6)&&wn()}}function sc(){He=mi.current,Z(mi)}function zn(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,$y(n)),he!==null)for(n=he.return;n!==null;){var i=n;switch(Fu(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&_o();break;case 3:Ti(),Z(Fe),Z(Pe),Gu();break;case 5:Yu(i);break;case 4:Ti();break;case 13:Z(te);break;case 19:Z(te);break;case 10:Vu(i.type._context);break;case 22:case 23:sc()}n=n.return}if(_e=t,he=t=dn(t.current,null),xe=He=e,pe=0,Yr=null,nc=ta=Wn=0,je=wr=null,Dn!==null){for(e=0;e<Dn.length;e++)if(n=Dn[e],i=n.interleaved,i!==null){n.interleaved=null;var r=i.next,s=n.pending;if(s!==null){var o=s.next;s.next=r,i.next=o}n.pending=i}Dn=null}return t}function Og(t,e){do{var n=he;try{if(Bu(),Zs.current=To,Po){for(var i=ne.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}Po=!1}if(Hn=0,ye=fe=ne=null,vr=!1,Hr=0,tc.current=null,n===null||n.return===null){pe=1,Yr=e,he=null;break}e:{var s=t,o=n.return,a=n,l=e;if(e=xe,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,h=c.tag;if(!(c.mode&1)&&(h===0||h===11||h===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var f=Ch(o);if(f!==null){f.flags&=-257,Eh(f,o,a,s,e),f.mode&1&&Sh(s,u,e),e=f,l=u;var m=e.updateQueue;if(m===null){var y=new Set;y.add(l),e.updateQueue=y}else m.add(l);break e}else{if(!(e&1)){Sh(s,u,e),oc();break e}l=Error(C(426))}}else if(ee&&a.mode&1){var v=Ch(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),Eh(v,o,a,s,e),$u(Oi(l,a));break e}}s=l=Oi(l,a),pe!==4&&(pe=2),wr===null?wr=[s]:wr.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var p=dg(s,l,e);vh(s,p);break e;case 1:a=l;var g=s.type,_=s.stateNode;if(!(s.flags&128)&&(typeof g.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(cn===null||!cn.has(_)))){s.flags|=65536,e&=-e,s.lanes|=e;var w=fg(s,a,e);vh(s,w);break e}}s=s.return}while(s!==null)}Rg(n)}catch(x){e=x,he===n&&n!==null&&(he=n=n.return);continue}break}while(!0)}function Mg(){var t=Oo.current;return Oo.current=To,t===null?To:t}function oc(){(pe===0||pe===3||pe===2)&&(pe=4),_e===null||!(Wn&268435455)&&!(ta&268435455)||qt(_e,xe)}function Ro(t,e){var n=F;F|=2;var i=Mg();(_e!==t||xe!==e)&&(Mt=null,zn(t,e));do try{hv();break}catch(r){Og(t,r)}while(!0);if(Bu(),F=n,Oo.current=i,he!==null)throw Error(C(261));return _e=null,xe=0,pe}function hv(){for(;he!==null;)Lg(he)}function dv(){for(;he!==null&&!N0();)Lg(he)}function Lg(t){var e=Ag(t.alternate,t,He);t.memoizedProps=t.pendingProps,e===null?Rg(t):he=e,tc.current=null}function Rg(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=sv(n,e),n!==null){n.flags&=32767,he=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{pe=6,he=null;return}}else if(n=rv(n,e,He),n!==null){he=n;return}if(e=e.sibling,e!==null){he=e;return}he=e=t}while(e!==null);pe===0&&(pe=5)}function On(t,e,n){var i=H,r=rt.transition;try{rt.transition=null,H=1,fv(t,e,n,i)}finally{rt.transition=r,H=i}return null}function fv(t,e,n,i){do ki();while(Jt!==null);if(F&6)throw Error(C(327));n=t.finishedWork;var r=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(C(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(Y0(t,s),t===_e&&(he=_e=null,xe=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ps||(Ps=!0,Dg(fo,function(){return ki(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=rt.transition,rt.transition=null;var o=H;H=1;var a=F;F|=4,tc.current=null,av(t,n),Eg(n,t),Iy(Tl),go=!!Pl,Tl=Pl=null,t.current=n,lv(n),z0(),F=a,H=o,rt.transition=s}else t.current=n;if(Ps&&(Ps=!1,Jt=t,Lo=r),s=t.pendingLanes,s===0&&(cn=null),U0(n.stateNode),Ue(t,le()),e!==null)for(i=t.onRecoverableError,n=0;n<e.length;n++)r=e[n],i(r.value,{componentStack:r.stack,digest:r.digest});if(Mo)throw Mo=!1,t=Gl,Gl=null,t;return Lo&1&&t.tag!==0&&ki(),s=t.pendingLanes,s&1?t===ql?xr++:(xr=0,ql=t):xr=0,wn(),null}function ki(){if(Jt!==null){var t=dp(Lo),e=rt.transition,n=H;try{if(rt.transition=null,H=16>t?16:t,Jt===null)var i=!1;else{if(t=Jt,Jt=null,Lo=0,F&6)throw Error(C(331));var r=F;for(F|=4,T=t.current;T!==null;){var s=T,o=s.child;if(T.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(T=u;T!==null;){var c=T;switch(c.tag){case 0:case 11:case 15:_r(8,c,s)}var h=c.child;if(h!==null)h.return=c,T=h;else for(;T!==null;){c=T;var d=c.sibling,f=c.return;if(bg(c),c===u){T=null;break}if(d!==null){d.return=f,T=d;break}T=f}}}var m=s.alternate;if(m!==null){var y=m.child;if(y!==null){m.child=null;do{var v=y.sibling;y.sibling=null,y=v}while(y!==null)}}T=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,T=o;else e:for(;T!==null;){if(s=T,s.flags&2048)switch(s.tag){case 0:case 11:case 15:_r(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,T=p;break e}T=s.return}}var g=t.current;for(T=g;T!==null;){o=T;var _=o.child;if(o.subtreeFlags&2064&&_!==null)_.return=o,T=_;else e:for(o=g;T!==null;){if(a=T,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ea(9,a)}}catch(x){se(a,a.return,x)}if(a===o){T=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,T=w;break e}T=a.return}}if(F=r,wn(),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(Ko,t)}catch{}i=!0}return i}finally{H=n,rt.transition=e}}return!1}function Fh(t,e,n){e=Oi(n,e),e=dg(t,e,1),t=un(t,e,1),e=Re(),t!==null&&(rs(t,1,e),Ue(t,e))}function se(t,e,n){if(t.tag===3)Fh(t,t,n);else for(;e!==null;){if(e.tag===3){Fh(e,t,n);break}else if(e.tag===1){var i=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(cn===null||!cn.has(i))){t=Oi(n,t),t=fg(e,t,1),e=un(e,t,1),t=Re(),e!==null&&(rs(e,1,t),Ue(e,t));break}}e=e.return}}function pv(t,e,n){var i=t.pingCache;i!==null&&i.delete(e),e=Re(),t.pingedLanes|=t.suspendedLanes&n,_e===t&&(xe&n)===n&&(pe===4||pe===3&&(xe&130023424)===xe&&500>le()-ic?zn(t,0):nc|=n),Ue(t,e)}function Ig(t,e){e===0&&(t.mode&1?(e=ys,ys<<=1,!(ys&130023424)&&(ys=4194304)):e=1);var n=Re();t=Ft(t,e),t!==null&&(rs(t,e,n),Ue(t,n))}function gv(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Ig(t,n)}function mv(t,e){var n=0;switch(t.tag){case 13:var i=t.stateNode,r=t.memoizedState;r!==null&&(n=r.retryLane);break;case 19:i=t.stateNode;break;default:throw Error(C(314))}i!==null&&i.delete(e),Ig(t,n)}var Ag;Ag=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Fe.current)ze=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return ze=!1,iv(t,e,n);ze=!!(t.flags&131072)}else ze=!1,ee&&e.flags&1048576&&zp(e,ko,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;to(t,e),t=e.pendingProps;var r=Ci(e,Pe.current);xi(e,n),r=Qu(null,e,i,t,r,n);var s=Xu();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,$e(i)?(s=!0,wo(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Wu(e),r.updater=Zo,e.stateNode=r,r._reactInternals=e,Nl(e,i,t,n),e=$l(null,e,i,!0,s,n)):(e.tag=0,ee&&s&&zu(e),Me(null,e,r,n),e=e.child),e;case 16:i=e.elementType;e:{switch(to(t,e),t=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=vv(i),t=ut(i,t),r){case 0:e=Fl(null,e,i,t,n);break e;case 1:e=Oh(null,e,i,t,n);break e;case 11:e=Ph(null,e,i,t,n);break e;case 14:e=Th(null,e,i,ut(i.type,t),n);break e}throw Error(C(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ut(i,r),Fl(t,e,i,r,n);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ut(i,r),Oh(t,e,i,r,n);case 3:e:{if(yg(e),t===null)throw Error(C(387));i=e.pendingProps,s=e.memoizedState,r=s.element,Hp(t,e),Co(e,i,null,n);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=Oi(Error(C(423)),e),e=Mh(t,e,i,n,r);break e}else if(i!==r){r=Oi(Error(C(424)),e),e=Mh(t,e,i,n,r);break e}else for(We=ln(e.stateNode.containerInfo.firstChild),Ye=e,ee=!0,ft=null,n=Bp(e,null,i,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ei(),i===r){e=$t(t,e,n);break e}Me(t,e,i,n)}e=e.child}return e;case 5:return Wp(e),t===null&&Al(e),i=e.type,r=e.pendingProps,s=t!==null?t.memoizedProps:null,o=r.children,Ol(i,r)?o=null:s!==null&&Ol(i,s)&&(e.flags|=32),mg(t,e),Me(t,e,o,n),e.child;case 6:return t===null&&Al(e),null;case 13:return vg(t,e,n);case 4:return Ku(e,e.stateNode.containerInfo),i=e.pendingProps,t===null?e.child=Pi(e,null,i,n):Me(t,e,i,n),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ut(i,r),Ph(t,e,i,r,n);case 7:return Me(t,e,e.pendingProps,n),e.child;case 8:return Me(t,e,e.pendingProps.children,n),e.child;case 12:return Me(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,q(bo,i._currentValue),i._currentValue=o,s!==null)if(yt(s.value,o)){if(s.children===r.children&&!Fe.current){e=$t(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=jt(-1,n&-n),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Dl(s.return,n,e),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(C(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Dl(o,n,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Me(t,e,r.children,n),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,xi(e,n),r=st(r),i=i(r),e.flags|=1,Me(t,e,i,n),e.child;case 14:return i=e.type,r=ut(i,e.pendingProps),r=ut(i.type,r),Th(t,e,i,r,n);case 15:return pg(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:ut(i,r),to(t,e),e.tag=1,$e(i)?(t=!0,wo(e)):t=!1,xi(e,n),hg(e,i,r),Nl(e,i,r,n),$l(null,e,i,!0,t,n);case 19:return _g(t,e,n);case 22:return gg(t,e,n)}throw Error(C(156,e.tag))};function Dg(t,e){return lp(t,e)}function yv(t,e,n,i){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nt(t,e,n,i){return new yv(t,e,n,i)}function ac(t){return t=t.prototype,!(!t||!t.isReactComponent)}function vv(t){if(typeof t=="function")return ac(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Eu)return 11;if(t===Pu)return 14}return 2}function dn(t,e){var n=t.alternate;return n===null?(n=nt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function ro(t,e,n,i,r,s){var o=2;if(i=t,typeof t=="function")ac(t)&&(o=1);else if(typeof t=="string")o=5;else e:switch(t){case oi:return Fn(n.children,r,s,e);case Cu:o=8,r|=8;break;case al:return t=nt(12,n,e,r|2),t.elementType=al,t.lanes=s,t;case ll:return t=nt(13,n,e,r),t.elementType=ll,t.lanes=s,t;case ul:return t=nt(19,n,e,r),t.elementType=ul,t.lanes=s,t;case Wf:return na(n,r,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Vf:o=10;break e;case Hf:o=9;break e;case Eu:o=11;break e;case Pu:o=14;break e;case Wt:o=16,i=null;break e}throw Error(C(130,t==null?t:typeof t,""))}return e=nt(o,n,e,r),e.elementType=t,e.type=i,e.lanes=s,e}function Fn(t,e,n,i){return t=nt(7,t,i,e),t.lanes=n,t}function na(t,e,n,i){return t=nt(22,t,i,e),t.elementType=Wf,t.lanes=n,t.stateNode={isHidden:!1},t}function $a(t,e,n){return t=nt(6,t,null,e),t.lanes=n,t}function Ua(t,e,n){return e=nt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function _v(t,e,n,i,r){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xa(0),this.expirationTimes=xa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xa(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function lc(t,e,n,i,r,s,o,a,l){return t=new _v(t,e,n,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=nt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:i,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wu(s),t}function wv(t,e,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:si,key:i==null?null:""+i,children:t,containerInfo:e,implementation:n}}function jg(t){if(!t)return gn;t=t._reactInternals;e:{if(qn(t)!==t||t.tag!==1)throw Error(C(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if($e(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(C(171))}if(t.tag===1){var n=t.type;if($e(n))return jp(t,n,e)}return e}function Ng(t,e,n,i,r,s,o,a,l){return t=lc(n,i,!0,t,r,s,o,a,l),t.context=jg(null),n=t.current,i=Re(),r=hn(n),s=jt(i,r),s.callback=e??null,un(n,s,r),t.current.lanes=r,rs(t,r,i),Ue(t,i),t}function ia(t,e,n,i){var r=e.current,s=Re(),o=hn(r);return n=jg(n),e.context===null?e.context=n:e.pendingContext=n,e=jt(s,o),e.payload={element:t},i=i===void 0?null:i,i!==null&&(e.callback=i),t=un(r,e,o),t!==null&&(gt(t,r,o,s),Js(t,r,o)),o}function Io(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function $h(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function uc(t,e){$h(t,e),(t=t.alternate)&&$h(t,e)}function xv(){return null}var zg=typeof reportError=="function"?reportError:function(t){console.error(t)};function cc(t){this._internalRoot=t}ra.prototype.render=cc.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(C(409));ia(t,e,null,null)};ra.prototype.unmount=cc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Kn(function(){ia(null,t,null,null)}),e[zt]=null}};function ra(t){this._internalRoot=t}ra.prototype.unstable_scheduleHydration=function(t){if(t){var e=gp();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Gt.length&&e!==0&&e<Gt[n].priority;n++);Gt.splice(n,0,t),n===0&&yp(t)}};function hc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function sa(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Uh(){}function kv(t,e,n,i,r){if(r){if(typeof i=="function"){var s=i;i=function(){var u=Io(o);s.call(u)}}var o=Ng(e,i,t,0,null,!1,!1,"",Uh);return t._reactRootContainer=o,t[zt]=o.current,Fr(t.nodeType===8?t.parentNode:t),Kn(),o}for(;r=t.lastChild;)t.removeChild(r);if(typeof i=="function"){var a=i;i=function(){var u=Io(l);a.call(u)}}var l=lc(t,0,!1,null,null,!1,!1,"",Uh);return t._reactRootContainer=l,t[zt]=l.current,Fr(t.nodeType===8?t.parentNode:t),Kn(function(){ia(e,l,n,i)}),l}function oa(t,e,n,i,r){var s=n._reactRootContainer;if(s){var o=s;if(typeof r=="function"){var a=r;r=function(){var l=Io(o);a.call(l)}}ia(e,o,t,r)}else o=kv(n,e,t,r,i);return Io(o)}fp=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=sr(e.pendingLanes);n!==0&&(Mu(e,n|1),Ue(e,le()),!(F&6)&&(Mi=le()+500,wn()))}break;case 13:Kn(function(){var i=Ft(t,1);if(i!==null){var r=Re();gt(i,t,1,r)}}),uc(t,1)}};Lu=function(t){if(t.tag===13){var e=Ft(t,134217728);if(e!==null){var n=Re();gt(e,t,134217728,n)}uc(t,134217728)}};pp=function(t){if(t.tag===13){var e=hn(t),n=Ft(t,e);if(n!==null){var i=Re();gt(n,t,e,i)}uc(t,e)}};gp=function(){return H};mp=function(t,e){var n=H;try{return H=t,e()}finally{H=n}};_l=function(t,e,n){switch(e){case"input":if(dl(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var i=n[e];if(i!==t&&i.form===t.form){var r=Qo(i);if(!r)throw Error(C(90));Yf(i),dl(i,r)}}}break;case"textarea":qf(t,n);break;case"select":e=n.value,e!=null&&yi(t,!!n.multiple,e,!1)}};np=rc;ip=Kn;var bv={usingClientEntryPoint:!1,Events:[os,ci,Qo,ep,tp,rc]},Qi={findFiberByHostInstance:An,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Sv={bundleType:Qi.bundleType,version:Qi.version,rendererPackageName:Qi.rendererPackageName,rendererConfig:Qi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ut.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=op(t),t===null?null:t.stateNode},findFiberByHostInstance:Qi.findFiberByHostInstance||xv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ts=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ts.isDisabled&&Ts.supportsFiber)try{Ko=Ts.inject(Sv),St=Ts}catch{}}Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=bv;Qe.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!hc(e))throw Error(C(200));return wv(t,e,null,n)};Qe.createRoot=function(t,e){if(!hc(t))throw Error(C(299));var n=!1,i="",r=zg;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(i=e.identifierPrefix),e.onRecoverableError!==void 0&&(r=e.onRecoverableError)),e=lc(t,1,!1,null,null,n,!1,i,r),t[zt]=e.current,Fr(t.nodeType===8?t.parentNode:t),new cc(e)};Qe.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(C(188)):(t=Object.keys(t).join(","),Error(C(268,t)));return t=op(e),t=t===null?null:t.stateNode,t};Qe.flushSync=function(t){return Kn(t)};Qe.hydrate=function(t,e,n){if(!sa(e))throw Error(C(200));return oa(null,t,e,!0,n)};Qe.hydrateRoot=function(t,e,n){if(!hc(t))throw Error(C(405));var i=n!=null&&n.hydratedSources||null,r=!1,s="",o=zg;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),e=Ng(e,null,t,1,n??null,r,!1,s,o),t[zt]=e.current,Fr(t),i)for(t=0;t<i.length;t++)n=i[t],r=n._getVersion,r=r(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,r]:e.mutableSourceEagerHydrationData.push(n,r);return new ra(e)};Qe.render=function(t,e,n){if(!sa(e))throw Error(C(200));return oa(null,t,e,!1,n)};Qe.unmountComponentAtNode=function(t){if(!sa(t))throw Error(C(40));return t._reactRootContainer?(Kn(function(){oa(null,null,t,!1,function(){t._reactRootContainer=null,t[zt]=null})}),!0):!1};Qe.unstable_batchedUpdates=rc;Qe.unstable_renderSubtreeIntoContainer=function(t,e,n,i){if(!sa(n))throw Error(C(200));if(t==null||t._reactInternals===void 0)throw Error(C(38));return oa(t,e,n,!1,i)};Qe.version="18.3.1-next-f1338f8080-20240426";function Fg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Fg)}catch(t){console.error(t)}}Fg(),Ff.exports=Qe;var Cv=Ff.exports,Bh=Cv;sl.createRoot=Bh.createRoot,sl.hydrateRoot=Bh.hydrateRoot;/**
+ * @remix-run/router v1.16.1
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function Gr(){return Gr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Gr.apply(this,arguments)}var Zt;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Zt||(Zt={}));const Vh="popstate";function Ev(t){t===void 0&&(t={});function e(i,r){let{pathname:s,search:o,hash:a}=i.location;return Jl("",{pathname:s,search:o,hash:a},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(i,r){return typeof r=="string"?r:Ug(r)}return Tv(e,n,null,t)}function ge(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function $g(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function Pv(){return Math.random().toString(36).substr(2,8)}function Hh(t,e){return{usr:t.state,key:t.key,idx:e}}function Jl(t,e,n,i){return n===void 0&&(n=null),Gr({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?$i(e):e,{state:n,key:e&&e.key||i||Pv()})}function Ug(t){let{pathname:e="/",search:n="",hash:i=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function $i(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substr(i),t=t.substr(0,i)),t&&(e.pathname=t)}return e}function Tv(t,e,n,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=Zt.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Gr({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function h(){a=Zt.Pop;let v=c(),p=v==null?null:v-u;u=v,l&&l({action:a,location:y.location,delta:p})}function d(v,p){a=Zt.Push;let g=Jl(y.location,v,p);u=c()+1;let _=Hh(g,u),w=y.createHref(g);try{o.pushState(_,"",w)}catch(x){if(x instanceof DOMException&&x.name==="DataCloneError")throw x;r.location.assign(w)}s&&l&&l({action:a,location:y.location,delta:1})}function f(v,p){a=Zt.Replace;let g=Jl(y.location,v,p);u=c();let _=Hh(g,u),w=y.createHref(g);o.replaceState(_,"",w),s&&l&&l({action:a,location:y.location,delta:0})}function m(v){let p=r.location.origin!=="null"?r.location.origin:r.location.href,g=typeof v=="string"?v:Ug(v);return g=g.replace(/ $/,"%20"),ge(p,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,p)}let y={get action(){return a},get location(){return t(r,o)},listen(v){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(Vh,h),l=v,()=>{r.removeEventListener(Vh,h),l=null}},createHref(v){return e(r,v)},createURL:m,encodeLocation(v){let p=m(v);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:f,go(v){return o.go(v)}};return y}var Wh;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(Wh||(Wh={}));function Ov(t,e,n){n===void 0&&(n="/");let i=typeof e=="string"?$i(e):e,r=Hg(i.pathname||"/",n);if(r==null)return null;let s=Bg(t);Mv(s);let o=null;for(let a=0;o==null&&a<s.length;++a){let l=Bv(r);o=Fv(s[a],l)}return o}function Bg(t,e,n,i){e===void 0&&(e=[]),n===void 0&&(n=[]),i===void 0&&(i="");let r=(s,o,a)=>{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(ge(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let u=$n([i,l.relativePath]),c=n.concat(l);s.children&&s.children.length>0&&(ge(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Bg(s.children,e,c,u)),!(s.path==null&&!s.index)&&e.push({path:u,score:Nv(u,s.index),routesMeta:c})};return t.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))r(s,o);else for(let l of Vg(s.path))r(s,o,l)}),e}function Vg(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let o=Vg(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>t.startsWith("/")&&l===""?"/":l)}function Mv(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:zv(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}const Lv=/^:[\w-]+$/,Rv=3,Iv=2,Av=1,Dv=10,jv=-2,Kh=t=>t==="*";function Nv(t,e){let n=t.split("/"),i=n.length;return n.some(Kh)&&(i+=jv),e&&(i+=Iv),n.filter(r=>!Kh(r)).reduce((r,s)=>r+(Lv.test(s)?Rv:s===""?Av:Dv),i)}function zv(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function Fv(t,e){let{routesMeta:n}=t,i={},r="/",s=[];for(let o=0;o<n.length;++o){let a=n[o],l=o===n.length-1,u=r==="/"?e:e.slice(r.length)||"/",c=$v({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},u);if(!c)return null;Object.assign(i,c.params);let h=a.route;s.push({params:i,pathname:$n([r,c.pathname]),pathnameBase:Gv($n([r,c.pathnameBase])),route:h}),c.pathnameBase!=="/"&&(r=$n([r,c.pathnameBase]))}return s}function $v(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,i]=Uv(t.path,t.caseSensitive,t.end),r=e.match(n);if(!r)return null;let s=r[0],o=s.replace(/(.)\/+$/,"$1"),a=r.slice(1);return{params:i.reduce((u,c,h)=>{let{paramName:d,isOptional:f}=c;if(d==="*"){let y=a[h]||"";o=s.slice(0,s.length-y.length).replace(/(.)\/+$/,"$1")}const m=a[h];return f&&!m?u[d]=void 0:u[d]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:s,pathnameBase:o,pattern:t}}function Uv(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),$g(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(i.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function Bv(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return $g(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Hg(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}function Vv(t,e){e===void 0&&(e="/");let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?$i(t):t;return{pathname:n?n.startsWith("/")?n:Hv(n,e):e,search:qv(i),hash:Qv(r)}}function Hv(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function Ba(t,e,n,i){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"].  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 Wv(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Kv(t,e){let n=Wv(t);return e?n.map((i,r)=>r===t.length-1?i.pathname:i.pathnameBase):n.map(i=>i.pathnameBase)}function Yv(t,e,n,i){i===void 0&&(i=!1);let r;typeof t=="string"?r=$i(t):(r=Gr({},t),ge(!r.pathname||!r.pathname.includes("?"),Ba("?","pathname","search",r)),ge(!r.pathname||!r.pathname.includes("#"),Ba("#","pathname","hash",r)),ge(!r.search||!r.search.includes("#"),Ba("#","search","hash",r)));let s=t===""||r.pathname==="",o=s?"/":r.pathname,a;if(o==null)a=n;else{let h=e.length-1;if(!i&&o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),h-=1;r.pathname=d.join("/")}a=h>=0?e[h]:"/"}let l=Vv(r,a),u=o&&o!=="/"&&o.endsWith("/"),c=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const $n=t=>t.join("/").replace(/\/\/+/g,"/"),Gv=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),qv=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Qv=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Xv(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const Wg=["post","put","patch","delete"];new Set(Wg);const Jv=["get",...Wg];new Set(Jv);/**
+ * React Router v6.23.1
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */function qr(){return qr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},qr.apply(this,arguments)}const dc=E.createContext(null),Zv=E.createContext(null),aa=E.createContext(null),la=E.createContext(null),Ui=E.createContext({outlet:null,matches:[],isDataRoute:!1}),Kg=E.createContext(null);function ua(){return E.useContext(la)!=null}function Yg(){return ua()||ge(!1),E.useContext(la).location}function Gg(t){E.useContext(aa).static||E.useLayoutEffect(t)}function fc(){let{isDataRoute:t}=E.useContext(Ui);return t?d_():e_()}function e_(){ua()||ge(!1);let t=E.useContext(dc),{basename:e,future:n,navigator:i}=E.useContext(aa),{matches:r}=E.useContext(Ui),{pathname:s}=Yg(),o=JSON.stringify(Kv(r,n.v7_relativeSplatPath)),a=E.useRef(!1);return Gg(()=>{a.current=!0}),E.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){i.go(u);return}let h=Yv(u,JSON.parse(o),s,c.relative==="path");t==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:$n([e,h.pathname])),(c.replace?i.replace:i.push)(h,c.state,c)},[e,i,o,s,t])}function t_(t,e){return n_(t,e)}function n_(t,e,n,i){ua()||ge(!1);let{navigator:r}=E.useContext(aa),{matches:s}=E.useContext(Ui),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let u=Yg(),c;if(e){var h;let v=typeof e=="string"?$i(e):e;l==="/"||(h=v.pathname)!=null&&h.startsWith(l)||ge(!1),c=v}else c=u;let d=c.pathname||"/",f=d;if(l!=="/"){let v=l.replace(/^\//,"").split("/");f="/"+d.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=Ov(t,{pathname:f}),y=a_(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:$n([l,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:$n([l,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),s,n,i);return e&&y?E.createElement(la.Provider,{value:{location:qr({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Zt.Pop}},y):y}function i_(){let t=h_(),e=Xv(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),n?E.createElement("pre",{style:r},n):null,null)}const r_=E.createElement(i_,null);class s_ extends E.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?E.createElement(Ui.Provider,{value:this.props.routeContext},E.createElement(Kg.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function o_(t){let{routeContext:e,match:n,children:i}=t,r=E.useContext(dc);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(Ui.Provider,{value:e},i)}function a_(t,e,n,i){var r;if(e===void 0&&(e=[]),n===void 0&&(n=null),i===void 0&&(i=null),t==null){var s;if((s=n)!=null&&s.errors)t=n.matches;else return null}let o=t,a=(r=n)==null?void 0:r.errors;if(a!=null){let c=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);c>=0||ge(!1),o=o.slice(0,Math.min(o.length,c+1))}let l=!1,u=-1;if(n&&i&&i.v7_partialHydration)for(let c=0;c<o.length;c++){let h=o[c];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=c),h.route.id){let{loaderData:d,errors:f}=n,m=h.route.loader&&d[h.route.id]===void 0&&(!f||f[h.route.id]===void 0);if(h.route.lazy||m){l=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((c,h,d)=>{let f,m=!1,y=null,v=null;n&&(f=a&&h.route.id?a[h.route.id]:void 0,y=h.route.errorElement||r_,l&&(u<0&&d===0?(m=!0,v=null):u===d&&(m=!0,v=h.route.hydrateFallbackElement||null)));let p=e.concat(o.slice(0,d+1)),g=()=>{let _;return f?_=y:m?_=v:h.route.Component?_=E.createElement(h.route.Component,null):h.route.element?_=h.route.element:_=c,E.createElement(o_,{match:h,routeContext:{outlet:c,matches:p,isDataRoute:n!=null},children:_})};return n&&(h.route.ErrorBoundary||h.route.errorElement||d===0)?E.createElement(s_,{location:n.location,revalidation:n.revalidation,component:y,error:f,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var qg=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(qg||{}),Ao=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Ao||{});function l_(t){let e=E.useContext(dc);return e||ge(!1),e}function u_(t){let e=E.useContext(Zv);return e||ge(!1),e}function c_(t){let e=E.useContext(Ui);return e||ge(!1),e}function Qg(t){let e=c_(),n=e.matches[e.matches.length-1];return n.route.id||ge(!1),n.route.id}function h_(){var t;let e=E.useContext(Kg),n=u_(Ao.UseRouteError),i=Qg(Ao.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[i]}function d_(){let{router:t}=l_(qg.UseNavigateStable),e=Qg(Ao.UseNavigateStable),n=E.useRef(!1);return Gg(()=>{n.current=!0}),E.useCallback(function(r,s){s===void 0&&(s={}),n.current&&(typeof r=="number"?t.navigate(r):t.navigate(r,qr({fromRouteId:e},s)))},[t,e])}function ar(t){ge(!1)}function f_(t){let{basename:e="/",children:n=null,location:i,navigationType:r=Zt.Pop,navigator:s,static:o=!1,future:a}=t;ua()&&ge(!1);let l=e.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:l,navigator:s,static:o,future:qr({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof i=="string"&&(i=$i(i));let{pathname:c="/",search:h="",hash:d="",state:f=null,key:m="default"}=i,y=E.useMemo(()=>{let v=Hg(c,l);return v==null?null:{location:{pathname:v,search:h,hash:d,state:f,key:m},navigationType:r}},[l,c,h,d,f,m,r]);return y==null?null:E.createElement(aa.Provider,{value:u},E.createElement(la.Provider,{children:n,value:y}))}function p_(t){let{children:e,location:n}=t;return t_(Zl(e),n)}new Promise(()=>{});function Zl(t,e){e===void 0&&(e=[]);let n=[];return E.Children.forEach(t,(i,r)=>{if(!E.isValidElement(i))return;let s=[...e,r];if(i.type===E.Fragment){n.push.apply(n,Zl(i.props.children,s));return}i.type!==ar&&ge(!1),!i.props.index||!i.props.children||ge(!1);let o={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(o.children=Zl(i.props.children,s)),n.push(o)}),n}/**
+ * React Router DOM v6.23.1
+ *
+ * Copyright (c) Remix Software Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE.md file in the root directory of this source tree.
+ *
+ * @license MIT
+ */const g_="6";try{window.__reactRouterVersion=g_}catch{}const m_="startTransition",Yh=p0[m_];function y_(t){let{basename:e,children:n,future:i,window:r}=t,s=E.useRef();s.current==null&&(s.current=Ev({window:r,v5Compat:!0}));let o=s.current,[a,l]=E.useState({action:o.action,location:o.location}),{v7_startTransition:u}=i||{},c=E.useCallback(h=>{u&&Yh?Yh(()=>l(h)):l(h)},[l,u]);return E.useLayoutEffect(()=>o.listen(c),[o,c]),E.createElement(f_,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:i})}var Gh;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(Gh||(Gh={}));var qh;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(qh||(qh={}));const v_="modulepreload",__=function(t,e){return new URL(t,e).href},Qh={},Li=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link"),o=document.querySelector("meta[property=csp-nonce]"),a=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.all(n.map(l=>{if(l=__(l,i),l in Qh)return;Qh[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!i)for(let f=s.length-1;f>=0;f--){const m=s[f];if(m.href===l&&(!u||m.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=u?"stylesheet":v_,u||(d.as="script",d.crossOrigin=""),d.href=l,a&&d.setAttribute("nonce",a),document.head.appendChild(d),u)return new Promise((f,m)=>{d.addEventListener("load",f),d.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})}))}return r.then(()=>e()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},w_=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>Li(()=>Promise.resolve().then(()=>ls),void 0,import.meta.url).then(({default:i})=>i(...n)):e=fetch,(...n)=>e(...n)};class pc extends Error{constructor(e,n="FunctionsError",i){super(e),this.name=n,this.context=i}}class x_ extends pc{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class k_ extends pc{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class b_ extends pc{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var eu;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(eu||(eu={}));var S_=function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(i.next(c))}catch(h){o(h)}}function l(c){try{u(i.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):r(c.value).then(a,l)}u((i=i.apply(t,e||[])).next())})};class C_{constructor(e,{headers:n={},customFetch:i,region:r=eu.Any}={}){this.url=e,this.headers=n,this.region=r,this.fetch=w_(i)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e,n={}){var i;return S_(this,void 0,void 0,function*(){try{const{headers:r,method:s,body:o}=n;let a={},{region:l}=n;l||(l=this.region),l&&l!=="any"&&(a["x-region"]=l);let u;o&&(r&&!Object.prototype.hasOwnProperty.call(r,"Content-Type")||!r)&&(typeof Blob<"u"&&o instanceof Blob||o instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",u=o):typeof o=="string"?(a["Content-Type"]="text/plain",u=o):typeof FormData<"u"&&o instanceof FormData?u=o:(a["Content-Type"]="application/json",u=JSON.stringify(o)));const c=yield this.fetch(`${this.url}/${e}`,{method:s||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),r),body:u}).catch(m=>{throw new x_(m)}),h=c.headers.get("x-relay-error");if(h&&h==="true")throw new k_(c);if(!c.ok)throw new b_(c);let d=((i=c.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),f;return d==="application/json"?f=yield c.json():d==="application/octet-stream"?f=yield c.blob():d==="text/event-stream"?f=c:d==="multipart/form-data"?f=yield c.formData():f=yield c.text(),{data:f,error:null}}catch(r){return{data:null,error:r}}})}}var E_=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")},Ri=E_();const P_=Ri.fetch,gc=Ri.fetch.bind(Ri),Xg=Ri.Headers,T_=Ri.Request,O_=Ri.Response,ls=Object.freeze(Object.defineProperty({__proto__:null,Headers:Xg,Request:T_,Response:O_,default:gc,fetch:P_},Symbol.toStringTag,{value:"Module"}));class M_ extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}}class L_{constructor(e){this.shouldThrowOnError=!1,this.method=e.method,this.url=e.url,this.headers=e.headers,this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=e.shouldThrowOnError,this.signal=e.signal,this.isMaybeSingle=e.isMaybeSingle,e.fetch?this.fetch=e.fetch:typeof fetch>"u"?this.fetch=gc:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}then(e,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 i=this.fetch;let r=i(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async s=>{var o,a,l;let u=null,c=null,h=null,d=s.status,f=s.statusText;if(s.ok){if(this.method!=="HEAD"){const p=await s.text();p===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?c=p:c=JSON.parse(p))}const y=(o=this.headers.Prefer)===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),v=(a=s.headers.get("content-range"))===null||a===void 0?void 0:a.split("/");y&&v&&v.length>1&&(h=parseInt(v[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(c)&&(c.length>1?(u={code:"PGRST116",details:`Results contain ${c.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},c=null,h=null,d=406,f="Not Acceptable"):c.length===1?c=c[0]:c=null)}else{const y=await s.text();try{u=JSON.parse(y),Array.isArray(u)&&s.status===404&&(c=[],u=null,d=200,f="OK")}catch{s.status===404&&y===""?(d=204,f="No Content"):u={message:y}}if(u&&this.isMaybeSingle&&(!((l=u==null?void 0:u.details)===null||l===void 0)&&l.includes("0 rows"))&&(u=null,d=200,f="OK"),u&&this.shouldThrowOnError)throw new M_(u)}return{error:u,data:c,count:h,status:d,statusText:f}});return this.shouldThrowOnError||(r=r.catch(s=>{var o,a,l;return{error:{message:`${(o=s==null?void 0:s.name)!==null&&o!==void 0?o:"FetchError"}: ${s==null?void 0:s.message}`,details:`${(a=s==null?void 0:s.stack)!==null&&a!==void 0?a:""}`,hint:"",code:`${(l=s==null?void 0:s.code)!==null&&l!==void 0?l:""}`},data:null,count:null,status:0,statusText:""}})),r.then(e,n)}}class R_ extends L_{select(e){let n=!1;const i=(e??"*").split("").map(r=>/\s/.test(r)&&!n?"":(r==='"'&&(n=!n),r)).join("");return this.url.searchParams.set("select",i),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(e,{ascending:n=!0,nullsFirst:i,foreignTable:r,referencedTable:s=r}={}){const o=s?`${s}.order`:"order",a=this.url.searchParams.get(o);return this.url.searchParams.set(o,`${a?`${a},`:""}${e}.${n?"asc":"desc"}${i===void 0?"":i?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:n,referencedTable:i=n}={}){const r=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(r,`${e}`),this}range(e,n,{foreignTable:i,referencedTable:r=i}={}){const s=typeof r>"u"?"offset":`${r}.offset`,o=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this.url.searchParams.set(o,`${n-e+1}`),this}abortSignal(e){return this.signal=e,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:e=!1,verbose:n=!1,settings:i=!1,buffers:r=!1,wal:s=!1,format:o="text"}={}){var a;const l=[e?"analyze":null,n?"verbose":null,i?"settings":null,r?"buffers":null,s?"wal":null].filter(Boolean).join("|"),u=(a=this.headers.Accept)!==null&&a!==void 0?a:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${o}; for="${u}"; options=${l};`,o==="json"?this:this}rollback(){var e;return((e=this.headers.Prefer)!==null&&e!==void 0?e:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}class ri extends R_{eq(e,n){return this.url.searchParams.append(e,`eq.${n}`),this}neq(e,n){return this.url.searchParams.append(e,`neq.${n}`),this}gt(e,n){return this.url.searchParams.append(e,`gt.${n}`),this}gte(e,n){return this.url.searchParams.append(e,`gte.${n}`),this}lt(e,n){return this.url.searchParams.append(e,`lt.${n}`),this}lte(e,n){return this.url.searchParams.append(e,`lte.${n}`),this}like(e,n){return this.url.searchParams.append(e,`like.${n}`),this}likeAllOf(e,n){return this.url.searchParams.append(e,`like(all).{${n.join(",")}}`),this}likeAnyOf(e,n){return this.url.searchParams.append(e,`like(any).{${n.join(",")}}`),this}ilike(e,n){return this.url.searchParams.append(e,`ilike.${n}`),this}ilikeAllOf(e,n){return this.url.searchParams.append(e,`ilike(all).{${n.join(",")}}`),this}ilikeAnyOf(e,n){return this.url.searchParams.append(e,`ilike(any).{${n.join(",")}}`),this}is(e,n){return this.url.searchParams.append(e,`is.${n}`),this}in(e,n){const i=Array.from(new Set(n)).map(r=>typeof r=="string"&&new RegExp("[,()]").test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(e,`in.(${i})`),this}contains(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cs.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cs.{${n.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(n)}`),this}containedBy(e,n){return typeof n=="string"?this.url.searchParams.append(e,`cd.${n}`):Array.isArray(n)?this.url.searchParams.append(e,`cd.{${n.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(n)}`),this}rangeGt(e,n){return this.url.searchParams.append(e,`sr.${n}`),this}rangeGte(e,n){return this.url.searchParams.append(e,`nxl.${n}`),this}rangeLt(e,n){return this.url.searchParams.append(e,`sl.${n}`),this}rangeLte(e,n){return this.url.searchParams.append(e,`nxr.${n}`),this}rangeAdjacent(e,n){return this.url.searchParams.append(e,`adj.${n}`),this}overlaps(e,n){return typeof n=="string"?this.url.searchParams.append(e,`ov.${n}`):this.url.searchParams.append(e,`ov.{${n.join(",")}}`),this}textSearch(e,n,{config:i,type:r}={}){let s="";r==="plain"?s="pl":r==="phrase"?s="ph":r==="websearch"&&(s="w");const o=i===void 0?"":`(${i})`;return this.url.searchParams.append(e,`${s}fts${o}.${n}`),this}match(e){return Object.entries(e).forEach(([n,i])=>{this.url.searchParams.append(n,`eq.${i}`)}),this}not(e,n,i){return this.url.searchParams.append(e,`not.${n}.${i}`),this}or(e,{foreignTable:n,referencedTable:i=n}={}){const r=i?`${i}.or`:"or";return this.url.searchParams.append(r,`(${e})`),this}filter(e,n,i){return this.url.searchParams.append(e,`${n}.${i}`),this}}class I_{constructor(e,{headers:n={},schema:i,fetch:r}){this.url=e,this.headers=n,this.schema=i,this.fetch=r}select(e,{head:n=!1,count:i}={}){const r=n?"HEAD":"GET";let s=!1;const o=(e??"*").split("").map(a=>/\s/.test(a)&&!s?"":(a==='"'&&(s=!s),a)).join("");return this.url.searchParams.set("select",o),i&&(this.headers.Prefer=`count=${i}`),new ri({method:r,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(e,{count:n,defaultToNull:i=!0}={}){const r="POST",s=[];if(this.headers.Prefer&&s.push(this.headers.Prefer),n&&s.push(`count=${n}`),i||s.push("missing=default"),this.headers.Prefer=s.join(","),Array.isArray(e)){const o=e.reduce((a,l)=>a.concat(Object.keys(l)),[]);if(o.length>0){const a=[...new Set(o)].map(l=>`"${l}"`);this.url.searchParams.set("columns",a.join(","))}}return new ri({method:r,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}upsert(e,{onConflict:n,ignoreDuplicates:i=!1,count:r,defaultToNull:s=!0}={}){const o="POST",a=[`resolution=${i?"ignore":"merge"}-duplicates`];if(n!==void 0&&this.url.searchParams.set("on_conflict",n),this.headers.Prefer&&a.push(this.headers.Prefer),r&&a.push(`count=${r}`),s||a.push("missing=default"),this.headers.Prefer=a.join(","),Array.isArray(e)){const l=e.reduce((u,c)=>u.concat(Object.keys(c)),[]);if(l.length>0){const u=[...new Set(l)].map(c=>`"${c}"`);this.url.searchParams.set("columns",u.join(","))}}return new ri({method:o,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}update(e,{count:n}={}){const i="PATCH",r=[];return this.headers.Prefer&&r.push(this.headers.Prefer),n&&r.push(`count=${n}`),this.headers.Prefer=r.join(","),new ri({method:i,url:this.url,headers:this.headers,schema:this.schema,body:e,fetch:this.fetch,allowEmpty:!1})}delete({count:e}={}){const n="DELETE",i=[];return e&&i.push(`count=${e}`),this.headers.Prefer&&i.unshift(this.headers.Prefer),this.headers.Prefer=i.join(","),new ri({method:n,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}const A_="1.15.2",D_={"X-Client-Info":`postgrest-js/${A_}`};class mc{constructor(e,{headers:n={},schema:i,fetch:r}={}){this.url=e,this.headers=Object.assign(Object.assign({},D_),n),this.schemaName=i,this.fetch=r}from(e){const n=new URL(`${this.url}/${e}`);return new I_(n,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(e){return new mc(this.url,{headers:this.headers,schema:e,fetch:this.fetch})}rpc(e,n={},{head:i=!1,get:r=!1,count:s}={}){let o;const a=new URL(`${this.url}/rpc/${e}`);let l;i||r?(o=i?"HEAD":"GET",Object.entries(n).filter(([c,h])=>h!==void 0).map(([c,h])=>[c,Array.isArray(h)?`{${h.join(",")}}`:`${h}`]).forEach(([c,h])=>{a.searchParams.append(c,h)})):(o="POST",l=n);const u=Object.assign({},this.headers);return s&&(u.Prefer=`count=${s}`),new ri({method:o,url:a,headers:u,schema:this.schemaName,body:l,fetch:this.fetch,allowEmpty:!1})}}const j_="2.9.5",N_={"X-Client-Info":`realtime-js/${j_}`},z_="1.0.0",Jg=1e4,F_=1e3;var bi;(function(t){t[t.connecting=0]="connecting",t[t.open=1]="open",t[t.closing=2]="closing",t[t.closed=3]="closed"})(bi||(bi={}));var Be;(function(t){t.closed="closed",t.errored="errored",t.joined="joined",t.joining="joining",t.leaving="leaving"})(Be||(Be={}));var ht;(function(t){t.close="phx_close",t.error="phx_error",t.join="phx_join",t.reply="phx_reply",t.leave="phx_leave",t.access_token="access_token"})(ht||(ht={}));var tu;(function(t){t.websocket="websocket"})(tu||(tu={}));var In;(function(t){t.Connecting="connecting",t.Open="open",t.Closing="closing",t.Closed="closed"})(In||(In={}));class Zg{constructor(e,n){this.callback=e,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=e,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))}}class $_{constructor(){this.HEADER_LENGTH=1}decode(e,n){return e.constructor===ArrayBuffer?n(this._binaryDecode(e)):n(typeof e=="string"?JSON.parse(e):{})}_binaryDecode(e){const n=new DataView(e),i=new TextDecoder;return this._decodeBroadcast(e,n,i)}_decodeBroadcast(e,n,i){const r=n.getUint8(1),s=n.getUint8(2);let o=this.HEADER_LENGTH+2;const a=i.decode(e.slice(o,o+r));o=o+r;const l=i.decode(e.slice(o,o+s));o=o+s;const u=JSON.parse(i.decode(e.slice(o,e.byteLength)));return{ref:null,topic:a,event:l,payload:u}}}class Va{constructor(e,n,i={},r=Jg){this.channel=e,this.event=n,this.payload=i,this.timeout=r,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(e){this.timeout=e,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(e){this.payload=Object.assign(Object.assign({},this.payload),e)}receive(e,n){var i;return this._hasReceived(e)&&n((i=this.receivedResp)===null||i===void 0?void 0:i.response),this.recHooks.push({status:e,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const e=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},e),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(e,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:e,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:e,response:n}){this.recHooks.filter(i=>i.status===e).forEach(i=>i.callback(n))}_hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}}var Xh;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Xh||(Xh={}));class kr{constructor(e,n){this.channel=e,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const i=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(i.state,{},r=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=kr.syncState(this.state,r,s,o),this.pendingDiffs.forEach(l=>{this.state=kr.syncDiff(this.state,l,s,o)}),this.pendingDiffs=[],a()}),this.channel._on(i.diff,{},r=>{const{onJoin:s,onLeave:o,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(r):(this.state=kr.syncDiff(this.state,r,s,o),a())}),this.onJoin((r,s,o)=>{this.channel._trigger("presence",{event:"join",key:r,currentPresences:s,newPresences:o})}),this.onLeave((r,s,o)=>{this.channel._trigger("presence",{event:"leave",key:r,currentPresences:s,leftPresences:o})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(e,n,i,r){const s=this.cloneDeep(e),o=this.transformState(n),a={},l={};return this.map(s,(u,c)=>{o[u]||(l[u]=c)}),this.map(o,(u,c)=>{const h=s[u];if(h){const d=c.map(v=>v.presence_ref),f=h.map(v=>v.presence_ref),m=c.filter(v=>f.indexOf(v.presence_ref)<0),y=h.filter(v=>d.indexOf(v.presence_ref)<0);m.length>0&&(a[u]=m),y.length>0&&(l[u]=y)}else a[u]=c}),this.syncDiff(s,{joins:a,leaves:l},i,r)}static syncDiff(e,n,i,r){const{joins:s,leaves:o}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return i||(i=()=>{}),r||(r=()=>{}),this.map(s,(a,l)=>{var u;const c=(u=e[a])!==null&&u!==void 0?u:[];if(e[a]=this.cloneDeep(l),c.length>0){const h=e[a].map(f=>f.presence_ref),d=c.filter(f=>h.indexOf(f.presence_ref)<0);e[a].unshift(...d)}i(a,c,l)}),this.map(o,(a,l)=>{let u=e[a];if(!u)return;const c=l.map(h=>h.presence_ref);u=u.filter(h=>c.indexOf(h.presence_ref)<0),e[a]=u,r(a,u,l),u.length===0&&delete e[a]}),e}static map(e,n){return Object.getOwnPropertyNames(e).map(i=>n(i,e[i]))}static transformState(e){return e=this.cloneDeep(e),Object.getOwnPropertyNames(e).reduce((n,i)=>{const r=e[i];return"metas"in r?n[i]=r.metas.map(s=>(s.presence_ref=s.phx_ref,delete s.phx_ref,delete s.phx_ref_prev,s)):n[i]=r,n},{})}static cloneDeep(e){return JSON.parse(JSON.stringify(e))}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var G;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(G||(G={}));const Jh=(t,e,n={})=>{var i;const r=(i=n.skipTypes)!==null&&i!==void 0?i:[];return Object.keys(e).reduce((s,o)=>(s[o]=U_(o,t,e,r),s),{})},U_=(t,e,n,i)=>{const r=e.find(a=>a.name===t),s=r==null?void 0:r.type,o=n[t];return s&&!i.includes(s)?em(s,o):nu(o)},em=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return W_(e,n)}switch(t){case G.bool:return B_(e);case G.float4:case G.float8:case G.int2:case G.int4:case G.int8:case G.numeric:case G.oid:return V_(e);case G.json:case G.jsonb:return H_(e);case G.timestamp:return K_(e);case G.abstime:case G.date:case G.daterange:case G.int4range:case G.int8range:case G.money:case G.reltime:case G.text:case G.time:case G.timestamptz:case G.timetz:case G.tsrange:case G.tstzrange:return nu(e);default:return nu(e)}},nu=t=>t,B_=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},V_=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},H_=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch(e){return console.log(`JSON parse error: ${e}`),t}return t},W_=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,i=t[n];if(t[0]==="{"&&i==="}"){let s;const o=t.slice(1,n);try{s=JSON.parse("["+o+"]")}catch{s=o?o.split(","):[]}return s.map(a=>em(e,a))}return t},K_=t=>typeof t=="string"?t.replace(" ","T"):t;var Zh;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Zh||(Zh={}));var ed;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes"})(ed||(ed={}));var td;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(td||(td={}));class yc{constructor(e,n={config:{}},i){this.topic=e,this.params=n,this.socket=i,this.bindings={},this.state=Be.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""}},n.config),this.timeout=this.socket.timeout,this.joinPush=new Va(this,ht.join,this.params,this.timeout),this.rejoinTimer=new Zg(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=Be.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=Be.closed,this.socket._remove(this)}),this._onError(r=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,r),this.state=Be.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=Be.errored,this.rejoinTimer.scheduleTimeout())}),this._on(ht.reply,{},(r,s)=>{this._trigger(this._replyEventName(s),r)}),this.presence=new kr(this),this.broadcastEndpointURL=this._broadcastEndpointURL()}subscribe(e,n=this.timeout){var i,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:o}}=this.params;this._onError(u=>e&&e("CHANNEL_ERROR",u)),this._onClose(()=>e&&e("CLOSED"));const a={},l={broadcast:s,presence:o,postgres_changes:(r=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(u=>u.filter))!==null&&r!==void 0?r:[]};this.socket.accessToken&&(a.access_token=this.socket.accessToken),this.updateJoinPayload(Object.assign({config:l},a)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",({postgres_changes:u})=>{var c;if(this.socket.accessToken&&this.socket.setAuth(this.socket.accessToken),u===void 0){e&&e("SUBSCRIBED");return}else{const h=this.bindings.postgres_changes,d=(c=h==null?void 0:h.length)!==null&&c!==void 0?c:0,f=[];for(let m=0;m<d;m++){const y=h[m],{filter:{event:v,schema:p,table:g,filter:_}}=y,w=u&&u[m];if(w&&w.event===v&&w.schema===p&&w.table===g&&w.filter===_)f.push(Object.assign(Object.assign({},y),{id:w.id}));else{this.unsubscribe(),e&&e("CHANNEL_ERROR",new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=f,e&&e("SUBSCRIBED");return}}).receive("error",u=>{e&&e("CHANNEL_ERROR",new Error(JSON.stringify(Object.values(u).join(", ")||"error")))}).receive("timeout",()=>{e&&e("TIMED_OUT")})}return this}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n.timeout||this.timeout)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,i){return this._on(e,n,i)}async send(e,n={}){var i,r;if(!this._canPush()&&e.type==="broadcast"){const{event:s,payload:o}=e,a={method:"POST",headers:{apikey:(i=this.socket.apiKey)!==null&&i!==void 0?i:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:o}]})};try{return(await this._fetchWithTimeout(this.broadcastEndpointURL,a,(r=n.timeout)!==null&&r!==void 0?r:this.timeout)).ok?"ok":"error"}catch(l){return l.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var o,a,l;const u=this._push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(a=(o=this.params)===null||o===void 0?void 0:o.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),u.receive("ok",()=>s("ok")),u.receive("error",()=>s("error")),u.receive("timeout",()=>s("timed out"))})}updateJoinPayload(e){this.joinPush.updatePayload(e)}unsubscribe(e=this.timeout){this.state=Be.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(ht.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(i=>{const r=new Va(this,ht.leave,{},e);r.receive("ok",()=>{n(),i("ok")}).receive("timeout",()=>{n(),i("timed out")}).receive("error",()=>{i("error")}),r.send(),this._canPush()||r.trigger("ok",{})})}_broadcastEndpointURL(){let e=this.socket.endPoint;return e=e.replace(/^ws/i,"http"),e=e.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),e.replace(/\/+$/,"")+"/api/broadcast"}async _fetchWithTimeout(e,n,i){const r=new AbortController,s=setTimeout(()=>r.abort(),i),o=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:r.signal}));return clearTimeout(s),o}_push(e,n,i=this.timeout){if(!this.joinedOnce)throw`tried to push '${e}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let r=new Va(this,e,n,i);return this._canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}_onMessage(e,n,i){return n}_isMember(e){return this.topic===e}_joinRef(){return this.joinPush.ref}_trigger(e,n,i){var r,s;const o=e.toLocaleLowerCase(),{close:a,error:l,leave:u,join:c}=ht;if(i&&[a,l,u,c].indexOf(o)>=0&&i!==this._joinRef())return;let d=this._onMessage(o,n,i);if(n&&!d)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(o)?(r=this.bindings.postgres_changes)===null||r===void 0||r.filter(f=>{var m,y,v;return((m=f.filter)===null||m===void 0?void 0:m.event)==="*"||((v=(y=f.filter)===null||y===void 0?void 0:y.event)===null||v===void 0?void 0:v.toLocaleLowerCase())===o}).map(f=>f.callback(d,i)):(s=this.bindings[o])===null||s===void 0||s.filter(f=>{var m,y,v,p,g,_;if(["broadcast","presence","postgres_changes"].includes(o))if("id"in f){const w=f.id,x=(m=f.filter)===null||m===void 0?void 0:m.event;return w&&((y=n.ids)===null||y===void 0?void 0:y.includes(w))&&(x==="*"||(x==null?void 0:x.toLocaleLowerCase())===((v=n.data)===null||v===void 0?void 0:v.type.toLocaleLowerCase()))}else{const w=(g=(p=f==null?void 0:f.filter)===null||p===void 0?void 0:p.event)===null||g===void 0?void 0:g.toLocaleLowerCase();return w==="*"||w===((_=n==null?void 0:n.event)===null||_===void 0?void 0:_.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===o}).map(f=>{if(typeof d=="object"&&"ids"in d){const m=d.data,{schema:y,table:v,commit_timestamp:p,type:g,errors:_}=m;d=Object.assign(Object.assign({},{schema:y,table:v,commit_timestamp:p,eventType:g,new:{},old:{},errors:_}),this._getPayloadRecords(m))}f.callback(d,i)})}_isClosed(){return this.state===Be.closed}_isJoined(){return this.state===Be.joined}_isJoining(){return this.state===Be.joining}_isLeaving(){return this.state===Be.leaving}_replyEventName(e){return`chan_reply_${e}`}_on(e,n,i){const r=e.toLocaleLowerCase(),s={type:r,filter:n,callback:i};return this.bindings[r]?this.bindings[r].push(s):this.bindings[r]=[s],this}_off(e,n){const i=e.toLocaleLowerCase();return this.bindings[i]=this.bindings[i].filter(r=>{var s;return!(((s=r.type)===null||s===void 0?void 0:s.toLocaleLowerCase())===i&&yc.isEqual(r.filter,n))}),this}static isEqual(e,n){if(Object.keys(e).length!==Object.keys(n).length)return!1;for(const i in e)if(e[i]!==n[i])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(e){this._on(ht.close,{},e)}_onError(e){this._on(ht.error,{},n=>e(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(e=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=Be.joining,this.joinPush.resend(e))}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=Jh(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=Jh(e.columns,e.old_record)),n}}const Y_=()=>{},G_=typeof WebSocket<"u";class q_{constructor(e,n){var i;this.accessToken=null,this.apiKey=null,this.channels=[],this.endPoint="",this.headers=N_,this.params={},this.timeout=Jg,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=Y_,this.conn=null,this.sendBuffer=[],this.serializer=new $_,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this._resolveFetch=s=>{let o;return s?o=s:typeof fetch>"u"?o=(...a)=>Li(()=>Promise.resolve().then(()=>ls),void 0,import.meta.url).then(({default:l})=>l(...a)):o=fetch,(...a)=>o(...a)},this.endPoint=`${e}/${tu.websocket}`,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=(i=n==null?void 0:n.params)===null||i===void 0?void 0:i.apikey;r&&(this.accessToken=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,o)=>o(JSON.stringify(s)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Zg(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this._endPointURL(),void 0,{headers:this.headers});return}if(G_){this.conn=new WebSocket(this._endPointURL()),this.setupConnection();return}this.conn=new Q_(this._endPointURL(),void 0,{close:()=>{this.conn=null}}),Li(()=>import("./browser-DaXFb0Yh.js").then(e=>e.b),[],import.meta.url).then(({default:e})=>{this.conn=new e(this._endPointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}disconnect(e,n){this.conn&&(this.conn.onclose=function(){},e?this.conn.close(e,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const e=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),e}log(e,n,i){this.logger(e,n,i)}connectionState(){switch(this.conn&&this.conn.readyState){case bi.connecting:return In.Connecting;case bi.open:return In.Open;case bi.closing:return In.Closing;default:return In.Closed}}isConnected(){return this.connectionState()===In.Open}channel(e,n={config:{}}){const i=new yc(`realtime:${e}`,n,this);return this.channels.push(i),i}push(e){const{topic:n,event:i,payload:r,ref:s}=e,o=()=>{this.encode(e,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${i} (${s})`,r),this.isConnected()?o():this.sendBuffer.push(o)}setAuth(e){this.accessToken=e,this.channels.forEach(n=>{e&&n.updateJoinPayload({access_token:e}),n.joinedOnce&&n._isJoined()&&n._push(ht.access_token,{access_token:e})})}_makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}_leaveOpenTopic(e){let n=this.channels.find(i=>i.topic===e&&(i._isJoined()||i._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${e}"`),n.unsubscribe())}_remove(e){this.channels=this.channels.filter(n=>n._joinRef()!==e._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=e=>this._onConnError(e),this.conn.onmessage=e=>this._onConnMessage(e),this.conn.onclose=e=>this._onConnClose(e))}_endPointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:z_}))}_onConnMessage(e){this.decode(e.data,n=>{let{topic:i,event:r,payload:s,ref:o}=n;(o&&o===this.pendingHeartbeatRef||r===(s==null?void 0:s.type))&&(this.pendingHeartbeatRef=null),this.log("receive",`${s.status||""} ${i} ${r} ${o&&"("+o+")"||""}`,s),this.channels.filter(a=>a._isMember(i)).forEach(a=>a._trigger(r,s,o)),this.stateChangeCallbacks.message.forEach(a=>a(n))})}_onConnOpen(){this.log("transport",`connected to ${this._endPointURL()}`),this._flushSendBuffer(),this.reconnectTimer.reset(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this._sendHeartbeat(),this.heartbeatIntervalMs),this.stateChangeCallbacks.open.forEach(e=>e())}_onConnClose(e){this.log("transport","close",e),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(e))}_onConnError(e){this.log("transport",e.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(e))}_triggerChanError(){this.channels.forEach(e=>e._trigger(ht.error))}_appendParams(e,n){if(Object.keys(n).length===0)return e;const i=e.match(/\?/)?"&":"?",r=new URLSearchParams(n);return`${e}${i}${r}`}_flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(e=>e()),this.sendBuffer=[])}_sendHeartbeat(){var e;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(e=this.conn)===null||e===void 0||e.close(F_,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth(this.accessToken)}}}class Q_{constructor(e,n,i){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=bi.connecting,this.send=()=>{},this.url=null,this.url=e,this.close=i.close}}class vc extends Error{constructor(e){super(e),this.__isStorageError=!0,this.name="StorageError"}}function Ce(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}class X_ extends vc{constructor(e,n){super(e),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class nd extends vc{constructor(e,n){super(e),this.name="StorageUnknownError",this.originalError=n}}var J_=function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(i.next(c))}catch(h){o(h)}}function l(c){try{u(i.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):r(c.value).then(a,l)}u((i=i.apply(t,e||[])).next())})};const tm=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>Li(()=>Promise.resolve().then(()=>ls),void 0,import.meta.url).then(({default:i})=>i(...n)):e=fetch,(...n)=>e(...n)},Z_=()=>J_(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield Li(()=>Promise.resolve().then(()=>ls),void 0,import.meta.url)).Response:Response});var Bi=function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(i.next(c))}catch(h){o(h)}}function l(c){try{u(i.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):r(c.value).then(a,l)}u((i=i.apply(t,e||[])).next())})};const Ha=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),ew=(t,e)=>Bi(void 0,void 0,void 0,function*(){const n=yield Z_();t instanceof n?t.json().then(i=>{e(new X_(Ha(i),t.status||500))}).catch(i=>{e(new nd(Ha(i),i))}):e(new nd(Ha(t),t))}),tw=(t,e,n,i)=>{const r={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?r:(r.headers=Object.assign({"Content-Type":"application/json"},e==null?void 0:e.headers),r.body=JSON.stringify(i),Object.assign(Object.assign({},r),n))};function ca(t,e,n,i,r,s){return Bi(this,void 0,void 0,function*(){return new Promise((o,a)=>{t(n,tw(e,i,r,s)).then(l=>{if(!l.ok)throw l;return i!=null&&i.noResolveJson?l:l.json()}).then(l=>o(l)).catch(l=>ew(l,a))})})}function iu(t,e,n,i){return Bi(this,void 0,void 0,function*(){return ca(t,"GET",e,n,i)})}function Yt(t,e,n,i,r){return Bi(this,void 0,void 0,function*(){return ca(t,"POST",e,i,r,n)})}function nw(t,e,n,i,r){return Bi(this,void 0,void 0,function*(){return ca(t,"PUT",e,i,r,n)})}function nm(t,e,n,i,r){return Bi(this,void 0,void 0,function*(){return ca(t,"DELETE",e,i,r,n)})}var Je=function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(i.next(c))}catch(h){o(h)}}function l(c){try{u(i.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):r(c.value).then(a,l)}u((i=i.apply(t,e||[])).next())})};const iw={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},id={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class rw{constructor(e,n={},i,r){this.url=e,this.headers=n,this.bucketId=i,this.fetch=tm(r)}uploadOrUpdate(e,n,i,r){return Je(this,void 0,void 0,function*(){try{let s;const o=Object.assign(Object.assign({},id),r),a=Object.assign(Object.assign({},this.headers),e==="POST"&&{"x-upsert":String(o.upsert)});typeof Blob<"u"&&i instanceof Blob?(s=new FormData,s.append("cacheControl",o.cacheControl),s.append("",i)):typeof FormData<"u"&&i instanceof FormData?(s=i,s.append("cacheControl",o.cacheControl)):(s=i,a["cache-control"]=`max-age=${o.cacheControl}`,a["content-type"]=o.contentType);const l=this._removeEmptyFolders(n),u=this._getFinalPath(l),c=yield this.fetch(`${this.url}/object/${u}`,Object.assign({method:e,body:s,headers:a},o!=null&&o.duplex?{duplex:o.duplex}:{})),h=yield c.json();return c.ok?{data:{path:l,id:h.Id,fullPath:h.Key},error:null}:{data:null,error:h}}catch(s){if(Ce(s))return{data:null,error:s};throw s}})}upload(e,n,i){return Je(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",e,n,i)})}uploadToSignedUrl(e,n,i,r){return Je(this,void 0,void 0,function*(){const s=this._removeEmptyFolders(e),o=this._getFinalPath(s),a=new URL(this.url+`/object/upload/sign/${o}`);a.searchParams.set("token",n);try{let l;const u=Object.assign({upsert:id.upsert},r),c=Object.assign(Object.assign({},this.headers),{"x-upsert":String(u.upsert)});typeof Blob<"u"&&i instanceof Blob?(l=new FormData,l.append("cacheControl",u.cacheControl),l.append("",i)):typeof FormData<"u"&&i instanceof FormData?(l=i,l.append("cacheControl",u.cacheControl)):(l=i,c["cache-control"]=`max-age=${u.cacheControl}`,c["content-type"]=u.contentType);const h=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:c}),d=yield h.json();return h.ok?{data:{path:s,fullPath:d.Key},error:null}:{data:null,error:d}}catch(l){if(Ce(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(e){return Je(this,void 0,void 0,function*(){try{let n=this._getFinalPath(e);const i=yield Yt(this.fetch,`${this.url}/object/upload/sign/${n}`,{},{headers:this.headers}),r=new URL(this.url+i.url),s=r.searchParams.get("token");if(!s)throw new vc("No token returned by API");return{data:{signedUrl:r.toString(),path:e,token:s},error:null}}catch(n){if(Ce(n))return{data:null,error:n};throw n}})}update(e,n,i){return Je(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",e,n,i)})}move(e,n){return Je(this,void 0,void 0,function*(){try{return{data:yield Yt(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n},{headers:this.headers}),error:null}}catch(i){if(Ce(i))return{data:null,error:i};throw i}})}copy(e,n){return Je(this,void 0,void 0,function*(){try{return{data:{path:(yield Yt(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:e,destinationKey:n},{headers:this.headers})).Key},error:null}}catch(i){if(Ce(i))return{data:null,error:i};throw i}})}createSignedUrl(e,n,i){return Je(this,void 0,void 0,function*(){try{let r=this._getFinalPath(e),s=yield Yt(this.fetch,`${this.url}/object/sign/${r}`,Object.assign({expiresIn:n},i!=null&&i.transform?{transform:i.transform}:{}),{headers:this.headers});const o=i!=null&&i.download?`&download=${i.download===!0?"":i.download}`:"";return s={signedUrl:encodeURI(`${this.url}${s.signedURL}${o}`)},{data:s,error:null}}catch(r){if(Ce(r))return{data:null,error:r};throw r}})}createSignedUrls(e,n,i){return Je(this,void 0,void 0,function*(){try{const r=yield Yt(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:e},{headers:this.headers}),s=i!=null&&i.download?`&download=${i.download===!0?"":i.download}`:"";return{data:r.map(o=>Object.assign(Object.assign({},o),{signedUrl:o.signedURL?encodeURI(`${this.url}${o.signedURL}${s}`):null})),error:null}}catch(r){if(Ce(r))return{data:null,error:r};throw r}})}download(e,n){return Je(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)||{}),o=s?`?${s}`:"";try{const a=this._getFinalPath(e);return{data:yield(yield iu(this.fetch,`${this.url}/${r}/${a}${o}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(Ce(a))return{data:null,error:a};throw a}})}getPublicUrl(e,n){const i=this._getFinalPath(e),r=[],s=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";s!==""&&r.push(s);const a=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 u=r.join("&");return u!==""&&(u=`?${u}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${i}${u}`)}}}remove(e){return Je(this,void 0,void 0,function*(){try{return{data:yield nm(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:e},{headers:this.headers}),error:null}}catch(n){if(Ce(n))return{data:null,error:n};throw n}})}list(e,n,i){return Je(this,void 0,void 0,function*(){try{const r=Object.assign(Object.assign(Object.assign({},iw),n),{prefix:e||""});return{data:yield Yt(this.fetch,`${this.url}/object/list/${this.bucketId}`,r,{headers:this.headers},i),error:null}}catch(r){if(Ce(r))return{data:null,error:r};throw r}})}_getFinalPath(e){return`${this.bucketId}/${e}`}_removeEmptyFolders(e){return e.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(e){const n=[];return e.width&&n.push(`width=${e.width}`),e.height&&n.push(`height=${e.height}`),e.resize&&n.push(`resize=${e.resize}`),e.format&&n.push(`format=${e.format}`),e.quality&&n.push(`quality=${e.quality}`),n.join("&")}}const sw="2.5.5",ow={"X-Client-Info":`storage-js/${sw}`};var Zn=function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(i.next(c))}catch(h){o(h)}}function l(c){try{u(i.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):r(c.value).then(a,l)}u((i=i.apply(t,e||[])).next())})};class aw{constructor(e,n={},i){this.url=e,this.headers=Object.assign(Object.assign({},ow),n),this.fetch=tm(i)}listBuckets(){return Zn(this,void 0,void 0,function*(){try{return{data:yield iu(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(e){if(Ce(e))return{data:null,error:e};throw e}})}getBucket(e){return Zn(this,void 0,void 0,function*(){try{return{data:yield iu(this.fetch,`${this.url}/bucket/${e}`,{headers:this.headers}),error:null}}catch(n){if(Ce(n))return{data:null,error:n};throw n}})}createBucket(e,n={public:!1}){return Zn(this,void 0,void 0,function*(){try{return{data:yield Yt(this.fetch,`${this.url}/bucket`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(i){if(Ce(i))return{data:null,error:i};throw i}})}updateBucket(e,n){return Zn(this,void 0,void 0,function*(){try{return{data:yield nw(this.fetch,`${this.url}/bucket/${e}`,{id:e,name:e,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(i){if(Ce(i))return{data:null,error:i};throw i}})}emptyBucket(e){return Zn(this,void 0,void 0,function*(){try{return{data:yield Yt(this.fetch,`${this.url}/bucket/${e}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(Ce(n))return{data:null,error:n};throw n}})}deleteBucket(e){return Zn(this,void 0,void 0,function*(){try{return{data:yield nm(this.fetch,`${this.url}/bucket/${e}`,{},{headers:this.headers}),error:null}}catch(n){if(Ce(n))return{data:null,error:n};throw n}})}}class lw extends aw{constructor(e,n={},i){super(e,n,i)}from(e){return new rw(this.url,this.headers,e,this.fetch)}}const uw="2.43.4";let lr="";typeof Deno<"u"?lr="deno":typeof document<"u"?lr="web":typeof navigator<"u"&&navigator.product==="ReactNative"?lr="react-native":lr="node";const cw={"X-Client-Info":`supabase-js-${lr}/${uw}`},hw={headers:cw},dw={schema:"public"},fw={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},pw={};var gw=function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(i.next(c))}catch(h){o(h)}}function l(c){try{u(i.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):r(c.value).then(a,l)}u((i=i.apply(t,e||[])).next())})};const mw=t=>{let e;return t?e=t:typeof fetch>"u"?e=gc:e=fetch,(...n)=>e(...n)},yw=()=>typeof Headers>"u"?Xg:Headers,vw=(t,e,n)=>{const i=mw(n),r=yw();return(s,o)=>gw(void 0,void 0,void 0,function*(){var a;const l=(a=yield e())!==null&&a!==void 0?a:t;let u=new r(o==null?void 0:o.headers);return u.has("apikey")||u.set("apikey",t),u.has("Authorization")||u.set("Authorization",`Bearer ${l}`),i(s,Object.assign(Object.assign({},o),{headers:u}))})};function _w(t){return t.replace(/\/$/,"")}function ww(t,e){const{db:n,auth:i,realtime:r,global:s}=t,{db:o,auth:a,realtime:l,global:u}=e;return{db:Object.assign(Object.assign({},o),n),auth:Object.assign(Object.assign({},a),i),realtime:Object.assign(Object.assign({},l),r),global:Object.assign(Object.assign({},u),s)}}const im="2.64.2",xw="http://localhost:9999",kw="supabase.auth.token",bw={"X-Client-Info":`gotrue-js/${im}`},rd=10,ru="X-Supabase-Api-Version",rm={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function Sw(t){return Math.round(Date.now()/1e3)+t}function Cw(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)})}const lt=()=>typeof document<"u",kn={tested:!1,writable:!1},br=()=>{if(!lt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(kn.tested)return kn.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),kn.tested=!0,kn.writable=!0}catch{kn.tested=!0,kn.writable=!1}return kn.writable};function Wa(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((r,s)=>{e[s]=r})}catch{}return n.searchParams.forEach((i,r)=>{e[r]=i}),e}const sm=t=>{let e;return t?e=t:typeof fetch>"u"?e=(...n)=>Li(()=>Promise.resolve().then(()=>ls),void 0,import.meta.url).then(({default:i})=>i(...n)):e=fetch,(...n)=>e(...n)},Ew=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",om=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},Os=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Ka=async(t,e)=>{await t.removeItem(e)};function Pw(t){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",i,r,s,o,a,l,u,c=0;for(t=t.replace("-","+").replace("_","/");c<t.length;)o=e.indexOf(t.charAt(c++)),a=e.indexOf(t.charAt(c++)),l=e.indexOf(t.charAt(c++)),u=e.indexOf(t.charAt(c++)),i=o<<2|a>>4,r=(a&15)<<4|l>>2,s=(l&3)<<6|u,n=n+String.fromCharCode(i),l!=64&&r!=0&&(n=n+String.fromCharCode(r)),u!=64&&s!=0&&(n=n+String.fromCharCode(s));return n}class ha{constructor(){this.promise=new ha.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}ha.promiseConstructor=Promise;function sd(t){const e=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=t.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!e.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const i=n[1];return JSON.parse(Pw(i))}async function Tw(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function Ow(t,e){return new Promise((i,r)=>{(async()=>{for(let s=0;s<1/0;s++)try{const o=await t(s);if(!e(s,null,o)){i(o);return}}catch(o){if(!e(s,o)){r(o);return}}})()})}function Mw(t){return("0"+t.toString(16)).substr(-2)}function Lw(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=n.length;let r="";for(let s=0;s<56;s++)r+=n.charAt(Math.floor(Math.random()*i));return r}return crypto.getRandomValues(e),Array.from(e,Mw).join("")}async function Rw(t){const n=new TextEncoder().encode(t),i=await crypto.subtle.digest("SHA-256",n),r=new Uint8Array(i);return Array.from(r).map(s=>String.fromCharCode(s)).join("")}function Iw(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Aw(t){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."),t;const n=await Rw(t);return Iw(n)}async function ei(t,e,n=!1){const i=Lw();let r=i;n&&(r+="/PASSWORD_RECOVERY"),await om(t,`${e}-code-verifier`,r);const s=await Aw(i);return[s,i===s?"plain":"s256"]}const Dw=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function jw(t){const e=t.headers.get(ru);if(!e||!e.match(Dw))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}class _c extends Error{constructor(e,n,i){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=i}}function j(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class Nw extends _c{constructor(e,n,i){super(e,n,i),this.name="AuthApiError",this.status=n,this.code=i}}function zw(t){return j(t)&&t.name==="AuthApiError"}class am extends _c{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class Qn extends _c{constructor(e,n,i,r){super(e,i,r),this.name=n,this.status=i}}class bn extends Qn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}class Ya extends Qn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class Ms extends Qn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class Ls extends Qn{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class od extends Qn{constructor(e,n=null){super(e,"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 su extends Qn{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function Ga(t){return j(t)&&t.name==="AuthRetryableFetchError"}class ad extends Qn{constructor(e,n,i){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=i}}var Fw=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const Mn=t=>t.msg||t.message||t.error_description||t.error||JSON.stringify(t),$w=[502,503,504];async function ld(t){var e;if(!Ew(t))throw new su(Mn(t),0);if($w.includes(t.status))throw new su(Mn(t),t.status);let n;try{n=await t.json()}catch(s){throw new am(Mn(s),s)}let i;const r=jw(t);if(r&&r.getTime()>=rm["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?i=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(i=n.error_code),i){if(i==="weak_password")throw new ad(Mn(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[])}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,o)=>s&&typeof o=="string",!0))throw new ad(Mn(n),t.status,n.weak_password.reasons);throw new Nw(Mn(n),t.status||500,i)}const Uw=(t,e,n,i)=>{const r={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?r:(r.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),r.body=JSON.stringify(i),Object.assign(Object.assign({},r),n))};async function z(t,e,n,i){var r;const s=Object.assign({},i==null?void 0:i.headers);s[ru]||(s[ru]=rm["2024-01-01"].name),i!=null&&i.jwt&&(s.Authorization=`Bearer ${i.jwt}`);const o=(r=i==null?void 0:i.query)!==null&&r!==void 0?r:{};i!=null&&i.redirectTo&&(o.redirect_to=i.redirectTo);const a=Object.keys(o).length?"?"+new URLSearchParams(o).toString():"",l=await Bw(t,e,n+a,{headers:s,noResolveJson:i==null?void 0:i.noResolveJson},{},i==null?void 0:i.body);return i!=null&&i.xform?i==null?void 0:i.xform(l):{data:Object.assign({},l),error:null}}async function Bw(t,e,n,i,r,s){const o=Uw(e,i,r,s);let a;try{a=await t(n,Object.assign({},o))}catch(l){throw console.error(l),new su(Mn(l),0)}if(a.ok||await ld(a),i!=null&&i.noResolveJson)return a;try{return await a.json()}catch(l){await ld(l)}}function Ht(t){var e;let n=null;Kw(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=Sw(t.expires_in)));const i=(e=t.user)!==null&&e!==void 0?e:t;return{data:{session:n,user:i},error:null}}function ud(t){const e=Ht(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,i)=>n&&typeof i=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Qt(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function Vw(t){return{data:t,error:null}}function Hw(t){const{action_link:e,email_otp:n,hashed_token:i,redirect_to:r,verification_type:s}=t,o=Fw(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:e,email_otp:n,hashed_token:i,redirect_to:r,verification_type:s},l=Object.assign({},o);return{data:{properties:a,user:l},error:null}}function Ww(t){return t}function Kw(t){return t.access_token&&t.refresh_token&&t.expires_in}var Yw=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};class Gw{constructor({url:e="",headers:n={},fetch:i}){this.url=e,this.headers=n,this.fetch=sm(i),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(e,n="global"){try{return await z(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(i){if(j(i))return{data:null,error:i};throw i}}async inviteUserByEmail(e,n={}){try{return await z(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Qt})}catch(i){if(j(i))return{data:{user:null},error:i};throw i}}async generateLink(e){try{const{options:n}=e,i=Yw(e,["options"]),r=Object.assign(Object.assign({},i),n);return"newEmail"in i&&(r.new_email=i==null?void 0:i.newEmail,delete r.newEmail),await z(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:r,headers:this.headers,xform:Hw,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(j(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await z(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Qt})}catch(n){if(j(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,i,r,s,o,a,l;try{const u={nextPage:null,lastPage:0,total:0},c=await z(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&i!==void 0?i:"",per_page:(s=(r=e==null?void 0:e.perPage)===null||r===void 0?void 0:r.toString())!==null&&s!==void 0?s:""},xform:Ww});if(c.error)throw c.error;const h=await c.json(),d=(o=c.headers.get("x-total-count"))!==null&&o!==void 0?o:0,f=(l=(a=c.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return f.length>0&&(f.forEach(m=>{const y=parseInt(m.split(";")[0].split("=")[1].substring(0,1)),v=JSON.parse(m.split(";")[1].split("=")[1]);u[`${v}Page`]=y}),u.total=parseInt(d)),{data:Object.assign(Object.assign({},h),u),error:null}}catch(u){if(j(u))return{data:{users:[]},error:u};throw u}}async getUserById(e){try{return await z(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Qt})}catch(n){if(j(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){try{return await z(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:Qt})}catch(i){if(j(i))return{data:{user:null},error:i};throw i}}async deleteUser(e,n=!1){try{return await z(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:Qt})}catch(i){if(j(i))return{data:{user:null},error:i};throw i}}async _listFactors(e){try{const{data:n,error:i}=await z(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:r=>({data:{factors:r},error:null})});return{data:n,error:i}}catch(n){if(j(n))return{data:null,error:n};throw n}}async _deleteFactor(e){try{return{data:await z(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(j(n))return{data:null,error:n};throw n}}}const qw={getItem:t=>br()?globalThis.localStorage.getItem(t):null,setItem:(t,e)=>{br()&&globalThis.localStorage.setItem(t,e)},removeItem:t=>{br()&&globalThis.localStorage.removeItem(t)}};function cd(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}function Qw(){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 ti={debug:!!(globalThis&&br()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class lm extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}class Xw extends lm{}async function Jw(t,e,n){ti.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",t,e);const i=new globalThis.AbortController;return e>0&&setTimeout(()=>{i.abort(),ti.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",t)},e),await globalThis.navigator.locks.request(t,e===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:i.signal},async r=>{if(r){ti.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",t,r.name);try{return await n()}finally{ti.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",t,r.name)}}else{if(e===0)throw ti.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",t),new Xw(`Acquiring an exclusive Navigator LockManager lock "${t}" immediately failed`);if(ti.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()}})}Qw();const Zw={url:xw,storageKey:kw,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:bw,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1},Xi=30*1e3,hd=3;async function dd(t,e,n){return await n()}class Qr{constructor(e){var n,i;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=Qr.nextInstanceID,Qr.nextInstanceID+=1,this.instanceID>0&&lt()&&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({},Zw),e);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 Gw({url:r.url,headers:r.headers,fetch:r.fetch}),this.url=r.url,this.headers=r.headers,this.fetch=sm(r.fetch),this.lock=r.lock||dd,this.detectSessionInUrl=r.detectSessionInUrl,this.flowType=r.flowType,this.hasCustomAuthorizationHeader=r.hasCustomAuthorizationHeader,r.lock?this.lock=r.lock:lt()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=Jw:this.lock=dd,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:br()?this.storage=qw:(this.memoryStorage={},this.storage=cd(this.memoryStorage)):(this.memoryStorage={},this.storage=cd(this.memoryStorage)),lt()&&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)}(i=this.broadcastChannel)===null||i===void 0||i.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(...e){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${im}) ${new Date().toISOString()}`,...e),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){try{const e=lt()?await this._isPKCEFlow():!1;if(this._debug("#_initialize()","begin","is PKCE flow",e),e||this.detectSessionInUrl&&this._isImplicitGrantFlow()){const{data:n,error:i}=await this._getSessionFromURL(e);if(i)return this._debug("#_initialize()","error detecting session from URL",i),(i==null?void 0:i.message)==="Identity is already linked"||(i==null?void 0:i.message)==="Identity is already linked to another user"?{error:i}:(await this._removeSession(),{error:i});const{session:r,redirectType:s}=n;return this._debug("#_initialize()","detected session in URL",r,"redirect type",s),await this._saveSession(r),setTimeout(async()=>{s==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",r):await this._notifyAllSubscribers("SIGNED_IN",r)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(e){return j(e)?{error:e}:{error:new am("Unexpected error during initialization",e)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,i,r;try{await this._removeSession();const s=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.captchaToken}},xform:Ht}),{data:o,error:a}=s;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(j(s))return{data:{user:null,session:null},error:s};throw s}}async signUp(e){var n,i,r;try{await this._removeSession();let s;if("email"in e){const{email:c,password:h,options:d}=e;let f=null,m=null;this.flowType==="pkce"&&([f,m]=await ei(this.storage,this.storageKey)),s=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:d==null?void 0:d.emailRedirectTo,body:{email:c,password:h,data:(n=d==null?void 0:d.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken},code_challenge:f,code_challenge_method:m},xform:Ht})}else if("phone"in e){const{phone:c,password:h,options:d}=e;s=await z(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:c,password:h,data:(i=d==null?void 0:d.data)!==null&&i!==void 0?i:{},channel:(r=d==null?void 0:d.channel)!==null&&r!==void 0?r:"sms",gotrue_meta_security:{captcha_token:d==null?void 0:d.captchaToken}},xform:Ht})}else throw new Ms("You must provide either an email or phone number and a password");const{data:o,error:a}=s;if(a||!o)return{data:{user:null,session:null},error:a};const l=o.session,u=o.user;return o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(s){if(j(s))return{data:{user:null,session:null},error:s};throw s}}async signInWithPassword(e){try{await this._removeSession();let n;if("email"in e){const{email:s,password:o,options:a}=e;n=await z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ud})}else if("phone"in e){const{phone:s,password:o,options:a}=e;n=await z(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:o,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:ud})}else throw new Ms("You must provide either an email or phone number and a password");const{data:i,error:r}=n;return r?{data:{user:null,session:null},error:r}:!i||!i.session||!i.user?{data:{user:null,session:null},error:new Ya}:(i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),{data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:r})}catch(n){if(j(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(e){var n,i,r,s;return await this._removeSession(),await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(i=e.options)===null||i===void 0?void 0:i.scopes,queryParams:(r=e.options)===null||r===void 0?void 0:r.queryParams,skipBrowserRedirect:(s=e.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(e))}async _exchangeCodeForSession(e){const n=await Os(this.storage,`${this.storageKey}-code-verifier`),[i,r]=(n??"").split("/"),{data:s,error:o}=await z(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:i},xform:Ht});return await Ka(this.storage,`${this.storageKey}-code-verifier`),o?{data:{user:null,session:null,redirectType:null},error:o}:!s||!s.session||!s.user?{data:{user:null,session:null,redirectType:null},error:new Ya}:(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),{data:Object.assign(Object.assign({},s),{redirectType:r??null}),error:o})}async signInWithIdToken(e){await this._removeSession();try{const{options:n,provider:i,token:r,access_token:s,nonce:o}=e,a=await z(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:r,access_token:s,nonce:o,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Ht}),{data:l,error:u}=a;return u?{data:{user:null,session:null},error:u}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new Ya}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:u})}catch(n){if(j(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(e){var n,i,r,s,o;try{if(await this._removeSession(),"email"in e){const{email:a,options:l}=e;let u=null,c=null;this.flowType==="pkce"&&([u,c]=await ei(this.storage,this.storageKey));const{error:h}=await z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(i=l==null?void 0:l.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:u,code_challenge_method:c},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:h}}if("phone"in e){const{phone:a,options:l}=e,{data:u,error:c}=await z(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,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:(o=l==null?void 0:l.channel)!==null&&o!==void 0?o:"sms"}});return{data:{user:null,session:null,messageId:u==null?void 0:u.message_id},error:c}}throw new Ms("You must provide either an email or phone number.")}catch(a){if(j(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(e){var n,i;try{e.type!=="email_change"&&e.type!=="phone_change"&&await this._removeSession();let r,s;"options"in e&&(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo,s=(i=e.options)===null||i===void 0?void 0:i.captchaToken);const{data:o,error:a}=await z(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:s}}),redirectTo:r,xform:Ht});if(a)throw a;if(!o)throw new Error("An error occurred on token verification.");const l=o.session,u=o.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:u,session:l},error:null}}catch(r){if(j(r))return{data:{user:null,session:null},error:r};throw r}}async signInWithSSO(e){var n,i,r;try{await this._removeSession();let s=null,o=null;return this.flowType==="pkce"&&([s,o]=await ei(this.storage,this.storageKey)),await z(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(i=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&i!==void 0?i:void 0}),!((r=e==null?void 0:e.options)===null||r===void 0)&&r.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:s,code_challenge_method:o}),headers:this.headers,xform:Vw})}catch(s){if(j(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 e=>{const{data:{session:n},error:i}=e;if(i)throw i;if(!n)throw new bn;const{error:r}=await z(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:r}})}catch(e){if(j(e))return{data:{user:null,session:null},error:e};throw e}}async resend(e){try{e.type!="email_change"&&e.type!="phone_change"&&await this._removeSession();const n=`${this.url}/resend`;if("email"in e){const{email:i,type:r,options:s}=e,{error:o}=await z(this.fetch,"POST",n,{headers:this.headers,body:{email:i,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:o}}else if("phone"in e){const{phone:i,type:r,options:s}=e,{data:o,error:a}=await z(this.fetch,"POST",n,{headers:this.headers,body:{phone:i,type:r,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return{data:{user:null,session:null,messageId:o==null?void 0:o.message_id},error:a}}throw new Ms("You must provide either an email or phone number and a type")}catch(n){if(j(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(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),r=(async()=>(await i,await n()))();return this.pendingInLock.push((async()=>{try{await r}catch{}})()),r}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const i=n();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const r=[...this.pendingInLock];await Promise.all(r),this.pendingInLock.splice(0,r.length)}return await i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(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 e=null;const n=await Os(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const i=e.expires_at?e.expires_at<=Date.now()/1e3:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",e.expires_at),!i){if(this.storage.isServer){const o=this.suppressGetSessionWarning;e=new Proxy(e,{get(l,u,c){return!o&&u==="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 many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),Reflect.get(l,u,c)}})}return{data:{session:e},error:null}}const{session:r,error:s}=await this._callRefreshToken(e.refresh_token);return s?{data:{session:null},error:s}:{data:{session:r},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(e){return e?await this._getUser(e):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(e){try{return e?await z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Qt}):await this._useSession(async n=>{var i,r,s;const{data:o,error:a}=n;if(a)throw a;return!(!((i=o.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new bn}:await z(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&s!==void 0?s:void 0,xform:Qt})})}catch(n){if(j(n))return{data:{user:null},error:n};throw n}}async updateUser(e,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(e,n))}async _updateUser(e,n={}){try{return await this._useSession(async i=>{const{data:r,error:s}=i;if(s)throw s;if(!r.session)throw new bn;const o=r.session;let a=null,l=null;this.flowType==="pkce"&&e.email!=null&&([a,l]=await ei(this.storage,this.storageKey));const{data:u,error:c}=await z(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:a,code_challenge_method:l}),jwt:o.access_token,xform:Qt});if(c)throw c;return o.user=u.user,await this._saveSession(o),await this._notifyAllSubscribers("USER_UPDATED",o),{data:{user:o.user},error:null}})}catch(i){if(j(i))return{data:{user:null},error:i};throw i}}_decodeJWT(e){return sd(e)}async setSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(e))}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new bn;const n=Date.now()/1e3;let i=n,r=!0,s=null;const o=sd(e.access_token);if(o.exp&&(i=o.exp,r=i<=n),r){const{session:a,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};s=a}else{const{data:a,error:l}=await this._getUser(e.access_token);if(l)throw l;s={access_token:e.access_token,refresh_token:e.refresh_token,user:a.user,token_type:"bearer",expires_in:i-n,expires_at:i},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return{data:{user:s.user,session:s},error:null}}catch(n){if(j(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(e){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(e))}async _refreshSession(e){try{return await this._useSession(async n=>{var i;if(!e){const{data:o,error:a}=n;if(a)throw a;e=(i=o.session)!==null&&i!==void 0?i:void 0}if(!(e!=null&&e.refresh_token))throw new bn;const{session:r,error:s}=await this._callRefreshToken(e.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(j(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(e){try{if(!lt())throw new Ls("No browser detected.");if(this.flowType==="implicit"&&!this._isImplicitGrantFlow())throw new Ls("Not a valid implicit grant flow url.");if(this.flowType=="pkce"&&!e)throw new od("Not a valid PKCE flow url.");const n=Wa(window.location.href);if(e){if(!n.code)throw new od("No code detected.");const{data:g,error:_}=await this._exchangeCodeForSession(n.code);if(_)throw _;const w=new URL(window.location.href);return w.searchParams.delete("code"),window.history.replaceState(window.history.state,"",w.toString()),{data:{session:g.session,redirectType:null},error:null}}if(n.error||n.error_description||n.error_code)throw new Ls(n.error_description||"Error in URL with unspecified error_description",{error:n.error||"unspecified_error",code:n.error_code||"unspecified_code"});const{provider_token:i,provider_refresh_token:r,access_token:s,refresh_token:o,expires_in:a,expires_at:l,token_type:u}=n;if(!s||!a||!o||!u)throw new Ls("No session defined in URL");const c=Math.round(Date.now()/1e3),h=parseInt(a);let d=c+h;l&&(d=parseInt(l));const f=d-c;f*1e3<=Xi&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${f}s, should have been closer to ${h}s`);const m=d-h;c-m>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",m,d,c):c-m<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clok for skew",m,d,c);const{data:y,error:v}=await this._getUser(s);if(v)throw v;const p={provider_token:i,provider_refresh_token:r,access_token:s,expires_in:h,expires_at:d,refresh_token:o,token_type:u,user:y.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:p,redirectType:n.type},error:null}}catch(n){if(j(n))return{data:{session:null,redirectType:null},error:n};throw n}}_isImplicitGrantFlow(){const e=Wa(window.location.href);return!!(lt()&&(e.access_token||e.error_description))}async _isPKCEFlow(){const e=Wa(window.location.href),n=await Os(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(e))}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var i;const{data:r,error:s}=n;if(s)return{error:s};const o=(i=r.session)===null||i===void 0?void 0:i.access_token;if(o){const{error:a}=await this.admin.signOut(o,e);if(a&&!(zw(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return e!=="others"&&(await this._removeSession(),await Ka(this.storage,`${this.storageKey}-code-verifier`),await this._notifyAllSubscribers("SIGNED_OUT",null)),{error:null}})}onAuthStateChange(e){const n=Cw(),i={id:n,callback:e,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,i),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:i}}}async _emitInitialSession(e){return await this._useSession(async n=>{var i,r;try{const{data:{session:s},error:o}=n;if(o)throw o;await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",e,"session",s)}catch(s){await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",s),console.error(s)}})}async resetPasswordForEmail(e,n={}){let i=null,r=null;this.flowType==="pkce"&&([i,r]=await ei(this.storage,this.storageKey,!0));try{return await z(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:i,code_challenge_method:r,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(j(s))return{data:null,error:s};throw s}}async getUserIdentities(){var e;try{const{data:n,error:i}=await this.getUser();if(i)throw i;return{data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null}}catch(n){if(j(n))return{data:null,error:n};throw n}}async linkIdentity(e){var n;try{const{data:i,error:r}=await this._useSession(async s=>{var o,a,l,u,c;const{data:h,error:d}=s;if(d)throw d;const f=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(o=e.options)===null||o===void 0?void 0:o.redirectTo,scopes:(a=e.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await z(this.fetch,"GET",f,{headers:this.headers,jwt:(c=(u=h.session)===null||u===void 0?void 0:u.access_token)!==null&&c!==void 0?c:void 0})});if(r)throw r;return lt()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(i==null?void 0:i.url),{data:{provider:e.provider,url:i==null?void 0:i.url},error:null}}catch(i){if(j(i))return{data:{provider:e.provider,url:null},error:i};throw i}}async unlinkIdentity(e){try{return await this._useSession(async n=>{var i,r;const{data:s,error:o}=n;if(o)throw o;return await z(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(r=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&r!==void 0?r:void 0})})}catch(n){if(j(n))return{data:null,error:n};throw n}}async _refreshAccessToken(e){const n=`#_refreshAccessToken(${e.substring(0,5)}...)`;this._debug(n,"begin");try{const i=Date.now();return await Ow(async r=>(r>0&&await Tw(200*Math.pow(2,r-1)),this._debug(n,"refreshing attempt",r),await z(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Ht})),(r,s)=>{const o=200*Math.pow(2,r);return s&&Ga(s)&&Date.now()+o-i<Xi})}catch(i){if(this._debug(n,"error",i),j(i))return{data:{session:null,user:null},error:i};throw i}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const i=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",i),lt()&&!n.skipBrowserRedirect&&window.location.assign(i),{data:{provider:e,url:i},error:null}}async _recoverAndRefresh(){var e;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const i=await Os(this.storage,this.storageKey);if(this._debug(n,"session from storage",i),!this._isValidSession(i)){this._debug(n,"session is not valid"),i!==null&&await this._removeSession();return}const r=Math.round(Date.now()/1e3),s=((e=i.expires_at)!==null&&e!==void 0?e:1/0)<r+rd;if(this._debug(n,`session has${s?"":" not"} expired with margin of ${rd}s`),s){if(this.autoRefreshToken&&i.refresh_token){const{error:o}=await this._callRefreshToken(i.refresh_token);o&&(console.error(o),Ga(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(n,"error",i),console.error(i);return}finally{this._debug(n,"end")}}async _callRefreshToken(e){var n,i;if(!e)throw new bn;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const r=`#_callRefreshToken(${e.substring(0,5)}...)`;this._debug(r,"begin");try{this.refreshingDeferred=new ha;const{data:s,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!s.session)throw new bn;await this._saveSession(s.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",s.session);const a={session:s.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(s){if(this._debug(r,"error",s),j(s)){const o={session:null,error:s};return Ga(s)||(await this._removeSession(),await this._notifyAllSubscribers("SIGNED_OUT",null)),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(o),o}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(s),s}finally{this.refreshingDeferred=null,this._debug(r,"end")}}async _notifyAllSubscribers(e,n,i=!0){const r=`#_notifyAllSubscribers(${e})`;this._debug(r,"begin",n,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:e,session:n});const s=[],o=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(e,n)}catch(l){s.push(l)}});if(await Promise.all(o),s.length>0){for(let a=0;a<s.length;a+=1)console.error(s[a]);throw s[0]}}finally{this._debug(r,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0,await om(this.storage,this.storageKey,e)}async _removeSession(){this._debug("#_removeSession()"),await Ka(this.storage,this.storageKey)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&lt()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Xi);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async n=>{const{data:{session:i}}=n;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const r=Math.floor((i.expires_at*1e3-e)/Xi);this._debug("#_autoRefreshTokenTick()",`access token expires in ${r} ticks, a tick lasts ${Xi}ms, refresh threshold is ${hd} ticks`),r<=hd&&await this._callRefreshToken(i.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(e){if(e.isAcquireTimeout||e instanceof lm)this._debug("auto refresh token tick lock not available");else throw e}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!lt()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),e||(await this.initializePromise,await this._acquireLock(-1,async()=>{if(document.visibilityState!=="visible"){this._debug(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(e,n,i){const r=[`provider=${encodeURIComponent(n)}`];if(i!=null&&i.redirectTo&&r.push(`redirect_to=${encodeURIComponent(i.redirectTo)}`),i!=null&&i.scopes&&r.push(`scopes=${encodeURIComponent(i.scopes)}`),this.flowType==="pkce"){const[s,o]=await ei(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(o)}`});r.push(a.toString())}if(i!=null&&i.queryParams){const s=new URLSearchParams(i.queryParams);r.push(s.toString())}return i!=null&&i.skipBrowserRedirect&&r.push(`skip_http_redirect=${i.skipBrowserRedirect}`),`${e}?${r.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var i;const{data:r,error:s}=n;return s?{data:null,error:s}:await z(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(i=r==null?void 0:r.session)===null||i===void 0?void 0:i.access_token})})}catch(n){if(j(n))return{data:null,error:n};throw n}}async _enroll(e){try{return await this._useSession(async n=>{var i,r;const{data:s,error:o}=n;if(o)return{data:null,error:o};const{data:a,error:l}=await z(this.fetch,"POST",`${this.url}/factors`,{body:{friendly_name:e.friendlyName,factor_type:e.factorType,issuer:e.issuer},headers:this.headers,jwt:(i=s==null?void 0:s.session)===null||i===void 0?void 0:i.access_token});return l?{data:null,error:l}:(!((r=a==null?void 0:a.totp)===null||r===void 0)&&r.qr_code&&(a.totp.qr_code=`data:image/svg+xml;utf-8,${a.totp.qr_code}`),{data:a,error:null})})}catch(n){if(j(n))return{data:null,error:n};throw n}}async _verify(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var i;const{data:r,error:s}=n;if(s)return{data:null,error:s};const{data:o,error:a}=await z(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:{code:e.code,challenge_id:e.challengeId},headers:this.headers,jwt:(i=r==null?void 0:r.session)===null||i===void 0?void 0:i.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+o.expires_in},o)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",o),{data:o,error:a})})}catch(n){if(j(n))return{data:null,error:n};throw n}})}async _challenge(e){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var i;const{data:r,error:s}=n;return s?{data:null,error:s}:await z(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{headers:this.headers,jwt:(i=r==null?void 0:r.session)===null||i===void 0?void 0:i.access_token})})}catch(n){if(j(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(e){const{data:n,error:i}=await this._challenge({factorId:e.factorId});return i?{data:null,error:i}:await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){const{data:{user:e},error:n}=await this.getUser();if(n)return{data:null,error:n};const i=(e==null?void 0:e.factors)||[],r=i.filter(s=>s.factor_type==="totp"&&s.status==="verified");return{data:{all:i,totp:r},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async e=>{var n,i;const{data:{session:r},error:s}=e;if(s)return{data:null,error:s};if(!r)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const o=this._decodeJWT(r.access_token);let a=null;o.aal&&(a=o.aal);let l=a;((i=(n=r.user.factors)===null||n===void 0?void 0:n.filter(h=>h.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(l="aal2");const c=o.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:c},error:null}}))}}Qr.nextInstanceID=0;const ex=Qr;class tx extends ex{constructor(e){super(e)}}var nx=function(t,e,n,i){function r(s){return s instanceof n?s:new n(function(o){o(s)})}return new(n||(n=Promise))(function(s,o){function a(c){try{u(i.next(c))}catch(h){o(h)}}function l(c){try{u(i.throw(c))}catch(h){o(h)}}function u(c){c.done?s(c.value):r(c.value).then(a,l)}u((i=i.apply(t,e||[])).next())})};class ix{constructor(e,n,i){var r,s,o;if(this.supabaseUrl=e,this.supabaseKey=n,!e)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const a=_w(e);this.realtimeUrl=`${a}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${a}/auth/v1`,this.storageUrl=`${a}/storage/v1`,this.functionsUrl=`${a}/functions/v1`;const l=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,u={db:dw,realtime:pw,auth:Object.assign(Object.assign({},fw),{storageKey:l}),global:hw},c=ww(i??{},u);this.storageKey=(r=c.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(s=c.global.headers)!==null&&s!==void 0?s:{},this.auth=this._initSupabaseAuthClient((o=c.auth)!==null&&o!==void 0?o:{},this.headers,c.global.fetch),this.fetch=vw(n,this._getAccessToken.bind(this),c.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers},c.realtime)),this.rest=new mc(`${a}/rest/v1`,{headers:this.headers,schema:c.db.schema,fetch:this.fetch}),this._listenForAuthEvents()}get functions(){return new C_(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new lw(this.storageUrl,this.headers,this.fetch)}from(e){return this.rest.from(e)}schema(e){return this.rest.schema(e)}rpc(e,n={},i={}){return this.rest.rpc(e,n,i)}channel(e,n={config:{}}){return this.realtime.channel(e,n)}getChannels(){return this.realtime.getChannels()}removeChannel(e){return this.realtime.removeChannel(e)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var e,n;return nx(this,void 0,void 0,function*(){const{data:i}=yield this.auth.getSession();return(n=(e=i.session)===null||e===void 0?void 0:e.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:e,persistSession:n,detectSessionInUrl:i,storage:r,storageKey:s,flowType:o,debug:a},l,u){var c;const h={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new tx({url:this.authUrl,headers:Object.assign(Object.assign({},h),l),storageKey:s,autoRefreshToken:e,persistSession:n,detectSessionInUrl:i,storage:r,flowType:o,debug:a,fetch:u,hasCustomAuthorizationHeader:(c="Authorization"in this.headers)!==null&&c!==void 0?c:!1})}_initRealtimeClient(e){return new q_(this.realtimeUrl,Object.assign(Object.assign({},e),{params:Object.assign({apikey:this.supabaseKey},e==null?void 0:e.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,i)=>{this._handleTokenChanged(n,"CLIENT",i==null?void 0:i.access_token)})}_handleTokenChanged(e,n,i){(e==="TOKEN_REFRESHED"||e==="SIGNED_IN")&&this.changedAccessToken!==i?(this.realtime.setAuth(i??null),this.changedAccessToken=i):e==="SIGNED_OUT"&&(this.realtime.setAuth(this.supabaseKey),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const rx=(t,e,n)=>new ix(t,e,n);function ni(t){return L.jsxs("div",{role:"button",className:"flex items-center w-full p-3 leading-tight transition-all rounded-lg outline-none text-start hover:bg-blue-gray-50 hover:bg-opacity-80 hover:text-blue-gray-900 focus:bg-blue-gray-50 focus:bg-opacity-80 focus:text-blue-gray-900 active:bg-blue-gray-50 active:bg-opacity-80 active:text-blue-gray-900",children:[L.jsx("div",{className:"grid mr-4 place-items-center",children:L.jsx("i",{className:t.icon})}),L.jsx("a",{href:t.href,children:t.name})]})}function sx(){return L.jsxs("div",{className:"relative flex h-full w-full max-w-[20rem] flex-col rounded-xl bg-white bg-clip-border p-4 text-gray-700 shadow-xl shadow-blue-gray-900/5 mr-5",children:[L.jsx("div",{className:"p-4 mb-2",children:L.jsx("h5",{className:"block font-sans text-xl antialiased font-semibold leading-snug tracking-normal text-blue-gray-900",children:L.jsx("a",{href:"/",children:"fs-tracer"})})}),L.jsxs("nav",{className:"flex min-w-[240px] flex-col gap-1 p-2 font-sans text-base font-normal text-blue-gray-700",children:[L.jsx(ni,{name:"Home",icon:"fa-solid fa-house",href:"/"}),L.jsx(ni,{name:"Recent files",icon:"fa-solid fa-folder",href:"/recent"}),L.jsx(ni,{name:"Search",icon:"fa-solid fa-magnifying-glass",href:"/search"}),L.jsx(ni,{name:"Monitoring",icon:"fa-solid fa-chart-column",href:"/monitoring"}),L.jsx(ni,{name:"Setup",icon:"fa-solid fa-gear",href:"/setup"}),L.jsx(ni,{name:"Logout",icon:"fa-solid fa-right-from-bracket",href:"/logout"})]})]})}/*!
+ * @kurkle/color v0.3.2
+ * https://github.com/kurkle/color#readme
+ * (c) 2023 Jukka Kurkela
+ * Released under the MIT License
+ */function us(t){return t+.5|0}const en=(t,e,n)=>Math.max(Math.min(t,n),e);function ur(t){return en(us(t*2.55),0,255)}function fn(t){return en(us(t*255),0,255)}function Rt(t){return en(us(t/2.55)/100,0,1)}function fd(t){return en(us(t*100),0,100)}const Ze={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ou=[..."0123456789ABCDEF"],ox=t=>ou[t&15],ax=t=>ou[(t&240)>>4]+ou[t&15],Rs=t=>(t&240)>>4===(t&15),lx=t=>Rs(t.r)&&Rs(t.g)&&Rs(t.b)&&Rs(t.a);function ux(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&Ze[t[1]]*17,g:255&Ze[t[2]]*17,b:255&Ze[t[3]]*17,a:e===5?Ze[t[4]]*17:255}:(e===7||e===9)&&(n={r:Ze[t[1]]<<4|Ze[t[2]],g:Ze[t[3]]<<4|Ze[t[4]],b:Ze[t[5]]<<4|Ze[t[6]],a:e===9?Ze[t[7]]<<4|Ze[t[8]]:255})),n}const cx=(t,e)=>t<255?e(t):"";function hx(t){var e=lx(t)?ox:ax;return t?"#"+e(t.r)+e(t.g)+e(t.b)+cx(t.a,e):void 0}const dx=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function um(t,e,n){const i=e*Math.min(n,1-n),r=(s,o=(s+t/30)%12)=>n-i*Math.max(Math.min(o-3,9-o,1),-1);return[r(0),r(8),r(4)]}function fx(t,e,n){const i=(r,s=(r+t/60)%6)=>n-n*e*Math.max(Math.min(s,4-s,1),0);return[i(5),i(3),i(1)]}function px(t,e,n){const i=um(t,1,.5);let r;for(e+n>1&&(r=1/(e+n),e*=r,n*=r),r=0;r<3;r++)i[r]*=1-e-n,i[r]+=e;return i}function gx(t,e,n,i,r){return t===r?(e-n)/i+(e<n?6:0):e===r?(n-t)/i+2:(t-e)/i+4}function wc(t){const n=t.r/255,i=t.g/255,r=t.b/255,s=Math.max(n,i,r),o=Math.min(n,i,r),a=(s+o)/2;let l,u,c;return s!==o&&(c=s-o,u=a>.5?c/(2-s-o):c/(s+o),l=gx(n,i,r,c,s),l=l*60+.5),[l|0,u||0,a]}function xc(t,e,n,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,i)).map(fn)}function kc(t,e,n){return xc(um,t,e,n)}function mx(t,e,n){return xc(px,t,e,n)}function yx(t,e,n){return xc(fx,t,e,n)}function cm(t){return(t%360+360)%360}function vx(t){const e=dx.exec(t);let n=255,i;if(!e)return;e[5]!==i&&(n=e[6]?ur(+e[5]):fn(+e[5]));const r=cm(+e[2]),s=+e[3]/100,o=+e[4]/100;return e[1]==="hwb"?i=mx(r,s,o):e[1]==="hsv"?i=yx(r,s,o):i=kc(r,s,o),{r:i[0],g:i[1],b:i[2],a:n}}function _x(t,e){var n=wc(t);n[0]=cm(n[0]+e),n=kc(n),t.r=n[0],t.g=n[1],t.b=n[2]}function wx(t){if(!t)return;const e=wc(t),n=e[0],i=fd(e[1]),r=fd(e[2]);return t.a<255?`hsla(${n}, ${i}%, ${r}%, ${Rt(t.a)})`:`hsl(${n}, ${i}%, ${r}%)`}const pd={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},gd={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function xx(){const t={},e=Object.keys(gd),n=Object.keys(pd);let i,r,s,o,a;for(i=0;i<e.length;i++){for(o=a=e[i],r=0;r<n.length;r++)s=n[r],a=a.replace(s,pd[s]);s=parseInt(gd[o],16),t[a]=[s>>16&255,s>>8&255,s&255]}return t}let Is;function kx(t){Is||(Is=xx(),Is.transparent=[0,0,0,0]);const e=Is[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const bx=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Sx(t){const e=bx.exec(t);let n=255,i,r,s;if(e){if(e[7]!==i){const o=+e[7];n=e[8]?ur(o):en(o*255,0,255)}return i=+e[1],r=+e[3],s=+e[5],i=255&(e[2]?ur(i):en(i,0,255)),r=255&(e[4]?ur(r):en(r,0,255)),s=255&(e[6]?ur(s):en(s,0,255)),{r:i,g:r,b:s,a:n}}}function Cx(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${Rt(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const qa=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,ii=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Ex(t,e,n){const i=ii(Rt(t.r)),r=ii(Rt(t.g)),s=ii(Rt(t.b));return{r:fn(qa(i+n*(ii(Rt(e.r))-i))),g:fn(qa(r+n*(ii(Rt(e.g))-r))),b:fn(qa(s+n*(ii(Rt(e.b))-s))),a:t.a+n*(e.a-t.a)}}function As(t,e,n){if(t){let i=wc(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*n,e===0?360:1)),i=kc(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function hm(t,e){return t&&Object.assign(e||{},t)}function md(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=fn(t[3]))):(e=hm(t,{r:0,g:0,b:0,a:1}),e.a=fn(e.a)),e}function Px(t){return t.charAt(0)==="r"?Sx(t):vx(t)}class Xr{constructor(e){if(e instanceof Xr)return e;const n=typeof e;let i;n==="object"?i=md(e):n==="string"&&(i=ux(e)||kx(e)||Px(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=hm(this._rgb);return e&&(e.a=Rt(e.a)),e}set rgb(e){this._rgb=md(e)}rgbString(){return this._valid?Cx(this._rgb):void 0}hexString(){return this._valid?hx(this._rgb):void 0}hslString(){return this._valid?wx(this._rgb):void 0}mix(e,n){if(e){const i=this.rgb,r=e.rgb;let s;const o=n===s?.5:n,a=2*o-1,l=i.a-r.a,u=((a*l===-1?a:(a+l)/(1+a*l))+1)/2;s=1-u,i.r=255&u*i.r+s*r.r+.5,i.g=255&u*i.g+s*r.g+.5,i.b=255&u*i.b+s*r.b+.5,i.a=o*i.a+(1-o)*r.a,this.rgb=i}return this}interpolate(e,n){return e&&(this._rgb=Ex(this._rgb,e._rgb,n)),this}clone(){return new Xr(this.rgb)}alpha(e){return this._rgb.a=fn(e),this}clearer(e){const n=this._rgb;return n.a*=1-e,this}greyscale(){const e=this._rgb,n=us(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=n,this}opaquer(e){const n=this._rgb;return n.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return As(this._rgb,2,e),this}darken(e){return As(this._rgb,2,-e),this}saturate(e){return As(this._rgb,1,e),this}desaturate(e){return As(this._rgb,1,-e),this}rotate(e){return _x(this._rgb,e),this}}/*!
+ * Chart.js v4.4.3
+ * https://www.chartjs.org
+ * (c) 2024 Chart.js Contributors
+ * Released under the MIT License
+ */function Pt(){}const Tx=(()=>{let t=0;return()=>t++})();function J(t){return t===null||typeof t>"u"}function oe(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function U(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function ve(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Ve(t,e){return ve(t)?t:e}function W(t,e){return typeof t>"u"?e:t}const Ox=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function re(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function V(t,e,n,i){let r,s,o;if(oe(t))for(s=t.length,r=0;r<s;r++)e.call(n,t[r],r);else if(U(t))for(o=Object.keys(t),s=o.length,r=0;r<s;r++)e.call(n,t[o[r]],o[r])}function Do(t,e){let n,i,r,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(r=t[n],s=e[n],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function jo(t){if(oe(t))return t.map(jo);if(U(t)){const e=Object.create(null),n=Object.keys(t),i=n.length;let r=0;for(;r<i;++r)e[n[r]]=jo(t[n[r]]);return e}return t}function dm(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function Mx(t,e,n,i){if(!dm(t))return;const r=e[t],s=n[t];U(r)&&U(s)?Jr(r,s,i):e[t]=jo(s)}function Jr(t,e,n){const i=oe(e)?e:[e],r=i.length;if(!U(t))return t;n=n||{};const s=n.merger||Mx;let o;for(let a=0;a<r;++a){if(o=i[a],!U(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)s(l[u],t,o,n)}return t}function Sr(t,e){return Jr(t,e,{merger:Lx})}function Lx(t,e,n){if(!dm(t))return;const i=e[t],r=n[t];U(i)&&U(r)?Sr(i,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=jo(r))}const yd={"":t=>t,x:t=>t.x,y:t=>t.y};function Rx(t){const e=t.split("."),n=[];let i="";for(const r of e)i+=r,i.endsWith("\\")?i=i.slice(0,-1)+".":(n.push(i),i="");return n}function Ix(t){const e=Rx(t);return n=>{for(const i of e){if(i==="")break;n=n&&n[i]}return n}}function No(t,e){return(yd[e]||(yd[e]=Ix(e)))(t)}function bc(t){return t.charAt(0).toUpperCase()+t.slice(1)}const zo=t=>typeof t<"u",mn=t=>typeof t=="function",vd=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function Ax(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const de=Math.PI,mt=2*de,Dx=mt+de,Fo=Number.POSITIVE_INFINITY,jx=de/180,Ke=de/2,Sn=de/4,_d=de*2/3,tn=Math.log10,Ii=Math.sign;function Cr(t,e,n){return Math.abs(t-e)<n}function wd(t){const e=Math.round(t);t=Cr(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(tn(t))),i=t/n;return(i<=1?1:i<=2?2:i<=5?5:10)*n}function Nx(t){const e=[],n=Math.sqrt(t);let i;for(i=1;i<n;i++)t%i===0&&(e.push(i),e.push(t/i));return n===(n|0)&&e.push(n),e.sort((r,s)=>r-s).pop(),e}function Zr(t){return!isNaN(parseFloat(t))&&isFinite(t)}function zx(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function fm(t,e,n){let i,r,s;for(i=0,r=t.length;i<r;i++)s=t[i][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function nn(t){return t*(de/180)}function Sc(t){return t*(180/de)}function xd(t){if(!ve(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Fx(t,e){const n=e.x-t.x,i=e.y-t.y,r=Math.sqrt(n*n+i*i);let s=Math.atan2(i,n);return s<-.5*de&&(s+=mt),{angle:s,distance:r}}function au(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $x(t,e){return(t-e+Dx)%mt-de}function dt(t){return(t%mt+mt)%mt}function pm(t,e,n,i){const r=dt(t),s=dt(e),o=dt(n),a=dt(s-r),l=dt(o-r),u=dt(r-s),c=dt(r-o);return r===s||r===o||i&&s===o||a>l&&u<c}function it(t,e,n){return Math.max(e,Math.min(n,t))}function Ux(t){return it(t,-32768,32767)}function Bx(t,e,n,i=1e-6){return t>=Math.min(e,n)-i&&t<=Math.max(e,n)+i}function Cc(t,e,n){n=n||(o=>t[o]<e);let i=t.length-1,r=0,s;for(;i-r>1;)s=r+i>>1,n(s)?r=s:i=s;return{lo:r,hi:i}}const Nn=(t,e,n,i)=>Cc(t,n,i?r=>{const s=t[r][e];return s<n||s===n&&t[r+1][e]===n}:r=>t[r][e]<n),Vx=(t,e,n)=>Cc(t,n,i=>t[i][e]>=n);function Hx(t,e,n){let i=0,r=t.length;for(;i<r&&t[i]<e;)i++;for(;r>i&&t[r-1]>n;)r--;return i>0||r<t.length?t.slice(i,r):t}const gm=["push","pop","shift","splice","unshift"];function Wx(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),gm.forEach(n=>{const i="_onData"+bc(n),r=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const o=r.apply(this,s);return t._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...s)}),o}})})}function kd(t,e){const n=t._chartjs;if(!n)return;const i=n.listeners,r=i.indexOf(e);r!==-1&&i.splice(r,1),!(i.length>0)&&(gm.forEach(s=>{delete t[s]}),delete t._chartjs)}function Kx(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const mm=function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame}();function ym(t,e){let n=[],i=!1;return function(...r){n=r,i||(i=!0,mm.call(window,()=>{i=!1,t.apply(e,n)}))}}function Yx(t,e){let n;return function(...i){return e?(clearTimeout(n),n=setTimeout(t,e,i)):t.apply(this,i),e}}const vm=t=>t==="start"?"left":t==="end"?"right":"center",Er=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2;function Gx(t,e,n){const i=e.length;let r=0,s=i;if(t._sorted){const{iScale:o,_parsed:a}=t,l=o.axis,{min:u,max:c,minDefined:h,maxDefined:d}=o.getUserBounds();h&&(r=it(Math.min(Nn(a,l,u).lo,n?i:Nn(e,l,o.getPixelForValue(u)).lo),0,i-1)),d?s=it(Math.max(Nn(a,o.axis,c,!0).hi+1,n?0:Nn(e,l,o.getPixelForValue(c),!0).hi+1),r,i)-r:s=i-r}return{start:r,count:s}}function qx(t){const{xScale:e,yScale:n,_scaleRanges:i}=t,r={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!i)return t._scaleRanges=r,!0;const s=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==n.min||i.ymax!==n.max;return Object.assign(i,r),s}const Ds=t=>t===0||t===1,bd=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*mt/n)),Sd=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*mt/n)+1,Pr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Ke)+1,easeOutSine:t=>Math.sin(t*Ke),easeInOutSine:t=>-.5*(Math.cos(de*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>Ds(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Ds(t)?t:bd(t,.075,.3),easeOutElastic:t=>Ds(t)?t:Sd(t,.075,.3),easeInOutElastic(t){return Ds(t)?t:t<.5?.5*bd(t*2,.1125,.45):.5+.5*Sd(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-Pr.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?Pr.easeInBounce(t*2)*.5:Pr.easeOutBounce(t*2-1)*.5+.5};function Ec(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Cd(t){return Ec(t)?t:new Xr(t)}function Qa(t){return Ec(t)?t:new Xr(t).saturate(.5).darken(.1).hexString()}const Qx=["x","y","borderWidth","radius","tension"],Xx=["color","borderColor","backgroundColor"];function Jx(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:Xx},numbers:{type:"number",properties:Qx}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function Zx(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Ed=new Map;function e1(t,e){e=e||{};const n=t+JSON.stringify(e);let i=Ed.get(n);return i||(i=new Intl.NumberFormat(t,e),Ed.set(n,i)),i}function Pc(t,e,n){return e1(e,n).format(t)}const _m={values(t){return oe(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const i=this.chart.options.locale;let r,s=t;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(r="scientific"),s=t1(t,n)}const o=tn(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Pc(t,i,l)},logarithmic(t,e,n){if(t===0)return"0";const i=n[e].significand||t/Math.pow(10,Math.floor(tn(t)));return[1,2,3,5,10,15].includes(i)||e>.8*n.length?_m.numeric.call(this,t,e,n):""}};function t1(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var da={formatters:_m};function n1(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:da.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Yn=Object.create(null),lu=Object.create(null);function Tr(t,e){if(!e)return t;const n=e.split(".");for(let i=0,r=n.length;i<r;++i){const s=n[i];t=t[s]||(t[s]=Object.create(null))}return t}function Xa(t,e,n){return typeof e=="string"?Jr(Tr(t,e),n):Jr(Tr(t,""),e)}class i1{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,r)=>Qa(r.backgroundColor),this.hoverBorderColor=(i,r)=>Qa(r.borderColor),this.hoverColor=(i,r)=>Qa(r.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return Xa(this,e,n)}get(e){return Tr(this,e)}describe(e,n){return Xa(lu,e,n)}override(e,n){return Xa(Yn,e,n)}route(e,n,i,r){const s=Tr(this,e),o=Tr(this,i),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[r];return U(l)?Object.assign({},u,l):W(l,u)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var ue=new i1({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Jx,Zx,n1]);function r1(t){return!t||J(t.size)||J(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function $o(t,e,n,i,r){let s=e[r];return s||(s=e[r]=t.measureText(r).width,n.push(r)),s>i&&(i=s),i}function s1(t,e,n,i){i=i||{};let r=i.data=i.data||{},s=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(r=i.data={},s=i.garbageCollect=[],i.font=e),t.save(),t.font=e;let o=0;const a=n.length;let l,u,c,h,d;for(l=0;l<a;l++)if(h=n[l],h!=null&&!oe(h))o=$o(t,r,s,o,h);else if(oe(h))for(u=0,c=h.length;u<c;u++)d=h[u],d!=null&&!oe(d)&&(o=$o(t,r,s,o,d));t.restore();const f=s.length/2;if(f>n.length){for(l=0;l<f;l++)delete r[s[l]];s.splice(0,f)}return o}function Cn(t,e,n){const i=t.currentDevicePixelRatio,r=n!==0?Math.max(n/2,.5):0;return Math.round((e-r)*i)/i+r}function Pd(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function uu(t,e,n,i){o1(t,e,n,i)}function o1(t,e,n,i,r){let s,o,a,l,u,c,h,d;const f=e.pointStyle,m=e.rotation,y=e.radius;let v=(m||0)*jx;if(f&&typeof f=="object"&&(s=f.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,i),t.rotate(v),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),t.restore();return}if(!(isNaN(y)||y<=0)){switch(t.beginPath(),f){default:t.arc(n,i,y,0,mt),t.closePath();break;case"triangle":c=y,t.moveTo(n+Math.sin(v)*c,i-Math.cos(v)*y),v+=_d,t.lineTo(n+Math.sin(v)*c,i-Math.cos(v)*y),v+=_d,t.lineTo(n+Math.sin(v)*c,i-Math.cos(v)*y),t.closePath();break;case"rectRounded":u=y*.516,l=y-u,o=Math.cos(v+Sn)*l,h=Math.cos(v+Sn)*l,a=Math.sin(v+Sn)*l,d=Math.sin(v+Sn)*l,t.arc(n-h,i-a,u,v-de,v-Ke),t.arc(n+d,i-o,u,v-Ke,v),t.arc(n+h,i+a,u,v,v+Ke),t.arc(n-d,i+o,u,v+Ke,v+de),t.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*y,c=l,t.rect(n-c,i-l,2*c,2*l);break}v+=Sn;case"rectRot":h=Math.cos(v)*y,o=Math.cos(v)*y,a=Math.sin(v)*y,d=Math.sin(v)*y,t.moveTo(n-h,i-a),t.lineTo(n+d,i-o),t.lineTo(n+h,i+a),t.lineTo(n-d,i+o),t.closePath();break;case"crossRot":v+=Sn;case"cross":h=Math.cos(v)*y,o=Math.cos(v)*y,a=Math.sin(v)*y,d=Math.sin(v)*y,t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+d,i-o),t.lineTo(n-d,i+o);break;case"star":h=Math.cos(v)*y,o=Math.cos(v)*y,a=Math.sin(v)*y,d=Math.sin(v)*y,t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+d,i-o),t.lineTo(n-d,i+o),v+=Sn,h=Math.cos(v)*y,o=Math.cos(v)*y,a=Math.sin(v)*y,d=Math.sin(v)*y,t.moveTo(n-h,i-a),t.lineTo(n+h,i+a),t.moveTo(n+d,i-o),t.lineTo(n-d,i+o);break;case"line":o=Math.cos(v)*y,a=Math.sin(v)*y,t.moveTo(n-o,i-a),t.lineTo(n+o,i+a);break;case"dash":t.moveTo(n,i),t.lineTo(n+Math.cos(v)*y,i+Math.sin(v)*y);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Dt(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function wm(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function xm(t){t.restore()}function a1(t,e,n,i,r){if(!e)return t.lineTo(n.x,n.y);if(r==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else r==="after"!=!!i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function l1(t,e,n,i){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?n.cp2x:n.cp1x,i?n.cp2y:n.cp1y,n.x,n.y)}function u1(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),J(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function c1(t,e,n,i,r){if(r.strikethrough||r.underline){const s=t.measureText(i),o=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,u=n+s.actualBoundingBoxDescent,c=r.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(o,c),t.lineTo(a,c),t.stroke()}}function h1(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function es(t,e,n,i,r,s={}){const o=oe(e)?e:[e],a=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(t.save(),t.font=r.string,u1(t,s),l=0;l<o.length;++l)u=o[l],s.backdrop&&h1(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),J(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(u,n,i,s.maxWidth)),t.fillText(u,n,i,s.maxWidth),c1(t,n,i,u,s),i+=Number(r.lineHeight);t.restore()}function cu(t,e){const{x:n,y:i,w:r,h:s,radius:o}=e;t.arc(n+o.topLeft,i+o.topLeft,o.topLeft,1.5*de,de,!0),t.lineTo(n,i+s-o.bottomLeft),t.arc(n+o.bottomLeft,i+s-o.bottomLeft,o.bottomLeft,de,Ke,!0),t.lineTo(n+r-o.bottomRight,i+s),t.arc(n+r-o.bottomRight,i+s-o.bottomRight,o.bottomRight,Ke,0,!0),t.lineTo(n+r,i+o.topRight),t.arc(n+r-o.topRight,i+o.topRight,o.topRight,0,-Ke,!0),t.lineTo(n+o.topLeft,i)}const d1=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,f1=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function p1(t,e){const n=(""+t).match(d1);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const g1=t=>+t||0;function km(t,e){const n={},i=U(e),r=i?Object.keys(e):e,s=U(t)?i?o=>W(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of r)n[o]=g1(s(o));return n}function m1(t){return km(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Or(t){return km(t,["topLeft","topRight","bottomLeft","bottomRight"])}function qe(t){const e=m1(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Le(t,e){t=t||{},e=e||ue.font;let n=W(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let i=W(t.style,e.style);i&&!(""+i).match(f1)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const r={family:W(t.family,e.family),lineHeight:p1(W(t.lineHeight,e.lineHeight),n),size:n,style:i,weight:W(t.weight,e.weight),string:""};return r.string=r1(r),r}function js(t,e,n,i){let r,s,o;for(r=0,s=t.length;r<s;++r)if(o=t[r],o!==void 0&&o!==void 0)return o}function y1(t,e,n){const{min:i,max:r}=t,s=Ox(e,(r-i)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(i,-Math.abs(s)),max:o(r,s)}}function xn(t,e){return Object.assign(Object.create(t),e)}function Tc(t,e=[""],n,i,r=()=>t[0]){const s=n||t;typeof i>"u"&&(i=Em("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:i,_getTarget:r,override:a=>Tc([a,...t],e,s,i)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return Sm(a,l,()=>C1(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Od(a).includes(l)},ownKeys(a){return Od(a)},set(a,l,u){const c=a._storage||(a._storage=r());return a[l]=c[l]=u,delete a._keys,!0}})}function Ai(t,e,n,i){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:bm(t,i),setContext:s=>Ai(t,s,n,i),override:s=>Ai(t.override(s),e,n,i)};return new Proxy(r,{deleteProperty(s,o){return delete s[o],delete t[o],!0},get(s,o,a){return Sm(s,o,()=>_1(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(s,o,a){return t[o]=a,delete s[o],!0}})}function bm(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:i=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:n,indexable:i,isScriptable:mn(n)?n:()=>n,isIndexable:mn(i)?i:()=>i}}const v1=(t,e)=>t?t+bc(e):e,Oc=(t,e)=>U(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Sm(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=n();return t[e]=i,i}function _1(t,e,n){const{_proxy:i,_context:r,_subProxy:s,_descriptors:o}=t;let a=i[e];return mn(a)&&o.isScriptable(e)&&(a=w1(e,a,t,n)),oe(a)&&a.length&&(a=x1(e,a,t,o.isIndexable)),Oc(e,a)&&(a=Ai(a,r,s&&s[e],o)),a}function w1(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(s,o||i);return a.delete(t),Oc(t,l)&&(l=Mc(r._scopes,r,t,l)),l}function x1(t,e,n,i){const{_proxy:r,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index<"u"&&i(t))return e[s.index%e.length];if(U(e[0])){const l=e,u=r._scopes.filter(c=>c!==l);e=[];for(const c of l){const h=Mc(u,r,t,c);e.push(Ai(h,s,o&&o[t],a))}}return e}function Cm(t,e,n){return mn(t)?t(e,n):t}const k1=(t,e)=>t===!0?e:typeof t=="string"?No(e,t):void 0;function b1(t,e,n,i,r){for(const s of e){const o=k1(n,s);if(o){t.add(o);const a=Cm(o._fallback,n,r);if(typeof a<"u"&&a!==n&&a!==i)return a}else if(o===!1&&typeof i<"u"&&n!==i)return null}return!1}function Mc(t,e,n,i){const r=e._rootScopes,s=Cm(e._fallback,n,i),o=[...t,...r],a=new Set;a.add(i);let l=Td(a,o,n,s||n,i);return l===null||typeof s<"u"&&s!==n&&(l=Td(a,o,s,l,i),l===null)?!1:Tc(Array.from(a),[""],r,s,()=>S1(e,n,i))}function Td(t,e,n,i,r){for(;n;)n=b1(t,e,n,i,r);return n}function S1(t,e,n){const i=t._getTarget();e in i||(i[e]={});const r=i[e];return oe(r)&&U(n)?n:r||{}}function C1(t,e,n,i){let r;for(const s of e)if(r=Em(v1(s,t),n),typeof r<"u")return Oc(t,r)?Mc(n,i,t,r):r}function Em(t,e){for(const n of e){if(!n)continue;const i=n[t];if(typeof i<"u")return i}}function Od(t){let e=t._keys;return e||(e=t._keys=E1(t._scopes)),e}function E1(t){const e=new Set;for(const n of t)for(const i of Object.keys(n).filter(r=>!r.startsWith("_")))e.add(i);return Array.from(e)}const P1=Number.EPSILON||1e-14,Di=(t,e)=>e<t.length&&!t[e].skip&&t[e],Pm=t=>t==="x"?"y":"x";function T1(t,e,n,i){const r=t.skip?e:t,s=e,o=n.skip?e:n,a=au(s,r),l=au(o,s);let u=a/(a+l),c=l/(a+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const h=i*u,d=i*c;return{previous:{x:s.x-h*(o.x-r.x),y:s.y-h*(o.y-r.y)},next:{x:s.x+d*(o.x-r.x),y:s.y+d*(o.y-r.y)}}}function O1(t,e,n){const i=t.length;let r,s,o,a,l,u=Di(t,0);for(let c=0;c<i-1;++c)if(l=u,u=Di(t,c+1),!(!l||!u)){if(Cr(e[c],0,P1)){n[c]=n[c+1]=0;continue}r=n[c]/e[c],s=n[c+1]/e[c],a=Math.pow(r,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[c]=r*o*e[c],n[c+1]=s*o*e[c])}}function M1(t,e,n="x"){const i=Pm(n),r=t.length;let s,o,a,l=Di(t,0);for(let u=0;u<r;++u){if(o=a,a=l,l=Di(t,u+1),!a)continue;const c=a[n],h=a[i];o&&(s=(c-o[n])/3,a[`cp1${n}`]=c-s,a[`cp1${i}`]=h-s*e[u]),l&&(s=(l[n]-c)/3,a[`cp2${n}`]=c+s,a[`cp2${i}`]=h+s*e[u])}}function L1(t,e="x"){const n=Pm(e),i=t.length,r=Array(i).fill(0),s=Array(i);let o,a,l,u=Di(t,0);for(o=0;o<i;++o)if(a=l,l=u,u=Di(t,o+1),!!l){if(u){const c=u[e]-l[e];r[o]=c!==0?(u[n]-l[n])/c:0}s[o]=a?u?Ii(r[o-1])!==Ii(r[o])?0:(r[o-1]+r[o])/2:r[o-1]:r[o]}O1(t,r,s),M1(t,s,e)}function Ns(t,e,n){return Math.max(Math.min(t,n),e)}function R1(t,e){let n,i,r,s,o,a=Dt(t[0],e);for(n=0,i=t.length;n<i;++n)o=s,s=a,a=n<i-1&&Dt(t[n+1],e),s&&(r=t[n],o&&(r.cp1x=Ns(r.cp1x,e.left,e.right),r.cp1y=Ns(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=Ns(r.cp2x,e.left,e.right),r.cp2y=Ns(r.cp2y,e.top,e.bottom)))}function I1(t,e,n,i,r){let s,o,a,l;if(e.spanGaps&&(t=t.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")L1(t,r);else{let u=i?t[t.length-1]:t[0];for(s=0,o=t.length;s<o;++s)a=t[s],l=T1(u,a,t[Math.min(s+1,o-(i?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,u=a}e.capBezierPoints&&R1(t,n)}function Lc(){return typeof window<"u"&&typeof document<"u"}function Rc(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function Uo(t,e,n){let i;return typeof t=="string"?(i=parseInt(t,10),t.indexOf("%")!==-1&&(i=i/100*e.parentNode[n])):i=t,i}const fa=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function A1(t,e){return fa(t).getPropertyValue(e)}const D1=["top","right","bottom","left"];function Un(t,e,n){const i={};n=n?"-"+n:"";for(let r=0;r<4;r++){const s=D1[r];i[s]=parseFloat(t[e+"-"+s+n])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const j1=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function N1(t,e){const n=t.touches,i=n&&n.length?n[0]:t,{offsetX:r,offsetY:s}=i;let o=!1,a,l;if(j1(r,s,t.target))a=r,l=s;else{const u=e.getBoundingClientRect();a=i.clientX-u.left,l=i.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function Ln(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:i}=e,r=fa(n),s=r.boxSizing==="border-box",o=Un(r,"padding"),a=Un(r,"border","width"),{x:l,y:u,box:c}=N1(t,n),h=o.left+(c&&a.left),d=o.top+(c&&a.top);let{width:f,height:m}=e;return s&&(f-=o.width+a.width,m-=o.height+a.height),{x:Math.round((l-h)/f*n.width/i),y:Math.round((u-d)/m*n.height/i)}}function z1(t,e,n){let i,r;if(e===void 0||n===void 0){const s=t&&Rc(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const o=s.getBoundingClientRect(),a=fa(s),l=Un(a,"border","width"),u=Un(a,"padding");e=o.width-u.width-l.width,n=o.height-u.height-l.height,i=Uo(a.maxWidth,s,"clientWidth"),r=Uo(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:i||Fo,maxHeight:r||Fo}}const zs=t=>Math.round(t*10)/10;function F1(t,e,n,i){const r=fa(t),s=Un(r,"margin"),o=Uo(r.maxWidth,t,"clientWidth")||Fo,a=Uo(r.maxHeight,t,"clientHeight")||Fo,l=z1(t,e,n);let{width:u,height:c}=l;if(r.boxSizing==="content-box"){const d=Un(r,"border","width"),f=Un(r,"padding");u-=f.width+d.width,c-=f.height+d.height}return u=Math.max(0,u-s.width),c=Math.max(0,i?u/i:c-s.height),u=zs(Math.min(u,o,l.maxWidth)),c=zs(Math.min(c,a,l.maxHeight)),u&&!c&&(c=zs(u/2)),(e!==void 0||n!==void 0)&&i&&l.height&&c>l.height&&(c=l.height,u=zs(Math.floor(c*i))),{width:u,height:c}}function Md(t,e,n){const i=e||1,r=Math.floor(t.height*i),s=Math.floor(t.width*i);t.height=Math.floor(t.height),t.width=Math.floor(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==i||o.height!==r||o.width!==s?(t.currentDevicePixelRatio=i,o.height=r,o.width=s,t.ctx.setTransform(i,0,0,i,0,0),!0):!1}const $1=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Lc()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t}();function Ld(t,e){const n=A1(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Rn(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function U1(t,e,n,i){return{x:t.x+n*(e.x-t.x),y:i==="middle"?n<.5?t.y:e.y:i==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function B1(t,e,n,i){const r={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=Rn(t,r,n),a=Rn(r,s,n),l=Rn(s,e,n),u=Rn(o,a,n),c=Rn(a,l,n);return Rn(u,c,n)}const V1=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,i){return n-i},leftForLtr(n,i){return n-i}}},H1=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function Ja(t,e,n){return t?V1(e,n):H1()}function W1(t,e){let n,i;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,i=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)}function K1(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Tm(t){return t==="angle"?{between:pm,compare:$x,normalize:dt}:{between:Bx,compare:(e,n)=>e-n,normalize:e=>e}}function Rd({start:t,end:e,count:n,loop:i,style:r}){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n===0,style:r}}function Y1(t,e,n){const{property:i,start:r,end:s}=n,{between:o,normalize:a}=Tm(i),l=e.length;let{start:u,end:c,loop:h}=t,d,f;if(h){for(u+=l,c+=l,d=0,f=l;d<f&&o(a(e[u%l][i]),r,s);++d)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:h,style:t.style}}function G1(t,e,n){if(!n)return[t];const{property:i,start:r,end:s}=n,o=e.length,{compare:a,between:l,normalize:u}=Tm(i),{start:c,end:h,loop:d,style:f}=Y1(t,e,n),m=[];let y=!1,v=null,p,g,_;const w=()=>l(r,_,p)&&a(r,_)!==0,x=()=>a(s,p)===0||l(s,_,p),b=()=>y||w(),k=()=>!y||x();for(let S=c,M=c;S<=h;++S)g=e[S%o],!g.skip&&(p=u(g[i]),p!==_&&(y=l(p,r,s),v===null&&b()&&(v=a(p,r)===0?S:M),v!==null&&k()&&(m.push(Rd({start:v,end:S,loop:d,count:o,style:f})),v=null),M=S,_=p));return v!==null&&m.push(Rd({start:v,end:h,loop:d,count:o,style:f})),m}function q1(t,e){const n=[],i=t.segments;for(let r=0;r<i.length;r++){const s=G1(i[r],t.points,e);s.length&&n.push(...s)}return n}function Q1(t,e,n,i){let r=0,s=e-1;if(n&&!i)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,n&&(s+=r);s>r&&t[s%e].skip;)s--;return s%=e,{start:r,end:s}}function X1(t,e,n,i){const r=t.length,s=[];let o=e,a=t[e],l;for(l=e+1;l<=n;++l){const u=t[l%r];u.skip||u.stop?a.skip||(i=!1,s.push({start:e%r,end:(l-1)%r,loop:i}),e=o=u.stop?l:null):(o=l,a.skip&&(e=l)),a=u}return o!==null&&s.push({start:e%r,end:o%r,loop:i}),s}function J1(t,e){const n=t.points,i=t.options.spanGaps,r=n.length;if(!r)return[];const s=!!t._loop,{start:o,end:a}=Q1(n,r,s,i);if(i===!0)return Id(t,[{start:o,end:a,loop:s}],n,e);const l=a<o?a+r:a,u=!!t._fullLoop&&o===0&&a===r-1;return Id(t,X1(n,o,l,u),n,e)}function Id(t,e,n,i){return!i||!i.setContext||!n?e:Z1(t,e,n,i)}function Z1(t,e,n,i){const r=t._chart.getContext(),s=Ad(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=n.length,u=[];let c=s,h=e[0].start,d=h;function f(m,y,v,p){const g=a?-1:1;if(m!==y){for(m+=l;n[m%l].skip;)m-=g;for(;n[y%l].skip;)y+=g;m%l!==y%l&&(u.push({start:m%l,end:y%l,loop:v,style:p}),c=p,h=y%l)}}for(const m of e){h=a?h:m.start;let y=n[h%l],v;for(d=h+1;d<=m.end;d++){const p=n[d%l];v=Ad(i.setContext(xn(r,{type:"segment",p0:y,p1:p,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),ek(v,c)&&f(h,d-1,m.loop,c),y=p,c=v}h<d-1&&f(h,d-1,m.loop,c)}return u}function Ad(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function ek(t,e){if(!e)return!1;const n=[],i=function(r,s){return Ec(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,i)!==JSON.stringify(e,i)}/*!
+ * Chart.js v4.4.3
+ * https://www.chartjs.org
+ * (c) 2024 Chart.js Contributors
+ * Released under the MIT License
+ */class tk{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,i,r){const s=n.listeners[r],o=n.duration;s.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(i-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=mm.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((i,r)=>{if(!i.running||!i.items.length)return;const s=i.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>i.duration&&(i.duration=l._total),l.tick(e),a=!0):(s[o]=s[s.length-1],s.pop());a&&(r.draw(),this._notify(r,i,e,"progress")),s.length||(i.running=!1,this._notify(r,i,e,"complete"),i.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let i=n.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,i)),i}listen(e,n,i){this._getAnims(e).listeners[n].push(i)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((i,r)=>Math.max(i,r._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const i=n.items;let r=i.length-1;for(;r>=0;--r)i[r].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Tt=new tk;const Dd="transparent",nk={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const i=Cd(t||Dd),r=i.valid&&Cd(e||Dd);return r&&r.valid?r.mix(i,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class ik{constructor(e,n,i,r){const s=n[i];r=js([e.to,r,s,e.from]);const o=js([e.from,s,r]);this._active=!0,this._fn=e.fn||nk[e.type||typeof o],this._easing=Pr[e.easing]||Pr.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=i,this._from=o,this._to=r,this._promises=void 0}active(){return this._active}update(e,n,i){if(this._active){this._notify(!1);const r=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=js([e.to,n,r,e.from]),this._from=js([e.from,r,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,i=this._duration,r=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<i),!this._active){this._target[r]=a,this._notify(!0);return}if(n<0){this._target[r]=s;return}l=n/i%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[r]=this._fn(s,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,i)=>{e.push({res:n,rej:i})})}_notify(e){const n=e?"res":"rej",i=this._promises||[];for(let r=0;r<i.length;r++)i[r][n]()}}class Om{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!U(e))return;const n=Object.keys(ue.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(r=>{const s=e[r];if(!U(s))return;const o={};for(const a of n)o[a]=s[a];(oe(s.properties)&&s.properties||[r]).forEach(a=>{(a===r||!i.has(a))&&i.set(a,o)})})}_animateOptions(e,n){const i=n.options,r=sk(e,i);if(!r)return[];const s=this._createAnimations(r,i);return i.$shared&&rk(e.options.$animations,i).then(()=>{e.options=i},()=>{}),s}_createAnimations(e,n){const i=this._properties,r=[],s=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){r.push(...this._animateOptions(e,n));continue}const c=n[u];let h=s[u];const d=i.get(u);if(h)if(d&&h.active()){h.update(d,c,a);continue}else h.cancel();if(!d||!d.duration){e[u]=c;continue}s[u]=h=new ik(d,e,u,c),r.push(h)}return r}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const i=this._createAnimations(e,n);if(i.length)return Tt.add(this._chart,i),!0}}function rk(t,e){const n=[],i=Object.keys(e);for(let r=0;r<i.length;r++){const s=t[i[r]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function sk(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function jd(t,e){const n=t&&t.options||{},i=n.reverse,r=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:i?s:r,end:i?r:s}}function ok(t,e,n){if(n===!1)return!1;const i=jd(t,n),r=jd(e,n);return{top:r.end,right:i.end,bottom:r.start,left:i.start}}function ak(t){let e,n,i,r;return U(t)?(e=t.top,n=t.right,i=t.bottom,r=t.left):e=n=i=r=t,{top:e,right:n,bottom:i,left:r,disabled:t===!1}}function Mm(t,e){const n=[],i=t._getSortedDatasetMetas(e);let r,s;for(r=0,s=i.length;r<s;++r)n.push(i[r].index);return n}function Nd(t,e,n,i={}){const r=t.keys,s=i.mode==="single";let o,a,l,u;if(e!==null){for(o=0,a=r.length;o<a;++o){if(l=+r[o],l===n){if(i.all)continue;break}u=t.values[l],ve(u)&&(s||e===0||Ii(e)===Ii(u))&&(e+=u)}return e}}function lk(t,e){const{iScale:n,vScale:i}=e,r=n.axis==="x"?"x":"y",s=i.axis==="x"?"x":"y",o=Object.keys(t),a=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[r]:c,[s]:t[c]};return a}function zd(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function uk(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function ck(t){const{min:e,max:n,minDefined:i,maxDefined:r}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:r?n:Number.POSITIVE_INFINITY}}function hk(t,e,n){const i=t[e]||(t[e]={});return i[n]||(i[n]={})}function Fd(t,e,n,i){for(const r of e.getMatchingVisibleMetas(i).reverse()){const s=t[r.index];if(n&&s>0||!n&&s<0)return r.index}return null}function $d(t,e){const{chart:n,_cachedMeta:i}=t,r=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=i,l=s.axis,u=o.axis,c=uk(s,o,i),h=e.length;let d;for(let f=0;f<h;++f){const m=e[f],{[l]:y,[u]:v}=m,p=m._stacks||(m._stacks={});d=p[u]=hk(r,c,y),d[a]=v,d._top=Fd(d,o,!0,i.type),d._bottom=Fd(d,o,!1,i.type);const g=d._visualValues||(d._visualValues={});g[a]=v}}function Za(t,e){const n=t.scales;return Object.keys(n).filter(i=>n[i].axis===e).shift()}function dk(t,e){return xn(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function fk(t,e,n){return xn(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Ji(t,e){const n=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const r of e){const s=r._stacks;if(!s||s[i]===void 0||s[i][n]===void 0)return;delete s[i][n],s[i]._visualValues!==void 0&&s[i]._visualValues[n]!==void 0&&delete s[i]._visualValues[n]}}}const el=t=>t==="reset"||t==="none",Ud=(t,e)=>e?t:Object.assign({},t),pk=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Mm(n,!0),values:null};class Mr{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=zd(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Ji(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,i=this.getDataset(),r=(h,d,f,m)=>h==="x"?d:h==="r"?m:f,s=n.xAxisID=W(i.xAxisID,Za(e,"x")),o=n.yAxisID=W(i.yAxisID,Za(e,"y")),a=n.rAxisID=W(i.rAxisID,Za(e,"r")),l=n.indexAxis,u=n.iAxisID=r(l,s,o,a),c=n.vAxisID=r(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&kd(this._data,this),e._stacked&&Ji(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),i=this._data;if(U(n)){const r=this._cachedMeta;this._data=lk(n,r)}else if(i!==n){if(i){kd(i,this);const r=this._cachedMeta;Ji(r),r._parsed=[]}n&&Object.isExtensible(n)&&Wx(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,i=this.getDataset();let r=!1;this._dataCheck();const s=n._stacked;n._stacked=zd(n.vScale,n),n.stack!==i.stack&&(r=!0,Ji(n),n.stack=i.stack),this._resyncElements(e),(r||s!==n._stacked)&&$d(this,n._parsed)}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:i,_data:r}=this,{iScale:s,_stacked:o}=i,a=s.axis;let l=e===0&&n===r.length?!0:i._sorted,u=e>0&&i._parsed[e-1],c,h,d;if(this._parsing===!1)i._parsed=r,i._sorted=!0,d=r;else{oe(r[e])?d=this.parseArrayData(i,r,e,n):U(r[e])?d=this.parseObjectData(i,r,e,n):d=this.parsePrimitiveData(i,r,e,n);const f=()=>h[a]===null||u&&h[a]<u[a];for(c=0;c<n;++c)i._parsed[c+e]=h=d[c],l&&(f()&&(l=!1),u=h);i._sorted=l}o&&$d(this,d)}parsePrimitiveData(e,n,i,r){const{iScale:s,vScale:o}=e,a=s.axis,l=o.axis,u=s.getLabels(),c=s===o,h=new Array(r);let d,f,m;for(d=0,f=r;d<f;++d)m=d+i,h[d]={[a]:c||s.parse(u[m],m),[l]:o.parse(n[m],m)};return h}parseArrayData(e,n,i,r){const{xScale:s,yScale:o}=e,a=new Array(r);let l,u,c,h;for(l=0,u=r;l<u;++l)c=l+i,h=n[c],a[l]={x:s.parse(h[0],c),y:o.parse(h[1],c)};return a}parseObjectData(e,n,i,r){const{xScale:s,yScale:o}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(r);let c,h,d,f;for(c=0,h=r;c<h;++c)d=c+i,f=n[d],u[c]={x:s.parse(No(f,a),d),y:o.parse(No(f,l),d)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,i){const r=this.chart,s=this._cachedMeta,o=n[e.axis],a={keys:Mm(r,!0),values:n._stacks[e.axis]._visualValues};return Nd(a,o,s.index,{mode:i})}updateRangeFromParsed(e,n,i,r){const s=i[n.axis];let o=s===null?NaN:s;const a=r&&i._stacks[n.axis];r&&a&&(r.values=a,o=Nd(r,s,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const i=this._cachedMeta,r=i._parsed,s=i._sorted&&e===i.iScale,o=r.length,a=this._getOtherScale(e),l=pk(n,i,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=ck(a);let d,f;function m(){f=r[d];const y=f[a.axis];return!ve(f[e.axis])||c>y||h<y}for(d=0;d<o&&!(!m()&&(this.updateRangeFromParsed(u,e,f,l),s));++d);if(s){for(d=o-1;d>=0;--d)if(!m()){this.updateRangeFromParsed(u,e,f,l);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,i=[];let r,s,o;for(r=0,s=n.length;r<s;++r)o=n[r][e.axis],ve(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,i=n.iScale,r=n.vScale,s=this.getParsed(e);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:r?""+r.getLabelForValue(s[r.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=ak(W(this.options.clip,ok(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,i=this._cachedMeta,r=i.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||r.length-a,u=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(e,s,a,l),c=a;c<a+l;++c){const h=r[c];h.hidden||(h.active&&u?o.push(h):h.draw(e,s))}for(c=0;c<o.length;++c)o[c].draw(e,s)}getStyle(e,n){const i=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,n,i){const r=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];s=o.$context||(o.$context=fk(this.getContext(),e,o)),s.parsed=this.getParsed(e),s.raw=r.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=dk(this.chart.getContext(),this.index)),s.dataset=r,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=i,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",i){const r=n==="active",s=this._cachedDataOpts,o=e+"-"+n,a=s[o],l=this.enableOptionSharing&&zo(i);if(a)return Ud(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,e),h=r?[`${e}Hover`,"hover",e,""]:[e,""],d=u.getOptionScopes(this.getDataset(),c),f=Object.keys(ue.elements[e]),m=()=>this.getContext(i,r,n),y=u.resolveNamedOptions(d,f,m,h);return y.$shared&&(y.$shared=l,s[o]=Object.freeze(Ud(y,l))),y}_resolveAnimations(e,n,i){const r=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(r.options.animation!==!1){const c=this.chart.config,h=c.datasetAnimationScopeKeys(this._type,n),d=c.getOptionScopes(this.getDataset(),h);l=c.createResolver(d,this.getContext(e,i,n))}const u=new Om(r,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||el(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const i=this.resolveDataElementOptions(e,n),r=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(n,s)||s!==r;return this.updateSharedOptions(s,n,i),{sharedOptions:s,includeOptions:o}}updateElement(e,n,i,r){el(r)?Object.assign(e,i):this._resolveAnimations(n,r).update(e,i)}updateSharedOptions(e,n,i){e&&!el(n)&&this._resolveAnimations(void 0,n).update(e,i)}_setStyle(e,n,i,r){e.active=r;const s=this.getStyle(n,r);this._resolveAnimations(n,i,r).update(e,{options:!r&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,n,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,i=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const r=i.length,s=n.length,o=Math.min(s,r);o&&this.parse(0,o),s>r?this._insertElements(r,s-r,e):s<r&&this._removeElements(s,r-s)}_insertElements(e,n,i=!0){const r=this._cachedMeta,s=r.data,o=e+n;let a;const l=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(s),a=e;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(r._parsed),this.parse(e,n),i&&this.updateElements(s,e,n,"reset")}updateElements(e,n,i,r){}_removeElements(e,n){const i=this._cachedMeta;if(this._parsing){const r=i._parsed.splice(e,n);i._stacked&&Ji(i,r)}i.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,i,r]=e;this[n](i,r)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}I(Mr,"defaults",{}),I(Mr,"datasetElementType",null),I(Mr,"dataElementType",null);class so extends Mr{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:i,data:r=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=Gx(n,r,o);this._drawStart=a,this._drawCount=l,qx(n)&&(a=0,l=r.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=r;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:u},e),this.updateElements(r,a,l,e)}updateElements(e,n,i,r){const s=r==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(n,r),d=o.axis,f=a.axis,{spanGaps:m,segment:y}=this.options,v=Zr(m)?m:Number.POSITIVE_INFINITY,p=this.chart._animationsDisabled||s||r==="none",g=n+i,_=e.length;let w=n>0&&this.getParsed(n-1);for(let x=0;x<_;++x){const b=e[x],k=p?b:{};if(x<n||x>=g){k.skip=!0;continue}const S=this.getParsed(x),M=J(S[f]),O=k[d]=o.getPixelForValue(S[d],x),D=k[f]=s||M?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,S,l):S[f],x);k.skip=isNaN(O)||isNaN(D)||M,k.stop=x>0&&Math.abs(S[d]-w[d])>v,y&&(k.parsed=S,k.raw=u.data[x]),h&&(k.options=c||this.resolveDataElementOptions(x,b.active?"active":r)),p||this.updateElement(b,x,k,r),w=S}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,i=n.options&&n.options.borderWidth||0,r=e.data||[];if(!r.length)return i;const s=r[0].size(this.resolveDataElementOptions(0)),o=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(i,s,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}I(so,"id","line"),I(so,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),I(so,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});function En(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ic{constructor(e){I(this,"options");this.options=e||{}}static override(e){Object.assign(Ic.prototype,e)}init(){}formats(){return En()}parse(){return En()}format(){return En()}add(){return En()}diff(){return En()}startOf(){return En()}endOf(){return En()}}var gk={_date:Ic};function mk(t,e,n,i){const{controller:r,data:s,_sorted:o}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&e!=="r"&&o&&s.length){const l=a._reversePixels?Vx:Nn;if(i){if(r._sharedOptions){const u=s[0],c=typeof u.getRange=="function"&&u.getRange(e);if(c){const h=l(s,e,n-c),d=l(s,e,n+c);return{lo:h.lo,hi:d.hi}}}}else return l(s,e,n)}return{lo:0,hi:s.length-1}}function cs(t,e,n,i,r){const s=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=s.length;a<l;++a){const{index:u,data:c}=s[a],{lo:h,hi:d}=mk(s[a],e,o,r);for(let f=h;f<=d;++f){const m=c[f];m.skip||i(m,u,f)}}}function yk(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(i,r){const s=e?Math.abs(i.x-r.x):0,o=n?Math.abs(i.y-r.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function tl(t,e,n,i,r){const s=[];return!r&&!t.isPointInArea(e)||cs(t,n,e,function(a,l,u){!r&&!Dt(a,t.chartArea,0)||a.inRange(e.x,e.y,i)&&s.push({element:a,datasetIndex:l,index:u})},!0),s}function vk(t,e,n,i){let r=[];function s(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],i),{angle:h}=Fx(o,{x:e.x,y:e.y});pm(h,u,c)&&r.push({element:o,datasetIndex:a,index:l})}return cs(t,n,e,s),r}function _k(t,e,n,i,r,s){let o=[];const a=yk(n);let l=Number.POSITIVE_INFINITY;function u(c,h,d){const f=c.inRange(e.x,e.y,r);if(i&&!f)return;const m=c.getCenterPoint(r);if(!(!!s||t.isPointInArea(m))&&!f)return;const v=a(e,m);v<l?(o=[{element:c,datasetIndex:h,index:d}],l=v):v===l&&o.push({element:c,datasetIndex:h,index:d})}return cs(t,n,e,u),o}function nl(t,e,n,i,r,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!i?vk(t,e,n,r):_k(t,e,n,i,r,s)}function Bd(t,e,n,i,r){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return cs(t,n,e,(l,u,c)=>{l[o](e[n],r)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(e.x,e.y,r))}),i&&!a?[]:s}var wk={evaluateInteractionItems:cs,modes:{index(t,e,n,i){const r=Ln(e,t),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?tl(t,r,s,i,o):nl(t,r,s,!1,i,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,h=u.data[c];h&&!h.skip&&l.push({element:h,datasetIndex:u.index,index:c})}),l):[]},dataset(t,e,n,i){const r=Ln(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?tl(t,r,s,i,o):nl(t,r,s,!1,i,o);if(a.length>0){const l=a[0].datasetIndex,u=t.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(t,e,n,i){const r=Ln(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return tl(t,r,s,i,o)},nearest(t,e,n,i){const r=Ln(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return nl(t,r,s,n.intersect,i,o)},x(t,e,n,i){const r=Ln(e,t);return Bd(t,r,"x",n.intersect,i)},y(t,e,n,i){const r=Ln(e,t);return Bd(t,r,"y",n.intersect,i)}}};const Lm=["left","top","right","bottom"];function Zi(t,e){return t.filter(n=>n.pos===e)}function Vd(t,e){return t.filter(n=>Lm.indexOf(n.pos)===-1&&n.box.axis===e)}function er(t,e){return t.sort((n,i)=>{const r=e?i:n,s=e?n:i;return r.weight===s.weight?r.index-s.index:r.weight-s.weight})}function xk(t){const e=[];let n,i,r,s,o,a;for(n=0,i=(t||[]).length;n<i;++n)r=t[n],{position:s,options:{stack:o,stackWeight:a=1}}=r,e.push({index:n,box:r,pos:s,horizontal:r.isHorizontal(),weight:r.weight,stack:o&&s+o,stackWeight:a});return e}function kk(t){const e={};for(const n of t){const{stack:i,pos:r,stackWeight:s}=n;if(!i||!Lm.includes(r))continue;const o=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}function bk(t,e){const n=kk(t),{vBoxMaxWidth:i,hBoxMaxHeight:r}=e;let s,o,a;for(s=0,o=t.length;s<o;++s){a=t[s];const{fullSize:l}=a.box,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*i:l&&e.availableWidth,a.height=r):(a.width=i,a.height=c?c*r:l&&e.availableHeight)}return n}function Sk(t){const e=xk(t),n=er(e.filter(u=>u.box.fullSize),!0),i=er(Zi(e,"left"),!0),r=er(Zi(e,"right")),s=er(Zi(e,"top"),!0),o=er(Zi(e,"bottom")),a=Vd(e,"x"),l=Vd(e,"y");return{fullSize:n,leftAndTop:i.concat(s),rightAndBottom:r.concat(l).concat(o).concat(a),chartArea:Zi(e,"chartArea"),vertical:i.concat(r).concat(l),horizontal:s.concat(o).concat(a)}}function Hd(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function Rm(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ck(t,e,n,i){const{pos:r,box:s}=n,o=t.maxPadding;if(!U(r)){n.size&&(t[r]-=n.size);const h=i[n.stack]||{size:0,count:1};h.size=Math.max(h.size,n.horizontal?s.height:s.width),n.size=h.size/h.count,t[r]+=n.size}s.getPadding&&Rm(o,s.getPadding());const a=Math.max(0,e.outerWidth-Hd(o,t,"left","right")),l=Math.max(0,e.outerHeight-Hd(o,t,"top","bottom")),u=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function Ek(t){const e=t.maxPadding;function n(i){const r=Math.max(e[i]-t[i],0);return t[i]+=r,r}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function Pk(t,e){const n=e.maxPadding;function i(r){const s={left:0,top:0,right:0,bottom:0};return r.forEach(o=>{s[o]=Math.max(e[o],n[o])}),s}return i(t?["left","right"]:["top","bottom"])}function cr(t,e,n,i){const r=[];let s,o,a,l,u,c;for(s=0,o=t.length,u=0;s<o;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,Pk(a.horizontal,e));const{same:h,other:d}=Ck(e,n,a,i);u|=h&&r.length,c=c||d,l.fullSize||r.push(a)}return u&&cr(r,e,n,i)||c}function Fs(t,e,n,i,r){t.top=n,t.left=e,t.right=e+i,t.bottom=n+r,t.width=i,t.height=r}function Wd(t,e,n,i){const r=n.padding;let{x:s,y:o}=e;for(const a of t){const l=a.box,u=i[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const h=e.w*c,d=u.size||l.height;zo(u.start)&&(o=u.start),l.fullSize?Fs(l,r.left,o,n.outerWidth-r.right-r.left,d):Fs(l,e.left+u.placed,o,h,d),u.start=o,u.placed+=h,o=l.bottom}else{const h=e.h*c,d=u.size||l.width;zo(u.start)&&(s=u.start),l.fullSize?Fs(l,s,r.top,d,n.outerHeight-r.bottom-r.top):Fs(l,s,e.top+u.placed,d,h),u.start=s,u.placed+=h,s=l.right}}e.x=s,e.y=o}var rn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,i){if(!t)return;const r=qe(t.options.layout.padding),s=Math.max(e-r.width,0),o=Math.max(n-r.height,0),a=Sk(t.boxes),l=a.vertical,u=a.horizontal;V(t.boxes,y=>{typeof y.beforeLayout=="function"&&y.beforeLayout()});const c=l.reduce((y,v)=>v.box.options&&v.box.options.display===!1?y:y+1,0)||1,h=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/c,hBoxMaxHeight:o/2}),d=Object.assign({},r);Rm(d,qe(i));const f=Object.assign({maxPadding:d,w:s,h:o,x:r.left,y:r.top},r),m=bk(l.concat(u),h);cr(a.fullSize,f,h,m),cr(l,f,h,m),cr(u,f,h,m)&&cr(l,f,h,m),Ek(f),Wd(a.leftAndTop,f,h,m),f.x+=f.w,f.y+=f.h,Wd(a.rightAndBottom,f,h,m),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},V(a.chartArea,y=>{const v=y.box;Object.assign(v,t.chartArea),v.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Im{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,i){}removeEventListener(e,n,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,i,r){return n=Math.max(0,n||e.width),i=i||e.height,{width:n,height:Math.max(0,r?Math.floor(n/r):i)}}isAttached(e){return!0}updateConfig(e){}}class Tk extends Im{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const oo="$chartjs",Ok={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Kd=t=>t===null||t==="";function Mk(t,e){const n=t.style,i=t.getAttribute("height"),r=t.getAttribute("width");if(t[oo]={initial:{height:i,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Kd(r)){const s=Ld(t,"width");s!==void 0&&(t.width=s)}if(Kd(i))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Ld(t,"height");s!==void 0&&(t.height=s)}return t}const Am=$1?{passive:!0}:!1;function Lk(t,e,n){t&&t.addEventListener(e,n,Am)}function Rk(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Am)}function Ik(t,e){const n=Ok[t.type]||t.type,{x:i,y:r}=Ln(t,e);return{type:n,chart:e,native:t,x:i!==void 0?i:null,y:r!==void 0?r:null}}function Bo(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function Ak(t,e,n){const i=t.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||Bo(a.addedNodes,i),o=o&&!Bo(a.removedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}function Dk(t,e,n){const i=t.canvas,r=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||Bo(a.removedNodes,i),o=o&&!Bo(a.addedNodes,i);o&&n()});return r.observe(document,{childList:!0,subtree:!0}),r}const ts=new Map;let Yd=0;function Dm(){const t=window.devicePixelRatio;t!==Yd&&(Yd=t,ts.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function jk(t,e){ts.size||window.addEventListener("resize",Dm),ts.set(t,e)}function Nk(t){ts.delete(t),ts.size||window.removeEventListener("resize",Dm)}function zk(t,e,n){const i=t.canvas,r=i&&Rc(i);if(!r)return;const s=ym((a,l)=>{const u=r.clientWidth;n(a,l),u<r.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(r),jk(t,s),o}function il(t,e,n){n&&n.disconnect(),e==="resize"&&Nk(t)}function Fk(t,e,n){const i=t.canvas,r=ym(s=>{t.ctx!==null&&n(Ik(s,t))},t);return Lk(i,e,r),r}class $k extends Im{acquireContext(e,n){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(Mk(e,n),i):null}releaseContext(e){const n=e.canvas;if(!n[oo])return!1;const i=n[oo].initial;["height","width"].forEach(s=>{const o=i[s];J(o)?n.removeAttribute(s):n.setAttribute(s,o)});const r=i.style||{};return Object.keys(r).forEach(s=>{n.style[s]=r[s]}),n.width=n.width,delete n[oo],!0}addEventListener(e,n,i){this.removeEventListener(e,n);const r=e.$proxies||(e.$proxies={}),o={attach:Ak,detach:Dk,resize:zk}[n]||Fk;r[n]=o(e,n,i)}removeEventListener(e,n){const i=e.$proxies||(e.$proxies={}),r=i[n];if(!r)return;({attach:il,detach:il,resize:il}[n]||Rk)(e,n,r),i[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,i,r){return F1(e,n,i,r)}isAttached(e){const n=e&&Rc(e);return!!(n&&n.isConnected)}}function Uk(t){return!Lc()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?Tk:$k}class yn{constructor(){I(this,"x");I(this,"y");I(this,"active",!1);I(this,"options");I(this,"$animations")}tooltipPosition(e){const{x:n,y:i}=this.getProps(["x","y"],e);return{x:n,y:i}}hasValue(){return Zr(this.x)&&Zr(this.y)}getProps(e,n){const i=this.$animations;if(!n||!i)return this;const r={};return e.forEach(s=>{r[s]=i[s]&&i[s].active()?i[s]._to:this[s]}),r}}I(yn,"defaults",{}),I(yn,"defaultRoutes");function Bk(t,e){const n=t.options.ticks,i=Vk(t),r=Math.min(n.maxTicksLimit||i,i),s=n.major.enabled?Wk(e):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>r)return Kk(e,u,s,o/r),u;const c=Hk(s,e,r);if(o>0){let h,d;const f=o>1?Math.round((l-a)/(o-1)):null;for($s(e,u,c,J(f)?0:a-f,a),h=0,d=o-1;h<d;h++)$s(e,u,c,s[h],s[h+1]);return $s(e,u,c,l,J(f)?e.length:l+f),u}return $s(e,u,c),u}function Vk(t){const e=t.options.offset,n=t._tickSize(),i=t._length/n+(e?0:1),r=t._maxLength/n;return Math.floor(Math.min(i,r))}function Hk(t,e,n){const i=Yk(t),r=e.length/n;if(!i)return Math.max(r,1);const s=Nx(i);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>r)return l}return Math.max(r,1)}function Wk(t){const e=[];let n,i;for(n=0,i=t.length;n<i;n++)t[n].major&&e.push(n);return e}function Kk(t,e,n,i){let r=0,s=n[0],o;for(i=Math.ceil(i),o=0;o<t.length;o++)o===s&&(e.push(t[o]),r++,s=n[r*i])}function $s(t,e,n,i,r){const s=W(i,0),o=Math.min(W(r,t.length),t.length);let a=0,l,u,c;for(n=Math.ceil(n),r&&(l=r-i,n=l/Math.floor(l/n)),c=s;c<0;)a++,c=Math.round(s+a*n);for(u=Math.max(s,0);u<o;u++)u===c&&(e.push(t[u]),a++,c=Math.round(s+a*n))}function Yk(t){const e=t.length;let n,i;if(e<2)return!1;for(i=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==i)return!1;return i}const Gk=t=>t==="left"?"right":t==="right"?"left":t,Gd=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,qd=(t,e)=>Math.min(e||t,t);function Qd(t,e){const n=[],i=t.length/e,r=t.length;let s=0;for(;s<r;s+=i)n.push(t[Math.floor(s)]);return n}function qk(t,e,n){const i=t.ticks.length,r=Math.min(e,i-1),s=t._startPixel,o=t._endPixel,a=1e-6;let l=t.getPixelForTick(r),u;if(!(n&&(i===1?u=Math.max(l-s,o-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(r-1))/2,l+=r<e?u:-u,l<s-a||l>o+a)))return l}function Qk(t,e){V(t,n=>{const i=n.gc,r=i.length/2;let s;if(r>e){for(s=0;s<r;++s)delete n.data[i[s]];i.splice(0,r)}})}function tr(t){return t.drawTicks?t.tickLength:0}function Xd(t,e){if(!t.display)return 0;const n=Le(t.font,e),i=qe(t.padding);return(oe(t.text)?t.text.length:1)*n.lineHeight+i.height}function Xk(t,e){return xn(t,{scale:e,type:"scale"})}function Jk(t,e,n){return xn(t,{tick:n,index:e,type:"tick"})}function Zk(t,e,n){let i=vm(t);return(n&&e!=="right"||!n&&e==="right")&&(i=Gk(i)),i}function eb(t,e,n,i){const{top:r,left:s,bottom:o,right:a,chart:l}=t,{chartArea:u,scales:c}=l;let h=0,d,f,m;const y=o-r,v=a-s;if(t.isHorizontal()){if(f=Er(i,s,a),U(n)){const p=Object.keys(n)[0],g=n[p];m=c[p].getPixelForValue(g)+y-e}else n==="center"?m=(u.bottom+u.top)/2+y-e:m=Gd(t,n,e);d=a-s}else{if(U(n)){const p=Object.keys(n)[0],g=n[p];f=c[p].getPixelForValue(g)-v+e}else n==="center"?f=(u.left+u.right)/2-v+e:f=Gd(t,n,e);m=Er(i,o,r),h=n==="left"?-Ke:Ke}return{titleX:f,titleY:m,maxWidth:d,rotation:h}}class Xn extends yn{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:i,_suggestedMax:r}=this;return e=Ve(e,Number.POSITIVE_INFINITY),n=Ve(n,Number.NEGATIVE_INFINITY),i=Ve(i,Number.POSITIVE_INFINITY),r=Ve(r,Number.NEGATIVE_INFINITY),{min:Ve(e,i),max:Ve(n,r),minDefined:ve(e),maxDefined:ve(n)}}getMinMax(e){let{min:n,max:i,minDefined:r,maxDefined:s}=this.getUserBounds(),o;if(r&&s)return{min:n,max:i};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,e),r||(n=Math.min(n,o.min)),s||(i=Math.max(i,o.max));return n=s&&n>i?i:n,i=r&&n>i?n:i,{min:Ve(n,Ve(i,n)),max:Ve(i,Ve(n,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){re(this.options.beforeUpdate,[this])}update(e,n,i){const{beginAtZero:r,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=y1(this,s,r),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?Qd(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=Bk(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,i;this.isHorizontal()?(n=this.left,i=this.right):(n=this.top,i=this.bottom,e=!e),this._startPixel=n,this._endPixel=i,this._reversePixels=e,this._length=i-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){re(this.options.afterUpdate,[this])}beforeSetDimensions(){re(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){re(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),re(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){re(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let i,r,s;for(i=0,r=e.length;i<r;i++)s=e[i],s.label=re(n.callback,[s.value,i,e],this)}afterTickToLabelConversion(){re(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){re(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,i=qd(this.ticks.length,e.ticks.maxTicksLimit),r=n.minRotation||0,s=n.maxRotation;let o=r,a,l,u;if(!this._isVisible()||!n.display||r>=s||i<=1||!this.isHorizontal()){this.labelRotation=r;return}const c=this._getLabelSizes(),h=c.widest.width,d=c.highest.height,f=it(this.chart.width-h,0,this.maxWidth);a=e.offset?this.maxWidth/i:f/(i-1),h+6>a&&(a=f/(i-(e.offset?.5:1)),l=this.maxHeight-tr(e.grid)-n.padding-Xd(e.title,this.chart.options.font),u=Math.sqrt(h*h+d*d),o=Sc(Math.min(Math.asin(it((c.highest.height+6)/a,-1,1)),Math.asin(it(l/u,-1,1))-Math.asin(it(d/u,-1,1)))),o=Math.max(r,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){re(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){re(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:i,title:r,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=Xd(r,n.options.font);if(a?(e.width=this.maxWidth,e.height=tr(s)+l):(e.height=this.maxHeight,e.width=tr(s)+l),i.display&&this.ticks.length){const{first:u,last:c,widest:h,highest:d}=this._getLabelSizes(),f=i.padding*2,m=nn(this.labelRotation),y=Math.cos(m),v=Math.sin(m);if(a){const p=i.mirror?0:v*h.width+y*d.height;e.height=Math.min(this.maxHeight,e.height+p+f)}else{const p=i.mirror?0:y*h.width+v*d.height;e.width=Math.min(this.maxWidth,e.width+p+f)}this._calculatePadding(u,c,v,y)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,i,r){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,f=0;l?u?(d=r*e.width,f=i*n.height):(d=i*e.height,f=r*n.width):s==="start"?f=n.width:s==="end"?d=e.width:s!=="inner"&&(d=e.width/2,f=n.width/2),this.paddingLeft=Math.max((d-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((f-h+o)*this.width/(this.width-h),0)}else{let c=n.height/2,h=e.height/2;s==="start"?(c=0,h=e.height):s==="end"&&(c=n.height,h=0),this.paddingTop=c+o,this.paddingBottom=h+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){re(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,i;for(n=0,i=e.length;n<i;n++)J(e[n].label)&&(e.splice(n,1),i--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let i=this.ticks;n<i.length&&(i=Qd(i,n)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,i){const{ctx:r,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/qd(n,i));let u=0,c=0,h,d,f,m,y,v,p,g,_,w,x;for(h=0;h<n;h+=l){if(m=e[h].label,y=this._resolveTickFontOptions(h),r.font=v=y.string,p=s[v]=s[v]||{data:{},gc:[]},g=y.lineHeight,_=w=0,!J(m)&&!oe(m))_=$o(r,p.data,p.gc,_,m),w=g;else if(oe(m))for(d=0,f=m.length;d<f;++d)x=m[d],!J(x)&&!oe(x)&&(_=$o(r,p.data,p.gc,_,x),w+=g);o.push(_),a.push(w),u=Math.max(_,u),c=Math.max(w,c)}Qk(s,n);const b=o.indexOf(u),k=a.indexOf(c),S=M=>({width:o[M]||0,height:a[M]||0});return{first:S(0),last:S(n-1),widest:S(b),highest:S(k),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return Ux(this._alignToPixels?Cn(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const i=n[e];return i.$context||(i.$context=Jk(this.getContext(),e,i))}return this.$context||(this.$context=Xk(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=nn(this.labelRotation),i=Math.abs(Math.cos(n)),r=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=e.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*i>a*r?a/i:l/r:l*r<a*i?l/i:a/r}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,i=this.chart,r=this.options,{grid:s,position:o,border:a}=r,l=s.offset,u=this.isHorizontal(),h=this.ticks.length+(l?1:0),d=tr(s),f=[],m=a.setContext(this.getContext()),y=m.display?m.width:0,v=y/2,p=function(K){return Cn(i,K,y)};let g,_,w,x,b,k,S,M,O,D,B,ce;if(o==="top")g=p(this.bottom),k=this.bottom-d,M=g-v,D=p(e.top)+v,ce=e.bottom;else if(o==="bottom")g=p(this.top),D=e.top,ce=p(e.bottom)-v,k=g+v,M=this.top+d;else if(o==="left")g=p(this.right),b=this.right-d,S=g-v,O=p(e.left)+v,B=e.right;else if(o==="right")g=p(this.left),O=e.left,B=p(e.right)-v,b=g+v,S=this.left+d;else if(n==="x"){if(o==="center")g=p((e.top+e.bottom)/2+.5);else if(U(o)){const K=Object.keys(o)[0],me=o[K];g=p(this.chart.scales[K].getPixelForValue(me))}D=e.top,ce=e.bottom,k=g+v,M=k+d}else if(n==="y"){if(o==="center")g=p((e.left+e.right)/2);else if(U(o)){const K=Object.keys(o)[0],me=o[K];g=p(this.chart.scales[K].getPixelForValue(me))}b=g-v,S=b-d,O=e.left,B=e.right}const ae=W(r.ticks.maxTicksLimit,h),$=Math.max(1,Math.ceil(h/ae));for(_=0;_<h;_+=$){const K=this.getContext(_),me=s.setContext(K),P=a.setContext(K),R=me.lineWidth,A=me.color,Y=P.dash||[],Q=P.dashOffset,vt=me.tickWidth,Te=me.tickColor,Et=me.tickBorderDash||[],Oe=me.tickBorderDashOffset;w=qk(this,_,l),w!==void 0&&(x=Cn(i,w,R),u?b=S=O=B=x:k=M=D=ce=x,f.push({tx1:b,ty1:k,tx2:S,ty2:M,x1:O,y1:D,x2:B,y2:ce,width:R,color:A,borderDash:Y,borderDashOffset:Q,tickWidth:vt,tickColor:Te,tickBorderDash:Et,tickBorderDashOffset:Oe}))}return this._ticksLength=h,this._borderValue=g,f}_computeLabelItems(e){const n=this.axis,i=this.options,{position:r,ticks:s}=i,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:h}=s,d=tr(i.grid),f=d+c,m=h?-c:f,y=-nn(this.labelRotation),v=[];let p,g,_,w,x,b,k,S,M,O,D,B,ce="middle";if(r==="top")b=this.bottom-m,k=this._getXAxisLabelAlignment();else if(r==="bottom")b=this.top+m,k=this._getXAxisLabelAlignment();else if(r==="left"){const $=this._getYAxisLabelAlignment(d);k=$.textAlign,x=$.x}else if(r==="right"){const $=this._getYAxisLabelAlignment(d);k=$.textAlign,x=$.x}else if(n==="x"){if(r==="center")b=(e.top+e.bottom)/2+f;else if(U(r)){const $=Object.keys(r)[0],K=r[$];b=this.chart.scales[$].getPixelForValue(K)+f}k=this._getXAxisLabelAlignment()}else if(n==="y"){if(r==="center")x=(e.left+e.right)/2-f;else if(U(r)){const $=Object.keys(r)[0],K=r[$];x=this.chart.scales[$].getPixelForValue(K)}k=this._getYAxisLabelAlignment(d).textAlign}n==="y"&&(l==="start"?ce="top":l==="end"&&(ce="bottom"));const ae=this._getLabelSizes();for(p=0,g=a.length;p<g;++p){_=a[p],w=_.label;const $=s.setContext(this.getContext(p));S=this.getPixelForTick(p)+s.labelOffset,M=this._resolveTickFontOptions(p),O=M.lineHeight,D=oe(w)?w.length:1;const K=D/2,me=$.color,P=$.textStrokeColor,R=$.textStrokeWidth;let A=k;o?(x=S,k==="inner"&&(p===g-1?A=this.options.reverse?"left":"right":p===0?A=this.options.reverse?"right":"left":A="center"),r==="top"?u==="near"||y!==0?B=-D*O+O/2:u==="center"?B=-ae.highest.height/2-K*O+O:B=-ae.highest.height+O/2:u==="near"||y!==0?B=O/2:u==="center"?B=ae.highest.height/2-K*O:B=ae.highest.height-D*O,h&&(B*=-1),y!==0&&!$.showLabelBackdrop&&(x+=O/2*Math.sin(y))):(b=S,B=(1-D)*O/2);let Y;if($.showLabelBackdrop){const Q=qe($.backdropPadding),vt=ae.heights[p],Te=ae.widths[p];let Et=B-Q.top,Oe=0-Q.left;switch(ce){case"middle":Et-=vt/2;break;case"bottom":Et-=vt;break}switch(k){case"center":Oe-=Te/2;break;case"right":Oe-=Te;break;case"inner":p===g-1?Oe-=Te:p>0&&(Oe-=Te/2);break}Y={left:Oe,top:Et,width:Te+Q.width,height:vt+Q.height,color:$.backdropColor}}v.push({label:w,font:M,textOffset:B,options:{rotation:y,color:me,strokeColor:P,strokeWidth:R,textAlign:A,textBaseline:ce,translation:[x,b],backdrop:Y}})}return v}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-nn(this.labelRotation))return e==="top"?"left":"right";let r="center";return n.align==="start"?r="left":n.align==="end"?r="right":n.align==="inner"&&(r="inner"),r}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:i,mirror:r,padding:s}}=this.options,o=this._getLabelSizes(),a=e+s,l=o.widest.width;let u,c;return n==="left"?r?(c=this.right+s,i==="near"?u="left":i==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,i==="near"?u="right":i==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?r?(c=this.left+s,i==="near"?u="right":i==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,i==="near"?u="left":i==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:i,top:r,width:s,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(i,r,s,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const r=this.ticks.findIndex(s=>s.value===e);return r>=0?n.setContext(this.getContext(r)).lineWidth:0}drawGrid(e){const n=this.options.grid,i=this.ctx,r=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,o;const a=(l,u,c)=>{!c.width||!c.color||(i.save(),i.lineWidth=c.width,i.strokeStyle=c.color,i.setLineDash(c.borderDash||[]),i.lineDashOffset=c.borderDashOffset,i.beginPath(),i.moveTo(l.x,l.y),i.lineTo(u.x,u.y),i.stroke(),i.restore())};if(n.display)for(s=0,o=r.length;s<o;++s){const l=r[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:i,grid:r}}=this,s=i.setContext(this.getContext()),o=i.display?s.width:0;if(!o)return;const a=r.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,h,d;this.isHorizontal()?(u=Cn(e,this.left,o)-o/2,c=Cn(e,this.right,a)+a/2,h=d=l):(h=Cn(e,this.top,o)-o/2,d=Cn(e,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,h),n.lineTo(c,d),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,r=this._computeLabelArea();r&&wm(i,r);const s=this.getLabelItems(e);for(const o of s){const a=o.options,l=o.font,u=o.label,c=o.textOffset;es(i,u,0,c,l,a)}r&&xm(i)}drawTitle(){const{ctx:e,options:{position:n,title:i,reverse:r}}=this;if(!i.display)return;const s=Le(i.font),o=qe(i.padding),a=i.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||U(n)?(l+=o.bottom,oe(i.text)&&(l+=s.lineHeight*(i.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:h,rotation:d}=eb(this,l,n,a);es(e,i.text,0,0,s,{color:i.color,maxWidth:h,rotation:d,textAlign:Zk(a,n,r),textBaseline:"middle",translation:[u,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,i=W(e.grid&&e.grid.z,-1),r=W(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Xn.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:i,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:r,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",r=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[i]===this.id&&(!e||a.type===e)&&r.push(a)}return r}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return Le(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Us{constructor(e,n,i){this.type=e,this.scope=n,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let i;ib(n)&&(i=this.register(n));const r=this.items,s=e.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in r||(r[s]=e,tb(e,o,i),this.override&&ue.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,i=e.id,r=this.scope;i in n&&delete n[i],r&&i in ue[r]&&(delete ue[r][i],this.override&&delete Yn[i])}}function tb(t,e,n){const i=Jr(Object.create(null),[n?ue.get(n):{},ue.get(e),t.defaults]);ue.set(e,i),t.defaultRoutes&&nb(e,t.defaultRoutes),t.descriptors&&ue.describe(e,t.descriptors)}function nb(t,e){Object.keys(e).forEach(n=>{const i=n.split("."),r=i.pop(),s=[t].concat(i).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");ue.route(s,r,l,a)})}function ib(t){return"id"in t&&"defaults"in t}class rb{constructor(){this.controllers=new Us(Mr,"datasets",!0),this.elements=new Us(yn,"elements"),this.plugins=new Us(Object,"plugins"),this.scales=new Us(Xn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,i){[...n].forEach(r=>{const s=i||this._getRegistryForType(r);i||s.isForType(r)||s===this.plugins&&r.id?this._exec(e,s,r):V(r,o=>{const a=i||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,i){const r=bc(e);re(i["before"+r],[],i),n[e](i),re(i["after"+r],[],i)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const i=this._typedRegistries[n];if(i.isForType(e))return i}return this.plugins}_get(e,n,i){const r=n.get(e);if(r===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return r}}var kt=new rb;class sb{constructor(){this._init=[]}notify(e,n,i,r){n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));const s=r?this._descriptors(e).filter(r):this._descriptors(e),o=this._notify(s,e,n,i);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall")),o}_notify(e,n,i,r){r=r||{};for(const s of e){const o=s.plugin,a=o[i],l=[n,r,s.options];if(re(a,l,o)===!1&&r.cancelable)return!1}return!0}invalidate(){J(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const i=e&&e.config,r=W(i.options&&i.options.plugins,{}),s=ob(i);return r===!1&&!n?[]:lb(e,s,r,n)}_notifyStateChanges(e){const n=this._oldCache||[],i=this._cache,r=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(r(n,i),e,"stop"),this._notify(r(i,n),e,"start")}}function ob(t){const e={},n=[],i=Object.keys(kt.plugins.items);for(let s=0;s<i.length;s++)n.push(kt.getPlugin(i[s]));const r=t.plugins||[];for(let s=0;s<r.length;s++){const o=r[s];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function ab(t,e){return!e&&t===!1?null:t===!0?{}:t}function lb(t,{plugins:e,localIds:n},i,r){const s=[],o=t.getContext();for(const a of e){const l=a.id,u=ab(i[l],r);u!==null&&s.push({plugin:a,options:ub(t.config,{plugin:a,local:n[l]},u,o)})}return s}function ub(t,{plugin:e,local:n},i,r){const s=t.pluginScopeKeys(e),o=t.getOptionScopes(i,s);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function hu(t,e){const n=ue.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function cb(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function hb(t,e){return t===e?"_index_":"_value_"}function Jd(t){if(t==="x"||t==="y"||t==="r")return t}function db(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function du(t,...e){if(Jd(t))return t;for(const n of e){const i=n.axis||db(n.position)||t.length>1&&Jd(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Zd(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function fb(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(n.length)return Zd(t,"x",n[0])||Zd(t,"y",n[0])}return{}}function pb(t,e){const n=Yn[t.type]||{scales:{}},i=e.scales||{},r=hu(t.type,e),s=Object.create(null);return Object.keys(i).forEach(o=>{const a=i[o];if(!U(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=du(o,a,fb(o,t),ue.scales[a.type]),u=hb(l,r),c=n.scales||{};s[o]=Sr(Object.create(null),[{axis:l},a,c[l],c[u]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||hu(a,e),c=(Yn[a]||{}).scales||{};Object.keys(c).forEach(h=>{const d=cb(h,l),f=o[d+"AxisID"]||d;s[f]=s[f]||Object.create(null),Sr(s[f],[{axis:d},i[f],c[h]])})}),Object.keys(s).forEach(o=>{const a=s[o];Sr(a,[ue.scales[a.type],ue.scale])}),s}function jm(t){const e=t.options||(t.options={});e.plugins=W(e.plugins,{}),e.scales=pb(t,e)}function Nm(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function gb(t){return t=t||{},t.data=Nm(t.data),jm(t),t}const ef=new Map,zm=new Set;function Bs(t,e){let n=ef.get(t);return n||(n=e(),ef.set(t,n),zm.add(n)),n}const nr=(t,e,n)=>{const i=No(e,n);i!==void 0&&t.add(i)};class mb{constructor(e){this._config=gb(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Nm(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),jm(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Bs(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Bs(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Bs(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,i=this.type;return Bs(`${i}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const i=this._scopeCache;let r=i.get(e);return(!r||n)&&(r=new Map,i.set(e,r)),r}getOptionScopes(e,n,i){const{options:r,type:s}=this,o=this._cachedScopes(e,i),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{e&&(l.add(e),c.forEach(h=>nr(l,e,h))),c.forEach(h=>nr(l,r,h)),c.forEach(h=>nr(l,Yn[s]||{},h)),c.forEach(h=>nr(l,ue,h)),c.forEach(h=>nr(l,lu,h))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),zm.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,Yn[n]||{},ue.datasets[n]||{},{type:n},ue,lu]}resolveNamedOptions(e,n,i,r=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=tf(this._resolverCache,e,r);let l=o;if(vb(o,n)){s.$shared=!1,i=mn(i)?i():i;const u=this.createResolver(e,i,a);l=Ai(o,i,u)}for(const u of n)s[u]=l[u];return s}createResolver(e,n,i=[""],r){const{resolver:s}=tf(this._resolverCache,e,i);return U(n)?Ai(s,n,void 0,r):s}}function tf(t,e,n){let i=t.get(e);i||(i=new Map,t.set(e,i));const r=n.join();let s=i.get(r);return s||(s={resolver:Tc(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},i.set(r,s)),s}const yb=t=>U(t)&&Object.getOwnPropertyNames(t).some(e=>mn(t[e]));function vb(t,e){const{isScriptable:n,isIndexable:i}=bm(t);for(const r of e){const s=n(r),o=i(r),a=(o||s)&&t[r];if(s&&(mn(a)||yb(a))||o&&oe(a))return!0}return!1}var _b="4.4.3";const wb=["top","bottom","left","right","chartArea"];function nf(t,e){return t==="top"||t==="bottom"||wb.indexOf(t)===-1&&e==="x"}function rf(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}function sf(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),re(n&&n.onComplete,[t],e)}function xb(t){const e=t.chart,n=e.options.animation;re(n&&n.onProgress,[t],e)}function Fm(t){return Lc()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const ao={},of=t=>{const e=Fm(t);return Object.values(ao).filter(n=>n.canvas===e).pop()};function kb(t,e,n){const i=Object.keys(t);for(const r of i){const s=+r;if(s>=e){const o=t[r];delete t[r],(n>0||s>e)&&(t[s+n]=o)}}}function bb(t,e,n,i){return!n||t.type==="mouseout"?null:i?e:t}function Vs(t,e,n){return t.options.clip?t[n]:e[n]}function Sb(t,e){const{xScale:n,yScale:i}=t;return n&&i?{left:Vs(n,e,"left"),right:Vs(n,e,"right"),top:Vs(i,e,"top"),bottom:Vs(i,e,"bottom")}:e}var Vt;let pa=(Vt=class{static register(...e){kt.add(...e),af()}static unregister(...e){kt.remove(...e),af()}constructor(e,n){const i=this.config=new mb(n),r=Fm(e),s=of(r);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Uk(r)),this.platform.updateConfig(i);const a=this.platform.acquireContext(r,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=Tx(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new sb,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Yx(h=>this.update(h),o.resizeDelay||0),this._dataChanges=[],ao[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Tt.listen(this,"complete",sf),Tt.listen(this,"progress",xb),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:i,height:r,_aspectRatio:s}=this;return J(e)?n&&s?s:r?i/r:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return kt}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Md(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Pd(this.canvas,this.ctx),this}stop(){return Tt.stop(this),this}resize(e,n){Tt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const i=this.options,r=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(r,e,n,s),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Md(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),re(i.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};V(n,(i,r)=>{i.id=r})}buildOrUpdateScales(){const e=this.options,n=e.scales,i=this.scales,r=Object.keys(i).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=du(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),V(s,o=>{const a=o.options,l=a.id,u=du(l,a),c=W(a.type,o.dtype);(a.position===void 0||nf(a.position,u)!==nf(o.dposition))&&(a.position=o.dposition),r[l]=!0;let h=null;if(l in i&&i[l].type===c)h=i[l];else{const d=kt.getScale(c);h=new d({id:l,type:c,ctx:this.ctx,chart:this}),i[h.id]=h}h.init(a,e)}),V(r,(o,a)=>{o||delete i[a]}),V(i,o=>{rn.configure(this,o,o.options),rn.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,i=e.length;if(e.sort((r,s)=>r.index-s.index),i>n){for(let r=n;r<i;++r)this._destroyDatasetMeta(r);e.splice(n,i-n)}this._sortedMetasets=e.slice(0).sort(rf("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((i,r)=>{n.filter(s=>s===i._dataset).length===0&&this._destroyDatasetMeta(r)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let i,r;for(this._removeUnreferencedMetasets(),i=0,r=n.length;i<r;i++){const s=n[i];let o=this.getDatasetMeta(i);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(i),o=this.getDatasetMeta(i)),o.type=a,o.indexAxis=s.indexAxis||hu(a,this.options),o.order=s.order||0,o.index=i,o.label=""+s.label,o.visible=this.isDatasetVisible(i),o.controller)o.controller.updateIndex(i),o.controller.linkScales();else{const l=kt.getController(a),{datasetElementType:u,dataElementType:c}=ue.datasets[a];Object.assign(l,{dataElementType:kt.getElement(c),datasetElementType:u&&kt.getElement(u)}),o.controller=new l(this,i),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){V(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const i=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:h}=this.getDatasetMeta(u),d=!r&&s.indexOf(h)===-1;h.buildOrUpdateElements(d),o=Math.max(+h.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),r||V(s,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(rf("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){V(this.scales,e=>{rn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!vd(n,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:i,start:r,count:s}of n){const o=i==="_removeElements"?-s:s;kb(e,r,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,i=s=>new Set(e.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),r=i(0);for(let s=1;s<n;s++)if(!vd(r,i(s)))return;return Array.from(r).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;rn.update(this,this.width,this.height,e);const n=this.chartArea,i=n.width<=0||n.height<=0;this._layers=[],V(this.boxes,r=>{i&&r.position==="chartArea"||(r.configure&&r.configure(),this._layers.push(...r._layers()))},this),this._layers.forEach((r,s)=>{r._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,i=this.data.datasets.length;n<i;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,i=this.data.datasets.length;n<i;++n)this._updateDataset(n,mn(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const i=this.getDatasetMeta(e),r={meta:i,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",r)!==!1&&(i.controller._update(n),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Tt.has(this)?this.attached&&!Tt.running(this)&&Tt.start(this):(this.draw(),sf({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:r}=this._resizeBeforeDraw;this._resize(i,r),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,i=[];let r,s;for(r=0,s=n.length;r<s;++r){const o=n[r];(!e||o.visible)&&i.push(o)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,i=e._clip,r=!i.disabled,s=Sb(e,this.chartArea),o={meta:e,index:e.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",o)!==!1&&(r&&wm(n,{left:i.left===!1?0:s.left-i.left,right:i.right===!1?this.width:s.right+i.right,top:i.top===!1?0:s.top-i.top,bottom:i.bottom===!1?this.height:s.bottom+i.bottom}),e.controller.draw(),r&&xm(n),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(e){return Dt(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,i,r){const s=wk.modes[n];return typeof s=="function"?s(this,e,i,r):[]}getDatasetMeta(e){const n=this.data.datasets[e],i=this._metasets;let r=i.filter(s=>s&&s._dataset===n).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},i.push(r)),r}getContext(){return this.$context||(this.$context=xn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!n.hidden}setDatasetVisibility(e,n){const i=this.getDatasetMeta(e);i.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,i){const r=i?"show":"hide",s=this.getDatasetMeta(e),o=s.controller._resolveAnimations(void 0,r);zo(n)?(s.data[n].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),o.update(s,{visible:i}),this.update(a=>a.datasetIndex===e?r:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Tt.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Pd(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete ao[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,i=(s,o)=>{n.addEventListener(this,s,o),e[s]=o},r=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};V(this.options.events,s=>i(s,r))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,i=(l,u)=>{n.addEventListener(this,l,u),e[l]=u},r=(l,u)=>{e[l]&&(n.removeEventListener(this,l,u),delete e[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{r("attach",a),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,r("resize",s),this._stop(),this._resize(0,0),i("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){V(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},V(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,i){const r=i?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+r+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){o=e[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[r+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],i=e.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!Do(i,n)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,n))}notifyPlugins(e,n,i){return this._plugins.notify(this,e,n,i)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,i){const r=this.options.hover,s=(l,u)=>l.filter(c=>!u.some(h=>c.datasetIndex===h.datasetIndex&&c.index===h.index)),o=s(n,e),a=i?e:s(e,n);o.length&&this.updateHoverStyle(o,r.mode,!1),a.length&&r.mode&&this.updateHoverStyle(a,r.mode,!0)}_eventHandler(e,n){const i={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},r=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,r)===!1)return;const s=this._handleEvent(e,n,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,r),(s||i.changed)&&this.render(),this}_handleEvent(e,n,i){const{_active:r=[],options:s}=this,o=n,a=this._getActiveElements(e,r,i,o),l=Ax(e),u=bb(e,this._lastEvent,i,l);i&&(this._lastEvent=null,re(s.onHover,[e,a,this],this),l&&re(s.onClick,[e,a,this],this));const c=!Do(a,r);return(c||n)&&(this._active=a,this._updateHoverStyles(a,r,n)),this._lastEvent=u,c}_getActiveElements(e,n,i,r){if(e.type==="mouseout")return[];if(!i)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,r)}},I(Vt,"defaults",ue),I(Vt,"instances",ao),I(Vt,"overrides",Yn),I(Vt,"registry",kt),I(Vt,"version",_b),I(Vt,"getChart",of),Vt);function af(){return V(pa.instances,t=>t._plugins.invalidate())}function $m(t,e,n=e){t.lineCap=W(n.borderCapStyle,e.borderCapStyle),t.setLineDash(W(n.borderDash,e.borderDash)),t.lineDashOffset=W(n.borderDashOffset,e.borderDashOffset),t.lineJoin=W(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=W(n.borderWidth,e.borderWidth),t.strokeStyle=W(n.borderColor,e.borderColor)}function Cb(t,e,n){t.lineTo(n.x,n.y)}function Eb(t){return t.stepped?a1:t.tension||t.cubicInterpolationMode==="monotone"?l1:Cb}function Um(t,e,n={}){const i=t.length,{start:r=0,end:s=i-1}=n,{start:o,end:a}=e,l=Math.max(r,o),u=Math.min(s,a),c=r<o&&s<o||r>a&&s>a;return{count:i,start:l,loop:e.loop,ilen:u<l&&!c?i+u-l:u-l}}function Pb(t,e,n,i){const{points:r,options:s}=e,{count:o,start:a,loop:l,ilen:u}=Um(r,n,i),c=Eb(s);let{move:h=!0,reverse:d}=i||{},f,m,y;for(f=0;f<=u;++f)m=r[(a+(d?u-f:f))%o],!m.skip&&(h?(t.moveTo(m.x,m.y),h=!1):c(t,y,m,d,s.stepped),y=m);return l&&(m=r[(a+(d?u:0))%o],c(t,y,m,d,s.stepped)),!!l}function Tb(t,e,n,i){const r=e.points,{count:s,start:o,ilen:a}=Um(r,n,i),{move:l=!0,reverse:u}=i||{};let c=0,h=0,d,f,m,y,v,p;const g=w=>(o+(u?a-w:w))%s,_=()=>{y!==v&&(t.lineTo(c,v),t.lineTo(c,y),t.lineTo(c,p))};for(l&&(f=r[g(0)],t.moveTo(f.x,f.y)),d=0;d<=a;++d){if(f=r[g(d)],f.skip)continue;const w=f.x,x=f.y,b=w|0;b===m?(x<y?y=x:x>v&&(v=x),c=(h*c+w)/++h):(_(),t.lineTo(w,x),m=b,h=0,y=v=x),p=x}_()}function fu(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?Tb:Pb}function Ob(t){return t.stepped?U1:t.tension||t.cubicInterpolationMode==="monotone"?B1:Rn}function Mb(t,e,n,i){let r=e._path;r||(r=e._path=new Path2D,e.path(r,n,i)&&r.closePath()),$m(t,e.options),t.stroke(r)}function Lb(t,e,n,i){const{segments:r,options:s}=e,o=fu(e);for(const a of r)$m(t,s,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+i-1})&&t.closePath(),t.stroke()}const Rb=typeof Path2D=="function";function Ib(t,e,n,i){Rb&&!e.options.segment?Mb(t,e,n,i):Lb(t,e,n,i)}class hr extends yn{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const r=i.spanGaps?this._loop:this._fullLoop;I1(this._points,i,e,r,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=J1(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,i=e.length;return i&&n[e[i-1].end]}interpolate(e,n){const i=this.options,r=e[n],s=this.points,o=q1(this,{property:n,start:r,end:r});if(!o.length)return;const a=[],l=Ob(i);let u,c;for(u=0,c=o.length;u<c;++u){const{start:h,end:d}=o[u],f=s[h],m=s[d];if(f===m){a.push(f);continue}const y=Math.abs((r-f[n])/(m[n]-f[n])),v=l(f,m,y,i.stepped);v[n]=e[n],a.push(v)}return a.length===1?a[0]:a}pathSegment(e,n,i){return fu(this)(e,this,n,i)}path(e,n,i){const r=this.segments,s=fu(this);let o=this._loop;n=n||0,i=i||this.points.length-n;for(const a of r)o&=s(e,this,a,{start:n,end:n+i-1});return!!o}draw(e,n,i,r){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),Ib(e,this,i,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}I(hr,"id","line"),I(hr,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),I(hr,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),I(hr,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function lf(t,e,n,i){const r=t.options,{[n]:s}=t.getProps([n],i);return Math.abs(e-s)<r.radius+r.hitRadius}class lo extends yn{constructor(n){super();I(this,"parsed");I(this,"skip");I(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,i,r){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(n-o,2)+Math.pow(i-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,i){return lf(this,n,"x",i)}inYRange(n,i){return lf(this,n,"y",i)}getCenterPoint(n){const{x:i,y:r}=this.getProps(["x","y"],n);return{x:i,y:r}}size(n){n=n||this.options||{};let i=n.radius||0;i=Math.max(i,i&&n.hoverRadius||0);const r=i&&n.borderWidth||0;return(i+r)*2}draw(n,i){const r=this.options;this.skip||r.radius<.1||!Dt(this,i,this.size(r)/2)||(n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.fillStyle=r.backgroundColor,uu(n,r,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}I(lo,"id","point"),I(lo,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),I(lo,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});class Bm extends yn{constructor(e){super(),this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=e,this.height=this.bottom=n;const r=oe(i.text)?i.text.length:1;this._padding=qe(i.padding);const s=r*Le(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const e=this.options.position;return e==="top"||e==="bottom"}_drawArgs(e){const{top:n,left:i,bottom:r,right:s,options:o}=this,a=o.align;let l=0,u,c,h;return this.isHorizontal()?(c=Er(a,i,s),h=n+e,u=s-i):(o.position==="left"?(c=i+e,h=Er(a,r,n),l=de*-.5):(c=s-e,h=Er(a,n,r),l=de*.5),u=r-n),{titleX:c,titleY:h,maxWidth:u,rotation:l}}draw(){const e=this.ctx,n=this.options;if(!n.display)return;const i=Le(n.font),s=i.lineHeight/2+this._padding.top,{titleX:o,titleY:a,maxWidth:l,rotation:u}=this._drawArgs(s);es(e,n.text,0,0,i,{color:n.color,maxWidth:l,rotation:u,textAlign:vm(n.align),textBaseline:"middle",translation:[o,a]})}}function Ab(t,e){const n=new Bm({ctx:t.ctx,options:e,chart:t});rn.configure(t,n,e),rn.addBox(t,n),t.titleBlock=n}var Db={id:"title",_element:Bm,start(t,e,n){Ab(t,n)},stop(t){const e=t.titleBlock;rn.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,n){const i=t.titleBlock;rn.configure(t,i,n),i.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const dr={average(t){if(!t.length)return!1;let e,n,i=new Set,r=0,s=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const l=a.tooltipPosition();i.add(l.x),r+=l.y,++s}}return{x:[...i].reduce((a,l)=>a+l)/i.size,y:r/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,i=e.y,r=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=t.length;s<o;++s){const l=t[s].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=au(e,u);c<r&&(r=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,i=l.y}return{x:n,y:i}}};function wt(t,e){return e&&(oe(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ot(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
+`)>-1?t.split(`
+`):t}function jb(t,e){const{element:n,datasetIndex:i,index:r}=e,s=t.getDatasetMeta(i).controller,{label:o,value:a}=s.getLabelAndValue(r);return{chart:t,label:o,parsed:s.getParsed(r),raw:t.data.datasets[i].data[r],formattedValue:a,dataset:s.getDataset(),dataIndex:r,datasetIndex:i,element:n}}function uf(t,e){const n=t.chart.ctx,{body:i,footer:r,title:s}=t,{boxWidth:o,boxHeight:a}=e,l=Le(e.bodyFont),u=Le(e.titleFont),c=Le(e.footerFont),h=s.length,d=r.length,f=i.length,m=qe(e.padding);let y=m.height,v=0,p=i.reduce((w,x)=>w+x.before.length+x.lines.length+x.after.length,0);if(p+=t.beforeBody.length+t.afterBody.length,h&&(y+=h*u.lineHeight+(h-1)*e.titleSpacing+e.titleMarginBottom),p){const w=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;y+=f*w+(p-f)*l.lineHeight+(p-1)*e.bodySpacing}d&&(y+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let g=0;const _=function(w){v=Math.max(v,n.measureText(w).width+g)};return n.save(),n.font=u.string,V(t.title,_),n.font=l.string,V(t.beforeBody.concat(t.afterBody),_),g=e.displayColors?o+2+e.boxPadding:0,V(i,w=>{V(w.before,_),V(w.lines,_),V(w.after,_)}),g=0,n.font=c.string,V(t.footer,_),n.restore(),v+=m.width,{width:v,height:y}}function Nb(t,e){const{y:n,height:i}=e;return n<i/2?"top":n>t.height-i/2?"bottom":"center"}function zb(t,e,n,i){const{x:r,width:s}=i,o=n.caretSize+n.caretPadding;if(t==="left"&&r+s+o>e.width||t==="right"&&r-s-o<0)return!0}function Fb(t,e,n,i){const{x:r,width:s}=n,{width:o,chartArea:{left:a,right:l}}=t;let u="center";return i==="center"?u=r<=(a+l)/2?"left":"right":r<=s/2?u="left":r>=o-s/2&&(u="right"),zb(u,t,e,n)&&(u="center"),u}function cf(t,e,n){const i=n.yAlign||e.yAlign||Nb(t,n);return{xAlign:n.xAlign||e.xAlign||Fb(t,e,n,i),yAlign:i}}function $b(t,e){let{x:n,width:i}=t;return e==="right"?n-=i:e==="center"&&(n-=i/2),n}function Ub(t,e,n){let{y:i,height:r}=t;return e==="top"?i+=n:e==="bottom"?i-=r+n:i-=r/2,i}function hf(t,e,n,i){const{caretSize:r,caretPadding:s,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,u=r+s,{topLeft:c,topRight:h,bottomLeft:d,bottomRight:f}=Or(o);let m=$b(e,a);const y=Ub(e,l,u);return l==="center"?a==="left"?m+=u:a==="right"&&(m-=u):a==="left"?m-=Math.max(c,d)+r:a==="right"&&(m+=Math.max(h,f)+r),{x:it(m,0,i.width-e.width),y:it(y,0,i.height-e.height)}}function Hs(t,e,n){const i=qe(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function df(t){return wt([],Ot(t))}function Bb(t,e,n){return xn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function ff(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const Vm={beforeTitle:Pt,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,i=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return n[e.dataIndex]}return""},afterTitle:Pt,beforeBody:Pt,beforeLabel:Pt,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return J(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Pt,afterBody:Pt,beforeFooter:Pt,footer:Pt,afterFooter:Pt};function De(t,e,n,i){const r=t[e].call(n,i);return typeof r>"u"?Vm[e].call(n,i):r}class pu extends yn{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,i=this.options.setContext(this.getContext()),r=i.enabled&&n.options.animation&&i.animations,s=new Om(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Bb(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:i}=n,r=De(i,"beforeTitle",this,e),s=De(i,"title",this,e),o=De(i,"afterTitle",this,e);let a=[];return a=wt(a,Ot(r)),a=wt(a,Ot(s)),a=wt(a,Ot(o)),a}getBeforeBody(e,n){return df(De(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:i}=n,r=[];return V(e,s=>{const o={before:[],lines:[],after:[]},a=ff(i,s);wt(o.before,Ot(De(a,"beforeLabel",this,s))),wt(o.lines,De(a,"label",this,s)),wt(o.after,Ot(De(a,"afterLabel",this,s))),r.push(o)}),r}getAfterBody(e,n){return df(De(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:i}=n,r=De(i,"beforeFooter",this,e),s=De(i,"footer",this,e),o=De(i,"afterFooter",this,e);let a=[];return a=wt(a,Ot(r)),a=wt(a,Ot(s)),a=wt(a,Ot(o)),a}_createItems(e){const n=this._active,i=this.chart.data,r=[],s=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(jb(this.chart,n[l]));return e.filter&&(a=a.filter((c,h,d)=>e.filter(c,h,d,i))),e.itemSort&&(a=a.sort((c,h)=>e.itemSort(c,h,i))),V(a,c=>{const h=ff(e.callbacks,c);r.push(De(h,"labelColor",this,c)),s.push(De(h,"labelPointStyle",this,c)),o.push(De(h,"labelTextColor",this,c))}),this.labelColors=r,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const i=this.options.setContext(this.getContext()),r=this._active;let s,o=[];if(!r.length)this.opacity!==0&&(s={opacity:0});else{const a=dr[i.position].call(this,r,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const l=this._size=uf(this,i),u=Object.assign({},a,l),c=cf(this.chart,i,u),h=hf(i,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,s={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,i,r){const s=this.getCaretPosition(e,i,r);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,i){const{xAlign:r,yAlign:s}=this,{caretSize:o,cornerRadius:a}=i,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:h}=Or(a),{x:d,y:f}=e,{width:m,height:y}=n;let v,p,g,_,w,x;return s==="center"?(w=f+y/2,r==="left"?(v=d,p=v-o,_=w+o,x=w-o):(v=d+m,p=v+o,_=w-o,x=w+o),g=v):(r==="left"?p=d+Math.max(l,c)+o:r==="right"?p=d+m-Math.max(u,h)-o:p=this.caretX,s==="top"?(_=f,w=_-o,v=p-o,g=p+o):(_=f+y,w=_+o,v=p+o,g=p-o),x=_),{x1:v,x2:p,x3:g,y1:_,y2:w,y3:x}}drawTitle(e,n,i){const r=this.title,s=r.length;let o,a,l;if(s){const u=Ja(i.rtl,this.x,this.width);for(e.x=Hs(this,i.titleAlign,i),n.textAlign=u.textAlign(i.titleAlign),n.textBaseline="middle",o=Le(i.titleFont),a=i.titleSpacing,n.fillStyle=i.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(r[l],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+a,l+1===s&&(e.y+=i.titleMarginBottom-a)}}_drawColorBox(e,n,i,r,s){const o=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:l,boxWidth:u}=s,c=Le(s.bodyFont),h=Hs(this,"left",s),d=r.x(h),f=l<c.lineHeight?(c.lineHeight-l)/2:0,m=n.y+f;if(s.usePointStyle){const y={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},v=r.leftForLtr(d,u)+u/2,p=m+l/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,uu(e,y,v,p),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,uu(e,y,v,p)}else{e.lineWidth=U(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const y=r.leftForLtr(d,u),v=r.leftForLtr(r.xPlus(d,1),u-2),p=Or(o.borderRadius);Object.values(p).some(g=>g!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,cu(e,{x:y,y:m,w:u,h:l,radius:p}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),cu(e,{x:v,y:m+1,w:u-2,h:l-2,radius:p}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(y,m,u,l),e.strokeRect(y,m,u,l),e.fillStyle=o.backgroundColor,e.fillRect(v,m+1,u-2,l-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,n,i){const{body:r}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=i,h=Le(i.bodyFont);let d=h.lineHeight,f=0;const m=Ja(i.rtl,this.x,this.width),y=function(S){n.fillText(S,m.x(e.x+f),e.y+d/2),e.y+=d+s},v=m.textAlign(o);let p,g,_,w,x,b,k;for(n.textAlign=o,n.textBaseline="middle",n.font=h.string,e.x=Hs(this,v,i),n.fillStyle=i.bodyColor,V(this.beforeBody,y),f=a&&v!=="right"?o==="center"?u/2+c:u+2+c:0,w=0,b=r.length;w<b;++w){for(p=r[w],g=this.labelTextColors[w],n.fillStyle=g,V(p.before,y),_=p.lines,a&&_.length&&(this._drawColorBox(n,e,w,m,i),d=Math.max(h.lineHeight,l)),x=0,k=_.length;x<k;++x)y(_[x]),d=h.lineHeight;V(p.after,y)}f=0,d=h.lineHeight,V(this.afterBody,y),e.y-=s}drawFooter(e,n,i){const r=this.footer,s=r.length;let o,a;if(s){const l=Ja(i.rtl,this.x,this.width);for(e.x=Hs(this,i.footerAlign,i),e.y+=i.footerMarginTop,n.textAlign=l.textAlign(i.footerAlign),n.textBaseline="middle",o=Le(i.footerFont),n.fillStyle=i.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(r[a],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+i.footerSpacing}}drawBackground(e,n,i,r){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=e,{width:u,height:c}=i,{topLeft:h,topRight:d,bottomLeft:f,bottomRight:m}=Or(r.cornerRadius);n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,n.lineWidth=r.borderWidth,n.beginPath(),n.moveTo(a+h,l),o==="top"&&this.drawCaret(e,n,i,r),n.lineTo(a+u-d,l),n.quadraticCurveTo(a+u,l,a+u,l+d),o==="center"&&s==="right"&&this.drawCaret(e,n,i,r),n.lineTo(a+u,l+c-m),n.quadraticCurveTo(a+u,l+c,a+u-m,l+c),o==="bottom"&&this.drawCaret(e,n,i,r),n.lineTo(a+f,l+c),n.quadraticCurveTo(a,l+c,a,l+c-f),o==="center"&&s==="left"&&this.drawCaret(e,n,i,r),n.lineTo(a,l+h),n.quadraticCurveTo(a,l,a+h,l),n.closePath(),n.fill(),r.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,i=this.$animations,r=i&&i.x,s=i&&i.y;if(r||s){const o=dr[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=uf(this,e),l=Object.assign({},o,this._size),u=cf(n,e,l),c=hf(e,l,u,n);(r._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(n);const r={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=qe(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=i,this.drawBackground(s,e,r,n),W1(e,n.textDirection),s.y+=o.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),K1(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const i=this._active,r=e.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),s=!Do(i,r),o=this._positionChanged(r,n);(s||o)&&(this._active=r,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,i=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const r=this.options,s=this._active||[],o=this._getActiveElements(e,s,n,i),a=this._positionChanged(o,e),l=n||!Do(o,s)||a;return l&&(this._active=o,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,i,r){const s=this.options;if(e.type==="mouseout")return[];if(!r)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:i,caretY:r,options:s}=this,o=dr[s.position].call(this,e,n);return o!==!1&&(i!==o.x||r!==o.y)}}I(pu,"positioners",dr);var Vb={id:"tooltip",_element:pu,positioners:dr,afterInit(t,e,n){n&&(t.tooltip=new pu({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Vm},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const Hb=(t,e,n,i)=>(typeof e=="string"?(n=t.push(e)-1,i.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function Wb(t,e,n,i){const r=t.indexOf(e);if(r===-1)return Hb(t,e,n,i);const s=t.lastIndexOf(e);return r!==s?n:r}const Kb=(t,e)=>t===null?null:it(Math.round(t),0,e);function pf(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class gu extends Xn{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const i=this.getLabels();for(const{index:r,label:s}of n)i[r]===s&&i.splice(r,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(J(e))return null;const i=this.getLabels();return n=isFinite(n)&&i[n]===e?n:Wb(i,e,W(n,e),this._addedLabels),Kb(n,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:i,max:r}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),n||(r=this.getLabels().length-1)),this.min=i,this.max=r}buildTicks(){const e=this.min,n=this.max,i=this.options.offset,r=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let o=e;o<=n;o++)r.push({value:o});return r}getLabelForValue(e){return pf.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}I(gu,"id","category"),I(gu,"defaults",{ticks:{callback:pf}});function Yb(t,e){const n=[],{bounds:r,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:h,includeBounds:d}=t,f=s||1,m=c-1,{min:y,max:v}=e,p=!J(o),g=!J(a),_=!J(u),w=(v-y)/(h+1);let x=wd((v-y)/m/f)*f,b,k,S,M;if(x<1e-14&&!p&&!g)return[{value:y},{value:v}];M=Math.ceil(v/x)-Math.floor(y/x),M>m&&(x=wd(M*x/m/f)*f),J(l)||(b=Math.pow(10,l),x=Math.ceil(x*b)/b),r==="ticks"?(k=Math.floor(y/x)*x,S=Math.ceil(v/x)*x):(k=y,S=v),p&&g&&s&&zx((a-o)/s,x/1e3)?(M=Math.round(Math.min((a-o)/x,c)),x=(a-o)/M,k=o,S=a):_?(k=p?o:k,S=g?a:S,M=u-1,x=(S-k)/M):(M=(S-k)/x,Cr(M,Math.round(M),x/1e3)?M=Math.round(M):M=Math.ceil(M));const O=Math.max(xd(x),xd(k));b=Math.pow(10,J(l)?O:l),k=Math.round(k*b)/b,S=Math.round(S*b)/b;let D=0;for(p&&(d&&k!==o?(n.push({value:o}),k<o&&D++,Cr(Math.round((k+D*x)*b)/b,o,gf(o,w,t))&&D++):k<o&&D++);D<M;++D){const B=Math.round((k+D*x)*b)/b;if(g&&B>a)break;n.push({value:B})}return g&&d&&S!==a?n.length&&Cr(n[n.length-1].value,a,gf(a,w,t))?n[n.length-1].value=a:n.push({value:a}):(!g||S===a)&&n.push({value:S}),n}function gf(t,e,{horizontal:n,minRotation:i}){const r=nn(i),s=(n?Math.sin(r):Math.cos(r))||.001,o=.75*e*(""+t).length;return Math.min(e/s,o)}class Vo extends Xn{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return J(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:i}=this.getUserBounds();let{min:r,max:s}=this;const o=l=>r=n?r:l,a=l=>s=i?s:l;if(e){const l=Ii(r),u=Ii(s);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(r===s){let l=s===0?1:Math.abs(s*.05);a(s+l),e||o(r-l)}this.min=r,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:i}=e,r;return i?(r=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,r>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${r} ticks. Limiting to 1000.`),r=1e3)):(r=this.computeTickLimit(),n=n||11),n&&(r=Math.min(n,r)),r}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const r={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=Yb(r,s);return e.bounds==="ticks"&&fm(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const r=(i-n)/Math.max(e.length-1,1)/2;n-=r,i+=r}this._startValue=n,this._endValue=i,this._valueRange=i-n}getLabelForValue(e){return Pc(e,this.chart.options.locale,this.options.ticks.format)}}class mu extends Vo{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ve(e)?e:0,this.max=ve(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,i=nn(this.options.ticks.minRotation),r=(e?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/r))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}I(mu,"id","linear"),I(mu,"defaults",{ticks:{callback:da.formatters.numeric}});const ns=t=>Math.floor(tn(t)),Pn=(t,e)=>Math.pow(10,ns(t)+e);function mf(t){return t/Math.pow(10,ns(t))===1}function yf(t,e,n){const i=Math.pow(10,n),r=Math.floor(t/i);return Math.ceil(e/i)-r}function Gb(t,e){const n=e-t;let i=ns(n);for(;yf(t,e,i)>10;)i++;for(;yf(t,e,i)<10;)i--;return Math.min(i,ns(t))}function qb(t,{min:e,max:n}){e=Ve(t.min,e);const i=[],r=ns(e);let s=Gb(e,n),o=s<0?Math.pow(10,Math.abs(s)):1;const a=Math.pow(10,s),l=r>s?Math.pow(10,r):0,u=Math.round((e-l)*o)/o,c=Math.floor((e-l)/a/10)*a*10;let h=Math.floor((u-c)/Math.pow(10,s)),d=Ve(t.min,Math.round((l+c+h*Math.pow(10,s))*o)/o);for(;d<n;)i.push({value:d,major:mf(d),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(s++,h=2,o=s>=0?1:o),d=Math.round((l+c+h*Math.pow(10,s))*o)/o;const f=Ve(t.max,d);return i.push({value:f,major:mf(f),significand:h}),i}class vf extends Xn{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(e,n){const i=Vo.prototype.parse.apply(this,[e,n]);if(i===0){this._zero=!0;return}return ve(i)&&i>0?i:null}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=ve(e)?Math.max(0,e):null,this.max=ve(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!ve(this._userMin)&&(this.min=e===Pn(this.min,0)?Pn(this.min,-1):Pn(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let i=this.min,r=this.max;const s=a=>i=e?i:a,o=a=>r=n?r:a;i===r&&(i<=0?(s(1),o(10)):(s(Pn(i,-1)),o(Pn(r,1)))),i<=0&&s(Pn(r,-1)),r<=0&&o(Pn(i,1)),this.min=i,this.max=r}buildTicks(){const e=this.options,n={min:this._userMin,max:this._userMax},i=qb(n,this);return e.bounds==="ticks"&&fm(i,this,"value"),e.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(e){return e===void 0?"0":Pc(e,this.chart.options.locale,this.options.ticks.format)}configure(){const e=this.min;super.configure(),this._startValue=tn(e),this._valueRange=tn(this.max)-tn(e)}getPixelForValue(e){return(e===void 0||e===0)&&(e=this.min),e===null||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(tn(e)-this._startValue)/this._valueRange)}getValueForPixel(e){const n=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+n*this._valueRange)}}I(vf,"id","logarithmic"),I(vf,"defaults",{ticks:{callback:da.formatters.logarithmic,major:{enabled:!0}}});function yu(t){const e=t.ticks;if(e.display&&t.display){const n=qe(e.backdropPadding);return W(e.font&&e.font.size,ue.font.size)+n.height}return 0}function Qb(t,e,n){return n=oe(n)?n:[n],{w:s1(t,e.string,n),h:n.length*e.lineHeight}}function _f(t,e,n,i,r){return t===i||t===r?{start:e-n/2,end:e+n/2}:t<i||t>r?{start:e-n,end:e}:{start:e,end:e+n}}function Xb(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},n=Object.assign({},e),i=[],r=[],s=t._pointLabels.length,o=t.options.pointLabels,a=o.centerPointLabels?de/s:0;for(let l=0;l<s;l++){const u=o.setContext(t.getPointLabelContext(l));r[l]=u.padding;const c=t.getPointPosition(l,t.drawingArea+r[l],a),h=Le(u.font),d=Qb(t.ctx,h,t._pointLabels[l]);i[l]=d;const f=dt(t.getIndexAngle(l)+a),m=Math.round(Sc(f)),y=_f(m,c.x,d.w,0,180),v=_f(m,c.y,d.h,90,270);Jb(n,e,f,y,v)}t.setCenterPoint(e.l-n.l,n.r-e.r,e.t-n.t,n.b-e.b),t._pointLabelItems=tS(t,i,r)}function Jb(t,e,n,i,r){const s=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n));let a=0,l=0;i.start<e.l?(a=(e.l-i.start)/s,t.l=Math.min(t.l,e.l-a)):i.end>e.r&&(a=(i.end-e.r)/s,t.r=Math.max(t.r,e.r+a)),r.start<e.t?(l=(e.t-r.start)/o,t.t=Math.min(t.t,e.t-l)):r.end>e.b&&(l=(r.end-e.b)/o,t.b=Math.max(t.b,e.b+l))}function Zb(t,e,n){const i=t.drawingArea,{extra:r,additionalAngle:s,padding:o,size:a}=n,l=t.getPointPosition(e,i+r+o,s),u=Math.round(Sc(dt(l.angle+Ke))),c=rS(l.y,a.h,u),h=nS(u),d=iS(l.x,a.w,h);return{visible:!0,x:l.x,y:c,textAlign:h,left:d,top:c,right:d+a.w,bottom:c+a.h}}function eS(t,e){if(!e)return!0;const{left:n,top:i,right:r,bottom:s}=t;return!(Dt({x:n,y:i},e)||Dt({x:n,y:s},e)||Dt({x:r,y:i},e)||Dt({x:r,y:s},e))}function tS(t,e,n){const i=[],r=t._pointLabels.length,s=t.options,{centerPointLabels:o,display:a}=s.pointLabels,l={extra:yu(s)/2,additionalAngle:o?de/r:0};let u;for(let c=0;c<r;c++){l.padding=n[c],l.size=e[c];const h=Zb(t,c,l);i.push(h),a==="auto"&&(h.visible=eS(h,u),h.visible&&(u=h))}return i}function nS(t){return t===0||t===180?"center":t<180?"left":"right"}function iS(t,e,n){return n==="right"?t-=e:n==="center"&&(t-=e/2),t}function rS(t,e,n){return n===90||n===270?t-=e/2:(n>270||n<90)&&(t-=e),t}function sS(t,e,n){const{left:i,top:r,right:s,bottom:o}=n,{backdropColor:a}=e;if(!J(a)){const l=Or(e.borderRadius),u=qe(e.backdropPadding);t.fillStyle=a;const c=i-u.left,h=r-u.top,d=s-i+u.width,f=o-r+u.height;Object.values(l).some(m=>m!==0)?(t.beginPath(),cu(t,{x:c,y:h,w:d,h:f,radius:l}),t.fill()):t.fillRect(c,h,d,f)}}function oS(t,e){const{ctx:n,options:{pointLabels:i}}=t;for(let r=e-1;r>=0;r--){const s=t._pointLabelItems[r];if(!s.visible)continue;const o=i.setContext(t.getPointLabelContext(r));sS(n,o,s);const a=Le(o.font),{x:l,y:u,textAlign:c}=s;es(n,t._pointLabels[r],l,u+a.lineHeight/2,a,{color:o.color,textAlign:c,textBaseline:"middle"})}}function Hm(t,e,n,i){const{ctx:r}=t;if(n)r.arc(t.xCenter,t.yCenter,e,0,mt);else{let s=t.getPointPosition(0,e);r.moveTo(s.x,s.y);for(let o=1;o<i;o++)s=t.getPointPosition(o,e),r.lineTo(s.x,s.y)}}function aS(t,e,n,i,r){const s=t.ctx,o=e.circular,{color:a,lineWidth:l}=e;!o&&!i||!a||!l||n<0||(s.save(),s.strokeStyle=a,s.lineWidth=l,s.setLineDash(r.dash),s.lineDashOffset=r.dashOffset,s.beginPath(),Hm(t,n,o,i),s.closePath(),s.stroke(),s.restore())}function lS(t,e,n){return xn(t,{label:n,index:e,type:"pointLabel"})}class Ws extends Vo{constructor(e){super(e),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const e=this._padding=qe(yu(this.options)/2),n=this.width=this.maxWidth-e.width,i=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+n/2+e.left),this.yCenter=Math.floor(this.top+i/2+e.top),this.drawingArea=Math.floor(Math.min(n,i)/2)}determineDataLimits(){const{min:e,max:n}=this.getMinMax(!1);this.min=ve(e)&&!isNaN(e)?e:0,this.max=ve(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/yu(this.options))}generateTickLabels(e){Vo.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((n,i)=>{const r=re(this.options.pointLabels.callback,[n,i],this);return r||r===0?r:""}).filter((n,i)=>this.chart.getDataVisibility(i))}fit(){const e=this.options;e.display&&e.pointLabels.display?Xb(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(e,n,i,r){this.xCenter+=Math.floor((e-n)/2),this.yCenter+=Math.floor((i-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,n,i,r))}getIndexAngle(e){const n=mt/(this._pointLabels.length||1),i=this.options.startAngle||0;return dt(e*n+nn(i))}getDistanceFromCenterForValue(e){if(J(e))return NaN;const n=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*n:(e-this.min)*n}getValueForDistanceFromCenter(e){if(J(e))return NaN;const n=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-n:this.min+n}getPointLabelContext(e){const n=this._pointLabels||[];if(e>=0&&e<n.length){const i=n[e];return lS(this.getContext(),e,i)}}getPointPosition(e,n,i=0){const r=this.getIndexAngle(e)-Ke+i;return{x:Math.cos(r)*n+this.xCenter,y:Math.sin(r)*n+this.yCenter,angle:r}}getPointPositionForValue(e,n){return this.getPointPosition(e,this.getDistanceFromCenterForValue(n))}getBasePosition(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}getPointLabelPosition(e){const{left:n,top:i,right:r,bottom:s}=this._pointLabelItems[e];return{left:n,top:i,right:r,bottom:s}}drawBackground(){const{backgroundColor:e,grid:{circular:n}}=this.options;if(e){const i=this.ctx;i.save(),i.beginPath(),Hm(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),i.closePath(),i.fillStyle=e,i.fill(),i.restore()}}drawGrid(){const e=this.ctx,n=this.options,{angleLines:i,grid:r,border:s}=n,o=this._pointLabels.length;let a,l,u;if(n.pointLabels.display&&oS(this,o),r.display&&this.ticks.forEach((c,h)=>{if(h!==0||h===0&&this.min<0){l=this.getDistanceFromCenterForValue(c.value);const d=this.getContext(h),f=r.setContext(d),m=s.setContext(d);aS(this,f,l,o,m)}}),i.display){for(e.save(),a=o-1;a>=0;a--){const c=i.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:d}=c;!d||!h||(e.lineWidth=d,e.strokeStyle=h,e.setLineDash(c.borderDash),e.lineDashOffset=c.borderDashOffset,l=this.getDistanceFromCenterForValue(n.ticks.reverse?this.min:this.max),u=this.getPointPosition(a,l),e.beginPath(),e.moveTo(this.xCenter,this.yCenter),e.lineTo(u.x,u.y),e.stroke())}e.restore()}}drawBorder(){}drawLabels(){const e=this.ctx,n=this.options,i=n.ticks;if(!i.display)return;const r=this.getIndexAngle(0);let s,o;e.save(),e.translate(this.xCenter,this.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",this.ticks.forEach((a,l)=>{if(l===0&&this.min>=0&&!n.reverse)return;const u=i.setContext(this.getContext(l)),c=Le(u.font);if(s=this.getDistanceFromCenterForValue(this.ticks[l].value),u.showLabelBackdrop){e.font=c.string,o=e.measureText(a.label).width,e.fillStyle=u.backdropColor;const h=qe(u.backdropPadding);e.fillRect(-o/2-h.left,-s-c.size/2-h.top,o+h.width,c.size+h.height)}es(e,a.label,0,-s,c,{color:u.color,strokeColor:u.textStrokeColor,strokeWidth:u.textStrokeWidth})}),e.restore()}drawTitle(){}}I(Ws,"id","radialLinear"),I(Ws,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:da.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(e){return e},padding:5,centerPointLabels:!1}}),I(Ws,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),I(Ws,"descriptors",{angleLines:{_fallback:"grid"}});const ga={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ne=Object.keys(ga);function wf(t,e){return t-e}function xf(t,e){if(J(e))return null;const n=t._adapter,{parser:i,round:r,isoWeekday:s}=t._parseOpts;let o=e;return typeof i=="function"&&(o=i(o)),ve(o)||(o=typeof i=="string"?n.parse(o,i):n.parse(o)),o===null?null:(r&&(o=r==="week"&&(Zr(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,r)),+o)}function kf(t,e,n,i){const r=Ne.length;for(let s=Ne.indexOf(t);s<r-1;++s){const o=ga[Ne[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(a*o.size))<=i)return Ne[s]}return Ne[r-1]}function uS(t,e,n,i,r){for(let s=Ne.length-1;s>=Ne.indexOf(n);s--){const o=Ne[s];if(ga[o].common&&t._adapter.diff(r,i,o)>=e-1)return o}return Ne[n?Ne.indexOf(n):0]}function cS(t){for(let e=Ne.indexOf(t)+1,n=Ne.length;e<n;++e)if(ga[Ne[e]].common)return Ne[e]}function bf(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:i,hi:r}=Cc(n,e),s=n[i]>=e?n[i]:n[r];t[s]=!0}}function hS(t,e,n,i){const r=t._adapter,s=+r.startOf(e[0].value,i),o=e[e.length-1].value;let a,l;for(a=s;a<=o;a=+r.add(a,1,i))l=n[a],l>=0&&(e[l].major=!0);return e}function Sf(t,e,n){const i=[],r={},s=e.length;let o,a;for(o=0;o<s;++o)a=e[o],r[a]=o,i.push({value:a,major:!1});return s===0||!n?i:hS(t,i,r,n)}class Ho extends Xn{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const i=e.time||(e.time={}),r=this._adapter=new gk._date(e.adapters.date);r.init(n),Sr(i.displayFormats,r.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:xf(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,i=e.time.unit||"day";let{min:r,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(r=Math.min(r,u.min)),!a&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),r=ve(r)&&!isNaN(r)?r:+n.startOf(Date.now(),i),s=ve(s)&&!isNaN(s)?s:+n.endOf(Date.now(),i)+1,this.min=Math.min(r,s-1),this.max=Math.max(r+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],i=e[e.length-1]),{min:n,max:i}}buildTicks(){const e=this.options,n=e.time,i=e.ticks,r=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);const s=this.min,o=this.max,a=Hx(r,s,o);return this._unit=n.unit||(i.autoSkip?kf(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):uS(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:cS(this._unit),this.initOffsets(r),e.reverse&&a.reverse(),Sf(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,i=0,r,s;this.options.offset&&e.length&&(r=this.getDecimalForValue(e[0]),e.length===1?n=1-r:n=(this.getDecimalForValue(e[1])-r)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?i=s:i=(s-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=it(n,0,o),i=it(i,0,o),this._offsets={start:n,end:i,factor:1/(n+1+i)}}_generate(){const e=this._adapter,n=this.min,i=this.max,r=this.options,s=r.time,o=s.unit||kf(s.minUnit,n,i,this._getLabelCapacity(n)),a=W(r.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=Zr(l)||l===!0,c={};let h=n,d,f;if(u&&(h=+e.startOf(h,"isoWeek",l)),h=+e.startOf(h,u?"day":o),e.diff(i,n,o)>1e5*a)throw new Error(n+" and "+i+" are too far apart with stepSize of "+a+" "+o);const m=r.ticks.source==="data"&&this.getDataTimestamps();for(d=h,f=0;d<i;d=+e.add(d,a,o),f++)bf(c,d,m);return(d===i||r.bounds==="ticks"||f===1)&&bf(c,d,m),Object.keys(c).sort(wf).map(y=>+y)}getLabelForValue(e){const n=this._adapter,i=this.options.time;return i.tooltipFormat?n.format(e,i.tooltipFormat):n.format(e,i.displayFormats.datetime)}format(e,n){const r=this.options.time.displayFormats,s=this._unit,o=n||r[s];return this._adapter.format(e,o)}_tickFormatFunction(e,n,i,r){const s=this.options,o=s.ticks.callback;if(o)return re(o,[e,n,i],this);const a=s.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],h=u&&a[u],d=i[n],f=u&&h&&d&&d.major;return this._adapter.format(e,r||(f?h:c))}generateTickLabels(e){let n,i,r;for(n=0,i=e.length;n<i;++n)r=e[n],r.label=this._tickFormatFunction(r.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+i)*n.factor)}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,i=this.ctx.measureText(e).width,r=nn(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(r),o=Math.sin(r),a=this._resolveTickFontOptions(0).size;return{w:i*s+a*o,h:i*o+a*s}}_getLabelCapacity(e){const n=this.options.time,i=n.displayFormats,r=i[n.unit]||i.millisecond,s=this._tickFormatFunction(e,0,Sf(this,[e],this._majorUnit),r),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,i;if(e.length)return e;const r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(n=0,i=r.length;n<i;++n)e=e.concat(r[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,i;if(e.length)return e;const r=this.getLabels();for(n=0,i=r.length;n<i;++n)e.push(xf(this,r[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return Kx(e.sort(wf))}}I(Ho,"id","time"),I(Ho,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Ks(t,e,n){let i=0,r=t.length-1,s,o,a,l;n?(e>=t[i].pos&&e<=t[r].pos&&({lo:i,hi:r}=Nn(t,"pos",e)),{pos:s,time:a}=t[i],{pos:o,time:l}=t[r]):(e>=t[i].time&&e<=t[r].time&&({lo:i,hi:r}=Nn(t,"time",e)),{time:s,pos:a}=t[i],{time:o,pos:l}=t[r]);const u=o-s;return u?a+(l-a)*(e-s)/u:a}class Cf extends Ho{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=Ks(n,this.min),this._tableRange=Ks(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:i}=this,r=[],s=[];let o,a,l,u,c;for(o=0,a=e.length;o<a;++o)u=e[o],u>=n&&u<=i&&r.push(u);if(r.length<2)return[{time:n,pos:0},{time:i,pos:1}];for(o=0,a=r.length;o<a;++o)c=r[o+1],l=r[o-1],u=r[o],Math.round((c+l)/2)!==u&&s.push({time:u,pos:o/(a-1)});return s}_generate(){const e=this.min,n=this.max;let i=super.getDataTimestamps();return(!i.includes(e)||!i.length)&&i.splice(0,0,e),(!i.includes(n)||i.length===1)&&i.push(n),i.sort((r,s)=>r-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),i=this.getLabelTimestamps();return n.length&&i.length?e=this.normalize(n.concat(i)):e=n.length?n:i,e=this._cache.all=e,e}getDecimalForValue(e){return(Ks(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,i=this.getDecimalForPixel(e)/n.factor-n.end;return Ks(this._table,i*this._tableRange+this._minPos,!0)}}I(Cf,"id","timeseries"),I(Cf,"defaults",Ho.defaults);const Wm="label";function Ef(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function dS(t,e){const n=t.options;n&&e&&Object.assign(n,e)}function Km(t,e){t.labels=e}function Ym(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wm;const i=[];t.datasets=e.map(r=>{const s=t.datasets.find(o=>o[n]===r[n]);return!s||!r.data||i.includes(s)?{...r}:(i.push(s),Object.assign(s,r),s)})}function fS(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Wm;const n={labels:[],datasets:[]};return Km(n,t.labels),Ym(n,t.datasets,e),n}function pS(t,e){const{height:n=150,width:i=300,redraw:r=!1,datasetIdKey:s,type:o,data:a,options:l,plugins:u=[],fallbackContent:c,updateMode:h,...d}=t,f=E.useRef(null),m=E.useRef(),y=()=>{f.current&&(m.current=new pa(f.current,{type:o,data:fS(a,s),options:l&&{...l},plugins:u}),Ef(e,m.current))},v=()=>{Ef(e,null),m.current&&(m.current.destroy(),m.current=null)};return E.useEffect(()=>{!r&&m.current&&l&&dS(m.current,l)},[r,l]),E.useEffect(()=>{!r&&m.current&&Km(m.current.config.data,a.labels)},[r,a.labels]),E.useEffect(()=>{!r&&m.current&&a.datasets&&Ym(m.current.config.data,a.datasets,s)},[r,a.datasets]),E.useEffect(()=>{m.current&&(r?(v(),setTimeout(y)):m.current.update(h))},[r,l,a.labels,a.datasets,h]),E.useEffect(()=>{m.current&&(v(),setTimeout(y))},[o]),E.useEffect(()=>(y(),()=>v()),[]),Ni.createElement("canvas",Object.assign({ref:f,role:"img",height:n,width:i},d),c)}const gS=E.forwardRef(pS);function mS(t,e){return pa.register(e),E.forwardRef((n,i)=>Ni.createElement(gS,Object.assign({},n,{ref:i,type:t})))}const yS=mS("line",so);pa.register(gu,mu,lo,hr,Db,Vb);function Pf(){const t={responsive:!0,plugins:{title:{display:!0,text:"File writes per second"}},scales:{x:{grid:{display:!1}},y:{ticks:{callback:function(i,r,s){return i+"wps"}},grid:{display:!1}}}},e=["January","February","March","April","May","June","July"],n={labels:e,datasets:[{label:"Dataset 1",data:e.map(()=>Math.random()*1e3),borderColor:"rgb(255, 99, 132)",backgroundColor:"rgba(255, 99, 132, 0.5)"},{label:"Dataset 2",data:e.map(()=>Math.random()*1e3),borderColor:"rgb(53, 162, 235)",backgroundColor:"rgba(53, 162, 235, 0.5)"}]};return L.jsx(yS,{data:n,options:t})}function vS(t){const e=fc(),[n,i]=E.useState([]);E.useEffect(()=>{t.session||e("/login")},[t.session]);const r=E.useCallback(async()=>{const{data:s,error:o}=await t.supabase.from("file").select();if(o){console.error(o);return}i(s.map(a=>a))},[t.supabase]);return E.useEffect(()=>{r()},[]),L.jsx(L.Fragment,{children:L.jsxs("div",{className:"flex h-screen",children:[L.jsx(sx,{}),L.jsxs("main",{className:"flex-1 overflow-y-auto",children:[L.jsx("div",{className:"w-3/12",children:L.jsx(Pf,{})}),L.jsx("div",{className:"w-3/12",children:L.jsx(Pf,{})}),L.jsx("div",{children:n.map(s=>L.jsx("div",{children:L.jsxs("p",{className:"underline",children:["file: ",s.absolute_path]})},s.id))})]})]})})}function _S(t={}){const{nonce:e,onScriptLoadSuccess:n,onScriptLoadError:i}=t,[r,s]=E.useState(!1),o=E.useRef(n);o.current=n;const a=E.useRef(i);return a.current=i,E.useEffect(()=>{const l=document.createElement("script");return l.src="https://accounts.google.com/gsi/client",l.async=!0,l.defer=!0,l.nonce=e,l.onload=()=>{var u;s(!0),(u=o.current)===null||u===void 0||u.call(o)},l.onerror=()=>{var u;s(!1),(u=a.current)===null||u===void 0||u.call(a)},document.body.appendChild(l),()=>{document.body.removeChild(l)}},[e]),r}const Gm=E.createContext(null);function wS({clientId:t,nonce:e,onScriptLoadSuccess:n,onScriptLoadError:i,children:r}){const s=_S({nonce:e,onScriptLoadSuccess:n,onScriptLoadError:i}),o=E.useMemo(()=>({clientId:t,scriptLoadedSuccessfully:s}),[t,s]);return Ni.createElement(Gm.Provider,{value:o},r)}function xS(){const t=E.useContext(Gm);if(!t)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return t}function kS(t){var e;return(e=t==null?void 0:t.clientId)!==null&&e!==void 0?e:t==null?void 0:t.client_id}const bS={large:40,medium:32,small:20};function SS({onSuccess:t,onError:e,useOneTap:n,promptMomentNotification:i,type:r="standard",theme:s="outline",size:o="large",text:a,shape:l,logo_alignment:u,width:c,locale:h,click_listener:d,containerProps:f,...m}){const y=E.useRef(null),{clientId:v,scriptLoadedSuccessfully:p}=xS(),g=E.useRef(t);g.current=t;const _=E.useRef(e);_.current=e;const w=E.useRef(i);return w.current=i,E.useEffect(()=>{var x,b,k,S,M,O,D,B,ce;if(p)return(k=(b=(x=window==null?void 0:window.google)===null||x===void 0?void 0:x.accounts)===null||b===void 0?void 0:b.id)===null||k===void 0||k.initialize({client_id:v,callback:ae=>{var $;if(!(ae!=null&&ae.credential))return($=_.current)===null||$===void 0?void 0:$.call(_);const{credential:K,select_by:me}=ae;g.current({credential:K,clientId:kS(ae),select_by:me})},...m}),(O=(M=(S=window==null?void 0:window.google)===null||S===void 0?void 0:S.accounts)===null||M===void 0?void 0:M.id)===null||O===void 0||O.renderButton(y.current,{type:r,theme:s,size:o,text:a,shape:l,logo_alignment:u,width:c,locale:h,click_listener:d}),n&&((ce=(B=(D=window==null?void 0:window.google)===null||D===void 0?void 0:D.accounts)===null||B===void 0?void 0:B.id)===null||ce===void 0||ce.prompt(w.current)),()=>{var ae,$,K;n&&((K=($=(ae=window==null?void 0:window.google)===null||ae===void 0?void 0:ae.accounts)===null||$===void 0?void 0:$.id)===null||K===void 0||K.cancel())}},[v,p,n,r,s,o,a,l,u,c,h]),Ni.createElement("div",{...f,ref:y,style:{height:bS[o],...f==null?void 0:f.style}})}function CS(t){const e=fc();return E.useEffect(()=>{t.supabase.auth.getSession().then(({data:{session:i}})=>{t.setSession(i),console.log("LOGIN SESSION",i)});const{data:{subscription:n}}=t.supabase.auth.onAuthStateChange((i,r)=>{t.setSession(r),console.log("SESSION CHANGE",r)});return()=>n.unsubscribe()},[t.supabase]),E.useEffect(()=>{t.session&&e("/")},[t.session]),L.jsx(L.Fragment,{children:L.jsx("div",{className:"flex flex-col items-center h-screen w-screen",children:L.jsxs("div",{className:"flex flex-row items-center gap-x-8 m-auto",children:[L.jsx("div",{children:L.jsx("h1",{className:"text-4xl text-bold font-sans antialiased text-blue-700 tracking-wide",children:"fs-tracer"})}),L.jsx("div",{className:"block max-w-sm p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700",children:L.jsxs("div",{className:"mx-7 my-5",children:[L.jsx("h5",{className:"mb-2 text-2xl font-bold font-sans antialiased text-gray-900",children:"Hello!"}),L.jsxs("div",{className:"flex flex-row items-center gap-2",children:[L.jsx("span",{className:"font-normal text-gray-700 dark:text-gray-400",children:"Continue with"}),L.jsx("span",{children:L.jsx(wS,{clientId:"952965459060-nrnrsdoq22mf646vfa72hk410pvdda5q.apps.googleusercontent.com",children:L.jsx(SS,{onSuccess:async n=>{await t.supabase.auth.signInWithIdToken({provider:"google",token:n.credential})},onError:()=>{console.log("Login Failed")},width:7777,size:"large",type:"icon"})})})]})]})})]})})})}function ES(t){const e=fc();return E.useEffect(()=>{(async()=>{await t.supabase.auth.signOut()})(),e("/login")},[t.session]),L.jsx(L.Fragment,{})}const rl=rx("https://slpoocycjgqsuoedhkbn.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InNscG9vY3ljamdxc3VvZWRoa2JuIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTUyMDU0MjUsImV4cCI6MjAzMDc4MTQyNX0.xZYRTRN65rlms1Hb96IBAQvw3EGtMzUxlGPP5TVey34");function PS(){const[t,e]=E.useState(null);return L.jsx(L.Fragment,{children:L.jsx(y_,{basename:"/fs-tracer-frontend",children:L.jsxs(p_,{children:[L.jsx(ar,{index:!0,element:L.jsx(vS,{supabase:rl,session:t})}),L.jsx(ar,{path:"login",element:L.jsx(CS,{supabase:rl,session:t,setSession:e})}),L.jsx(ar,{path:"logout",element:L.jsx(ES,{supabase:rl,session:t,setSession:e})}),L.jsx(ar,{path:"*",element:L.jsx("p",{children:"notfound"})})]})})})}sl.createRoot(document.getElementById("root")).render(L.jsx(Ni.StrictMode,{children:L.jsx(PS,{})}));export{Jm as g};
diff --git a/assets/index-C1q9-kv2.css b/assets/index-DvPzh0o3.css
index ef750c7..0cc029f 100644
--- a/assets/index-C1q9-kv2.css
+++ b/assets/index-DvPzh0o3.css
@@ -1 +1 @@
-*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.contents{display:contents}.font-bold{font-weight:700}.underline{text-decoration-line:underline}
+*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.relative{position:relative}.m-auto{margin:auto}.mx-7{margin-left:1.75rem;margin-right:1.75rem}.my-5{margin-top:1.25rem;margin-bottom:1.25rem}.mb-2{margin-bottom:.5rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.block{display:block}.flex{display:flex}.grid{display:grid}.contents{display:contents}.h-full{height:100%}.h-screen{height:100vh}.w-3\/12{width:25%}.w-full{width:100%}.w-screen{width:100vw}.min-w-\[240px\]{min-width:240px}.min-w-full{min-width:100%}.max-w-\[20rem\]{max-width:20rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.place-items-center{place-items:center}.items-center{align-items:center}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-clip-border{background-clip:border-box}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.text-start{text-align:start}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-normal{font-weight:400}.font-semibold{font-weight:600}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-normal{letter-spacing:0em}.tracking-wide{letter-spacing:.025em}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\:bg-opacity-80:hover{--tw-bg-opacity: .8}.focus\:bg-opacity-80:focus{--tw-bg-opacity: .8}.active\:bg-opacity-80:active{--tw-bg-opacity: .8}@media (prefers-color-scheme: dark){.dark\:border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity))}.dark\:bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.dark\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}}
diff --git a/index.html b/index.html
index 4cb3ce0..231e9d3 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,9 @@
     <meta charset="UTF-8" />
     <link rel="icon" type="image/svg+xml" href="vite.svg" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>Vite + React + TS</title>
+    <title>fs-tracer</title>
+    <link rel="stylesheet" 
+href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
     <script src="https://accounts.google.com/gsi/client" async></script>
     <!-- Start Single Page Apps for GitHub Pages -->
     <script type="text/javascript">
@@ -30,8 +32,8 @@
       }(window.location))
     </script>
     <!-- End Single Page Apps for GitHub Pages -->
-    <script type="module" crossorigin src="./assets/index-BWDOwrgR.js"></script>
-    <link rel="stylesheet" crossorigin href="./assets/index-C1q9-kv2.css">
+    <script type="module" crossorigin src="./assets/index-CCYnKuN0.js"></script>
+    <link rel="stylesheet" crossorigin href="./assets/index-DvPzh0o3.css">
   </head>
   <body>
     <div id="root"></div>